Page MenuHomeFreeBSD

libc: implement rtld_get_stack_prot() for real
ClosedPublic

Authored by kib on Sun, Jan 10, 3:12 AM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib requested review of this revision.Sun, Jan 10, 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.Sun, Jan 10, 3:35 AM
kib edited the summary of this revision. (Show Details)

Cache return value.

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