* [merged mm-stable] selftests-memfd-sysctl-fix-memfd_noexec_scope_noexec_enforced.patch removed from -mm tree
@ 2023-08-11 22:59 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-11 22:59 UTC (permalink / raw)
To: mm-commits, skhan, mike.kravetz, lkp, keescook, jorgelo, jannh,
hughd, dverkamp, dmitry.torokhov, asmadeus, jeffxu, akpm
The quilt patch titled
Subject: selftests/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED
has been removed from the -mm tree. Its filename was
selftests-memfd-sysctl-fix-memfd_noexec_scope_noexec_enforced.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Jeff Xu <jeffxu@google.com>
Subject: selftests/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED
Date: Wed, 5 Jul 2023 06:33:15 +0000
Add selftest for sysctl vm.memfd_noexec is 2
(MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED)
memfd_create(.., MFD_EXEC) should fail in this case.
Link: https://lkml.kernel.org/r/20230705063315.3680666-3-jeffxu@google.com
Reported-by: Dominique Martinet <asmadeus@codewreck.org>
Closes: https://lore.kernel.org/linux-mm/CABi2SkXUX_QqTQ10Yx9bBUGpN1wByOi_=gZU6WEy5a8MaQY3Jw@mail.gmail.com/T/
Signed-off-by: Jeff Xu <jeffxu@google.com>
Cc: Daniel Verkamp <dverkamp@chromium.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jann Horn <jannh@google.com>
Cc: Jorge Lucangeli Obes <jorgelo@chromium.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: kernel test robot <lkp@intel.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/memfd/memfd_test.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/tools/testing/selftests/memfd/memfd_test.c~selftests-memfd-sysctl-fix-memfd_noexec_scope_noexec_enforced
+++ a/tools/testing/selftests/memfd/memfd_test.c
@@ -1147,6 +1147,11 @@ static void test_sysctl_child(void)
sysctl_assert_write("2");
mfd_fail_new("kern_memfd_sysctl_2",
MFD_CLOEXEC | MFD_ALLOW_SEALING);
+ mfd_fail_new("kern_memfd_sysctl_2_MFD_EXEC",
+ MFD_CLOEXEC | MFD_EXEC);
+ fd = mfd_assert_new("", 0, MFD_NOEXEC_SEAL);
+ close(fd);
+
sysctl_fail_write("0");
sysctl_fail_write("1");
}
_
Patches currently in -mm which might be from jeffxu@google.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-11 23:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 22:59 [merged mm-stable] selftests-memfd-sysctl-fix-memfd_noexec_scope_noexec_enforced.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.