OpenCloudOS-Kernel/drivers/dax
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
..
hmem dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
pmem dax: Kill DEV_DAX_PMEM_COMPAT 2021-11-24 19:21:35 -08:00
Kconfig cxl for v6.3 2023-02-25 09:19:23 -08:00
Makefile cxl/dax: Create dax devices for CXL RAM regions 2023-02-10 17:33:45 -08:00
bus.c dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
bus.h dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
cxl.c dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
dax-private.h dax: Introduce alloc_dev_dax_id() 2023-06-23 01:03:50 -06:00
device.c dax: fix missing-prototype warnings 2023-05-18 17:28:07 -07:00
kmem.c dax/kmem: Pass valid argument to memory_group_register_static 2023-06-23 01:32:06 -06:00
pmem.c dax: Cleanup extra dax_region references 2023-06-23 01:03:50 -06:00
super.c dax: enable dax fault handler to report VM_FAULT_HWPOISON 2023-06-26 07:54:23 -06:00