Bug 22363 - Wrong platform is used for x32
Summary: Wrong platform is used for x32
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.27
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-29 01:38 UTC by H.J. Lu
Modified: 2017-11-02 10:59 UTC (History)
1 user (show)

See Also:
Host:
Target: x32
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2017-10-29 01:38:05 UTC
[hjl@gnu-tools-1 build-x86_64-linux]$ LD_SHOW_AUXV=1 elf/tst-align
AT_SYSINFO_EHDR: 0xffbb4000
AT_HWCAP:        bfebfbff
AT_PAGESZ:       4096
AT_CLKTCK:       100
AT_PHDR:         0x400034
AT_PHENT:        32
AT_PHNUM:        9
AT_BASE:         0xf7d5b000
AT_FLAGS:        0x0
AT_ENTRY:        0x400f10
AT_UID:          1000
AT_EUID:         1000
AT_GID:          1000
AT_EGID:         1000
AT_SECURE:       0
AT_RANDOM:       0xffabe5fb
AT_HWCAP2:       0x0
AT_EXECFN:       elf/tst-align
AT_PLATFORM:     i686
^^^^^^^^^^^^^^^^^^^^^^^^^ This should be x86_64.
__int128:  18 0xffabde60 16
double:  12 0xffabde58 8
ldouble: 15 0xffabde70 16
__int128:  18 0xffabe020 16
double:  12 0xffabe018 8
ldouble: 15 0xffabe030 16
[hjl@gnu-tools-1 build-x86_64-linux]$
Comment 1 cvs-commit@gcc.gnu.org 2017-10-29 21:16:49 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr22363/master has been created
        at  7d6fbf5876d66e319ed4d1e0881528b70d84c44e (commit)

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7d6fbf5876d66e319ed4d1e0881528b70d84c44e

commit 7d6fbf5876d66e319ed4d1e0881528b70d84c44e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Oct 29 14:12:01 2017 -0700

    x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363]
    
    Set dl_platform to "x86_64" for x32 by default since kernel may set it
    to "i686".  This fixed:
    
    FAIL: elf/tst-platform-1
    
    on x32.  Tested on x86-64 and x32.
    
    	[BZ #22363]
    	* sysdeps/x86/cpu-features.c (init_cpu_features): Set
    	GLRO(dl_platform) to "x86_64" by default for x32.

-----------------------------------------------------------------------