linux-stable/drivers/nvdimm
Jane Chu 1ea7ca1b09 dax: enable dax fault handler to report VM_FAULT_HWPOISON
When multiple processes mmap() a dax file, then at some point,
a process issues a 'load' and consumes a hwpoison, the process
receives a SIGBUS with si_code = BUS_MCEERR_AR and with si_lsb
set for the poison scope. Soon after, any other process issues
a 'load' to the poisoned page (that is unmapped from the kernel
side by memory_failure), it receives a SIGBUS with
si_code = BUS_ADRERR and without valid si_lsb.

This is confusing to user, and is different from page fault due
to poison in RAM memory, also some helpful information is lost.

Channel dax backend driver's poison detection to the filesystem
such that instead of reporting VM_FAULT_SIGBUS, it could report
VM_FAULT_HWPOISON.

If user level block IO syscalls fail due to poison, the errno will
be converted to EIO to maintain block API consistency.

Signed-off-by: Jane Chu <jane.chu@oracle.com>
Link: https://lore.kernel.org/r/20230615181325.1327259-2-jane.chu@oracle.com
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2023-06-26 07:54:23 -06:00
..
Kconfig nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE 2023-01-28 15:32:36 -08:00
Makefile
badrange.c
btt.c block: remove ->rw_page 2023-02-02 22:33:34 -08:00
btt.h
btt_devs.c
bus.c nvdimm: make nd_class variable static 2023-06-23 14:55:58 -06:00
claim.c
core.c
dax_devs.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
dimm.c
dimm_devs.c nvdimm: make security_show static 2023-06-23 15:08:24 -06:00
e820.c
label.c
label.h
namespace_devs.c
nd-core.h cxl for v6.3 2023-02-25 09:19:23 -08:00
nd.h Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
nd_perf.c
nd_virtio.c
of_pmem.c
pfn.h
pfn_devs.c nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE 2023-01-28 15:32:36 -08:00
pmem.c dax: enable dax fault handler to report VM_FAULT_HWPOISON 2023-06-26 07:54:23 -06:00
pmem.h
region.c nvdimm/region: Move cache management to the region driver 2022-12-02 23:52:32 -08:00
region_devs.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
security.c nvdimm/region: Move cache management to the region driver 2022-12-02 23:52:32 -08:00
virtio_pmem.c virtio_pmem: populate numa information 2023-02-15 06:46:22 -05:00
virtio_pmem.h