mirror of
https://github.com/torvalds/linux.git
synced 2026-06-14 10:03:05 +02:00
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 <tony.luck@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: hch@lst.de Cc: linux-fsdevel@vger.kernel.org Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/152539238119.31796.14318473522414462886.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> |
||
|---|---|---|
| .. | ||
| badrange.c | ||
| blk.c | ||
| btt_devs.c | ||
| btt.c | ||
| btt.h | ||
| bus.c | ||
| claim.c | ||
| core.c | ||
| dax_devs.c | ||
| dimm_devs.c | ||
| dimm.c | ||
| e820.c | ||
| Kconfig | ||
| label.c | ||
| label.h | ||
| Makefile | ||
| namespace_devs.c | ||
| nd-core.h | ||
| nd.h | ||
| of_pmem.c | ||
| pfn_devs.c | ||
| pfn.h | ||
| pmem.c | ||
| pmem.h | ||
| region_devs.c | ||
| region.c | ||