Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 May 2026 07:17:08 +0000
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: a42f95b71ed9 - stable/15 - amd64 ia32_syscall(): only allow for ILP32 processes
Message-ID:  <69f847f4.406dd.20adc89@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=a42f95b71ed946ad3d85f1b95daf0056abdc8345

commit a42f95b71ed946ad3d85f1b95daf0056abdc8345
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-04-25 09:49:08 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-05-04 07:16:39 +0000

    amd64 ia32_syscall(): only allow for ILP32 processes
    
    (cherry picked from commit bd8edba0792b71be3f8ed5dea9c22287e95c986a)
---
 sys/amd64/ia32/ia32_syscall.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/amd64/ia32/ia32_syscall.c b/sys/amd64/ia32/ia32_syscall.c
index 85e3d8f8e920..edafb753faa0 100644
--- a/sys/amd64/ia32/ia32_syscall.c
+++ b/sys/amd64/ia32/ia32_syscall.c
@@ -218,6 +218,15 @@ ia32_syscall(struct trapframe *frame)
 	orig_tf_rflags = frame->tf_rflags;
 	td = curthread;
 	td->td_frame = frame;
+	if (__predict_false(SV_PROC_FLAG(td->td_proc, SV_ILP32) == 0)) {
+		ksiginfo_init_trap(&ksi);
+		ksi.ksi_signo = SIGBUS;
+		ksi.ksi_code = BUS_OBJERR;
+		ksi.ksi_addr = (void *)frame->tf_rip;
+		trapsignal(td, &ksi);
+		userret(td, td->td_frame);
+		return;
+	}
 
 	syscallenter(td);
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f847f4.406dd.20adc89>