Page MenuHomeFreeBSD

Reserve WXNEEDED ELF feature control flag
ClosedPublic

Authored by emaste on Mar 1 2020, 9:24 PM.

Details

Summary

This will be used to tag binaries that require W+X mappings.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Looks perfectly reasonable to me.

This revision is now accepted and ready to land.Mar 1 2020, 9:44 PM

All other flags are called 'disabled'. It takes some efforts to realize that this flag also disables some feature.

I prefer that we tag the binaries with statements of fact (this binary makes W+X mappings) rather than demand policy decisions (turn off W^X mode), although for all existing cases it's not easy to succinctly state the fact. The other argument for wxneeded is that this is what the flag is already called by OpenBSD, and supported by lld there (as -z wxneeded). I'm also not sure the disable form (i.e., NT_FREEBSD_FCTL_DISABLE_WXORX) is more clear.

However this sort of discussion is the reason I posted it for review first, let's see what folks think.

Ok, commit whatever name you have now to have the bit reserved. Changing the name does not change ABI.

This revision was automatically updated to reflect the committed changes.