selftests/memfd: add tests for F_SEAL_EXEC
authorDaniel Verkamp <dverkamp@chromium.org>
Thu, 15 Dec 2022 00:12:02 +0000 (00:12 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 19 Jan 2023 01:12:37 +0000 (17:12 -0800)
commit32d118ad50a5afecb74358bcefc5cb6ea6ccfc2b
tree004d18cba462b3a10940d6e18e1fc8578a3c3d54
parent6fd7353829cafc4067aad9eea0dc95da67e7df16
selftests/memfd: add tests for F_SEAL_EXEC

Basic tests to ensure that user/group/other execute bits cannot be changed
after applying F_SEAL_EXEC to a memfd.

Link: https://lkml.kernel.org/r/20221215001205.51969-3-jeffxu@google.com
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Co-developed-by: Jeff Xu <jeffxu@google.com>
Signed-off-by: Jeff Xu <jeffxu@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: David Herrmann <dh.herrmann@gmail.com>
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: kernel test robot <lkp@intel.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/memfd/memfd_test.c