diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-01-28 09:30:32 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-01-28 09:30:32 -0500 |
| commit | 41ca5d4e9be11ea6ae040b51d9628a189fd82896 (patch) | |
| tree | f9c35cc37b9622f6cccd91b94548f44b9a534029 /arch/x86/mm | |
| parent | 0fcedc8631ec28ca25d3c0b116e8fa0c19dd5f6d (diff) | |
| parent | 3669ef9fa7d35f573ec9c0e0341b29251c2734a7 (diff) | |
Merge commit 3669ef9fa7d3 ("x86, tls: Interpret an all-zero struct user_desc as 'no segment'") into x86/asm
Pick up the latestest asm fixes before advancing it any further.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm')
| -rw-r--r-- | arch/x86/mm/mpx.c | 6 | ||||
| -rw-r--r-- | arch/x86/mm/pat.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index 67ebf5751222..c439ec478216 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c | |||
| @@ -349,6 +349,12 @@ static __user void *task_get_bounds_dir(struct task_struct *tsk) | |||
| 349 | return MPX_INVALID_BOUNDS_DIR; | 349 | return MPX_INVALID_BOUNDS_DIR; |
| 350 | 350 | ||
| 351 | /* | 351 | /* |
| 352 | * 32-bit binaries on 64-bit kernels are currently | ||
| 353 | * unsupported. | ||
| 354 | */ | ||
| 355 | if (IS_ENABLED(CONFIG_X86_64) && test_thread_flag(TIF_IA32)) | ||
| 356 | return MPX_INVALID_BOUNDS_DIR; | ||
| 357 | /* | ||
| 352 | * The bounds directory pointer is stored in a register | 358 | * The bounds directory pointer is stored in a register |
| 353 | * only accessible if we first do an xsave. | 359 | * only accessible if we first do an xsave. |
| 354 | */ | 360 | */ |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index edf299c8ff6c..7ac68698406c 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
| @@ -234,8 +234,13 @@ void pat_init(void) | |||
| 234 | PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, UC); | 234 | PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, UC); |
| 235 | 235 | ||
| 236 | /* Boot CPU check */ | 236 | /* Boot CPU check */ |
| 237 | if (!boot_pat_state) | 237 | if (!boot_pat_state) { |
| 238 | rdmsrl(MSR_IA32_CR_PAT, boot_pat_state); | 238 | rdmsrl(MSR_IA32_CR_PAT, boot_pat_state); |
| 239 | if (!boot_pat_state) { | ||
| 240 | pat_disable("PAT read returns always zero, disabled."); | ||
| 241 | return; | ||
| 242 | } | ||
| 243 | } | ||
| 239 | 244 | ||
| 240 | wrmsrl(MSR_IA32_CR_PAT, pat); | 245 | wrmsrl(MSR_IA32_CR_PAT, pat); |
| 241 | 246 | ||
