All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Ensure default return thunk isn't used at runtime
@ 2023-10-10 17:10 David Kaplan
  2023-10-10 17:10 ` [PATCH 1/3] Revert "x86/retpoline: Remove .text..__x86.return_thunk section" David Kaplan
                   ` (5 more replies)
  0 siblings, 6 replies; 93+ messages in thread
From: David Kaplan @ 2023-10-10 17:10 UTC (permalink / raw)
  To: x86, luto; +Cc: linux-kernel

Several CPU side-channel mitigations require the use of a special return thunk.
The necessary return thunk is installed at runtime via apply_returns(), after
which point the default return thunk (__x86_return_thunk) should never be used.

Patch 3 enforces this by modifying __x86_return_thunk to be a ud2 after
alternatives are applied.  

Patch 1 reverts a recent commit which resulted in retpoline sequences not being
annotated as containing returns, which was leaving them using the default return
thunk.

Patch 2 fixes an issue where functions in vdso32-setup were using the default
return thunk because objtool was not being run on them in some cases.

David Kaplan (3):
  Revert "x86/retpoline: Remove .text..__x86.return_thunk section"
  x86/vdso: Run objtool on vdso32-setup
  x86/retpoline: Ensure default return thunk isn't used at runtime

 arch/x86/entry/vdso/Makefile  |  3 ++-
 arch/x86/kernel/vmlinux.lds.S |  3 +++
 arch/x86/lib/retpoline.S      | 10 +++++++---
 3 files changed, 12 insertions(+), 4 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 93+ messages in thread

end of thread, other threads:[~2024-10-04 19:38 UTC | newest]

Thread overview: 93+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-10 17:10 [PATCH 0/3] Ensure default return thunk isn't used at runtime David Kaplan
2023-10-10 17:10 ` [PATCH 1/3] Revert "x86/retpoline: Remove .text..__x86.return_thunk section" David Kaplan
2023-10-10 17:48   ` Peter Zijlstra
2023-10-10 19:57     ` Josh Poimboeuf
2023-10-10 20:04       ` Borislav Petkov
2023-10-10 20:19         ` Josh Poimboeuf
2023-10-10 20:40           ` Kaplan, David
2023-10-10 21:22           ` Josh Poimboeuf
2023-10-11  7:41             ` Peter Zijlstra
2023-10-11  9:34               ` Borislav Petkov
2023-10-11 16:28               ` Josh Poimboeuf
2023-10-11 22:35                 ` Peter Zijlstra
2023-10-11 22:42                   ` Ingo Molnar
2023-10-12  2:27                   ` Josh Poimboeuf
2023-10-12  2:47                     ` [PATCH v2] objtool: Fix return thunk patching in retpolines Josh Poimboeuf
2023-10-12  6:25                       ` [tip: x86/bugs] " tip-bot2 for Josh Poimboeuf
2023-10-12  8:16                       ` [PATCH v2] " Peter Zijlstra
2023-10-12 17:50                       ` [tip: x86/bugs] " tip-bot2 for Josh Poimboeuf
2023-10-20 11:37                       ` tip-bot2 for Josh Poimboeuf
2023-10-12  8:16                     ` [PATCH 1/3] Revert "x86/retpoline: Remove .text..__x86.return_thunk section" Peter Zijlstra
2023-10-10 17:10 ` [PATCH 2/3] x86/vdso: Run objtool on vdso32-setup David Kaplan
2023-10-12 17:50   ` [tip: x86/bugs] x86/vdso: Run objtool on vdso32-setup.o tip-bot2 for David Kaplan
2023-10-20 11:37   ` tip-bot2 for David Kaplan
2023-10-10 17:10 ` [PATCH 3/3] x86/retpoline: Ensure default return thunk isn't used at runtime David Kaplan
2023-10-10 19:36   ` Josh Poimboeuf
2023-10-10 20:14     ` Kaplan, David
2023-10-10 20:41       ` Josh Poimboeuf
2023-10-12 14:10         ` [PATCH -v2] " Borislav Petkov
2023-10-12 17:11           ` Josh Poimboeuf
2023-10-12 17:50           ` [tip: x86/bugs] " tip-bot2 for David Kaplan
2023-10-16 21:10             ` Nathan Chancellor
2023-10-16 21:29               ` Borislav Petkov
2023-10-16 21:48                 ` Nathan Chancellor
2023-10-17  4:31                   ` Kaplan, David
2023-10-17  5:28                     ` Josh Poimboeuf
2023-10-17 13:54                       ` Kaplan, David
2023-10-17 15:24                       ` Nick Desaulniers
2023-10-17 15:26                         ` Marco Elver
2023-10-17 15:32                       ` Nathan Chancellor
2023-10-17 16:59                         ` [PATCH] x86/srso: Fix panic in return thunk during boot Josh Poimboeuf
2023-10-17 17:52                           ` [tip: x86/bugs] x86/retpoline: Make sure there are no unconverted return thunks due to KCSAN tip-bot2 for Josh Poimboeuf
2023-10-20 11:37                           ` tip-bot2 for Josh Poimboeuf
2023-10-18 13:23             ` [tip: x86/bugs] x86/retpoline: Ensure default return thunk isn't used at runtime Borislav Petkov
2023-10-18 13:38               ` Ingo Molnar
2023-10-18 15:12                 ` Borislav Petkov
2023-10-18 15:54                   ` Josh Poimboeuf
2023-10-18 17:55                     ` Borislav Petkov
2023-10-18 18:14                       ` Josh Poimboeuf
2023-10-18 18:22                         ` Borislav Petkov
2023-10-18 18:39                           ` Josh Poimboeuf
2023-10-18 18:44                             ` Borislav Petkov
2023-10-18 19:14                               ` Josh Poimboeuf
2023-10-18 20:04                                 ` Borislav Petkov
2023-10-18 20:37                       ` Borislav Petkov
2023-10-19  6:35                         ` Josh Poimboeuf
2023-10-19  6:59                           ` Josh Poimboeuf
2023-10-19 14:15                             ` Borislav Petkov
2023-10-19 14:21                               ` Kaplan, David
2023-10-19 14:39                                 ` Borislav Petkov
2023-10-19 15:20                                   ` Josh Poimboeuf
2023-10-24 20:19                                     ` Borislav Petkov
2024-01-03 18:46                                       ` Borislav Petkov
2024-01-04 13:12                                         ` Borislav Petkov
2024-01-04 13:24                                           ` [PATCH -v2] " Borislav Petkov
2024-01-04 13:26                                             ` Borislav Petkov
2024-02-07 17:50                                               ` Josh Poimboeuf
2024-02-07 18:53                                                 ` Borislav Petkov
2024-02-07 19:49                                                   ` Josh Poimboeuf
2024-02-12 10:43                                                     ` Borislav Petkov
2024-04-03 17:10                                                       ` Klara Modin
2024-04-03 17:30                                                         ` Borislav Petkov
2024-04-03 20:26                                                           ` Klara Modin
2024-04-03 20:41                                                             ` Borislav Petkov
2024-04-03 22:25                                                               ` Klara Modin
2024-04-04 14:44                                                                 ` Borislav Petkov
2024-04-16  9:27                                                         ` Borislav Petkov
2024-04-17  3:59                                                           ` Klara Modin
2024-04-17 16:20                                                         ` [tip: x86/urgent] x86/retpolines: Enable the default thunk warning only on relevant configs tip-bot2 for Borislav Petkov (AMD)
2023-10-19  7:43                         ` [tip: x86/bugs] x86/retpoline: Ensure default return thunk isn't used at runtime Peter Zijlstra
2023-10-19  9:40                       ` [tip: x86/bugs] Revert "x86/retpoline: Remove .text..__x86.return_thunk section" tip-bot2 for Borislav Petkov (AMD)
2023-10-19  9:40                       ` [tip: x86/bugs] Revert "x86/retpoline: Ensure default return thunk isn't used at runtime" tip-bot2 for Borislav Petkov (AMD)
2024-10-04 19:37                         ` Peter Zijlstra
2024-02-12 14:13   ` [tip: x86/bugs] x86/retpoline: Ensure default return thunk isn't used at runtime tip-bot2 for Josh Poimboeuf
2024-02-15  3:20     ` Nathan Chancellor
2024-02-15  8:30       ` Nikolay Borisov
2024-02-15 15:53       ` Borislav Petkov
2024-02-16  5:42         ` Josh Poimboeuf
2024-02-16 21:27           ` Borislav Petkov
2024-02-20  5:57             ` [PATCH] x86/vdso: Fix rethunk patching for vdso-image-{32,64}.o Josh Poimboeuf
2024-02-20 12:31       ` [tip: x86/core] " tip-bot2 for Josh Poimboeuf
2023-10-10 17:52 ` [PATCH 0/3] Ensure default return thunk isn't used at runtime Peter Zijlstra
2023-10-20 11:28 ` Subject: [PATCH] x86/retpoline: Document some thunk handling aspects (was: Re: [PATCH 0/3] Ensure default return thunk isn't used at runtime) Borislav Petkov
2023-10-20 11:37 ` [tip: x86/bugs] x86/retpoline: Document some thunk handling aspects tip-bot2 for Borislav Petkov (AMD)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.