arch/arm64/include/asm/mte-kasan.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/mte-kasan.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/mte-kasan.h- Extension
.h- Size
- 5836 bytes
- Lines
- 265
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
asm/compiler.hasm/cputype.hasm/mte-def.hlinux/types.h
Detected Declarations
function system_uses_mte_async_or_asymm_modefunction system_uses_mte_async_or_asymm_modefunction Flagfunction mte_enable_tcofunction __mte_disable_tco_asyncfunction __mte_enable_tco_asyncfunction mte_get_ptr_tagfunction mte_get_mem_tagfunction mte_get_random_tagfunction __stg_postfunction __stzg_postfunction __dc_gvafunction __dc_gzvafunction mte_set_mem_tag_rangefunction mte_disable_tcofunction mte_get_mem_tagfunction mte_get_random_tagfunction mte_set_mem_tag_range
Annotated Snippet
if (!dczid_dzp && size >= 2 * dczid_bs) {\
do { \
curr = stg_post(curr); \
} while (curr < end1); \
\
do { \
dc_gva(curr); \
curr += dczid_bs; \
} while (curr < end2); \
} \
\
while (curr < end3) \
curr = stg_post(curr); \
} while (0)
if (init)
SET_MEMTAG_RANGE(__stzg_post, __dc_gzva);
else
SET_MEMTAG_RANGE(__stg_post, __dc_gva);
#undef SET_MEMTAG_RANGE
}
void mte_enable_kernel_sync(void);
void mte_enable_kernel_async(void);
void mte_enable_kernel_asymm(void);
int mte_enable_kernel_store_only(void);
#else /* CONFIG_ARM64_MTE */
static inline void mte_disable_tco(void)
{
}
static inline void mte_enable_tco(void)
{
}
static inline void __mte_disable_tco_async(void)
{
}
static inline void __mte_enable_tco_async(void)
{
}
static inline u8 mte_get_ptr_tag(void *ptr)
{
return 0xFF;
}
static inline u8 mte_get_mem_tag(void *addr)
{
return 0xFF;
}
static inline u8 mte_get_random_tag(void)
{
return 0xFF;
}
static inline void mte_set_mem_tag_range(void *addr, size_t size,
u8 tag, bool init)
{
}
static inline void mte_enable_kernel_sync(void)
{
}
static inline void mte_enable_kernel_async(void)
{
}
static inline void mte_enable_kernel_asymm(void)
{
}
static inline int mte_enable_kernel_store_only(void)
{
return -EINVAL;
}
#endif /* CONFIG_ARM64_MTE */
#endif /* __ASSEMBLER__ */
#endif /* __ASM_MTE_KASAN_H */
Annotation
- Immediate include surface: `asm/compiler.h`, `asm/cputype.h`, `asm/mte-def.h`, `linux/types.h`.
- Detected declarations: `function system_uses_mte_async_or_asymm_mode`, `function system_uses_mte_async_or_asymm_mode`, `function Flag`, `function mte_enable_tco`, `function __mte_disable_tco_async`, `function __mte_enable_tco_async`, `function mte_get_ptr_tag`, `function mte_get_mem_tag`, `function mte_get_random_tag`, `function __stg_post`.
- Atlas domain: Architecture Layer / arch/arm64.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.