[PATCH v5 1/1] <sys/tagged-address.h>: An API for tagged address

H.J. Lu hjl.tools@gmail.com
Fri Aug 20 16:30:00 GMT 2021


On Fri, Aug 20, 2021 at 9:25 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > On Thu, Aug 12, 2021 at 5:01 AM Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> >>
> >> The 08/12/2021 10:36, Florian Weimer wrote:
> >> > * H. J. Lu:
> >> > > +@deftypefun int set_tagged_address_mask (uintptr_t @var{mask})
> >> > > +@standards{GNU, sys/tagged-address.h}
> >> > > +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
> >> > > +Set the mask for address bits used in address translation to @var{mask}.
> >> > > +Only bits set in @var{mask} will be used in address translation.  The
> >> > > +return value is @code{0} on success and @code{-1} on failure.  This
> >> > > +function can be called only once before @code{main}.
> >> >
> >> > Again the restriction around @code{main} is unclear.  If it's “before
> >> > allocating memory” or “before starting threads”, than we should say
> >> > that.
> >>
> >> it should be at least before thread creation on aarch64.
> >
> > Before main is before thread creation and before main is safer
> > than before thread creation.
>
> You can create threads from ELF constructors, and those run before main.
> (Although this tends to run into deadlocks in our implementation.)

I will change the wording to before man AND thread creation.

-- 
H.J.


More information about the Libc-alpha mailing list