summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2025-03-25 03:01:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:33:35 +0200
commitb92e9f7565d9b5e936c66669616e1dad4ec06171 (patch)
tree6abe363ec36bb7b6fa8d92595fa7e4b17343a023 /drivers
parentbb2cb55064ab903b09668f28397c165e8a9c8b8a (diff)
downloadlinux-b92e9f7565d9b5e936c66669616e1dad4ec06171.tar.gz
linux-b92e9f7565d9b5e936c66669616e1dad4ec06171.tar.bz2
linux-b92e9f7565d9b5e936c66669616e1dad4ec06171.zip
x86/entry: Fix ORC unwinder for PUSH_REGS with save_ret=1
[ Upstream commit 57e2428f8df8263275344566e02c277648a4b7f1 ] PUSH_REGS with save_ret=1 is used by interrupt entry helper functions that initially start with a UNWIND_HINT_FUNC ORC state. However, save_ret=1 means that we clobber the helper function's return address (and then later restore the return address further down on the stack); after that point, the only thing on the stack we can unwind through is the IRET frame, so use UNWIND_HINT_IRET_REGS until we have a full pt_regs frame. ( An alternate approach would be to move the pt_regs->di overwrite down such that it is the final step of pt_regs setup; but I don't want to rearrange entry code just to make unwinding a tiny bit more elegant. ) Fixes: 9e809d15d6b6 ("x86/entry: Reduce the code footprint of the 'idtentry' macro") Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Brian Gerst <brgerst@gmail.com> Cc: Juergen Gross <jgross@suse.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Kees Cook <keescook@chromium.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20250325-2025-03-unwind-fixes-v1-1-acd774364768@google.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions