Page MenuHomeFreeBSD

libc: implement rtld_get_stack_prot() for real
ClosedPublic

Authored by kib on Jan 10 2021, 3:12 AM.
Tags
None
Referenced Files
F80130995: D28075.diff
Thu, Mar 28, 8:01 AM
Unknown Object (File)
Feb 11 2024, 5:13 PM
Unknown Object (File)
Dec 22 2023, 11:01 PM
Unknown Object (File)
Dec 21 2023, 1:27 AM
Unknown Object (File)
Dec 11 2023, 12:03 AM
Unknown Object (File)
Oct 10 2023, 8:43 PM
Unknown Object (File)
Sep 6 2023, 9:41 AM
Unknown Object (File)
Sep 6 2023, 3:07 AM
Subscribers
None

Details

Summary

which makes stack prot correct for not main threads created by binaries with statically linked libthr.

Cache result, but do not engage into full double-checked locking, since calculation of the return value is idempotent.

PR: 252549

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jan 10 2021, 3:12 AM
kib created this revision.

Looks good to me.

I wondered if we want to keep the calculated stack prot to avoid iterating over the phdrs for each created thread but the value seems limited, simplicity is probably better.

This revision is now accepted and ready to land.Jan 10 2021, 3:35 AM
kib edited the summary of this revision. (Show Details)

Cache return value.

This revision now requires review to proceed.Jan 10 2021, 3:51 AM
This revision is now accepted and ready to land.Jan 10 2021, 4:16 AM
This revision was automatically updated to reflect the committed changes.