提交 4b0c2b2d 编写于 作者: P Peter Zijlstra 提交者: Zheng Zengkai

x86/asm: Fix register order

stable inclusion
from stable-v5.10.133
commit 8ef808b3f406ed920adea8ffc949f63c059bf3a7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5PTAS
CVE: CVE-2022-29900,CVE-2022-23816,CVE-2022-29901

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8ef808b3f406ed920adea8ffc949f63c059bf3a7

--------------------------------

commit a92ede2d upstream.

Ensure the register order is correct; this allows for easy translation
between register number and trampoline and vice-versa.
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: NBorislav Petkov <bp@suse.de>
Acked-by: NJosh Poimboeuf <jpoimboe@redhat.com>
Tested-by: NAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/20211026120309.978573921@infradead.orgSigned-off-by: NThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NLin Yujun <linyujun809@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 59e91c42
/* SPDX-License-Identifier: GPL-2.0 */
/*
* These are in machine order; things rely on that.
*/
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
GEN(rax) GEN(rax)
GEN(rbx)
GEN(rcx) GEN(rcx)
GEN(rdx) GEN(rdx)
GEN(rbx)
GEN(rsp)
GEN(rbp)
GEN(rsi) GEN(rsi)
GEN(rdi) GEN(rdi)
GEN(rbp)
GEN(r8) GEN(r8)
GEN(r9) GEN(r9)
GEN(r10) GEN(r10)
...@@ -16,10 +21,11 @@ GEN(r14) ...@@ -16,10 +21,11 @@ GEN(r14)
GEN(r15) GEN(r15)
#else #else
GEN(eax) GEN(eax)
GEN(ebx)
GEN(ecx) GEN(ecx)
GEN(edx) GEN(edx)
GEN(ebx)
GEN(esp)
GEN(ebp)
GEN(esi) GEN(esi)
GEN(edi) GEN(edi)
GEN(ebp)
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册