Page MenuHomeFreeBSD

D57992.diff
No OneTemporary

D57992.diff

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

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)

Event Timeline