public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Compatibility issues around <sys/platform/x86.h>
Date: Tue, 22 Dec 2020 09:43:27 -0300	[thread overview]
Message-ID: <c2c669cb-3e9e-47e7-d1ee-e410c8b85c24@linaro.org> (raw)
In-Reply-To: <CAMe9rOoZhm=5+vKQO=3pD9xtcoaAmNtMT-Q5wk0mnJ4meC_69A@mail.gmail.com>



On 22/12/2020 08:42, H.J. Lu wrote:
> On Mon, Dec 21, 2020 at 9:16 AM Adhemerval Zanella via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
>>
>>
>>
>> On 21/12/2020 14:05, H.J. Lu via Libc-alpha wrote:
>>> On Mon, Dec 21, 2020 at 5:00 AM Florian Weimer <fweimer@redhat.com> wrote:
>>>>
>>>> I finally had some time to review the <sys/platform/x86.h> interface.
>>>>
>>>> I have two major concerns:
>>>>
>>>> (a) Placement of struct cpu_features in _rtld_global_ro
>>>>
>>>> This means that backporting new feature support changes the internal
>>>> GLIBC_PRIVATE ABI. Consequently, there's a race condition during
>>>> in-place updates where loading binaries can fail in obscure ways, due to
>>>> the change in _rtld_global_ro offsets.  We should really avoid this.
>>>
>>> This applies to all members in _rtld_global_ro.
>>
>> Couldn't it be mitigated by adding member solely at the end of the struct
>> and making sure the backport uses the same offset?
> 
> What if we need to extend a member in the middle?
> 

My question also extends if we would need to do so. Do we plan to extend
the cpu_features indefinitely or can we pre-allocate a large space now
for future extensions?

  reply	other threads:[~2020-12-22 12:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 13:00 Florian Weimer
2020-12-21 17:05 ` H.J. Lu
2020-12-21 17:15   ` Adhemerval Zanella
2020-12-22 11:42     ` H.J. Lu
2020-12-22 12:43       ` Adhemerval Zanella [this message]
2020-12-22 12:57         ` H.J. Lu
2020-12-22 11:42   ` H.J. Lu
2020-12-22 13:32   ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2c669cb-3e9e-47e7-d1ee-e410c8b85c24@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).