linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] fmm/hwpoison: Fix regressions in memory failure handling
@ 2025-02-11  6:01 Shuai Xue
  2025-02-11  6:01 ` [PATCH v1 1/4] x86/mce: Collect error message for severities below MCE_PANIC_SEVERITY Shuai Xue
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Shuai Xue @ 2025-02-11  6:01 UTC (permalink / raw)
  To: tony.luck, bp, nao.horiguchi
  Cc: tglx, mingo, dave.hansen, x86, hpa, linmiaohe, akpm, linux-edac,
	linux-kernel, linux-mm, baolin.wang, tianruidong

This patch addresses three regressions identified in memory failure
handling, as discovered using ras-tools[1]:

- `./einj_mem_uc copyin -f`
- `./einj_mem_uc futex -f`
- `./einj_mem_uc instr`

The regressions in the copyin and futex cases were caused by the
replacement of `EX_TYPE_UACCESS` with `EX_TYPE_EFAULT_REG` in some
copy-from-user operations, leading to kernel panics. The instr case
regression resulted from the PTE entry not being marked as hwpoison,
causing the system to send unnecessary SIGBUS signals.

These fixes ensure proper handling of memory errors and prevent kernel
panics and unnecessary signal dispatch.

[1]https://git.kernel.org/pub/scm/linux/kernel/git/aegl/ras-tools.git

Shuai Xue (4):
  x86/mce: Collect error message for severities below MCE_PANIC_SEVERITY
  x86/mce: dump error msg from severities
  x86/mce: add EX_TYPE_EFAULT_REG as in-kernel recovery context to fix
    copy-from-user operations regression
  mm/hwpoison: Fix incorrect "not recovered" report for recovered clean
    pages

 arch/x86/kernel/cpu/mce/core.c     | 19 +++++++++++++------
 arch/x86/kernel/cpu/mce/severity.c | 21 ++++++++++++++++-----
 mm/memory-failure.c                |  5 ++---
 3 files changed, 31 insertions(+), 14 deletions(-)

-- 
2.39.3



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-02-14 16:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-11  6:01 [PATCH v1 0/4] fmm/hwpoison: Fix regressions in memory failure handling Shuai Xue
2025-02-11  6:01 ` [PATCH v1 1/4] x86/mce: Collect error message for severities below MCE_PANIC_SEVERITY Shuai Xue
2025-02-11 16:51   ` Luck, Tony
2025-02-12  1:51     ` Shuai Xue
2025-02-11  6:01 ` [PATCH v1 2/4] x86/mce: dump error msg from severities Shuai Xue
2025-02-11 16:44   ` Luck, Tony
2025-02-14  9:29     ` Shuai Xue
2025-02-14 16:57       ` Luck, Tony
2025-02-11  6:01 ` [PATCH v1 3/4] x86/mce: add EX_TYPE_EFAULT_REG as in-kernel recovery context to fix copy-from-user operations regression Shuai Xue
2025-02-11  6:02 ` [PATCH v1 4/4] mm/hwpoison: Fix incorrect "not recovered" report for recovered clean pages Shuai Xue
2025-02-12  8:09   ` Miaohe Lin
2025-02-12 13:55     ` Shuai Xue
2025-02-13  3:20       ` Miaohe Lin
2025-02-13  6:59         ` Shuai Xue
2025-02-14  6:54           ` Miaohe Lin
2025-02-14  7:59             ` Shuai Xue
2025-02-14 16:51             ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox