Skip to content

Commit 6906584

Browse files
aeglsuryasaimadhu
authored andcommitted
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. For a full list of those fixes, see the output of: git log --oneline v5.14 ^v5.13 -- lib/iov_iter.c Signed-off-by: Tony Luck <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent a6e3cf7 commit 6906584

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

arch/x86/lib/copy_user_64.S

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -234,24 +234,11 @@ EXPORT_SYMBOL(copy_user_enhanced_fast_string)
234234
*/
235235
SYM_CODE_START_LOCAL(.Lcopy_user_handle_tail)
236236
movl %edx,%ecx
237-
cmp $X86_TRAP_MC,%eax /* check if X86_TRAP_MC */
238-
je 3f
239237
1: rep movsb
240238
2: mov %ecx,%eax
241239
ASM_CLAC
242240
ret
243241

244-
/*
245-
* Return zero to pretend that this copy succeeded. This
246-
* is counter-intuitive, but needed to prevent the code
247-
* in lib/iov_iter.c from retrying and running back into
248-
* the poison cache line again. The machine check handler
249-
* will ensure that a SIGBUS is sent to the task.
250-
*/
251-
3: xorl %eax,%eax
252-
ASM_CLAC
253-
ret
254-
255242
_ASM_EXTABLE_CPY(1b, 2b)
256243
SYM_CODE_END(.Lcopy_user_handle_tail)
257244

0 commit comments

Comments
 (0)