Date: Tue, 30 May 2017 13:21:43 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319206 - stable/11/sys/arm64/arm64 Message-ID: <201705301321.v4UDLhYb009963@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Tue May 30 13:21:43 2017 New Revision: 319206 URL: https://svnweb.freebsd.org/changeset/base/319206 Log: MFC r317197: Restrict the arm64 supervisor all instructions to only allow a zero immediate value for system calls. We may wish to use other values in the future for other purposes. Modified: stable/11/sys/arm64/arm64/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/trap.c ============================================================================== --- stable/11/sys/arm64/arm64/trap.c Tue May 30 13:16:06 2017 (r319205) +++ stable/11/sys/arm64/arm64/trap.c Tue May 30 13:21:43 2017 (r319206) @@ -135,8 +135,13 @@ svc_handler(struct thread *td, struct trapframe *frame struct syscall_args sa; int error; - error = syscallenter(td, &sa); - syscallret(td, error, &sa); + if ((frame->tf_esr & ESR_ELx_ISS_MASK) == 0) { + error = syscallenter(td, &sa); + syscallret(td, error, &sa); + } else { + call_trapsignal(td, SIGILL, ILL_ILLOPN, (void *)frame->tf_elr); + userret(td, frame); + } } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705301321.v4UDLhYb009963>