WTF: patch "[PATCH] selftests/landlock: Add tests for O_PATH" was seriously submitted to be applied to the 5.18-stable tree?
Subsystems (3)
[email protected]
maintainerThe patch below was submitted to be applied to the 5.18-stable tree.
I fail to see how this patch meets the stable kernel rules as found at Documentation/process/stable-kernel-rules.rst.
I could be totally wrong, and if so, please respond to <[email protected]> and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d1788ad990874734341b05ab8ccb6448c09c6422 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= <[email protected]>
Date: Fri, 6 May 2022 18:08:17 +0200
Subject: [PATCH] selftests/landlock: Add tests for O_PATH
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The O_PATH flag is currently not handled by Landlock. Let's make sure this behavior will remain consistent with the same ruleset over time.
tools/testing/selftests/landlock/fs_test.c +8 -2
@@ -654,17 +654,23 @@ TEST_F_FORK(layout1, effective_access)enforce_ruleset (_metadata, ruleset_fd);ASSERT_EQ (0 ,close (ruleset_fd)); -/* Tests on a directory. */ +/* Tests on a directory (with or without O_PATH). */ ASSERT_EQ (EACCES ,test_open ("/" ,O_RDONLY )); +ASSERT_EQ (0 ,test_open ("/" ,O_RDONLY |O_PATH ));ASSERT_EQ (EACCES ,test_open (dir_s1d1,O_RDONLY )); +ASSERT_EQ (0 ,test_open (dir_s1d1,O_RDONLY |O_PATH ));ASSERT_EQ (EACCES ,test_open (file1_s1d1,O_RDONLY )); +ASSERT_EQ (0 ,test_open (file1_s1d1,O_RDONLY |O_PATH )); +ASSERT_EQ (0 ,test_open (dir_s1d2,O_RDONLY ));ASSERT_EQ (0 ,test_open (file1_s1d2,O_RDONLY ));ASSERT_EQ (0 ,test_open (dir_s1d3,O_RDONLY ));ASSERT_EQ (0 ,test_open (file1_s1d3,O_RDONLY )); -/* Tests on a file. */ +/* Tests on a file (with or without O_PATH). */ ASSERT_EQ (EACCES ,test_open (dir_s2d2,O_RDONLY )); +ASSERT_EQ (0 ,test_open (dir_s2d2,O_RDONLY |O_PATH )); +ASSERT_EQ (0 ,test_open (file1_s2d2,O_RDONLY ));/* Checks effective read and write actions. */