Skip to content

[PW_SID:1091437] [RESEND] riscv: mm: Add proper handling for HWPOISON faults#1882

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1091437
Closed

[PW_SID:1091437] [RESEND] riscv: mm: Add proper handling for HWPOISON faults#1882
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1091437

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

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

Linux RISC-V bot and others added 2 commits May 2, 2026 08:13
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>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.98 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2208.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 2986.02 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.55 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.98 seconds
Result: ERROR
Output:

ERROR: Invalid commit separator - some tools may have problems applying this
#20: 
--------------

CHECK: Logical continuations should be on the previous line
#80: FILE: arch/riscv/kernel/traps.c:121:
+	if (!show_unhandled_signals || !unhandled_signal(tsk, signo)
+	    || !printk_ratelimit())

WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit
#80: FILE: arch/riscv/kernel/traps.c:121:
+	    || !printk_ratelimit())

WARNING: Avoid logging continuation uses where feasible
#86: FILE: arch/riscv/kernel/traps.c:127:
+	pr_cont("\n");

WARNING: From:/Signed-off-by: email name mismatch: 'From: winterddd <tianruidong@linux.alibaba.com>' != 'Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>'

total: 1 errors, 3 warnings, 1 checks, 75 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit fe06881b6e08 ("riscv: mm: Add proper handling for HWPOISON faults") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
CHECK: Logical continuations should be on the previous line
ERROR: Invalid commit separator - some tools may have problems applying this
WARNING: Avoid logging continuation uses where feasible
WARNING: From:/Signed-off-by: email name mismatch: 'From: winterddd <tianruidong@linux.alibaba.com>' != 'Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>'
WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 77.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
kdoc
Desc: Detects for kdoc errors
Duration: 0.73 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RESEND] riscv: mm: Add proper handling for HWPOISON faults"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from 2d4fcdd to cd9d421 Compare May 14, 2026 08:49
@linux-riscv-bot linux-riscv-bot deleted the pw1091437 branch May 16, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant