Patch "libbpf: Fix VERSIONED_SYM_COUNT number parsing" has been added to the 5.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

    libbpf: Fix VERSIONED_SYM_COUNT number parsing

to the 5.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:
     libbpf-fix-versioned_sym_count-number-parsing.patch
and it can be found in the queue-5.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 68ecced425590b8cfeeb1793aa529ca4c31c263f
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
Date:   Wed Nov 18 22:13:50 2020 +0100

    libbpf: Fix VERSIONED_SYM_COUNT number parsing
    
    [ Upstream commit 1fd6cee127e2ddff36d648573d7566aafb0d0b77 ]
    
    We remove "other info" from "readelf -s --wide" output when
    parsing GLOBAL_SYM_COUNT variable, which was added in [1].
    But we don't do that for VERSIONED_SYM_COUNT and it's failing
    the check_abi target on powerpc Fedora 33.
    
    The extra "other info" wasn't problem for VERSIONED_SYM_COUNT
    parsing until commit [2] added awk in the pipe, which assumes
    that the last column is symbol, but it can be "other info".
    
    Adding "other info" removal for VERSIONED_SYM_COUNT the same
    way as we did for GLOBAL_SYM_COUNT parsing.
    
    [1] aa915931ac3e ("libbpf: Fix readelf output parsing for Fedora")
    [2] 746f534a4809 ("tools/libbpf: Avoid counting local symbols in ABI check")
    
    Fixes: 746f534a4809 ("tools/libbpf: Avoid counting local symbols in ABI check")
    Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
    Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20201118211350.1493421-1-jolsa@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 9ae8f4ef0aac2..8bf2c406b0e05 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -152,6 +152,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \
 			   awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \
 			   sort -u | wc -l)
 VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
+			      sed 's/\[.*\]//' | \
 			      awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \
 			      grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)
 
@@ -220,6 +221,7 @@ check_abi: $(OUTPUT)libbpf.so
 		    awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'|  \
 		    sort -u > $(OUTPUT)libbpf_global_syms.tmp;		 \
 		readelf --dyn-syms --wide $(OUTPUT)libbpf.so |		 \
+		    sed 's/\[.*\]//' |					 \
 		    awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'|  \
 		    grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 |		 \
 		    sort -u > $(OUTPUT)libbpf_versioned_syms.tmp; 	 \



[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