summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-12-22 09:28:26 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-24 08:21:23 +0000
commit7c4802d3a88aa0782f773af3270141f3e5ba72d1 (patch)
tree5ef1d0b8477b34c9a895f6e08b5ca0260b7f867b /meta/recipes-kernel
parent7af854bc9d49e65acc61c863ce729fb31e08201c (diff)
downloadpoky-7c4802d3a88aa0782f773af3270141f3e5ba72d1.tar.gz
systemtap: fix on target build for 4.4 and 5.10+
The following systemtap commit: commit 7615cae790c899bc8a82841c75c8ea9c6fa54df3 Author: Frank Ch. Eigler <fche@redhat.com> Date: Mon Nov 9 19:18:19 2020 -0500 PR26665: relayfs-on-procfs megapatch Changes the way that capabilities are checked when compiling a systemtap probe. In our cross-build -> on target workflow, this results in a mismatch between the systemtap configuration capabilities and the kernel configuration. The result is a compilation failure since the security components are protected by two different #ifdef's, and they can be out of sync. By protecting the include and callsite with the same #ifdef, we ensure they are in sync and fix our on target problem. While this fix is oe-specific, a variant will be proposed upstream once a deeper analsysis of other options has been completed. (From OE-Core rev: 25fa864270efe3ff5699a1bf9ebdf599e96362a5) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch44
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch b/meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch
new file mode 100644
index 0000000000..efc79f6c0f
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch
@@ -0,0 +1,44 @@
1From cbf27cd54071f788231e69d96dbaad563f1010d4 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Fri, 18 Dec 2020 13:15:08 -0500
4Subject: [PATCH] transport: protect include and callsite with same conditional
5
6transport.c has the following code block:
7
8 if (!debugfs_p && security_locked_down (LOCKDOWN_DEBUGFS))
9
10Which is protected by the conditional STAPCONF_LOCKDOWN_DEBUGFS.
11
12linux/security.h provides the definition of LOCKDOWN_DEBUGFS, and
13must be included or we have a compilation issue.
14
15The include of security.h is protected by #ifdef CONFIG_SECURITY_LOCKDOWN_LSM,
16which means that in some configurations we can get out of sync with
17the include and the callsite.
18
19If we protect the include and the callsite with the same #ifdef, we can
20be sure that they will be consistent.
21
22Upstream-status: Inappropriate (kernel-devsrc specific)
23
24Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
25---
26 runtime/transport/transport.c | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
30index bb4a98bd3..88e20ea28 100644
31--- a/runtime/transport/transport.c
32+++ b/runtime/transport/transport.c
33@@ -21,7 +21,7 @@
34 #include <linux/namei.h>
35 #include <linux/delay.h>
36 #include <linux/mutex.h>
37-#ifdef CONFIG_SECURITY_LOCKDOWN_LSM
38+#ifdef STAPCONF_LOCKDOWN_DEBUGFS
39 #include <linux/security.h>
40 #endif
41 #include "../uidgid_compatibility.h"
42--
432.19.1
44
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index ae735025b7..016b423847 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -7,6 +7,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \ 7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \
8 file://0001-Install-python-modules-to-correct-library-dir.patch \ 8 file://0001-Install-python-modules-to-correct-library-dir.patch \
9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ 9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
10 file://0001-transport-protect-include-and-callsite-with-same-con.patch \
10 " 11 "
11 12
12COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux' 13COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux'