]> git.baikalelectronics.ru Git - kernel.git/commit
x86/vdso: Fix vDSO build if a retpoline is emitted
authorAndy Lutomirski <luto@kernel.org>
Thu, 16 Aug 2018 19:41:15 +0000 (12:41 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 20 Aug 2018 16:04:41 +0000 (18:04 +0200)
commit0b3e559a77dd455f49b91ac61b6c914e43f488ce
tree0fda84bdf28d9eda10549cbc8327bd73ab12decf
parent438c433264938f968e06343309d5224e30a0e5e5
x86/vdso: Fix vDSO build if a retpoline is emitted

Currently, if the vDSO ends up containing an indirect branch or
call, GCC will emit the "external thunk" style of retpoline, and it
will fail to link.

Fix it by building the vDSO with inline retpoline thunks.

I haven't seen any reports of this triggering on an unpatched
kernel.

Fixes: commit 492da428ad04 ("x86/retpoline: Add initial retpoline support")
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Matt Rickard <matt@softrans.com.au>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Vas Dias <jason.vas.dias@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/c76538cd3afbe19c6246c2d1715bc6a60bd63985.1534448381.git.luto@kernel.org
Makefile
arch/x86/entry/vdso/Makefile