mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
Patch series "selftests/mm: add memory failure selftests", v4. Introduce selftests to validate the functionality of memory failure. These tests help ensure that memory failure handling for anonymous pages, pagecaches pages works correctly, including proper SIGBUS delivery to user processes, page isolation, and recovery paths. Currently madvise syscall is used to inject memory failures. And only anonymous pages and pagecaches are tested. More test scenarios, e.g. hugetlb, shmem, thp, will be added. Also more memory failure injecting methods will be supported, e.g. APEI Error INJection, if required. This patch (of 3): This patch adds a new kselftest to validate memory failure handling for anonymous pages. The test performs the following operations: 1. Allocates anonymous pages using mmap(). 2. Injects memory failure via madvise syscall. 3. Verifies expected error handling behavior. 4. Unpoison memory. This test helps ensure that memory failure handling for anonymous pages works correctly, including proper SIGBUS delivery to user processes, page isolation and recovery paths. Link: https://lkml.kernel.org/r/20260206031639.2707102-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20260206031639.2707102-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Cc: David Hildenbrand <david@kernel.org> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Mark Brown <broonie@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Naoya Horiguchi <nao.horiguchi@gmail.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: kernel test robot <lkp@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 lines
326 B
Text
15 lines
326 B
Text
CONFIG_SYSVIPC=y
|
|
CONFIG_USERFAULTFD=y
|
|
CONFIG_PTE_MARKER_UFFD_WP=y
|
|
CONFIG_TEST_VMALLOC=m
|
|
CONFIG_DEVICE_PRIVATE=y
|
|
CONFIG_TEST_HMM=m
|
|
CONFIG_GUP_TEST=y
|
|
CONFIG_TRANSPARENT_HUGEPAGE=y
|
|
CONFIG_MEM_SOFT_DIRTY=y
|
|
CONFIG_ANON_VMA_NAME=y
|
|
CONFIG_FTRACE=y
|
|
CONFIG_PROFILING=y
|
|
CONFIG_UPROBES=y
|
|
CONFIG_MEMORY_FAILURE=y
|
|
CONFIG_HWPOISON_INJECT=m
|