diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-03-08 15:46:04 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-03-12 09:15:49 +0100 |
commit | ba08abca66d46381df60842f64f70099d5482b92 (patch) | |
tree | 4c95d9c8d8a57e79b4942d841fb45b1c787f7c90 /tools/thermal | |
parent | Linux 5.12-rc2 (diff) | |
download | linux-ba08abca66d46381df60842f64f70099d5482b92.tar.xz linux-ba08abca66d46381df60842f64f70099d5482b92.zip |
objtool,x86: Fix uaccess PUSHF/POPF validation
Commit ab234a260b1f ("x86/pv: Rework arch_local_irq_restore() to not
use popf") replaced "push %reg; popf" with something like: "test
$0x200, %reg; jz 1f; sti; 1:", which breaks the pushf/popf symmetry
that commit ea24213d8088 ("objtool: Add UACCESS validation") relies
on.
The result is:
drivers/gpu/drm/amd/amdgpu/si.o: warning: objtool: si_common_hw_init()+0xf36: PUSHF stack exhausted
Meanwhile, commit c9c324dc22aa ("objtool: Support stack layout changes
in alternatives") makes that we can actually use stack-ops in
alternatives, which means we can revert 1ff865e343c2 ("x86,smap: Fix
smap_{save,restore}() alternatives").
That in turn means we can limit the PUSHF/POPF handling of
ea24213d8088 to those instructions that are in alternatives.
Fixes: ab234a260b1f ("x86/pv: Rework arch_local_irq_restore() to not use popf")
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/YEY4rIbQYa5fnnEp@hirez.programming.kicks-ass.net
Diffstat (limited to 'tools/thermal')
0 files changed, 0 insertions, 0 deletions