x86/kexec: Disable RET on kexec
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 8 Jul 2022 17:10:11 +0000 (19:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jul 2022 10:54:11 +0000 (12:54 +0200)
commitdb0128b8243fe6f1004b07a622ab8f3bc7260be8
treea146ffbae73f1494ac3f0c50cd1f7a9d75b20795
parent3653093b7bbfa8c8c61858bffdc7f1e41ad436e1
x86/kexec: Disable RET on kexec

commit 697977d8415d61f3acbc4ee6d564c9dcf0309507 upstream.

All the invocations unroll to __x86_return_thunk and this file
must be PIC independent.

This fixes kexec on 64-bit AMD boxes.

  [ bp: Fix 32-bit build. ]

Reported-by: Edward Tran <edward.tran@oracle.com>
Reported-by: Awais Tanveer <awais.tanveer@oracle.com>
Suggested-by: Ankur Arora <ankur.a.arora@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/relocate_kernel_32.S
arch/x86/kernel/relocate_kernel_64.S