elfctl: add knowledge about the la57 bit

(cherry picked from commit b989c1dd1e)
This commit is contained in:
Konstantin Belousov committed 2025-05-03 18:19:41 +03:00
1 parent 64a8ac8c63
commit c5e3af9013
2 files changed
+18 -1

No files matched your search

+14
View File
@@ -95,6 +95,20 @@ Features may also be specified as a single combined value:
.Bd -literal -offset indent
elfctl -e =0x5 file
.Ed
.Sh NOTES
On amd64, on a machine with LA57 (5-level paging) mode supported and
enabled, if both
.Va la57
and
.Va la48
feature flags are specified, the
.Va la57
feature has priority over
.Va la48 .
The
.Va vm.pmap.prefer_uva_la48
sysctl MIB defines the default user address space size for binaries
which do not set either of these flags.
.Sh SEE ALSO
.Xr mitigations 7
.Sh HISTORY
+4 -1
View File
@@ -67,7 +67,10 @@ static struct ControlFeatures featurelist[] = {
"Disable implicit PROT_MAX" },
{ "nostackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" },
{ "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" },
{ "la48", NT_FREEBSD_FCTL_LA48, "amd64: Limit user VA to 48bit" },
{ "la48", NT_FREEBSD_FCTL_LA48,
"amd64: Limit user virtual addresses to 48 bits" },
{ "la57", NT_FREEBSD_FCTL_LA57,
"amd64: Allow the use of 57-bit virtual addresses when available" },
};
static struct option long_opts[] = {