Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110062827
D48964.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
953 B
Referenced Files
None
Subscribers
None
D48964.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D48964: arm64: Add a sysctl to read the current exception level
Attached
Detach File
Event Timeline
Log In to Comment