This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv3] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: munroesj at linux dot vnet dot ibm dot com
- Cc: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>, Peter Bergner <bergner at vnet dot ibm dot com>, Roland McGrath <roland at hack dot frob dot com>, Joseph Myers <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>, Tulio Machado <tuliom at linux dot vnet dot ibm dot com>, "Steven J. Munroe" <sjmunroe at us dot ibm dot com>
- Date: Fri, 9 Oct 2015 15:57:57 -0400
- Subject: Re: [PATCHv3] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB
- Authentication-results: sourceware.org; auth=none
- References: <4BE991CB-F601-4D63-A416-5991FE870FC4 at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1509232114070 dot 10585 at digraph dot polyomino dot org dot uk> <B650304C-6207-46AC-B6A8-FA29959B305D at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1509232141250 dot 10585 at digraph dot polyomino dot org dot uk> <1443046986 dot 23503 dot 68 dot camel at otta> <alpine dot DEB dot 2 dot 10 dot 1509232234500 dot 10585 at digraph dot polyomino dot org dot uk> <1443050731 dot 23503 dot 78 dot camel at otta> <alpine dot DEB dot 2 dot 10 dot 1509232340470 dot 10585 at digraph dot polyomino dot org dot uk> <1443057751 dot 13186 dot 6 dot camel at otta> <alpine dot DEB dot 2 dot 10 dot 1509240126140 dot 10585 at digraph dot polyomino dot org dot uk> <1443058522 dot 13186 dot 9 dot camel at otta> <1443654009 dot 4885 dot 4 dot camel at oc7878010663> <B2EB15A6-FEB5-4DBA-8719-0BAA5B65EF5E at linux dot vnet dot ibm dot com> <5615CD5D dot 1080409 at redhat dot com> <1444318222 dot 12222 dot 8 dot camel at oc7878010663>
On 10/08/2015 11:30 AM, Steven Munroe wrote:
>> (a) Reference to GLIBC_2.23 in ppc.h functions?
>>
>> It is clear that Peter Bergner is going to use gcc to emit code that
>> references the TCB offsets directly to produce the builtins, and that
>> a data reference to __parse_hwcap_and_convert_at_platform will ensure
>> the application depends on a versioned dependency of GLIBC_2.23 to
>> avoid application compatibility issues.
>>
>> However, it doesn't appear that __ppc_get_hwcap or __ppc_get_at_platform
>> generate any references to __parse_hwcap_and_convert_at_platform? These
>> two functions as added in the manual could be used by applications
>> directly by including the platform header and calling those functions.
>> Such applications would have no such references to __parse* and as such
>> would not be protected by the dynamic loader library version checking.
>> The same referecne to __parse_hwcap_and_convert_at_platform as gcc is
>> using needs to be emitted in the inline assembly from those functions
>> and you should double check that using these functions results in a binary
>> that has a reference to a GLIBC_2.23 versioned symbol, and that running
>> it on an older glibc causes an error.
>>
>
> We can drop these (__ppc_get_hwcap or __ppc_get_at_platform) if we can
> guarantee that the TCB fields are initialized before we need to run
> library init or CTORs. This guarantee applies to static and dynamic
> linking.
That's up to you to prove by looking at the places where you've added
the initialization sequences. My guess is that you're probably good because
all of these sequences are run before main and before any thread is created
and before any CTORs are run. I'd like you to verify that though.
In which case the next steps are:
- Remove ppc.h functions.
- Verify all init is done before CTORs
- Post smaller v4 patch.
Cheers,
Carlos.