Patch "samples: bpf: Replace symbol compare of trace_event" has been added to the 4.9-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

    samples: bpf: Replace symbol compare of trace_event

to the 4.9-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:
     samples-bpf-replace-symbol-compare-of-trace_event.patch
and it can be found in the queue-4.9 subdirectory.

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



commit fe290723482f1a8dcb379bc2a1e02468d149584e
Author: Daniel T. Lee <danieltimlee@xxxxxxxxx>
Date:   Thu Dec 5 17:01:13 2019 +0900

    samples: bpf: Replace symbol compare of trace_event
    
    [ Upstream commit bba1b2a890253528c45aa66cf856f289a215bfbc ]
    
    Previously, when this sample is added, commit 1c47910ef8013
    ("samples/bpf: add perf_event+bpf example"), a symbol 'sys_read' and
    'sys_write' has been used without no prefixes. But currently there are
    no exact symbols with these under kallsyms and this leads to failure.
    
    This commit changes exact compare to substring compare to keep compatible
    with exact symbol or prefixed symbol.
    
    Fixes: 1c47910ef8013 ("samples/bpf: add perf_event+bpf example")
    Signed-off-by: Daniel T. Lee <danieltimlee@xxxxxxxxx>
    Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20191205080114.19766-2-danieltimlee@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/samples/bpf/trace_event_user.c b/samples/bpf/trace_event_user.c
index 9a130d31ecf2..6fbb5eb9daf3 100644
--- a/samples/bpf/trace_event_user.c
+++ b/samples/bpf/trace_event_user.c
@@ -33,9 +33,9 @@ static void print_ksym(__u64 addr)
 		return;
 	sym = ksym_search(addr);
 	printf("%s;", sym->name);
-	if (!strcmp(sym->name, "sys_read"))
+	if (!strstr(sym->name, "sys_read"))
 		sys_read_seen = true;
-	else if (!strcmp(sym->name, "sys_write"))
+	else if (!strstr(sym->name, "sys_write"))
 		sys_write_seen = true;
 }
 



[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