git: 503f752a347f - main - sysent: retire unused SV_IA32
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 03 Jun 2025 23:02:41 UTC
The branch main has been updated by brooks:
URL: https://cgit.FreeBSD.org/src/commit/?id=503f752a347fdd74e406f3700dd2ad3bd770f302
commit 503f752a347fdd74e406f3700dd2ad3bd770f302
Author: Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2025-06-03 22:59:30 +0000
Commit: Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2025-06-03 22:59:30 +0000
sysent: retire unused SV_IA32
When COMPAT_IA32 was generaliaed to COMPAT_FREEBSD32 in 2010 (commit
841c0c7ec75b), all runtime uses of SV_IA32 were removed in favor of
SV_ILP32 check. Given SV_ILP32's existance it makes no
sense to dynamically check for SV_IA32 (even if we had a 32-bit x86 ABI
with 64-bit time_t we needed to differentiate, SV_IA32 would be the
wrong spelling.) As such, remove SV_IA32 and mark the bit reserved.
Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D50672
---
sys/amd64/linux32/linux32_sysvec.c | 2 +-
sys/compat/ia32/ia32_sysvec.c | 2 +-
sys/i386/i386/elf_machdep.c | 2 +-
sys/i386/linux/linux_sysvec.c | 4 ++--
sys/kern/imgact_aout.c | 6 ++----
sys/sys/sysent.h | 2 +-
6 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index a8cc03ea8c71..d7f87e2fdf34 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -799,7 +799,7 @@ struct sysentvec elf_linux_sysvec = {
.sv_setregs = linux_exec_setregs,
.sv_fixlimit = linux32_fixlimit,
.sv_maxssiz = &linux32_maxssiz,
- .sv_flags = SV_ABI_LINUX | SV_ILP32 | SV_IA32 | SV_SHP |
+ .sv_flags = SV_ABI_LINUX | SV_ILP32 | SV_SHP |
SV_SIG_DISCIGN | SV_SIG_WAITNDQ | SV_TIMEKEEP,
.sv_set_syscall_retval = linux32_set_syscall_retval,
.sv_fetch_syscall_args = linux32_fetch_syscall_args,
diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c
index 5174438bc40a..0ea7d072e911 100644
--- a/sys/compat/ia32/ia32_sysvec.c
+++ b/sys/compat/ia32/ia32_sysvec.c
@@ -126,7 +126,7 @@ struct sysentvec ia32_freebsd_sysvec = {
.sv_setregs = ia32_setregs,
.sv_fixlimit = ia32_fixlimit,
.sv_maxssiz = &ia32_maxssiz,
- .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_IA32 | SV_ILP32 |
+ .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_ILP32 |
SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER |
SV_DSO_SIG | SV_SIGSYS,
.sv_set_syscall_retval = ia32_set_syscall_retval,
diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c
index eb6ac5735e56..13769af0fbca 100644
--- a/sys/i386/i386/elf_machdep.c
+++ b/sys/i386/i386/elf_machdep.c
@@ -74,7 +74,7 @@ struct sysentvec elf32_freebsd_sysvec = {
.sv_setregs = exec_setregs,
.sv_fixlimit = NULL,
.sv_maxssiz = NULL,
- .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_IA32 | SV_ILP32 |
+ .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_ILP32 |
SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER | SV_SIGSYS,
.sv_set_syscall_retval = cpu_set_syscall_retval,
.sv_fetch_syscall_args = cpu_fetch_syscall_args,
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 24f8ec2d7ea8..c68a0e17a8e4 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -596,7 +596,7 @@ struct sysentvec linux_sysvec = {
.sv_setregs = linux_exec_setregs,
.sv_fixlimit = NULL,
.sv_maxssiz = NULL,
- .sv_flags = SV_ABI_LINUX | SV_AOUT | SV_IA32 | SV_ILP32 |
+ .sv_flags = SV_ABI_LINUX | SV_AOUT | SV_ILP32 |
SV_SIG_DISCIGN | SV_SIG_WAITNDQ,
.sv_set_syscall_retval = linux_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
@@ -638,7 +638,7 @@ struct sysentvec elf_linux_sysvec = {
.sv_setregs = linux_exec_setregs,
.sv_fixlimit = NULL,
.sv_maxssiz = NULL,
- .sv_flags = SV_ABI_LINUX | SV_IA32 | SV_ILP32 | SV_SHP |
+ .sv_flags = SV_ABI_LINUX | SV_ILP32 | SV_SHP |
SV_SIG_DISCIGN | SV_SIG_WAITNDQ | SV_TIMEKEEP,
.sv_set_syscall_retval = linux_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 0ecfaa65c84e..9978c74f0dee 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -90,8 +90,7 @@ struct sysentvec aout_sysvec = {
.sv_setregs = exec_setregs,
.sv_fixlimit = NULL,
.sv_maxssiz = NULL,
- .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32 |
- SV_SIGSYS,
+ .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_ILP32 | SV_SIGSYS,
.sv_set_syscall_retval = cpu_set_syscall_retval,
.sv_fetch_syscall_args = cpu_fetch_syscall_args,
.sv_syscallnames = syscallnames,
@@ -140,8 +139,7 @@ struct sysentvec aout_sysvec = {
.sv_setregs = ia32_setregs,
.sv_fixlimit = ia32_fixlimit,
.sv_maxssiz = &ia32_maxssiz,
- .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32 |
- SV_SIGSYS,
+ .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_ILP32 | SV_SIGSYS,
.sv_set_syscall_retval = ia32_set_syscall_retval,
.sv_fetch_syscall_args = ia32_fetch_syscall_args,
.sv_syscallnames = freebsd32_syscallnames,
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index c582ed494be9..dffe77de91d0 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -162,7 +162,7 @@ struct sysentvec {
#define SV_ILP32 0x000100 /* 32-bit executable. */
#define SV_LP64 0x000200 /* 64-bit executable. */
-#define SV_IA32 0x004000 /* Intel 32-bit executable. */
+#define SV_RESERVED0 0x004000 /* Formerly SV_IA32 */
#define SV_AOUT 0x008000 /* a.out executable. */
#define SV_SHP 0x010000 /* Shared page. */
#define SV_SIGSYS 0x020000 /* SIGSYS for non-existing syscall */