]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some libbpf patches from 5.4.y and 5.8.y
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Sep 2020 07:26:15 +0000 (09:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Sep 2020 07:26:15 +0000 (09:26 +0200)
queue-5.4/libbpf-fix-build-on-ppc64le-architecture.patch [deleted file]
queue-5.4/libbpf-handle-gcc-built-in-types-for-arm-neon.patch [deleted file]
queue-5.4/series
queue-5.8/libbpf-fix-build-on-ppc64le-architecture.patch [deleted file]
queue-5.8/libbpf-handle-gcc-built-in-types-for-arm-neon.patch [deleted file]
queue-5.8/series

diff --git a/queue-5.4/libbpf-fix-build-on-ppc64le-architecture.patch b/queue-5.4/libbpf-fix-build-on-ppc64le-architecture.patch
deleted file mode 100644 (file)
index 4672cd5..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 3fb1a96a91120877488071a167d26d76be4be977 Mon Sep 17 00:00:00 2001
-From: Andrii Nakryiko <andriin@fb.com>
-Date: Tue, 18 Aug 2020 09:44:56 -0700
-Subject: libbpf: Fix build on ppc64le architecture
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Andrii Nakryiko <andriin@fb.com>
-
-commit 3fb1a96a91120877488071a167d26d76be4be977 upstream.
-
-On ppc64le we get the following warning:
-
-  In file included from btf_dump.c:16:0:
-  btf_dump.c: In function ‘btf_dump_emit_struct_def’:
-  ../include/linux/kernel.h:20:17: error: comparison of distinct pointer types lacks a cast [-Werror]
-    (void) (&_max1 == &_max2);  \
-                   ^
-  btf_dump.c:882:11: note: in expansion of macro ‘max’
-      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
-             ^~~
-
-Fix by explicitly casting to __s64, which is a return type from
-btf__resolve_size().
-
-Fixes: 702eddc77a90 ("libbpf: Handle GCC built-in types for Arm NEON")
-Signed-off-by: Andrii Nakryiko <andriin@fb.com>
-Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-Link: https://lore.kernel.org/bpf/20200818164456.1181661-1-andriin@fb.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- tools/lib/bpf/btf_dump.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/tools/lib/bpf/btf_dump.c
-+++ b/tools/lib/bpf/btf_dump.c
-@@ -906,7 +906,7 @@ static void btf_dump_emit_struct_def(str
-                       btf_dump_printf(d, ": %d", m_sz);
-                       off = m_off + m_sz;
-               } else {
--                      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
-+                      m_sz = max((__s64)0, btf__resolve_size(d->btf, m->type));
-                       off = m_off + m_sz * 8;
-               }
-               btf_dump_printf(d, ";");
diff --git a/queue-5.4/libbpf-handle-gcc-built-in-types-for-arm-neon.patch b/queue-5.4/libbpf-handle-gcc-built-in-types-for-arm-neon.patch
deleted file mode 100644 (file)
index 8673a4d..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-From f0b0bdbf7045ed59d5ec03fbbbfb64a7be5dab1c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 12 Aug 2020 16:39:10 +0200
-Subject: libbpf: Handle GCC built-in types for Arm NEON
-
-From: Jean-Philippe Brucker <jean-philippe@linaro.org>
-
-[ Upstream commit 702eddc77a905782083b14ccd05b23840675fd18 ]
-
-When building Arm NEON (SIMD) code from lib/raid6/neon.uc, GCC emits
-DWARF information using a base type "__Poly8_t", which is internal to
-GCC and not recognized by Clang. This causes build failures when
-building with Clang a vmlinux.h generated from an arm64 kernel that was
-built with GCC.
-
-       vmlinux.h:47284:9: error: unknown type name '__Poly8_t'
-       typedef __Poly8_t poly8x16_t[16];
-               ^~~~~~~~~
-
-The polyX_t types are defined as unsigned integers in the "Arm C
-Language Extension" document (101028_Q220_00_en). Emit typedefs based on
-standard integer types for the GCC internal types, similar to those
-emitted by Clang.
-
-Including linux/kernel.h to use ARRAY_SIZE() incidentally redefined
-max(), causing a build bug due to different types, hence the seemingly
-unrelated change.
-
-Reported-by: Jakov Petrina <jakov.petrina@sartura.hr>
-Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
-Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-Acked-by: Andrii Nakryiko <andriin@fb.com>
-Link: https://lore.kernel.org/bpf/20200812143909.3293280-1-jean-philippe@linaro.org
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/lib/bpf/btf_dump.c | 35 ++++++++++++++++++++++++++++++++++-
- 1 file changed, 34 insertions(+), 1 deletion(-)
-
-diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c
-index d9e386b8f47ed..07fcc8e79662d 100644
---- a/tools/lib/bpf/btf_dump.c
-+++ b/tools/lib/bpf/btf_dump.c
-@@ -13,6 +13,7 @@
- #include <errno.h>
- #include <linux/err.h>
- #include <linux/btf.h>
-+#include <linux/kernel.h>
- #include "btf.h"
- #include "hashmap.h"
- #include "libbpf.h"
-@@ -543,6 +544,9 @@ static int btf_dump_order_type(struct btf_dump *d, __u32 id, bool through_ptr)
-       }
- }
-+static void btf_dump_emit_missing_aliases(struct btf_dump *d, __u32 id,
-+                                        const struct btf_type *t);
-+
- static void btf_dump_emit_struct_fwd(struct btf_dump *d, __u32 id,
-                                    const struct btf_type *t);
- static void btf_dump_emit_struct_def(struct btf_dump *d, __u32 id,
-@@ -665,6 +669,9 @@ static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id)
-       switch (kind) {
-       case BTF_KIND_INT:
-+              /* Emit type alias definitions if necessary */
-+              btf_dump_emit_missing_aliases(d, id, t);
-+
-               tstate->emit_state = EMITTED;
-               break;
-       case BTF_KIND_ENUM:
-@@ -899,7 +906,7 @@ static void btf_dump_emit_struct_def(struct btf_dump *d,
-                       btf_dump_printf(d, ": %d", m_sz);
-                       off = m_off + m_sz;
-               } else {
--                      m_sz = max(0, btf__resolve_size(d->btf, m->type));
-+                      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
-                       off = m_off + m_sz * 8;
-               }
-               btf_dump_printf(d, ";");
-@@ -919,6 +926,32 @@ static void btf_dump_emit_struct_def(struct btf_dump *d,
-               btf_dump_printf(d, " __attribute__((packed))");
- }
-+static const char *missing_base_types[][2] = {
-+      /*
-+       * GCC emits typedefs to its internal __PolyX_t types when compiling Arm
-+       * SIMD intrinsics. Alias them to standard base types.
-+       */
-+      { "__Poly8_t",          "unsigned char" },
-+      { "__Poly16_t",         "unsigned short" },
-+      { "__Poly64_t",         "unsigned long long" },
-+      { "__Poly128_t",        "unsigned __int128" },
-+};
-+
-+static void btf_dump_emit_missing_aliases(struct btf_dump *d, __u32 id,
-+                                        const struct btf_type *t)
-+{
-+      const char *name = btf_dump_type_name(d, id);
-+      int i;
-+
-+      for (i = 0; i < ARRAY_SIZE(missing_base_types); i++) {
-+              if (strcmp(name, missing_base_types[i][0]) == 0) {
-+                      btf_dump_printf(d, "typedef %s %s;\n\n",
-+                                      missing_base_types[i][1], name);
-+                      break;
-+              }
-+      }
-+}
-+
- static void btf_dump_emit_enum_fwd(struct btf_dump *d, __u32 id,
-                                  const struct btf_type *t)
- {
--- 
-2.25.1
-
index 788fc006fe6d26e004a70005ececd9b4a9048e18..baaf475f4a4c152ce621901e40f1239b548fb778 100644 (file)
@@ -126,7 +126,6 @@ spi-stm32-always-perform-registers-configuration-pri.patch
 drm-amd-powerplay-correct-vega20-cached-smu-feature-.patch
 drm-amd-powerplay-correct-uvd-vce-pg-state-on-custom.patch
 drm-amd-display-switch-to-immediate-mode-for-updatin.patch
-libbpf-handle-gcc-built-in-types-for-arm-neon.patch
 netfilter-avoid-ipv6-nf_defrag_ipv6-module-dependenc.patch
 can-j1939-transport-j1939_xtp_rx_dat_one-compare-own.patch
 alsa-hda-realtek-add-model-alc298-samsung-headphone.patch
@@ -210,5 +209,4 @@ kheaders-explain-why-include-config-autoconf.h-is-excluded-from-md5sum.patch
 kbuild-add-variables-for-compression-tools.patch
 kbuild-fix-broken-builds-because-of-gzip-bzip2-lzop-variables.patch
 hid-hiddev-fix-slab-out-of-bounds-write-in-hiddev_ioctl_usage.patch
-libbpf-fix-build-on-ppc64le-architecture.patch
 alsa-usb-audio-update-documentation-comment-for-ms2109-quirk.patch
diff --git a/queue-5.8/libbpf-fix-build-on-ppc64le-architecture.patch b/queue-5.8/libbpf-fix-build-on-ppc64le-architecture.patch
deleted file mode 100644 (file)
index 011fe17..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 3fb1a96a91120877488071a167d26d76be4be977 Mon Sep 17 00:00:00 2001
-From: Andrii Nakryiko <andriin@fb.com>
-Date: Tue, 18 Aug 2020 09:44:56 -0700
-Subject: libbpf: Fix build on ppc64le architecture
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Andrii Nakryiko <andriin@fb.com>
-
-commit 3fb1a96a91120877488071a167d26d76be4be977 upstream.
-
-On ppc64le we get the following warning:
-
-  In file included from btf_dump.c:16:0:
-  btf_dump.c: In function ‘btf_dump_emit_struct_def’:
-  ../include/linux/kernel.h:20:17: error: comparison of distinct pointer types lacks a cast [-Werror]
-    (void) (&_max1 == &_max2);  \
-                   ^
-  btf_dump.c:882:11: note: in expansion of macro ‘max’
-      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
-             ^~~
-
-Fix by explicitly casting to __s64, which is a return type from
-btf__resolve_size().
-
-Fixes: 702eddc77a90 ("libbpf: Handle GCC built-in types for Arm NEON")
-Signed-off-by: Andrii Nakryiko <andriin@fb.com>
-Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-Link: https://lore.kernel.org/bpf/20200818164456.1181661-1-andriin@fb.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- tools/lib/bpf/btf_dump.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/tools/lib/bpf/btf_dump.c
-+++ b/tools/lib/bpf/btf_dump.c
-@@ -876,7 +876,7 @@ static void btf_dump_emit_struct_def(str
-                       btf_dump_printf(d, ": %d", m_sz);
-                       off = m_off + m_sz;
-               } else {
--                      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
-+                      m_sz = max((__s64)0, btf__resolve_size(d->btf, m->type));
-                       off = m_off + m_sz * 8;
-               }
-               btf_dump_printf(d, ";");
diff --git a/queue-5.8/libbpf-handle-gcc-built-in-types-for-arm-neon.patch b/queue-5.8/libbpf-handle-gcc-built-in-types-for-arm-neon.patch
deleted file mode 100644 (file)
index 7b1284a..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-From 168c6f37311efaf29d9a789ce4e8249a362a1bd6 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 12 Aug 2020 16:39:10 +0200
-Subject: libbpf: Handle GCC built-in types for Arm NEON
-
-From: Jean-Philippe Brucker <jean-philippe@linaro.org>
-
-[ Upstream commit 702eddc77a905782083b14ccd05b23840675fd18 ]
-
-When building Arm NEON (SIMD) code from lib/raid6/neon.uc, GCC emits
-DWARF information using a base type "__Poly8_t", which is internal to
-GCC and not recognized by Clang. This causes build failures when
-building with Clang a vmlinux.h generated from an arm64 kernel that was
-built with GCC.
-
-       vmlinux.h:47284:9: error: unknown type name '__Poly8_t'
-       typedef __Poly8_t poly8x16_t[16];
-               ^~~~~~~~~
-
-The polyX_t types are defined as unsigned integers in the "Arm C
-Language Extension" document (101028_Q220_00_en). Emit typedefs based on
-standard integer types for the GCC internal types, similar to those
-emitted by Clang.
-
-Including linux/kernel.h to use ARRAY_SIZE() incidentally redefined
-max(), causing a build bug due to different types, hence the seemingly
-unrelated change.
-
-Reported-by: Jakov Petrina <jakov.petrina@sartura.hr>
-Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
-Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-Acked-by: Andrii Nakryiko <andriin@fb.com>
-Link: https://lore.kernel.org/bpf/20200812143909.3293280-1-jean-philippe@linaro.org
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/lib/bpf/btf_dump.c | 35 ++++++++++++++++++++++++++++++++++-
- 1 file changed, 34 insertions(+), 1 deletion(-)
-
-diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c
-index bbb4303172606..4edf76c5a7101 100644
---- a/tools/lib/bpf/btf_dump.c
-+++ b/tools/lib/bpf/btf_dump.c
-@@ -13,6 +13,7 @@
- #include <errno.h>
- #include <linux/err.h>
- #include <linux/btf.h>
-+#include <linux/kernel.h>
- #include "btf.h"
- #include "hashmap.h"
- #include "libbpf.h"
-@@ -548,6 +549,9 @@ static int btf_dump_order_type(struct btf_dump *d, __u32 id, bool through_ptr)
-       }
- }
-+static void btf_dump_emit_missing_aliases(struct btf_dump *d, __u32 id,
-+                                        const struct btf_type *t);
-+
- static void btf_dump_emit_struct_fwd(struct btf_dump *d, __u32 id,
-                                    const struct btf_type *t);
- static void btf_dump_emit_struct_def(struct btf_dump *d, __u32 id,
-@@ -670,6 +674,9 @@ static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id)
-       switch (kind) {
-       case BTF_KIND_INT:
-+              /* Emit type alias definitions if necessary */
-+              btf_dump_emit_missing_aliases(d, id, t);
-+
-               tstate->emit_state = EMITTED;
-               break;
-       case BTF_KIND_ENUM:
-@@ -869,7 +876,7 @@ static void btf_dump_emit_struct_def(struct btf_dump *d,
-                       btf_dump_printf(d, ": %d", m_sz);
-                       off = m_off + m_sz;
-               } else {
--                      m_sz = max(0, btf__resolve_size(d->btf, m->type));
-+                      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
-                       off = m_off + m_sz * 8;
-               }
-               btf_dump_printf(d, ";");
-@@ -889,6 +896,32 @@ static void btf_dump_emit_struct_def(struct btf_dump *d,
-               btf_dump_printf(d, " __attribute__((packed))");
- }
-+static const char *missing_base_types[][2] = {
-+      /*
-+       * GCC emits typedefs to its internal __PolyX_t types when compiling Arm
-+       * SIMD intrinsics. Alias them to standard base types.
-+       */
-+      { "__Poly8_t",          "unsigned char" },
-+      { "__Poly16_t",         "unsigned short" },
-+      { "__Poly64_t",         "unsigned long long" },
-+      { "__Poly128_t",        "unsigned __int128" },
-+};
-+
-+static void btf_dump_emit_missing_aliases(struct btf_dump *d, __u32 id,
-+                                        const struct btf_type *t)
-+{
-+      const char *name = btf_dump_type_name(d, id);
-+      int i;
-+
-+      for (i = 0; i < ARRAY_SIZE(missing_base_types); i++) {
-+              if (strcmp(name, missing_base_types[i][0]) == 0) {
-+                      btf_dump_printf(d, "typedef %s %s;\n\n",
-+                                      missing_base_types[i][1], name);
-+                      break;
-+              }
-+      }
-+}
-+
- static void btf_dump_emit_enum_fwd(struct btf_dump *d, __u32 id,
-                                  const struct btf_type *t)
- {
--- 
-2.25.1
-
index 88131a5c9dc7aff75b60b035514bdf82e32e43c5..eb29e12d78d957d11bf12b44a085f4f5908a14b6 100644 (file)
@@ -124,7 +124,6 @@ drm-amd-powerplay-correct-uvd-vce-pg-state-on-custom.patch
 drm-amd-display-fix-lfc-multiplier-changing-erratica.patch
 drm-amd-display-switch-to-immediate-mode-for-updatin.patch
 selftests-bpf-fix-segmentation-fault-in-test_progs.patch
-libbpf-handle-gcc-built-in-types-for-arm-neon.patch
 netfilter-avoid-ipv6-nf_defrag_ipv6-module-dependenc.patch
 libbpf-prevent-overriding-errno-when-logging-errors.patch
 tools-bpftool-fix-compilation-warnings-in-32-bit-mod.patch
@@ -250,6 +249,5 @@ hid-hiddev-fix-slab-out-of-bounds-write-in-hiddev_ioctl_usage.patch
 drm-vmwgfx-stdu-use-drm_mode_config_reset.patch
 drm-vmwgfx-sou-use-drm_mode_config_reset.patch
 drm-vmwgfx-ldu-use-drm_mode_config_reset.patch
-libbpf-fix-build-on-ppc64le-architecture.patch
 dma-pool-fix-an-uninitialized-variable-bug-in-atomic_pool_expand.patch
 alsa-usb-audio-update-documentation-comment-for-ms2109-quirk.patch