linux-stable/arch/x86/entry
Nathan Chancellor 96c5043a4d x86/vdso: Conditionally export __vdso_sgx_enter_enclave()
commit 45be2ad007 upstream.

Recently, ld.lld moved from '--undefined-version' to
'--no-undefined-version' as the default, which breaks building the vDSO
when CONFIG_X86_SGX is not set:

  ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined

__vdso_sgx_enter_enclave is only included in the vDSO when
CONFIG_X86_SGX is set. Only export it if it will be present in the final
object, which clears up the error.

Fixes: 8466436952 ("x86/vdso: Implement a vDSO for Intel SGX enclave call")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1756
Link: https://lore.kernel.org/r/20221109000306.1407357-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-21 17:48:01 +01:00
..
syscalls Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
vdso x86/vdso: Conditionally export __vdso_sgx_enter_enclave() 2022-12-21 17:48:01 +01:00
vsyscall x86/vsyscall_emu/64: Don't use RET in vsyscall emulation 2022-06-27 10:33:58 +02:00
calling.h x86/retbleed: Add fine grained Kconfig knobs 2022-06-29 17:43:41 +02:00
common.c X86 entry code related updates: 2021-06-29 12:44:51 -07:00
entry.S x86/bugs: Add retbleed=ibpb 2022-06-27 10:34:00 +02:00
entry_32.S x86/speculation: Fix RSB filling with CONFIG_RETPOLINE=n 2022-06-27 10:34:00 +02:00
entry_64.S x86/entry: Remove UNTRAIN_RET from native_irq_return_ldt 2022-07-14 09:45:12 +02:00
entry_64_compat.S x86/entry: Fix entry_INT80_compat for Xen PV guests 2022-08-16 10:02:52 +02:00
Makefile x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-04 12:23:50 +02:00
syscall_32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_64.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_x32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
thunk_32.S x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-04 12:23:50 +02:00
thunk_64.S x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-04 12:23:50 +02:00