The patch titled Subject: selftests/mm: kvm, mdwe fixes to avoid requiring "make headers" has been added to the -mm mm-unstable branch. Its filename is selftests-mm-kvm-mdwe-fixes-to-avoid-requiring-make-headers.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-kvm-mdwe-fixes-to-avoid-requiring-make-headers.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: John Hubbard <jhubbard@xxxxxxxxxx> Subject: selftests/mm: kvm, mdwe fixes to avoid requiring "make headers" Date: Thu, 13 Jun 2024 19:30:08 -0700 On Ubuntu 23.04, the kvm and mdwe selftests/mm build fails due to missing a few items that are found in prctl.h. Here is an excerpt of the build failures: ksm_tests.c:252:13: error: use of undeclared identifier 'PR_SET_MEMORY_MERGE' ... mdwe_test.c:26:18: error: use of undeclared identifier 'PR_SET_MDWE' mdwe_test.c:38:18: error: use of undeclared identifier 'PR_GET_MDWE' Fix these errors by adding the missing items to vm_util.h, and include vm_util.h from mdwe_test.c. Link: https://lkml.kernel.org/r/20240614023009.221547-6-jhubbard@xxxxxxxxxx Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Andrei Vagin <avagin@xxxxxxxxxx> Cc: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Cc: Christian Brauner <brauner@xxxxxxxxxx> Cc: Jeff Xu <jeffxu@xxxxxxxxxxxx> Cc: Kees Cook <kees@xxxxxxxxxx> Cc: Kent Overstreet <kent.overstreet@xxxxxxxxx> Cc: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Cc: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Cc: Rich Felker <dalias@xxxxxxxx> Cc: Shuah Khan <shuah@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/mm/mdwe_test.c | 1 + tools/testing/selftests/mm/vm_util.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) --- a/tools/testing/selftests/mm/mdwe_test.c~selftests-mm-kvm-mdwe-fixes-to-avoid-requiring-make-headers +++ a/tools/testing/selftests/mm/mdwe_test.c @@ -15,6 +15,7 @@ #include <unistd.h> #include "../kselftest_harness.h" +#include "vm_util.h" #ifndef __aarch64__ # define PROT_BTI 0 --- a/tools/testing/selftests/mm/vm_util.h~selftests-mm-kvm-mdwe-fixes-to-avoid-requiring-make-headers +++ a/tools/testing/selftests/mm/vm_util.h @@ -61,3 +61,18 @@ unsigned long get_free_hugepages(void); #define PAGEMAP_PRESENT(ent) (((ent) & (1ull << 63)) != 0) #define PAGEMAP_PFN(ent) ((ent) & ((1ull << 55) - 1)) + +#ifndef PR_SET_MEMORY_MERGE +#define PR_SET_MEMORY_MERGE 67 +#endif + +#ifndef PR_GET_MEMORY_MERGE +#define PR_GET_MEMORY_MERGE 68 +#endif + +#ifndef PR_SET_MDWE +#define PR_SET_MDWE 65 +#define PR_MDWE_REFUSE_EXEC_GAIN (1UL << 0) +#define PR_MDWE_NO_INHERIT (1UL << 1) +#define PR_GET_MDWE 66 +#endif _ Patches currently in -mm which might be from jhubbard@xxxxxxxxxx are selftests-mm-mseal-self_elf-fix-missing-__nr_mseal.patch selftests-mm-mseal-self_elf-factor-out-test-macros-and-other-duplicated-items.patch selftests-mm-mseal-self_elf-rename-test_end_check-to-report_test_pass.patch selftests-mm-fix-vm_utilc-build-failures-add-snapshot-of-fsh.patch selftests-mm-kvm-mdwe-fixes-to-avoid-requiring-make-headers.patch selftests-mm-remove-local-__nr_-definitions.patch selftests-mqueue-fix-5-warnings-about-signed-unsigned-mismatches.patch