diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-12 23:40:35 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-12 23:52:27 -0400 |
commit | eb4ec8d4b0d5d596c67dc2baf935df30e27fbb71 (patch) | |
tree | 96e8ab35736afbc53824f499c30c840e7e521390 /sys/include/arch | |
parent | a63b1db5237e4b62a2137a7ee32326497aab6e14 (diff) |
kernel/amd64: Ensure CR4.UMIP is set by default
To prevent user programs from performing any operations related to
system memory structures (such as the GDT, TSS, etc), we will always set
CR4.UMIP if possible to improve the security of Hyra.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch')
-rw-r--r-- | sys/include/arch/amd64/cpu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h index b02ed5f..3dadebd 100644 --- a/sys/include/arch/amd64/cpu.h +++ b/sys/include/arch/amd64/cpu.h @@ -44,6 +44,7 @@ /* Feature bits */ #define CPU_FEAT_SMAP BIT(0) #define CPU_FEAT_SMEP BIT(1) +#define CPU_FEAT_UMIP BIT(2) /* CPU vendors */ #define CPU_VENDOR_OTHER 0x00000000 |