linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] selftests/mm: sigbus-wp test requires UFFD_FEATURE_WP_HUGETLBFS_SHMEM
@ 2024-03-21 23:20 Edward Liaw
  2024-03-21 23:29 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Liaw @ 2024-03-21 23:20 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, Shuah Khan
  Cc: linux-kselftest, kernel-team, Edward Liaw, linux-mm

The sigbus-wp test requires the UFFD_FEATURE_WP_HUGETLBFS_SHMEM flag for
shmem and hugetlb targets.  Otherwise it is not backwards compatible
with kernels <5.19 and fails with EINVAL.

Signed-off-by: Edward Liaw <edliaw@google.com>
---
 tools/testing/selftests/mm/uffd-unit-tests.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c
index 4a48dc617c6b..21ec23206ab4 100644
--- a/tools/testing/selftests/mm/uffd-unit-tests.c
+++ b/tools/testing/selftests/mm/uffd-unit-tests.c
@@ -1437,7 +1437,8 @@ uffd_test_case_t uffd_tests[] = {
 		.uffd_fn = uffd_sigbus_wp_test,
 		.mem_targets = MEM_ALL,
 		.uffd_feature_required = UFFD_FEATURE_SIGBUS |
-		UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_PAGEFAULT_FLAG_WP,
+		UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_PAGEFAULT_FLAG_WP |
+		UFFD_FEATURE_WP_HUGETLBFS_SHMEM,
 	},
 	{
 		.name = "events",
-- 
2.44.0.396.g6e790dbe36-goog



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

* Re: [PATCH v1] selftests/mm: sigbus-wp test requires UFFD_FEATURE_WP_HUGETLBFS_SHMEM
  2024-03-21 23:20 [PATCH v1] selftests/mm: sigbus-wp test requires UFFD_FEATURE_WP_HUGETLBFS_SHMEM Edward Liaw
@ 2024-03-21 23:29 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2024-03-21 23:29 UTC (permalink / raw)
  To: Edward Liaw
  Cc: linux-kernel, Shuah Khan, linux-kselftest, kernel-team, linux-mm,
	Peter Xu

On Thu, 21 Mar 2024 23:20:21 +0000 Edward Liaw <edliaw@google.com> wrote:

> The sigbus-wp test requires the UFFD_FEATURE_WP_HUGETLBFS_SHMEM flag for
> shmem and hugetlb targets.  Otherwise it is not backwards compatible
> with kernels <5.19 and fails with EINVAL.
> 
> ...
>
> --- a/tools/testing/selftests/mm/uffd-unit-tests.c
> +++ b/tools/testing/selftests/mm/uffd-unit-tests.c
> @@ -1437,7 +1437,8 @@ uffd_test_case_t uffd_tests[] = {
>  		.uffd_fn = uffd_sigbus_wp_test,
>  		.mem_targets = MEM_ALL,
>  		.uffd_feature_required = UFFD_FEATURE_SIGBUS |
> -		UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_PAGEFAULT_FLAG_WP,
> +		UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_PAGEFAULT_FLAG_WP |
> +		UFFD_FEATURE_WP_HUGETLBFS_SHMEM,
>  	},
>  	{
>  		.name = "events",

Thanks, I'll add

Fixes: 73c1ea939b65 ("selftests/mm: move uffd sig/events tests into uffd unit tests")
Cc: <stable@vger.kernel.org>


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

end of thread, other threads:[~2024-03-21 23:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 23:20 [PATCH v1] selftests/mm: sigbus-wp test requires UFFD_FEATURE_WP_HUGETLBFS_SHMEM Edward Liaw
2024-03-21 23:29 ` Andrew Morton

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