Patch "selftests/ftrace: Add new test case which checks non unique symbol" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/ftrace: Add new test case which checks non unique symbol

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-ftrace-add-new-test-case-which-checks-non-.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1d630d5e51f4d48d5135a94e9374cf7521009c6b
Author: Francis Laniel <flaniel@xxxxxxxxxxxxxxxxxxx>
Date:   Fri Oct 20 13:42:50 2023 +0300

    selftests/ftrace: Add new test case which checks non unique symbol
    
    [ Upstream commit 03b80ff8023adae6780e491f66e932df8165e3a0 ]
    
    If name_show() is non unique, this test will try to install a kprobe on this
    function which should fail returning EADDRNOTAVAIL.
    On kernel where name_show() is not unique, this test is skipped.
    
    Link: https://lore.kernel.org/all/20231020104250.9537-3-flaniel@xxxxxxxxxxxxxxxxxxx/
    
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Francis Laniel <flaniel@xxxxxxxxxxxxxxxxxxx>
    Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
    Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
new file mode 100644
index 0000000000000..bc9514428dbaf
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
@@ -0,0 +1,13 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# description: Test failure of registering kprobe on non unique symbol
+# requires: kprobe_events
+
+SYMBOL='name_show'
+
+# We skip this test on kernel where SYMBOL is unique or does not exist.
+if [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}" /proc/kallsyms)" -le '1' ]; then
+	exit_unsupported
+fi
+
+! echo "p:test_non_unique ${SYMBOL}" > kprobe_events



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux