Date: Sat, 3 May 2025 15:20:11 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: c5e3af9013ef - stable/14 - elfctl: add knowledge about the la57 bit Message-ID: <202505031520.543FKBM4051342@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e3af9013efa1fe015eed0f580c6742f8a5ad8a commit c5e3af9013efa1fe015eed0f580c6742f8a5ad8a Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2025-04-19 10:47:45 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2025-05-03 15:19:41 +0000 elfctl: add knowledge about the la57 bit (cherry picked from commit b989c1dd1e2edc8cf7597d276625b454b7b72e6d) --- usr.bin/elfctl/elfctl.1 | 14 ++++++++++++++ usr.bin/elfctl/elfctl.c | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/usr.bin/elfctl/elfctl.1 b/usr.bin/elfctl/elfctl.1 index 5ba016b664a3..e72c6bcf250a 100644 --- a/usr.bin/elfctl/elfctl.1 +++ b/usr.bin/elfctl/elfctl.1 @@ -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 diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c index d9cb557bbad4..cacd30b44b2d 100644 --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -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[] = {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505031520.543FKBM4051342>