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
Unknown Object (File)
Fri, Jan 17, 10:07 PM
Unknown Object (File)
Dec 11 2024, 3:25 AM
Unknown Object (File)
Nov 23 2024, 6:58 PM
Unknown Object (File)
Nov 19 2024, 12:28 AM
Unknown Object (File)
Nov 18 2024, 11:48 PM
Unknown Object (File)
Nov 18 2024, 9:25 PM
Unknown Object (File)
Oct 2 2024, 5:05 AM
Unknown Object (File)
Sep 30 2024, 12:08 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.