diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-09-09 10:05:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-09-09 10:05:15 -0400 |
commit | 9a5682765a2e5f93cf2fe7b612b8072b18f0c68a (patch) | |
tree | a5a7667a1089a367677257ad36b3e3f144405b42 /arch/x86/kernel/dumpstack.c | |
parent | 3567994a05ba6490f6055650fbb892c926ae7fca (diff) | |
parent | 9bc4f28af75a91aea0ae383f50b0a430c4509303 (diff) |
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
"A set of fixes for x86:
- Prevent multiplication result truncation on 32bit. Introduced with
the early timestamp reworrk.
- Ensure microcode revision storage to be consistent under all
circumstances
- Prevent write tearing of PTEs
- Prevent confusion of user and kernel reegisters when dumping fatal
signals verbosely
- Make an error return value in a failure path of the vector
allocation negative. Returning EINVAL might the caller assume
success and causes further wreckage.
- A trivial kernel doc warning fix"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Use WRITE_ONCE() when setting PTEs
x86/apic/vector: Make error return value negative
x86/process: Don't mix user/kernel regs in 64bit __show_regs()
x86/tsc: Prevent result truncation on 32bit
x86: Fix kernel-doc atomic.h warnings
x86/microcode: Update the new microcode revision unconditionally
x86/microcode: Make sure boot_cpu_data.microcode is up-to-date
Diffstat (limited to 'arch/x86/kernel/dumpstack.c')
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index f56895106ccf..2b5886401e5f 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -146,7 +146,7 @@ static void show_regs_if_on_stack(struct stack_info *info, struct pt_regs *regs, | |||
146 | * they can be printed in the right context. | 146 | * they can be printed in the right context. |
147 | */ | 147 | */ |
148 | if (!partial && on_stack(info, regs, sizeof(*regs))) { | 148 | if (!partial && on_stack(info, regs, sizeof(*regs))) { |
149 | __show_regs(regs, 0); | 149 | __show_regs(regs, SHOW_REGS_SHORT); |
150 | 150 | ||
151 | } else if (partial && on_stack(info, (void *)regs + IRET_FRAME_OFFSET, | 151 | } else if (partial && on_stack(info, (void *)regs + IRET_FRAME_OFFSET, |
152 | IRET_FRAME_SIZE)) { | 152 | IRET_FRAME_SIZE)) { |
@@ -344,7 +344,7 @@ void oops_end(unsigned long flags, struct pt_regs *regs, int signr) | |||
344 | oops_exit(); | 344 | oops_exit(); |
345 | 345 | ||
346 | /* Executive summary in case the oops scrolled away */ | 346 | /* Executive summary in case the oops scrolled away */ |
347 | __show_regs(&exec_summary_regs, true); | 347 | __show_regs(&exec_summary_regs, SHOW_REGS_ALL); |
348 | 348 | ||
349 | if (!signr) | 349 | if (!signr) |
350 | return; | 350 | return; |
@@ -407,14 +407,9 @@ void die(const char *str, struct pt_regs *regs, long err) | |||
407 | 407 | ||
408 | void show_regs(struct pt_regs *regs) | 408 | void show_regs(struct pt_regs *regs) |
409 | { | 409 | { |
410 | bool all = true; | ||
411 | |||
412 | show_regs_print_info(KERN_DEFAULT); | 410 | show_regs_print_info(KERN_DEFAULT); |
413 | 411 | ||
414 | if (IS_ENABLED(CONFIG_X86_32)) | 412 | __show_regs(regs, user_mode(regs) ? SHOW_REGS_USER : SHOW_REGS_ALL); |
415 | all = !user_mode(regs); | ||
416 | |||
417 | __show_regs(regs, all); | ||
418 | 413 | ||
419 | /* | 414 | /* |
420 | * When in-kernel, we also print out the stack at the time of the fault.. | 415 | * When in-kernel, we also print out the stack at the time of the fault.. |