Re: [PATCH 0/3] Ensure default return thunk isn't used at runtime

From: Peter Zijlstra
Date: Tue Oct 10 2023 - 13:52:16 EST


On Tue, Oct 10, 2023 at 12:10:17PM -0500, David Kaplan wrote:

> 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(-)

Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

That said, I'm afraid we might have broken rethunk for i386 somewhere
along the SRSO series.

I suspect the easiest fix is to make CONFIG_RETHUNK hard depend on
x86_64 or something.