Extension Spotlight
Supm — Userspace Pointer Masking
Linux enables Supm automatically on 64-bit systems and aliases the capability to whichever pointer-masking extension (Smnpm or Ssnpm) firmware reports, ensuring the Explorer’s “Yes” status.
Kernel Config
arch/riscv/Kconfig
config RISCV_ISA_SUPM
bool "Supm extension for userspace pointer masking"
depends on 64BIT
default y
help
Add support for pointer masking in userspace (Supm) when the
underlying hardware extension (Smnpm or Ssnpm) is detected at boot.
If this option is disabled, userspace will be unable to use
the prctl(PR_{SET,GET}_TAGGED_ADDR_CTRL) API.
'default y' ties Supm exposure directly to firmware-reported hardware capabilities.
HWCAP Alias
arch/riscv/include/asm/hwcap.h
#ifdef CONFIG_RISCV_M_MODE
#define RISCV_ISA_EXT_SxAIA RISCV_ISA_EXT_SMAIA
#define RISCV_ISA_EXT_SUPM RISCV_ISA_EXT_SMNPM
#else
#define RISCV_ISA_EXT_SxAIA RISCV_ISA_EXT_SSAIA
#define RISCV_ISA_EXT_SUPM RISCV_ISA_EXT_SSNPM
#endif
The mapping surfaces Supm to user space whether the platform boots in M-mode ('Smpnm') or S-mode ('Ssnpm').