]> git.ipfire.org Git - thirdparty/linux.git/commit
Revert "selftests/mm: remove local __NR_* definitions"
authorJohn Hubbard <jhubbard@nvidia.com>
Fri, 14 Feb 2025 03:38:50 +0000 (19:38 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Mar 2025 05:36:12 +0000 (21:36 -0800)
commit0a7565ee6ec31eb16c0476adbfc1af3f2271cb6b
tree0f3b65a591e5dd06c0b245a1982dafb0def55655
parent8344017aaf32a7532cff293eb3df7fd2265ebafd
Revert "selftests/mm: remove local __NR_* definitions"

This reverts commit a5c6bc590094a1a73cf6fa3f505e1945d2bf2461.

The general approach described in commit e076eaca5906 ("selftests: break
the dependency upon local header files") was taken one step too far here:
it should not have been extended to include the syscall numbers.  This is
because doing so would require per-arch support in tools/include/uapi, and
no such support exists.

This revert fixes two separate reports of test failures, from Dave
Hansen[1], and Li Wang[2].  An excerpt of Dave's report:

Before this commit (a5c6bc590094a1a73cf6fa3f505e1945d2bf2461) things are
fine.  But after, I get:

running PKEY tests for unsupported CPU/OS

An excerpt of Li's report:

    I just found that mlock2_() return a wrong value in mlock2-test

[1] https://lore.kernel.org/dc585017-6740-4cab-a536-b12b37a7582d@intel.com
[2] https://lore.kernel.org/CAEemH2eW=UMu9+turT2jRie7+6ewUazXmA6kL+VBo3cGDGU6RA@mail.gmail.com

Link: https://lkml.kernel.org/r/20250214033850.235171-1-jhubbard@nvidia.com
Fixes: a5c6bc590094 ("selftests/mm: remove local __NR_* definitions")
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Li Wang <liwang@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jeff Xu <jeffxu@chromium.org>
Cc: Andrei Vagin <avagin@google.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Kees Cook <kees@kernel.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/hugepage-mremap.c
tools/testing/selftests/mm/ksm_functional_tests.c
tools/testing/selftests/mm/memfd_secret.c
tools/testing/selftests/mm/mkdirty.c
tools/testing/selftests/mm/mlock2.h
tools/testing/selftests/mm/protection_keys.c
tools/testing/selftests/mm/uffd-common.c
tools/testing/selftests/mm/uffd-stress.c
tools/testing/selftests/mm/uffd-unit-tests.c