| .. | .. |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | #include <asm/cpufeature.h> /* boot_cpu_has, ... */ |
|---|
| 12 | 12 | #include <asm/mmu_context.h> /* vma_pkey() */ |
|---|
| 13 | | -#include <asm/fpu/internal.h> /* init_fpstate */ |
|---|
| 14 | 13 | |
|---|
| 15 | 14 | int __execute_only_pkey(struct mm_struct *mm) |
|---|
| 16 | 15 | { |
|---|
| .. | .. |
|---|
| 154 | 153 | static ssize_t init_pkru_write_file(struct file *file, |
|---|
| 155 | 154 | const char __user *user_buf, size_t count, loff_t *ppos) |
|---|
| 156 | 155 | { |
|---|
| 157 | | - struct pkru_state *pk; |
|---|
| 158 | 156 | char buf[32]; |
|---|
| 159 | 157 | ssize_t len; |
|---|
| 160 | 158 | u32 new_init_pkru; |
|---|
| .. | .. |
|---|
| 177 | 175 | return -EINVAL; |
|---|
| 178 | 176 | |
|---|
| 179 | 177 | 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; |
|---|
| 184 | 178 | return count; |
|---|
| 185 | 179 | } |
|---|
| 186 | 180 | |
|---|