Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162742934
D57992.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
987 B
Referenced Files
None
Subscribers
None
D57992.diff
View Options
diff --git a/sys/arm64/arm64/mte.c b/sys/arm64/arm64/mte.c
--- a/sys/arm64/arm64/mte.c
+++ b/sys/arm64/arm64/mte.c
@@ -38,7 +38,7 @@
#include <vm/vm_page.h>
/* Version of MTE implemented. 0 == unimplemented */
-static u_int __read_mostly mte_version = 0;
+static int __read_mostly mte_version = 0;
/*
* FEAT_MTE (mte_version == 1) has userspace instructions, but no tag
@@ -49,6 +49,13 @@
struct thread *mte_switch(struct thread *);
+bool
+mte_enabled(void)
+{
+ MPASS(mte_version >= 0);
+ return (MTE_HAS_TAG_CHECK);
+}
+
#define load_tags(addr) ({ \
uint64_t __val; \
asm volatile( \
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -278,6 +278,7 @@
#endif
/* Memory Tagging Extension (MTE) support */
+bool mte_enabled(void);
void mte_fork(struct thread *, struct thread *);
void mte_exec(struct thread *);
void mte_copy_thread(struct thread *, struct thread *);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 17, 10:22 AM (3 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35163090
Default Alt Text
D57992.diff (987 B)
Attached To
Mode
D57992: arm64: Add mte_enabled to see if MTE is enabled
Attached
Detach File
Event Timeline
Log In to Comment