Kprobe event string type argument failed in ftrace from ubuntu_kernel_selftests on B/C i386

Bug #1825780 reported by Po-Hsu Lin on 2019-04-22
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Undecided
Po-Hsu Lin
linux (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Po-Hsu Lin
Bionic
Undecided
Po-Hsu Lin
Cosmic
Undecided
Po-Hsu Lin

Bug Description

== Justification ==
When running the ftrace in ubunut_kernel_selftests, the "Kprobe event string type argument" test will fail on Bionic / Cosmic i386:
  [22] Kprobe event string type argument [FAIL]

This is because the test was trying to probe a notrace function.
# grep create_trace_kprobe /sys/kernel/debug/tracing/available_filter_functions

== Fix ==
6fc7c411 (selftests/ftrace: Fix kprobe string testcase to not probe notrace function)
This will change the event to trace in the test, from
create_trace_kprobe to tracefs_create_dir

Patch can be cherry-picked for Cosmic.

For Bionic and Xenial, it can be cherry-picked after the commit 9855c462 for bug 1812809.

Although we don't run this ftrace test in Xenial, it will still be a plus to fix this.

It's already been applied in D.

This patch belongs to a patchset [1], in which further limits kprobe-events probing on notrace function. To address this issue for the testing tool this one will be suffice.

[1] https://lkml.org/lkml/2018/7/30/257

== Test ==
Patch tested with Bionic / Cosmic i386. Test passed as expected:
  [22] Kprobe event string type argument [PASS]

== Regression potential ==
None.
This patch is just for the kernel testing tool.

== Original bug report ==
Failure spotted on Bionic / Cosmic i386 (node fozzie)

[22] Kprobe event string type argument [FAIL]

 selftests: ftrace: ftracetest
 ========================================
 === Ftrace unit tests ===
 [1] Basic trace file check [PASS]
 [2] Basic test for tracers [PASS]
 [3] Basic trace clock test [PASS]
 [4] Basic event tracing check [PASS]
 [5] Snapshot and tracing setting [PASS]
 [6] event tracing - enable/disable with event level files [PASS]
 [7] event tracing - restricts events based on pid [PASS]
 [8] event tracing - enable/disable with subsystem level files [PASS]
 [9] event tracing - enable/disable with top level files [PASS]
 [10] ftrace - function graph filters with stack tracer [PASS]
 [11] ftrace - function graph filters [PASS]
 [12] ftrace - function pid filters [PASS]
 [13] ftrace - test for function event triggers [PASS]
 [14] ftrace - function profiler with function tracing [PASS]
 [15] ftrace - test reading of set_ftrace_filter [PASS]
 [16] ftrace - test for function traceon/off triggers [PASS]
 [17] Test creation and deletion of trace instances while setting an event [PASS]
 [18] Test creation and deletion of trace instances [PASS]
 [19] Kprobe dynamic event - adding and removing [PASS]
 [20] Kprobe dynamic event - busy event check [PASS]
 [21] Kprobe dynamic event with arguments [PASS]
 [22] Kprobe event string type argument [FAIL]
 [23] Kprobe event argument syntax [PASS]
 [24] Kprobes event arguments with types [PASS]
 [25] Kprobe event auto/manual naming [PASS]
 [26] Kprobe dynamic event with function tracer [PASS]
 [27] Kretprobe dynamic event with arguments [PASS]
 [28] Kretprobe dynamic event with maxactive [PASS]
 [29] Register/unregister many kprobe events [PASS]
 [30] event trigger - test extended error support [PASS]
 [31] event trigger - test field variable support [PASS]
 [32] event trigger - test multiple actions on hist trigger [PASS]
 [33] event trigger - test inter-event histogram trigger onmatch action [PASS]
 [34] event trigger - test inter-event histogram trigger onmatch-onmax action [PASS]
 [35] event trigger - test inter-event histogram trigger onmax action [PASS]
 [36] event trigger - test synthetic_events syntax parser [PASS]
 [37] event trigger - test event enable/disable trigger [PASS]
 [38] event trigger - test trigger filter [PASS]
 [39] event trigger - test histogram modifiers [PASS]
 [40] event trigger - test multiple histogram triggers [PASS]
 [41] event trigger - test snapshot-trigger [PASS]
 [42] event trigger - test stacktrace-trigger [PASS]
 [43] trace_marker trigger - test snapshot trigger [PASS]
 [44] trace_marker trigger - test histogram with synthetic event against kernel event [PASS]
 [45] trace_marker trigger - test histogram with synthetic event [PASS]
 [46] event trigger - test traceon/off trigger [PASS]
 [47] (instance) Basic test for tracers [PASS]
 [48] (instance) Basic trace clock test [PASS]
 [49] (instance) Snapshot and tracing setting [PASS]
 [50] (instance) event tracing - enable/disable with event level files [PASS]
 [51] (instance) event tracing - restricts events based on pid [PASS]
 [52] (instance) event tracing - enable/disable with subsystem level files [PASS]
 [53] (instance) ftrace - test for function event triggers [PASS]
 [54] (instance) ftrace - test for function traceon/off triggers [PASS]
 [55] (instance) event trigger - test event enable/disable trigger [PASS]
 [56] (instance) event trigger - test trigger filter [PASS]
 [57] (instance) event trigger - test histogram modifiers [PASS]
 [58] (instance) event trigger - test multiple histogram triggers [PASS]
 [59] (instance) trace_marker trigger - test snapshot trigger [PASS]

 # of passed: 58
 # of failed: 1
 # of unresolved: 0
 # of untested: 0
 # of unsupported: 0
 # of xfailed: 0
 # of undefined(test bug): 0
 not ok 1..1 selftests: ftrace: ftracetest [FAIL]

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1825780

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Bionic):
status: New → Incomplete
Changed in linux (Ubuntu Cosmic):
status: New → Incomplete
Po-Hsu Lin (cypressyew) wrote :

Not sure about Disco, it seem that this test suite was not successfully tested on it.

tags: added: bionic cosmic
Po-Hsu Lin (cypressyew) wrote :

This issue can be fixed by patch:
https://github.com/torvalds/linux/commit/6fc7c4110cbaff85b1f49fd70b77950384c3a201

It's already in Disco.

Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Changed in linux (Ubuntu Bionic):
status: Incomplete → In Progress
Changed in linux (Ubuntu Cosmic):
status: Incomplete → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Bionic):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Po-Hsu Lin (cypressyew) on 2019-04-22
description: updated
Po-Hsu Lin (cypressyew) on 2019-04-23
Changed in linux (Ubuntu Xenial):
status: New → Fix Committed
status: Fix Committed → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Po-Hsu Lin (cypressyew) on 2019-04-23
description: updated
Po-Hsu Lin (cypressyew) wrote :

BTW,
this patch belongs to a patchset [1], in which further limiting kprobe-events probing on notrace function

[1] https://lkml.org/lkml/2018/7/30/257

Po-Hsu Lin (cypressyew) on 2019-04-23
description: updated
Po-Hsu Lin (cypressyew) on 2019-04-23
description: updated
Changed in linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Cosmic):
status: In Progress → Fix Committed

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
Po-Hsu Lin (cypressyew) wrote :

Test passed with Bionic i386.

tags: added: verification-done-xenial
removed: verification-needed-xenial
tags: added: verification-done-bionic
removed: verification-needed-bionic

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-cosmic' to 'verification-done-cosmic'. If the problem still exists, change the tag 'verification-needed-cosmic' to 'verification-failed-cosmic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-cosmic
Po-Hsu Lin (cypressyew) wrote :

Passed with Cosmic i386 with proposed kernel.

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (19.2 KiB)

This bug was fixed in the package linux - 4.4.0-150.176

---------------
linux (4.4.0-150.176) xenial; urgency=medium

  * linux: 4.4.0-150.176 -proposed tracker (LP: #1830941)

  * glibc 2.23-0ubuntu11 ADT test failure with linux 4.4.0-149.175
    (LP: #1830890)
    - x86/vdso: Pass --eh-frame-hdr to the linker

linux (4.4.0-149.175) xenial; urgency=medium

  * linux: 4.4.0-149.175 -proposed tracker (LP: #1829209)

  * disable a.out support (LP: #1818552)
    - [Config] Disable a.out support

  * autopkgtests run too often, too much and don't skip enough (LP: #1823056)
    - [Debian] Set +x on rebuild testcase.
    - [Debian] Skip rebuild test, for regression-suite deps.
    - [Debian] Make ubuntu-regression-suite skippable on unbootable kernels.
    - [Debian] make rebuild use skippable error codes when skipping.
    - [Debian] Only run regression-suite, if requested to.

  * Xenial update: 4.4.179 upstream stable release (LP: #1828420)
    - arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals
    - arm64: debug: Ensure debug handlers check triggering exception level
    - ext4: cleanup bh release code in ext4_ind_remove_space()
    - lib/int_sqrt: optimize initial value compute
    - tty/serial: atmel: Add is_half_duplex helper
    - mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified
    - i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA
    - Bluetooth: Fix decrementing reference count twice in releasing socket
    - tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped
    - CIFS: fix POSIX lock leak and invalid ptr deref
    - h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
    - tracing: kdb: Fix ftdump to not sleep
    - gpio: gpio-omap: fix level interrupt idling
    - sysctl: handle overflow for file-max
    - enic: fix build warning without CONFIG_CPUMASK_OFFSTACK
    - mm/cma.c: cma_declare_contiguous: correct err handling
    - mm/page_ext.c: fix an imbalance with kmemleak
    - mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512!
    - mm/slab.c: kmemleak no scan alien caches
    - ocfs2: fix a panic problem caused by o2cb_ctl
    - f2fs: do not use mutex lock in atomic context
    - fs/file.c: initialize init_files.resize_wait
    - cifs: use correct format characters
    - dm thin: add sanity checks to thin-pool and external snapshot creation
    - cifs: Fix NULL pointer dereference of devname
    - fs: fix guard_bio_eod to check for real EOD errors
    - tools lib traceevent: Fix buffer overflow in arg_eval
    - usb: chipidea: Grab the (legacy) USB PHY by phandle first
    - scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c
    - coresight: etm4x: Add support to enable ETMv4.2
    - ARM: 8840/1: use a raw_spinlock_t in unwind
    - mmc: omap: fix the maximum timeout setting
    - e1000e: Fix -Wformat-truncation warnings
    - IB/mlx4: Increase the timeout for CM cache
    - scsi: megaraid_sas: return error when create DMA pool failed
    - perf test: Fix failure of 'evsel-tp-sched' test on s390
    - SoC: imx-sgtl5000: add missing put_device()
    - media: sh_veu: Correct return type for mem2mem buffer helpers
    - media: s5...

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (3.8 KiB)

This bug was fixed in the package linux - 4.15.0-51.55

---------------
linux (4.15.0-51.55) bionic; urgency=medium

  * linux: 4.15.0-51.55 -proposed tracker (LP: #1829219)

  * disable a.out support (LP: #1818552)
    - [Config] Disable a.out support

  * [UBUNTU] qdio: clear intparm during shutdown (LP: #1828394)
    - s390/qdio: clear intparm during shutdown

  * ftrace in ubuntu_kernel_selftests hang with Cosmic kernel (LP: #1826385)
    - kprobes/x86: Fix instruction patching corruption when copying more than one
      RIP-relative instruction

  * touchpad not working on lenovo yoga 530 (LP: #1787775)
    - Revert "UBUNTU: SAUCE: i2c:amd Depends on ACPI"
    - Revert "UBUNTU: SAUCE: i2c:amd move out pointer in union i2c_event_base"
    - Revert "UBUNTU: SAUCE: i2c:amd I2C Driver based on PCI Interface for
      upcoming platform"
    - i2c: add helpers to ease DMA handling
    - i2c: add a message flag for DMA safe buffers
    - i2c: add extra check to safe DMA buffer helper
    - i2c: Add drivers for the AMD PCIe MP2 I2C controller
    - [Config] Update config for AMD MP2 I2C driver
    - [Config] Update I2C_AMD_MP2 annotations

  * tm-unavailable in powerpc/tm failed on Bionic Power9 (LP: #1813129)
    - selftests/powerpc: Check for pthread errors in tm-unavailable
    - selftests/powerpc: Skip tm-unavailable if TM is not enabled

  * cp_abort in powerpc/context_switch from ubunut_kernel_selftests failed on
    Bionic P9 (LP: #1813134)
    - selftests/powerpc: Remove redundant cp_abort test

  * bionic/linux: completely remove snapdragon files from sources (LP: #1827880)
    - [Packaging] remove snapdragon dead files
    - [Config] update configs after snapdragon removal

  * The noise keeps occurring when Headset is plugged in on a Dell machine
    (LP: #1827972)
    - ALSA: hda/realtek - Fixed Dell AIO speaker noise

  * Geneve tunnels don't work when ipv6 is disabled (LP: #1794232)
    - geneve: correctly handle ipv6.disable module parameter

  * There are 4 HDMI/Displayport audio output listed in sound setting without
    attach any HDMI/DP monitor (LP: #1827967)
    - ALSA: hda/hdmi - Read the pin sense from register when repolling
    - ALSA: hda/hdmi - Consider eld_valid when reporting jack event

  * Headphone jack switch sense is inverted: plugging in headphones disables
    headphone output (LP: #1824259)
    - ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

  * CTAUTO:DevOps:860.50:devops4fp1:Error occurred during LINUX Dmesg error
    Checking for all LINUX clients for devops4p10 (LP: #1766201)
    - SAUCE: integrity: downgrade error to warning

  * Screen freeze after resume from S3 when HDMI monitor plugged on Dell
    Precision 7740 (LP: #1825958)
    - PCI: Restore resized BAR state on resume

  * potential memory corruption on arm64 on dev release (LP: #1827437)
    - driver core: Postpone DMA tear-down until after devres release

  * powerpc/pmu/ebb test in ubuntu_kernel_selftest failed with "error while
    loading shared libraries" on Bionic/Cosmic PowerPC (LP: #1812805)
    - selftests/powerpc/pmu: Link ebb tests with -no-pie

  * unnecessary request_queue freeze (LP: #1815733)
    - block: av...

Read more...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 4.18.0-21.22

---------------
linux (4.18.0-21.22) cosmic; urgency=medium

  * linux: 4.18.0-21.22 -proposed tracker (LP: #1829186)

  * disable a.out support (LP: #1818552)
    - [Config] Turn off a.out support

  * ftrace in ubuntu_kernel_selftests hang with Cosmic kernel (LP: #1826385)
    - kprobes/x86: Fix instruction patching corruption when copying more than one
      RIP-relative instruction

  * touchpad not working on lenovo yoga 530 (LP: #1787775)
    - Revert "UBUNTU: SAUCE: i2c:amd Depends on ACPI"
    - Revert "UBUNTU: SAUCE: i2c:amd move out pointer in union i2c_event_base"
    - Revert "UBUNTU: SAUCE: i2c:amd I2C Driver based on PCI Interface for
      upcoming platform"
    - i2c: add extra check to safe DMA buffer helper
    - i2c: Add drivers for the AMD PCIe MP2 I2C controller
    - [Config] Update config for AMD MP2 I2C driver
    - [Config] Update I2C_AMD_MP2 annotations

  * Geneve tunnels don't work when ipv6 is disabled (LP: #1794232)
    - geneve: correctly handle ipv6.disable module parameter

  * There are 4 HDMI/Displayport audio output listed in sound setting without
    attach any HDMI/DP monitor (LP: #1827967)
    - ALSA: hda/hdmi - Read the pin sense from register when repolling
    - ALSA: hda/hdmi - Consider eld_valid when reporting jack event

  * Headphone jack switch sense is inverted: plugging in headphones disables
    headphone output (LP: #1824259)
    - ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

  * CTAUTO:DevOps:860.50:devops4fp1:Error occurred during LINUX Dmesg error
    Checking for all LINUX clients for devops4p10 (LP: #1766201)
    - SAUCE: integrity: downgrade error to warning

  * potential memory corruption on arm64 on dev release (LP: #1827437)
    - driver core: Postpone DMA tear-down until after devres release

  * powerpc/pmu/ebb test in ubuntu_kernel_selftest failed with "error while
    loading shared libraries" on Bionic/Cosmic PowerPC (LP: #1812805)
    - selftests/powerpc/pmu: Link ebb tests with -no-pie

  * unnecessary request_queue freeze (LP: #1815733)
    - block: avoid setting nr_requests to current value
    - block: avoid setting none scheduler if it's already none

  * Kprobe event string type argument failed in ftrace from
    ubuntu_kernel_selftests on B/C i386 (LP: #1825780)
    - selftests/ftrace: Fix kprobe string testcase to not probe notrace function

  * False positive test result in run_netsocktests from net in
    ubuntu_kernel_selftest (LP: #1825777)
    - selftests/net: correct the return value for run_netsocktests

 -- Stefan Bader <email address hidden> Wed, 15 May 2019 13:18:36 +0200

Changed in linux (Ubuntu Cosmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers