Bug 15905 - [ARM] IFUNC support broken for REL relocs.
Summary: [ARM] IFUNC support broken for REL relocs.
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: Carlos O'Donell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-29 03:46 UTC by Carlos O'Donell
Modified: 2014-06-13 12:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos O'Donell 2013-08-29 03:46:47 UTC
On ARM in dl-machine.h (elf_machine_rel) when handling R_ARM_IRELATIVE relocations for STT_GNU_IFUNC we fail to pass dl_hwcap to the IFUNC resolver resulting in the wrong function being selected for the current hardware.

When building glibc with multi-arch support and the VFP ABI this will cause the NEON variants of functions to be selected even though NEON hardware might not be present.

On hardware without NEON support the built glibc will fail to run correctly. This is immediately obvious as most of the testsuite will fail with SIGILL on this hardware.
Comment 1 Carlos O'Donell 2013-08-29 04:02:56 UTC
Posted patch:
http://sourceware.org/ml/libc-ports/2013-08/msg00053.html
Comment 2 Carlos O'Donell 2013-08-29 04:24:29 UTC
commit d0721e703d222c01a9e8c329311c4fb01dac6972
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Thu Aug 29 00:17:33 2013 -0400

    ARM: Pass dl_hwcap to IFUNC resolver.
    
    For REL relocs pass dl_hwcap to the IFUNC resolver
    as is required by the IFUNC API (bug 15905).