The patch titled Subject: selftest mm/mseal: fix compile warning has been added to the -mm mm-unstable branch. Its filename is selftest-mm-mseal-read-only-elf-memory-segment-fix-3.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftest-mm-mseal-read-only-elf-memory-segment-fix-3.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: Jeff Xu <jeffxu@xxxxxxxxxxxx> Subject: selftest mm/mseal: fix compile warning Date: Sat, 20 Apr 2024 00:35:15 +0000 fix compile warning reported by test robot Link: https://lkml.kernel.org/r/20240420003515.345982-2-jeffxu@xxxxxxxxxxxx Signed-off-by: Jeff Xu <jeffxu@xxxxxxxxxxxx> Reported-by: kernel test robot <yujie.liu@xxxxxxxxx> Closes: https://lore.kernel.org/r/202404190226.OfJOewV8-lkp@xxxxxxxxx/ Suggested-by: Pedro Falcato <pedro.falcato@xxxxxxxxx> Reviewed-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/mm/mseal_test.c | 3 +-- tools/testing/selftests/mm/seal_elf.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) --- a/tools/testing/selftests/mm/mseal_test.c~selftest-mm-mseal-read-only-elf-memory-segment-fix-3 +++ a/tools/testing/selftests/mm/mseal_test.c @@ -79,7 +79,7 @@ static unsigned long get_vma_size(void * return 0; while (fgets(line, sizeof(line), maps)) { - if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, &protstr) == 3) { + if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, protstr) == 3) { if (addr_start == (uintptr_t) addr) { size = addr_end - addr_start; if (protstr[0] == 'r') @@ -208,7 +208,6 @@ static u64 set_pkey_bits(u64 reg, int pk static void set_pkey(int pkey, unsigned long pkey_value) { - unsigned long mask = (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE); u64 new_pkey_reg; new_pkey_reg = set_pkey_bits(__read_pkey_reg(), pkey, pkey_value); --- a/tools/testing/selftests/mm/seal_elf.c~selftest-mm-mseal-read-only-elf-memory-segment-fix-3 +++ a/tools/testing/selftests/mm/seal_elf.c @@ -105,7 +105,6 @@ static void test_seal_elf(void) int ret; FILE *maps; char line[512]; - int size = 0; uintptr_t addr_start, addr_end; char prot[5]; char filename[256]; @@ -136,7 +135,7 @@ static void test_seal_elf(void) */ while (fgets(line, sizeof(line), maps)) { if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*u %255[^\n]", - &addr_start, &addr_end, &prot, &filename) == 4) { + &addr_start, &addr_end, prot, filename) == 4) { if (strlen(filename)) { /* * seal the mapping if read only. _ Patches currently in -mm which might be from jeffxu@xxxxxxxxxxxx are mseal-wire-up-mseal-syscall.patch mseal-add-mseal-syscall.patch selftest-mm-mseal-memory-sealing.patch mseal-add-documentation.patch selftest-mm-mseal-read-only-elf-memory-segment.patch selftest-mm-mseal-read-only-elf-memory-segment-fix.patch selftest-mm-mseal-read-only-elf-memory-segment-fix-3.patch