Bug 13507 - [stable/thud-nmut] beaglebone-yocto lttng-modules fails
Summary: [stable/thud-nmut] beaglebone-yocto lttng-modules fails
Status: CLOSED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.6.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.6.5
Assignee: Armin Kuster
QA Contact:
URL: https://errors.yoctoproject.org/Error...
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-09-09 17:47 UTC by Armin Kuster
Modified: 2019-12-04 16:08 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
bump to v4.14.143 (4.53 KB, patch)
2019-09-15 14:08 UTC, Bruce Ashfield
no flags Details | Diff
bump yp bsps to 4.14.143 too (2.24 KB, patch)
2019-09-15 22:09 UTC, Armin Kuster
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Kuster 2019-09-09 17:47:37 UTC
TOPDIR/tmp/work/beaglebone_yocto-poky-linux-gnueabi/lttng-modules/2.10.9-r0/lttng-modules-2.10.9/probes/../blacklist/kprobes.h:19:4: error: #error "Your kernel is known to have buggy optimized kprobes implementation. Fixed by commit 0ac569bf6a7983c0c5747d6df8db9dc05bc92b6c \"ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction\" in Linux. Disable CONFIG_OPTPROBES or upgrade your kernel."
 #  error "Your kernel is known to have buggy optimized kprobes implementation. Fixed by commit 0ac569bf6a7983c0c5747d6df8db9dc05bc92b6c \"ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction\" in Linux. Disable CONFIG_OPTPROBES or upgrade your kernel."
    ^~~~~


The 4.14 got updated and now we see this error. 


https://github.com/lttng/lttng-modules/commit/2d16de12b197aed57212826187bcb0ab24ad071e
Comment 1 Armin Kuster 2019-09-09 17:47:48 UTC
commit e46daee53bb50bde38805f1823a182979724c229
Author: Kees Cook <keescook@chromium.org>
Date:   Tue Oct 30 22:12:56 2018 +0100

    ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE

    The arm compiler internally interprets an inline assembly label
    as an unsigned long value, not a pointer. As a result, under
    CONFIG_FORTIFY_SOURCE, the address of a label has a size of 4 bytes,
    which was tripping the runtime checks. Instead, we can just cast the label
    (as done with the size calculations earlier).

    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1639397

    Reported-by: William Cohen <wcohen@redhat.com>
    Fixes: 6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions")
    Cc: stable@vger.kernel.org
    Acked-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
    Tested-by: William Cohen <wcohen@redhat.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

It was introduced in the 4.20 cycle.
It was also backported to the 4.19 and 4.14 branch.
Comment 2 Armin Kuster 2019-09-09 17:48:06 UTC
This issue is fixed upstream by [1] and is present in the 5.0 kernel
release.

[1] 0ac569bf6a7983c0c5747d6df8db9dc05bc92b6c

The fix was backported to 4.20, 4.19 and 4.14 branch.
It is included starting at:
    v5.0.0
    v4.20.13
    v4.19.26
    v4.14.104
Comment 3 Armin Kuster 2019-09-09 17:51:49 UTC
I believe updating thud's 4.14 to .120 should address this error.

Fix is pending kernel updates that should be done in the next few weeks. 

Not hold up dot release.
Comment 4 Bruce Ashfield 2019-09-15 14:08:28 UTC
Created attachment 4561 [details]
bump to v4.14.143

Try the following patch, it takes 4.14 to .143
Comment 5 Armin Kuster 2019-09-15 14:24:31 UTC
giving it a try today
Comment 6 Armin Kuster 2019-09-15 15:02:26 UTC
in AB being build tested.
Comment 7 Armin Kuster 2019-09-15 22:08:21 UTC
heheheh, it kept failing even after applying patch.. is a meta-yocto-bsp so it needs patching too. I have one tested.
Comment 8 Armin Kuster 2019-09-15 22:09:22 UTC
Created attachment 4562 [details]
bump yp bsps to 4.14.143 too
Comment 9 Armin Kuster 2019-09-15 23:03:04 UTC
bsp patch sent to list.
Comment 10 Armin Kuster 2019-09-16 15:32:28 UTC
(In reply to comment #4)
> Created attachment 4561 [details]
> bump to v4.14.143
> 
> Try the following patch, it takes 4.14 to .143

want me to send it to the list?
Comment 11 Armin Kuster 2019-09-16 17:28:55 UTC
patches sent to list
Comment 13 Armin Kuster 2019-10-13 19:30:00 UTC
waiting for merge.
Comment 16 Armin Kuster 2019-12-04 16:08:00 UTC
closing