提交 a4ee022d 编写于 作者: A Andy Lutomirski 提交者: tangbin

x86/entry/64: Don't compile ignore_sysret if 32-bit emulation is enabled

mainline inclusion
from mainline-v5.3
commit dffb3f9d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5Q0UG?from=project-issue
CVE: NA

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

It's only used if !CONFIG_IA32_EMULATION, so disable it in normal
configs.  This will save a few bytes of text and reduce confusion.
Signed-off-by: NAndy Lutomirski <luto@kernel.org>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Cc:  "BaeChang Seok" <chang.seok.bae@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Bae, Chang Seok" <chang.seok.bae@intel.com>
Link: https://lkml.kernel.org/r/0f7dafa72fe7194689de5ee8cfe5d83509fabcf5.1562035429.git.luto@kernel.orgSigned-off-by: Ntangbin <tangbin_yewu@cmss.chinamobile.com>
上级 99b180a1
...@@ -1732,11 +1732,17 @@ nmi_restore: ...@@ -1732,11 +1732,17 @@ nmi_restore:
iretq iretq
END(nmi) END(nmi)
#ifndef CONFIG_IA32_EMULATION
/*
* This handles SYSCALL from 32-bit code. There is no way to program
* MSRs to fully disable 32-bit SYSCALL.
*/
ENTRY(ignore_sysret) ENTRY(ignore_sysret)
UNWIND_HINT_EMPTY UNWIND_HINT_EMPTY
mov $-ENOSYS, %eax mov $-ENOSYS, %eax
sysret sysret
END(ignore_sysret) END(ignore_sysret)
#endif
ENTRY(rewind_stack_do_exit) ENTRY(rewind_stack_do_exit)
UNWIND_HINT_FUNC UNWIND_HINT_FUNC
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册