lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1506932521.14341.1594826794611.JavaMail.zimbra@efficios.com>
Date:   Wed, 15 Jul 2020 11:26:34 -0400 (EDT)
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     Florian Weimer <fweimer@...hat.com>
Cc:     carlos <carlos@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        paulmck <paulmck@...ux.ibm.com>,
        Boqun Feng <boqun.feng@...il.com>,
        "H. Peter Anvin" <hpa@...or.com>, Paul Turner <pjt@...gle.com>,
        linux-api <linux-api@...r.kernel.org>,
        Christian Brauner <christian.brauner@...ntu.com>
Subject: Re: [RFC PATCH 2/4] rseq: Allow extending struct rseq

----- On Jul 15, 2020, at 10:58 AM, Florian Weimer fweimer@...hat.com wrote:

> * Mathieu Desnoyers:
> 
>> ----- On Jul 15, 2020, at 9:42 AM, Florian Weimer fweimer@...hat.com wrote:
>>> * Mathieu Desnoyers:
>>> 
>> [...]
>>>> How would this allow early-rseq-adopter libraries to interact with
>>>> glibc ?
>>> 
>>> Under all extension proposals I've seen so far, early adopters are
>>> essentially incompatible with glibc rseq registration.  I don't think
>>> you can have it both ways.
>>
>> The basic question I'm not sure about is whether we are allowed to increase
>> the size and alignement of __rseq_abi from e.g. glibc 2.32 to glibc 2.33.
> 
> With the current mechanism (global TLS data symbol), we can do that
> using symbol versioning.  That means that we can only do this on a
> release boundary,

That should not be a problem.

> and that it's incompatible with other libraries which
> use an interposing unversioned symbol.

We have the freedom to define the ABI of this shared __rseq_abi symbol
right now. Maybe it's not such a good thing to let early adopters use
unversioned __rseq_abi symbols.

Let me wrap my head around this scenario then, please let me know if
I'm misunderstanding something:

1) glibc 2.32 exposes:
   __rseq_abi (GLIBC_2.32) with size == 32.
   __rseq_abi with size == 32 is available as a private symbol within glibc
   - both symbols alias the same contents.

2) glibc 2.33 exposes:
   __rseq_abi (GLIBC_2.32) with size == 32.
   __rseq_abi (GLIBC_2.33) with size == 64.
   __rseq_abi with size == 64 is available as a private symbol within glibc
   - the three symbols alias the same contents.

Then what happens if we have a program or preloaded library defining
__rseq_abi (without version) with size == 32 loaded with a glibc 2.33 ?

Or what happens if we have a program or preloaded libary defining
__rseq_abi (GLIBC_2.32) with size == 32 loaded with a glibc 2.33 ?

I wonder if "GLIBC_*" is the right version namespace for this. Considering
that the layout of this structure is defined by the Linux kernel UAPI, maybe
we'd want version named as "RSEQ_1.0", "RSEQ_2.0" or something similar.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ