]> Git Repo - linux.git/commit
x86/asm/memcpy_mcsafe: Return bytes remaining
authorDan Williams <[email protected]>
Fri, 4 May 2018 00:06:21 +0000 (17:06 -0700)
committerIngo Molnar <[email protected]>
Tue, 15 May 2018 06:32:42 +0000 (08:32 +0200)
commit60622d68227d6d71fdfba5fb39f7f3d44cdd8815
tree345ff9c60d43d8d3720053a25f855289cd9570ff
parentbd131544aa7e318a5735cbcbad46c4a5ee6b9d42
x86/asm/memcpy_mcsafe: Return bytes remaining

Machine check safe memory copies are currently deployed in the pmem
driver whenever reading from persistent memory media, so that -EIO is
returned rather than triggering a kernel panic. While this protects most
pmem accesses, it is not complete in the filesystem-dax case. When
filesystem-dax is enabled reads may bypass the block layer and the
driver via dax_iomap_actor() and its usage of copy_to_iter().

In preparation for creating a copy_to_iter() variant that can handle
machine checks, teach memcpy_mcsafe() to return the number of bytes
remaining rather than -EFAULT when an exception occurs.

Co-developed-by: Tony Luck <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/152539238119.31796.14318473522414462886.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/include/asm/string_64.h
arch/x86/lib/memcpy_64.S
drivers/nvdimm/claim.c
drivers/nvdimm/pmem.c
include/linux/string.h
This page took 0.059798 seconds and 4 git commands to generate.