This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] aarch64: simplify the DT_AARCH64_VARIANT_PCS handling code
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: nd <nd at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 11 Jul 2019 13:36:06 +0000
- Subject: Re: [PATCH] aarch64: simplify the DT_AARCH64_VARIANT_PCS handling code
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zHTTYEyawgLVt4jgBlt7eDLvFpO/OkC7RUKPNjDFVzc=; b=YZe6qf+eOcfjsLWdt357aD28TrJmwYLFdv5a/J596lKk7CTUrdWJBM4BlFuL8UL1dh3oz+FldE9YmFWKqvBtFf+lf3018KI3GTI+XUXqFbCKA20zQ8lp2sYV4xwNRJP2QnjgKHp76dE41iBE27Mo2uQTNtlbvfYXEpg6EwLTkx5ORK9490NNc24y4xtT0wU11qawV5yUpPMjmDe0QEE7lMhhIEwXkS8ydgu25vqmvO7J5yaSPpAGPUVIh4E8HyqAX2q2qZ9vnEdQ8F4E3voZBM61iySqiOFxmZL1g0Zq9hu7yS5NjnncmwwA/C+BiUouSiZizGBzRBhfsNSbrt+2xg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fKLJttIjuozlkNuMdmiTrC5xg1AFVsSsThnUvuqcFG354F4FDjoSrPKJ4wuNQ/GiwcCWAweMp903RZyCBi4A0LD8nuW8y+3JB5TgSkovhFPcUg2VURTt4fdvdQRcV8scC3Z70mx1TfFTWU1/jHJ13/J1LdNjJJeK/j6wnCTL5TJIb8u3x1L5n1ftVBWi7OTezLeAur6vAcLuWXhD83MNY/fUAgexPHuwC1+5FpTdaaVWfBEQS0L0tGCr7MPF+iCxlV5H9yALIpHQwwVIIhcmv5n+1jbpFl2P7veS0mM5GXwgGlxRP7GDUmCuwGxZfTvhi3cUmLMPZZX5JyMrK5rLHg==
- References: <2801f179-5700-651c-760d-24ebb27dab1b@arm.com> <b7e9030e-f1de-2113-a386-c00cb5ff39d4@arm.com> <8736jdoepc.fsf@mid.deneb.enyo.de> <6e0af245-2318-5396-91c7-3157aad5319d@arm.com>
On 11/07/2019 10:07, Szabolcs Nagy wrote:
> On 10/07/2019 20:46, Florian Weimer wrote:
>> * Szabolcs Nagy:
>>
>>> On 09/07/2019 13:55, Szabolcs Nagy wrote:
>>>> Remove unnecessary variant_pcs field: the dynamic tag can be checked
>>>> directly.
>>>>
>>>> I'll commit this tomorrow unless there are comments.
>>>> Then backport it with the variant pcs support to release branches
>>>> https://sourceware.org/ml/libc-alpha/2019-05/msg00523.html
>>>
>>> i was about to back port this but i wonder if
>>> glibc has policy that a release branch cannot
>>> change libc internal abi between dynamic linker
>>> and lib*.so to allow reliable updates?
>>>
>>> this patch changes the size of map->l_info array.
>>
>> The usual issue involves changing the size of _rtld_global and
>> _rtld_global_ro.
>>
>> I don't know to what extent libc and libdl access link maps directly,
>> without going through ld.so. I don't recall seeing anything like
>> that, but that doesn't mean much.
>
> i'll try to do some analysis, but e.g. l_tls_* is after l_info
> in struct link_map and i'd expect those to be accessed by
> libpthreads and ld.so as well.
>
i checked what happens with old ld.so but new lib*.so and
libc.so can call
EXTERN void (*_dl_rtld_lock_recursive) (void *);
member of the rtld_global struct in ld.so during a
__GI__dl_addr(ptmalloc_init,...) call, but there is a
EXTERN struct link_map _dl_rtld_map;
member before, so inconsistent link_map size across
libc and ld.so breaks this.
i suspect rtld_global._dl_tls_* and link_map->l_tls*
access would be broken too if execution could get there.