]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sev: Avoid using __x86_return_thunk
authorKim Phillips <kim.phillips@amd.com>
Tue, 14 Jun 2022 21:15:44 +0000 (23:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jul 2022 10:54:00 +0000 (12:54 +0200)
commit70b71938a9f7f6db419f88a63fcae5483e0f52bf
treee2e903712e181f2f6bdca731dd184fa1ada7c2fe
parent5d9118c9a84e0a7e61428c71c9e9c86fd0b70afc
x86/sev: Avoid using __x86_return_thunk

commit b7f79e3d414c9a21fb2516fe430981b17e416d7c upstream.

Specifically, it's because __enc_copy() encrypts the kernel after
being relocated outside the kernel in sme_encrypt_execute(), and the
RET macro's jmp offset isn't amended prior to execution.

Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
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/mm/mem_encrypt_boot.S