[PATCH v4 19/22] aarch64: Process gnu properties in static exe
Yury Khrustalev
yury.khrustalev@arm.com
Thu Dec 12 15:01:32 GMT 2024
Hello Adhemerval
On Tue, Dec 10, 2024 at 09:26:47AM +0000, Yury Khrustalev wrote:
> Hello Adhemerval
>
> On Fri, Dec 06, 2024 at 11:05:59AM -0300, Adhemerval Zanella Netto wrote:
> >
> >
> > On 06/12/24 08:55, Yury Khrustalev wrote:
> > > On Tue, Dec 03, 2024 at 03:56:45PM -0300, Adhemerval Zanella Netto wrote:
> > >>
> > >>
> > >> On 29/11/24 13:37, Yury Khrustalev wrote:
> > >>> From: Szabolcs Nagy <szabolcs.nagy@arm.com>
> > >>>
> > >>> Unlike for BTI, the kernel does not process GCS properties so update
> > >>> GL(dl_aarch64_gcs) before the GCS status is set.
> > >>
> > >> Although it would only used for aarch64, I think we should make this change
> > >> generic as I suggested for memory sealing support [1].
> > >>
> > >> [1] https://patchwork.sourceware.org/project/glibc/patch/20240930200831.1669010-3-adhemerval.zanella@linaro.org/
> > >
> > > I can see some similatiry however in the case of GCS it's crucial to initialise
> > > it as early as possible. In the patch [1] you referenced this setup would occur
> > > after a number of function calls (as far as I can tell from the sources).
> > >
> > > I agree that it makes sense to make this change generic eventually, but at this
> > > point I don't see how to do it. I'd like to leave it AArch64 specific for now.
> >
> > The main problem is to enable memory sealing would incur in double in processing
> > PT_GNU_PROPERTY multiple time, which its wasteful.
>
> This is a good point.
>
> > Maybe we can add another call to process the PT_NOTE / PT_GNU_PROPERTY prior
> > ARCH_SETUP_TLS (since notes/property processing should not rely on TCB
> > support).
>
> I have a patch for this ready and tested that replaces the one in this thread.
> It's not part of v5 [1] I've submitted last Friday. As soon as other patches in
> this series have been reviewed, I'll resend change to address your comments above.
> I hope this helps and won't delay merge of the whole seriese before the deadline
> for the upcoming release.
I've sent a patch that introduces generic function for processing PT_NOTE / PT_GNU_PROPERTY.
It is part of the v6 of the GCS series [1].
I would appreciate if you could review this as I hope to have this whole serience accepted
before the holidays.
Thanks,
Yury
[1] https://inbox.sourceware.org/libc-alpha/20241212143749.767747-1-yury.khrustalev@arm.com/
More information about the Libc-alpha
mailing list