linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Enhance soft hwpoison handling and injection
@ 2024-05-01 23:24 Jane Chu
  2024-05-01 23:24 ` [PATCH 1/3] mm/memory-failure: try to send SIGBUS even if unmap failed Jane Chu
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Jane Chu @ 2024-05-01 23:24 UTC (permalink / raw)
  To: linmiaohe, nao.horiguchi, akpm, linux-mm, linux-kernel

This series aim at the following enhancement -
1. Let one hwpoison injector, that is, madvise(MADV_HWPOISON) to behave
   more like as if a real UE occurred. Because the other two injectors
   such as hwpoison-inject and the 'einj' on x86 can't, and it seems to
   me we need a better simulation to real UE scenario.
2. For years, if the kernel is unable to unmap a hwpoisoned page, it send
   a SIGKILL instead of SIGBUS to prevent user process from potentially
   accessing the page again. But in doing so, the user process also lose
   important information: vaddr, for recovery.  Fortunately, the kernel
   already has code to kill process re-accessing a hwpoisoned page, so
   remove the '!unmap_success' check.
3. Right now, if a thp page under GUP longterm pin is hwpoisoned, and
   kernel cannot split the thp page, memory-failure simply ignores
   the UE and returns.  That's not ideal, it could deliver a SIGBUS with
   useful information for userspace recovery.


Jane Chu (3):
  mm/memory-failure: try to send SIGBUS even if unmap failed
  mm/madvise: Add MF_ACTION_REQUIRED to madvise(MADV_HWPOISON)
  mm/memory-failure: send SIGBUS in the event of thp split fail

 mm/madvise.c        |  2 +-
 mm/memory-failure.c | 49 ++++++++++++++++++++++++++++++++++++---------
 2 files changed, 41 insertions(+), 10 deletions(-)

-- 
2.39.3



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

end of thread, other threads:[~2024-05-10  3:19 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01 23:24 [PATCH 0/3] Enhance soft hwpoison handling and injection Jane Chu
2024-05-01 23:24 ` [PATCH 1/3] mm/memory-failure: try to send SIGBUS even if unmap failed Jane Chu
2024-05-07  9:02   ` Oscar Salvador
2024-05-07 17:54     ` Jane Chu
2024-05-08 12:06       ` Oscar Salvador
2024-05-08 16:51         ` Jane Chu
2024-05-08  7:47   ` Miaohe Lin
2024-05-08 16:58     ` Jane Chu
2024-05-09  2:54   ` Miaohe Lin
2024-05-09 16:40     ` Jane Chu
2024-05-01 23:24 ` [PATCH 2/3] mm/madvise: Add MF_ACTION_REQUIRED to madvise(MADV_HWPOISON) Jane Chu
2024-05-05  7:02   ` Miaohe Lin
2024-05-06 19:54     ` Jane Chu
2024-05-08  7:58       ` Miaohe Lin
2024-05-01 23:24 ` [PATCH 3/3] mm/memory-failure: send SIGBUS in the event of thp split fail Jane Chu
2024-05-05  7:00   ` Miaohe Lin
2024-05-06 20:26     ` Jane Chu
2024-05-08  8:08       ` Miaohe Lin
2024-05-08 17:45         ` Jane Chu
2024-05-09  8:30           ` Miaohe Lin
2024-05-09 15:34             ` Jane Chu
2024-05-10  2:59               ` Miaohe Lin
2024-05-10  3:18                 ` Jane Chu
2024-05-08  9:03   ` Miaohe Lin
2024-05-08 16:56     ` Jane Chu
2024-05-09  8:52       ` Miaohe Lin

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