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
F102929888: D28075.diff
Mon, Nov 18, 9:25 PM
Unknown Object (File)
Oct 2 2024, 5:05 AM
Unknown Object (File)
Sep 30 2024, 12:08 AM
Unknown Object (File)
Sep 27 2024, 3:49 AM
Unknown Object (File)
Sep 22 2024, 12:28 PM
Unknown Object (File)
Sep 16 2024, 7:55 PM
Unknown Object (File)
Sep 15 2024, 4:23 AM
Unknown Object (File)
Sep 5 2024, 3:55 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 Skipped
Unit
Tests Skipped

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.