]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up libbpf patch to apply with quilt properly
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Apr 2022 15:01:14 +0000 (17:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Apr 2022 15:01:14 +0000 (17:01 +0200)
queue-5.10/libbpf-fix-build-issue-with-llvm-readelf.patch
queue-5.15/libbpf-fix-build-issue-with-llvm-readelf.patch
queue-5.16/libbpf-fix-build-issue-with-llvm-readelf.patch
queue-5.17/libbpf-fix-build-issue-with-llvm-readelf.patch

index b144e94c0454681916afe126423dbe6f52bc251d..25a5b64622293bc903111ae98fe5256714b1e75a 100644 (file)
@@ -12,38 +12,38 @@ readelf is a symbolic link to llvm-readelf. In such cases,
 llvm-readelf will be used instead of default binutils readelf,
 and the following error will appear during libbpf build:
 
-  Warning: Num of global symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
-   does NOT match with num of versioned symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
-   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
-  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
-  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
-  @@ -324,6 +324,22 @@
-   btf__str_by_offset
-   btf__type_by_id
-   btf__type_cnt
-  +LIBBPF_0.0.1
-  +LIBBPF_0.0.2
-  +LIBBPF_0.0.3
-  +LIBBPF_0.0.4
-  +LIBBPF_0.0.5
-  +LIBBPF_0.0.6
-  +LIBBPF_0.0.7
-  +LIBBPF_0.0.8
-  +LIBBPF_0.0.9
-  +LIBBPF_0.1.0
-  +LIBBPF_0.2.0
-  +LIBBPF_0.3.0
-  +LIBBPF_0.4.0
-  +LIBBPF_0.5.0
-  +LIBBPF_0.6.0
-  +LIBBPF_0.7.0
-   libbpf_attach_type_by_name
-   libbpf_find_kernel_btf
-   libbpf_find_vmlinux_btf_id
-  make[2]: *** [Makefile:184: check_abi] Error 1
-  make[1]: *** [Makefile:140: all] Error 2
+#  Warning: Num of global symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
+#   does NOT match with num of versioned symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
+#   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
+#  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
+#  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
+#  @@ -324,6 +324,22 @@
+#   btf__str_by_offset
+#   btf__type_by_id
+#   btf__type_cnt
+#  +LIBBPF_0.0.1
+#  +LIBBPF_0.0.2
+#  +LIBBPF_0.0.3
+#  +LIBBPF_0.0.4
+#  +LIBBPF_0.0.5
+#  +LIBBPF_0.0.6
+#  +LIBBPF_0.0.7
+#  +LIBBPF_0.0.8
+#  +LIBBPF_0.0.9
+#  +LIBBPF_0.1.0
+#  +LIBBPF_0.2.0
+#  +LIBBPF_0.3.0
+#  +LIBBPF_0.4.0
+#  +LIBBPF_0.5.0
+#  +LIBBPF_0.6.0
+#  +LIBBPF_0.7.0
+#   libbpf_attach_type_by_name
+#   libbpf_find_kernel_btf
+#   libbpf_find_vmlinux_btf_id
+#  make[2]: *** [Makefile:184: check_abi] Error 1
+#  make[1]: *** [Makefile:140: all] Error 2
 
 The above failure is due to different printouts for some ABS
 versioned symbols. For example, with the same libbpf.so,
@@ -66,15 +66,14 @@ Signed-off-by: Yonghong Song <yhs@fb.com>
 Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
 Link: https://lore.kernel.org/bpf/20220204214355.502108-1-yhs@fb.com
 Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- tools/lib/bpf/Makefile | 4 ++--
+ tools/lib/bpf/Makefile |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
-index 154b75fc1373..f2a353bba25f 100644
 --- a/tools/lib/bpf/Makefile
 +++ b/tools/lib/bpf/Makefile
-@@ -147,7 +147,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \
+@@ -147,7 +147,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --
                           sort -u | wc -l)
  VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
                              sed 's/\[.*\]//' | \
@@ -83,7 +82,7 @@ index 154b75fc1373..f2a353bba25f 100644
                              grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)
  
  CMD_TARGETS = $(LIB_TARGET) $(PC_FILE)
-@@ -216,7 +216,7 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_SCRIPT)
+@@ -216,7 +216,7 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_
                    sort -u > $(OUTPUT)libbpf_global_syms.tmp;           \
                readelf --dyn-syms --wide $(OUTPUT)libbpf.so |           \
                    sed 's/\[.*\]//' |                                   \
@@ -92,6 +91,3 @@ index 154b75fc1373..f2a353bba25f 100644
                    grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 |             \
                    sort -u > $(OUTPUT)libbpf_versioned_syms.tmp;        \
                diff -u $(OUTPUT)libbpf_global_syms.tmp                  \
--- 
-2.35.1
-
index 53ad0aebecfd3a005f0d590a99e6cc745ecc4c95..64534e6e8eae1e4c6e7f27230df1bd7bd7e38903 100644 (file)
@@ -12,38 +12,38 @@ readelf is a symbolic link to llvm-readelf. In such cases,
 llvm-readelf will be used instead of default binutils readelf,
 and the following error will appear during libbpf build:
 
-  Warning: Num of global symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
-   does NOT match with num of versioned symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
-   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
-  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
-  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
-  @@ -324,6 +324,22 @@
-   btf__str_by_offset
-   btf__type_by_id
-   btf__type_cnt
-  +LIBBPF_0.0.1
-  +LIBBPF_0.0.2
-  +LIBBPF_0.0.3
-  +LIBBPF_0.0.4
-  +LIBBPF_0.0.5
-  +LIBBPF_0.0.6
-  +LIBBPF_0.0.7
-  +LIBBPF_0.0.8
-  +LIBBPF_0.0.9
-  +LIBBPF_0.1.0
-  +LIBBPF_0.2.0
-  +LIBBPF_0.3.0
-  +LIBBPF_0.4.0
-  +LIBBPF_0.5.0
-  +LIBBPF_0.6.0
-  +LIBBPF_0.7.0
-   libbpf_attach_type_by_name
-   libbpf_find_kernel_btf
-   libbpf_find_vmlinux_btf_id
-  make[2]: *** [Makefile:184: check_abi] Error 1
-  make[1]: *** [Makefile:140: all] Error 2
+#  Warning: Num of global symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
+#   does NOT match with num of versioned symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
+#   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
+#  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
+#  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
+#  @@ -324,6 +324,22 @@
+#   btf__str_by_offset
+#   btf__type_by_id
+#   btf__type_cnt
+#  +LIBBPF_0.0.1
+#  +LIBBPF_0.0.2
+#  +LIBBPF_0.0.3
+#  +LIBBPF_0.0.4
+#  +LIBBPF_0.0.5
+#  +LIBBPF_0.0.6
+#  +LIBBPF_0.0.7
+#  +LIBBPF_0.0.8
+#  +LIBBPF_0.0.9
+#  +LIBBPF_0.1.0
+#  +LIBBPF_0.2.0
+#  +LIBBPF_0.3.0
+#  +LIBBPF_0.4.0
+#  +LIBBPF_0.5.0
+#  +LIBBPF_0.6.0
+#  +LIBBPF_0.7.0
+#   libbpf_attach_type_by_name
+#   libbpf_find_kernel_btf
+#   libbpf_find_vmlinux_btf_id
+#  make[2]: *** [Makefile:184: check_abi] Error 1
+#  make[1]: *** [Makefile:140: all] Error 2
 
 The above failure is due to different printouts for some ABS
 versioned symbols. For example, with the same libbpf.so,
@@ -66,6 +66,7 @@ Signed-off-by: Yonghong Song <yhs@fb.com>
 Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
 Link: https://lore.kernel.org/bpf/20220204214355.502108-1-yhs@fb.com
 Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
  tools/lib/bpf/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
index 1e57e69acf66d3d7299a89aff0848b583ce6e7dd..ea8d9bd1bb9da35969d478ba15606db0db069529 100644 (file)
@@ -12,38 +12,38 @@ readelf is a symbolic link to llvm-readelf. In such cases,
 llvm-readelf will be used instead of default binutils readelf,
 and the following error will appear during libbpf build:
 
-  Warning: Num of global symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
-   does NOT match with num of versioned symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
-   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
-  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
-  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
-  @@ -324,6 +324,22 @@
-   btf__str_by_offset
-   btf__type_by_id
-   btf__type_cnt
-  +LIBBPF_0.0.1
-  +LIBBPF_0.0.2
-  +LIBBPF_0.0.3
-  +LIBBPF_0.0.4
-  +LIBBPF_0.0.5
-  +LIBBPF_0.0.6
-  +LIBBPF_0.0.7
-  +LIBBPF_0.0.8
-  +LIBBPF_0.0.9
-  +LIBBPF_0.1.0
-  +LIBBPF_0.2.0
-  +LIBBPF_0.3.0
-  +LIBBPF_0.4.0
-  +LIBBPF_0.5.0
-  +LIBBPF_0.6.0
-  +LIBBPF_0.7.0
-   libbpf_attach_type_by_name
-   libbpf_find_kernel_btf
-   libbpf_find_vmlinux_btf_id
-  make[2]: *** [Makefile:184: check_abi] Error 1
-  make[1]: *** [Makefile:140: all] Error 2
+#  Warning: Num of global symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
+#   does NOT match with num of versioned symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
+#   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
+#  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
+#  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
+#  @@ -324,6 +324,22 @@
+#   btf__str_by_offset
+#   btf__type_by_id
+#   btf__type_cnt
+#  +LIBBPF_0.0.1
+#  +LIBBPF_0.0.2
+#  +LIBBPF_0.0.3
+#  +LIBBPF_0.0.4
+#  +LIBBPF_0.0.5
+#  +LIBBPF_0.0.6
+#  +LIBBPF_0.0.7
+#  +LIBBPF_0.0.8
+#  +LIBBPF_0.0.9
+#  +LIBBPF_0.1.0
+#  +LIBBPF_0.2.0
+#  +LIBBPF_0.3.0
+#  +LIBBPF_0.4.0
+#  +LIBBPF_0.5.0
+#  +LIBBPF_0.6.0
+#  +LIBBPF_0.7.0
+#   libbpf_attach_type_by_name
+#   libbpf_find_kernel_btf
+#   libbpf_find_vmlinux_btf_id
+#  make[2]: *** [Makefile:184: check_abi] Error 1
+#  make[1]: *** [Makefile:140: all] Error 2
 
 The above failure is due to different printouts for some ABS
 versioned symbols. For example, with the same libbpf.so,
@@ -66,15 +66,14 @@ Signed-off-by: Yonghong Song <yhs@fb.com>
 Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
 Link: https://lore.kernel.org/bpf/20220204214355.502108-1-yhs@fb.com
 Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- tools/lib/bpf/Makefile | 4 ++--
+ tools/lib/bpf/Makefile |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
-index b393b5e82380..d1b474f3c586 100644
 --- a/tools/lib/bpf/Makefile
 +++ b/tools/lib/bpf/Makefile
-@@ -129,7 +129,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \
+@@ -129,7 +129,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --
                           sort -u | wc -l)
  VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
                              sed 's/\[.*\]//' | \
@@ -83,7 +82,7 @@ index b393b5e82380..d1b474f3c586 100644
                              grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)
  
  CMD_TARGETS = $(LIB_TARGET) $(PC_FILE)
-@@ -192,7 +192,7 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_SCRIPT)
+@@ -192,7 +192,7 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_
                    sort -u > $(OUTPUT)libbpf_global_syms.tmp;           \
                readelf --dyn-syms --wide $(OUTPUT)libbpf.so |           \
                    sed 's/\[.*\]//' |                                   \
@@ -92,6 +91,3 @@ index b393b5e82380..d1b474f3c586 100644
                    grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 |             \
                    sort -u > $(OUTPUT)libbpf_versioned_syms.tmp;        \
                diff -u $(OUTPUT)libbpf_global_syms.tmp                  \
--- 
-2.35.1
-
index 559f03e7eedffdf7216eb652a66bbe8448391715..9ae22c051cc0efbd1c942b568d8bae8d35c8baf8 100644 (file)
@@ -12,38 +12,38 @@ readelf is a symbolic link to llvm-readelf. In such cases,
 llvm-readelf will be used instead of default binutils readelf,
 and the following error will appear during libbpf build:
 
-  Warning: Num of global symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
-   does NOT match with num of versioned symbols in
-   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
-   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
-  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
-  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
-  @@ -324,6 +324,22 @@
-   btf__str_by_offset
-   btf__type_by_id
-   btf__type_cnt
-  +LIBBPF_0.0.1
-  +LIBBPF_0.0.2
-  +LIBBPF_0.0.3
-  +LIBBPF_0.0.4
-  +LIBBPF_0.0.5
-  +LIBBPF_0.0.6
-  +LIBBPF_0.0.7
-  +LIBBPF_0.0.8
-  +LIBBPF_0.0.9
-  +LIBBPF_0.1.0
-  +LIBBPF_0.2.0
-  +LIBBPF_0.3.0
-  +LIBBPF_0.4.0
-  +LIBBPF_0.5.0
-  +LIBBPF_0.6.0
-  +LIBBPF_0.7.0
-   libbpf_attach_type_by_name
-   libbpf_find_kernel_btf
-   libbpf_find_vmlinux_btf_id
-  make[2]: *** [Makefile:184: check_abi] Error 1
-  make[1]: *** [Makefile:140: all] Error 2
+#  Warning: Num of global symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o (367)
+#   does NOT match with num of versioned symbols in
+#   /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so libbpf.map (383).
+#   Please make sure all LIBBPF_API symbols are versioned in libbpf.map.
+#  --- /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_global_syms.tmp ...
+#  +++ /home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/build/libbpf/libbpf_versioned_syms.tmp ...
+#  @@ -324,6 +324,22 @@
+#   btf__str_by_offset
+#   btf__type_by_id
+#   btf__type_cnt
+#  +LIBBPF_0.0.1
+#  +LIBBPF_0.0.2
+#  +LIBBPF_0.0.3
+#  +LIBBPF_0.0.4
+#  +LIBBPF_0.0.5
+#  +LIBBPF_0.0.6
+#  +LIBBPF_0.0.7
+#  +LIBBPF_0.0.8
+#  +LIBBPF_0.0.9
+#  +LIBBPF_0.1.0
+#  +LIBBPF_0.2.0
+#  +LIBBPF_0.3.0
+#  +LIBBPF_0.4.0
+#  +LIBBPF_0.5.0
+#  +LIBBPF_0.6.0
+#  +LIBBPF_0.7.0
+#   libbpf_attach_type_by_name
+#   libbpf_find_kernel_btf
+#   libbpf_find_vmlinux_btf_id
+#  make[2]: *** [Makefile:184: check_abi] Error 1
+#  make[1]: *** [Makefile:140: all] Error 2
 
 The above failure is due to different printouts for some ABS
 versioned symbols. For example, with the same libbpf.so,
@@ -66,15 +66,14 @@ Signed-off-by: Yonghong Song <yhs@fb.com>
 Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
 Link: https://lore.kernel.org/bpf/20220204214355.502108-1-yhs@fb.com
 Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- tools/lib/bpf/Makefile | 4 ++--
+ tools/lib/bpf/Makefile |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
-index f947b61b2107..b8b37fe76006 100644
 --- a/tools/lib/bpf/Makefile
 +++ b/tools/lib/bpf/Makefile
-@@ -131,7 +131,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \
+@@ -131,7 +131,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --
                           sort -u | wc -l)
  VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
                              sed 's/\[.*\]//' | \
@@ -83,7 +82,7 @@ index f947b61b2107..b8b37fe76006 100644
                              grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)
  
  CMD_TARGETS = $(LIB_TARGET) $(PC_FILE)
-@@ -194,7 +194,7 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_SCRIPT)
+@@ -194,7 +194,7 @@ check_abi: $(OUTPUT)libbpf.so $(VERSION_
                    sort -u > $(OUTPUT)libbpf_global_syms.tmp;           \
                readelf --dyn-syms --wide $(OUTPUT)libbpf.so |           \
                    sed 's/\[.*\]//' |                                   \
@@ -92,6 +91,3 @@ index f947b61b2107..b8b37fe76006 100644
                    grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 |             \
                    sort -u > $(OUTPUT)libbpf_versioned_syms.tmp;        \
                diff -u $(OUTPUT)libbpf_global_syms.tmp                  \
--- 
-2.35.1
-