[PW_SID:1091437] [RESEND] riscv: mm: Add proper handling for HWPOISON faults#1882
[PW_SID:1091437] [RESEND] riscv: mm: Add proper handling for HWPOISON faults#1882linux-riscv-bot wants to merge 2 commits into
Conversation
Currently, the RISC-V fault handler treats memory poisoning faults (VM_FAULT_HWPOISON and VM_FAULT_HWPOISON_LARGE) as a generic bus error (BUS_ADRERR). This is incorrect as it loses crucial information about the nature of the error. As for describe in [0], A SIGBUS is sent with the correct machine check error code (BUS_MCEERR_AR) and populates `si_addr_lsb`(log2 of the corruption page size) in siginfo while there is page fault with poison page. The logic is based on the existing arm64 implementation for handling HWPOISON. Testing -------------- ras-tools[0] is used to test. ./einj_mem_uc -j -k single & echo 0x107943b400 > /sys/devices/system/memory/hard_offline_page echo trigger > ./trigger_start before apply this patch: signal 7 code 2 addr 0x7fff95bdc400 after apply this patch: signal 7 code 4 addr 0x7fff95bdc400 [0]: https://www.man7.org/linux/man-pages/man2/sigaction.2.html [1]: https://kernel.googlesource.com/pub/scm/linux/kernel/git/aegl/ras-tools/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
|
Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults" |
2d4fcdd to
cd9d421
Compare
PR for series 1091437 applied to workflow__riscv__fixes
Name: [RESEND] riscv: mm: Add proper handling for HWPOISON faults
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1091437
Version: 1