[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210706190620.1290391-4-tony.luck@intel.com>
Date: Tue, 6 Jul 2021 12:06:20 -0700
From: Tony Luck <tony.luck@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Tony Luck <tony.luck@...el.com>, Ding Hui <dinghui@...gfor.com.cn>,
naoya.horiguchi@....com, osalvador@...e.de,
Youquan Song <youquan.song@...el.com>, huangcun@...gfor.com.cn,
x86@...nel.org, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] x86/mce: Drop copyin special case for #MC
Fixes to the iterator code to handle faults that are not on
page boundaries mean that the special case for machine check
during copy from user is no longer needed.
Signed-off-by: Tony Luck <tony.luck@...el.com>
---
arch/x86/lib/copy_user_64.S | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S
index 57b79c577496..2797e630b9b1 100644
--- a/arch/x86/lib/copy_user_64.S
+++ b/arch/x86/lib/copy_user_64.S
@@ -234,24 +234,11 @@ EXPORT_SYMBOL(copy_user_enhanced_fast_string)
*/
SYM_CODE_START_LOCAL(.Lcopy_user_handle_tail)
movl %edx,%ecx
- cmp $X86_TRAP_MC,%eax /* check if X86_TRAP_MC */
- je 3f
1: rep movsb
2: mov %ecx,%eax
ASM_CLAC
ret
- /*
- * Return zero to pretend that this copy succeeded. This
- * is counter-intuitive, but needed to prevent the code
- * in lib/iov_iter.c from retrying and running back into
- * the poison cache line again. The machine check handler
- * will ensure that a SIGBUS is sent to the task.
- */
-3: xorl %eax,%eax
- ASM_CLAC
- ret
-
_ASM_EXTABLE_CPY(1b, 2b)
SYM_CODE_END(.Lcopy_user_handle_tail)
--
2.29.2
Powered by blists - more mailing lists