[OE-core] [PATCH] linux-yocto/5.0: fix systemtap on arm

bruce.ashfield at gmail.com bruce.ashfield at gmail.com
Sat Jun 1 18:45:39 UTC 2019


From: Bruce Ashfield <bruce.ashfield at gmail.com>

The following commit is part of 5.0.17+:

    ARM: fix function graph tracer and unwinder dependencies

    [ Upstream commit 503621628b32782a07b2318e4112bd4372aa3401 ]

    Naresh Kamboju recently reported that the function-graph tracer crashes
    on ARM. The function-graph tracer assumes that the kernel is built with
    frame pointers.

    We explicitly disabled the function-graph tracer when building Thumb2,
    since the Thumb2 ABI doesn't have frame pointers.

    We recently changed the way the unwinder method was selected, which
    seems to have made it more likely that we can end up with the function-
    graph tracer enabled but without the kernel built with frame pointers.

    Fix up the function graph tracer dependencies so the option is not
    available when we have no possibility of having frame pointers, and
    adjust the dependencies on the unwinder option to hide the non-frame
    pointer unwinder options if the function-graph tracer is enabled.

    Reviewed-by: Masami Hiramatsu <mhiramat at kernel.org>
    Tested-by: Masami Hiramatsu <mhiramat at kernel.org>
    Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
    Signed-off-by: Sasha Levin <sashal at kernel.org>

As such, we no longer have UNWINDER_ARM enabled in our ARM builds by
default, since we do have FUNCTION_GRAPH_TRACER enabled in the common
ftrace configuration.

We disable FUNCTION_GRAPH_TRACER for ARM, which allows UNWINDER_ARM to
remain enabled and hence systemtap work out of the box for our ARM
reference builds. Obviously, BSPs or other users of the fragments can
make a different decision, but we chose unwinder to be on by default.

Signed-off-by: Bruce Ashfield <bruce.ashfield at gmail.com>
---

Richard,

If you apply this on top of my latest consolidated pull request, system
should work out of the box again:

   root at qemuarm:~# stap --disable-cache -DSTP_NO_VERREL_CHECK ./hello.stp
   WARNING: Kernel function symbol table missing [man warning::symbols]
   [ 1721.562007] Kprobes globally unoptimized
   [ 1721.617209] stap_2107: loading out-of-tree module taints kernel.
   hello world

Bruce


 meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb   | 2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb | 2 +-
 meta/recipes-kernel/linux/linux-yocto_5.0.bb      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
index 2249feb9fe..e1d2b2e9ac 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
@@ -12,7 +12,7 @@ python () {
 }
 
 SRCREV_machine ?= "9c1e84c9b81b6bf1df55f26f2e0517266c37f7eb"
-SRCREV_meta ?= "d4b67d66fd9d40e4ec149500f57b991c83362a17"
+SRCREV_meta ?= "ff7928637fcdf5a7176a2f735f8cb21cd0f4b219"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.0;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
index 0c240708df..7024d7017f 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
@@ -17,7 +17,7 @@ KCONF_BSP_AUDIT_LEVEL = "2"
 
 SRCREV_machine_qemuarm ?= "fabee455f397ba8054f35a3ad5f2250bbad93bef"
 SRCREV_machine ?= "00638cdd8f92869a0f89ebe3289fdbd856ba9458"
-SRCREV_meta ?= "d4b67d66fd9d40e4ec149500f57b991c83362a17"
+SRCREV_meta ?= "ff7928637fcdf5a7176a2f735f8cb21cd0f4b219"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.0.bb b/meta/recipes-kernel/linux/linux-yocto_5.0.bb
index 0510187197..214e83bd33 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.0.bb
@@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?= "00638cdd8f92869a0f89ebe3289fdbd856ba9458"
 SRCREV_machine_qemux86-64 ?= "00638cdd8f92869a0f89ebe3289fdbd856ba9458"
 SRCREV_machine_qemumips64 ?= "5a8b27bcc0b16077ab8edfcd3fb25c80dc2c652e"
 SRCREV_machine ?= "00638cdd8f92869a0f89ebe3289fdbd856ba9458"
-SRCREV_meta ?= "d4b67d66fd9d40e4ec149500f57b991c83362a17"
+SRCREV_meta ?= "ff7928637fcdf5a7176a2f735f8cb21cd0f4b219"
 
 # remap qemuarm to qemuarma15 for the 5.0 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
-- 
2.19.1



More information about the Openembedded-core mailing list