Page MenuHomeFreeBSD

D48964.diff
No OneTemporary

D48964.diff

diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -59,6 +59,7 @@
#include <sys/sched.h>
#include <sys/signalvar.h>
#include <sys/syscallsubr.h>
+#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
#include <sys/ucontext.h>
@@ -173,6 +174,21 @@
SYSINIT(ssp_warn2, SI_SUB_LAST, SI_ORDER_ANY, print_ssp_warning, NULL);
#endif
+static int
+sysctl_current_el(SYSCTL_HANDLER_ARGS)
+{
+ int error, el;
+
+ el = (READ_SPECIALREG(CurrentEL) & CURRENTEL_EL_MASK) >>
+ CURRENTEL_EL_SHIFT;
+ error = sysctl_handle_int(oidp, &el, 0, req);
+ if (error == 0 && req->newptr != NULL)
+ return (EINVAL);
+ return (error);
+}
+SYSCTL_PROC(_machdep, OID_AUTO, current_el, CTLTYPE_INT | CTLFLAG_RD,
+ NULL, 0, sysctl_current_el, "I", "Kernel exception level");
+
static bool
pan_check(const struct cpu_feat *feat __unused, u_int midr __unused)
{

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 14, 3:40 AM (19 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16629434
Default Alt Text
D48964.diff (953 B)

Event Timeline