Date: Mon, 12 May 2025 12:50:18 GMT From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 8bfb456eafd3 - main - arm64: Raise a SIGILL if we fail reading an insn Message-ID: <202505121250.54CCoIhW082787@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8bfb456eafd34e2de89d2fb77af7a1d34474ca0d commit 8bfb456eafd34e2de89d2fb77af7a1d34474ca0d Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2025-05-12 11:04:05 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2025-05-12 11:04:05 +0000 arm64: Raise a SIGILL if we fail reading an insn When reading an instruction we may fail if another thread is unmapping a page while the current thread is executing from it. In this case raise a SIGILL rather than panicing the kernel. Reviewed by: harry.moulton_arm.com Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D50203 --- sys/arm64/arm64/undefined.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/undefined.c b/sys/arm64/arm64/undefined.c index c307281ea523..cdd2a083ec17 100644 --- a/sys/arm64/arm64/undefined.c +++ b/sys/arm64/arm64/undefined.c @@ -322,8 +322,9 @@ undef_insn(u_int el, struct trapframe *frame) if (el == 0) { ret = fueword32((uint32_t *)frame->tf_elr, &insn); + /* Raise a SIGILL if we are unable to read the instruction */ if (ret != 0) - panic("Unable to read userspace faulting instruction"); + return (0); } else { insn = *(uint32_t *)frame->tf_elr; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505121250.54CCoIhW082787>