summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-04-30 17:33:54 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-01 21:57:34 +0100
commit2d4923e8112f1f0fe8cbf08f31975b9430075743 (patch)
tree3ede12cac4f2f8b086502dea28ddb50b483fcf1b /meta
parent0d72d8f4b79e949a027c6eb83c6f5a50a339f2ae (diff)
downloadpoky-2d4923e8112f1f0fe8cbf08f31975b9430075743.tar.gz
strace: fix ptest failure in landlock
Kernel commit: commit 3d4b396a616d0d67bf95d6823ad1197f6247292e Author: Christian Brauner <christian.brauner@ubuntu.com> Date: Mon Oct 11 15:37:04 2021 +0200 landlock: Use square brackets around "landlock-ruleset" commit aea0b9f2486da8497f35c7114b764bf55e17c7ea upstream. Make the name of the anon inode fd "[landlock-ruleset]" instead of "landlock-ruleset". This is minor but most anon inode fds already carry square brackets around their name: [eventfd] [eventpoll] [fanotify] [fscontext] [io_uring] [pidfd] [signalfd] [timerfd] [userfaultfd] For the sake of consistency lets do the same for the landlock-ruleset anon inode fd that comes with landlock. We did the same in 1cdc415f1083 ("uapi, fsopen: use square brackets around "fscontext" [ver #2]") for the new mount api. Cc: linux-security-module@vger.kernel.org Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/20211011133704.1704369-1-brauner@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Changed the format of the landlock tracing. We need to update the strace expected string to match. Upstream-Status: Submitted [https://lists.strace.io/pipermail/strace-devel/2022-April/011064.html] (From OE-Core rev: bf7d885aef06f6208533dd5fab45ee8e92d6d6d7) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch67
-rw-r--r--meta/recipes-devtools/strace/strace_5.17.bb1
2 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch b/meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch
new file mode 100644
index 0000000000..9d67d68331
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-landlock-update-expected-string.patch
@@ -0,0 +1,67 @@
1From d0dae2fb30b907bc9bf70382f37c9e00207ae036 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Sat, 30 Apr 2022 01:09:42 -0400
4Subject: [PATCH] landlock: update expected string
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Kernel commit:
10
11 commit 3d4b396a616d0d67bf95d6823ad1197f6247292e
12 Author: Christian Brauner <christian.brauner@ubuntu.com>
13 Date: Mon Oct 11 15:37:04 2021 +0200
14
15 landlock: Use square brackets around "landlock-ruleset"
16
17 commit aea0b9f2486da8497f35c7114b764bf55e17c7ea upstream.
18
19 Make the name of the anon inode fd "[landlock-ruleset]" instead of
20 "landlock-ruleset". This is minor but most anon inode fds already
21 carry square brackets around their name:
22
23 [eventfd]
24 [eventpoll]
25 [fanotify]
26 [fscontext]
27 [io_uring]
28 [pidfd]
29 [signalfd]
30 [timerfd]
31 [userfaultfd]
32
33 For the sake of consistency lets do the same for the landlock-ruleset anon
34 inode fd that comes with landlock. We did the same in
35 1cdc415f1083 ("uapi, fsopen: use square brackets around "fscontext" [ver #2]")
36 for the new mount api.
37
38 Cc: linux-security-module@vger.kernel.org
39 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
40 Link: https://lore.kernel.org/r/20211011133704.1704369-1-brauner@kernel.org
41 Cc: stable@vger.kernel.org
42 Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
43 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44
45Changed the format of the landlock tracing. We need to update the strace
46expected string to match.
47
48Upstream-Status: Submitted [https://lists.strace.io/pipermail/strace-devel/2022-April/011064.html]
49
50Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
51---
52 tests/landlock_create_ruleset-y.c | 2 +-
53 1 file changed, 1 insertion(+), 1 deletion(-)
54
55diff --git a/tests/landlock_create_ruleset-y.c b/tests/landlock_create_ruleset-y.c
56index a30966b..50e19c2 100644
57--- a/tests/landlock_create_ruleset-y.c
58+++ b/tests/landlock_create_ruleset-y.c
59@@ -1,4 +1,4 @@
60-#define FD_PATH "<anon_inode:landlock-ruleset>"
61+#define FD_PATH "<anon_inode:[landlock-ruleset]>"
62 #define SKIP_IF_PROC_IS_UNAVAILABLE skip_if_unavailable("/proc/self/fd/")
63
64 #include "landlock_create_ruleset.c"
65--
662.19.1
67
diff --git a/meta/recipes-devtools/strace/strace_5.17.bb b/meta/recipes-devtools/strace/strace_5.17.bb
index 129db87af8..c7fd9edf40 100644
--- a/meta/recipes-devtools/strace/strace_5.17.bb
+++ b/meta/recipes-devtools/strace/strace_5.17.bb
@@ -13,6 +13,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
13 file://ptest-spacesave.patch \ 13 file://ptest-spacesave.patch \
14 file://0001-strace-fix-reproducibilty-issues.patch \ 14 file://0001-strace-fix-reproducibilty-issues.patch \
15 file://skip-load.patch \ 15 file://skip-load.patch \
16 file://0001-landlock-update-expected-string.patch \
16 " 17 "
17SRC_URI[sha256sum] = "5fb298dbd1331fd1e1bc94c5c32395860d376101b87c6cd3d1ba9f9aa15c161f" 18SRC_URI[sha256sum] = "5fb298dbd1331fd1e1bc94c5c32395860d376101b87c6cd3d1ba9f9aa15c161f"
18 19