hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/x86/mm/pkeys.c
....@@ -10,7 +10,6 @@
1010
1111 #include <asm/cpufeature.h> /* boot_cpu_has, ... */
1212 #include <asm/mmu_context.h> /* vma_pkey() */
13
-#include <asm/fpu/internal.h> /* init_fpstate */
1413
1514 int __execute_only_pkey(struct mm_struct *mm)
1615 {
....@@ -154,7 +153,6 @@
154153 static ssize_t init_pkru_write_file(struct file *file,
155154 const char __user *user_buf, size_t count, loff_t *ppos)
156155 {
157
- struct pkru_state *pk;
158156 char buf[32];
159157 ssize_t len;
160158 u32 new_init_pkru;
....@@ -177,10 +175,6 @@
177175 return -EINVAL;
178176
179177 WRITE_ONCE(init_pkru_value, new_init_pkru);
180
- pk = get_xsave_addr(&init_fpstate.xsave, XFEATURE_PKRU);
181
- if (!pk)
182
- return -EINVAL;
183
- pk->pkru = new_init_pkru;
184178 return count;
185179 }
186180