]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch
authorSasha Levin <sashal@kernel.org>
Mon, 28 Dec 2020 23:09:14 +0000 (18:09 -0500)
committerSasha Levin <sashal@kernel.org>
Mon, 28 Dec 2020 23:09:14 +0000 (18:09 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.10/libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch [deleted file]
queue-5.10/series
queue-5.4/libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch [deleted file]
queue-5.4/series

diff --git a/queue-5.10/libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch b/queue-5.10/libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch
deleted file mode 100644 (file)
index 6404eae..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From c306b1e136cdfcb7be83c3299c244f3781c276d5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 Nov 2020 20:33:57 -0800
-Subject: libbpf: Fix BTF data layout checks and allow empty BTF
-
-From: Andrii Nakryiko <andrii@kernel.org>
-
-[ Upstream commit d8123624506cd62730c9cd9c7672c698e462703d ]
-
-Make data section layout checks stricter, disallowing overlap of types and
-strings data.
-
-Additionally, allow BTFs with no type data. There is nothing inherently wrong
-with having BTF with no types (put potentially with some strings). This could
-be a situation with kernel module BTFs, if module doesn't introduce any new
-type information.
-
-Also fix invalid offset alignment check for btf->hdr->type_off.
-
-Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
-Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
-Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-Link: https://lore.kernel.org/bpf/20201105043402.2530976-8-andrii@kernel.org
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/lib/bpf/btf.c | 16 ++++++----------
- 1 file changed, 6 insertions(+), 10 deletions(-)
-
-diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
-index 231b07203e3d2..987c1515b828b 100644
---- a/tools/lib/bpf/btf.c
-+++ b/tools/lib/bpf/btf.c
-@@ -215,22 +215,18 @@ static int btf_parse_hdr(struct btf *btf)
-               return -EINVAL;
-       }
--      if (meta_left < hdr->type_off) {
--              pr_debug("Invalid BTF type section offset:%u\n", hdr->type_off);
-+      if (meta_left < hdr->str_off + hdr->str_len) {
-+              pr_debug("Invalid BTF total size:%u\n", btf->raw_size);
-               return -EINVAL;
-       }
--      if (meta_left < hdr->str_off) {
--              pr_debug("Invalid BTF string section offset:%u\n", hdr->str_off);
-+      if (hdr->type_off + hdr->type_len > hdr->str_off) {
-+              pr_debug("Invalid BTF data sections layout: type data at %u + %u, strings data at %u + %u\n",
-+                       hdr->type_off, hdr->type_len, hdr->str_off, hdr->str_len);
-               return -EINVAL;
-       }
--      if (hdr->type_off >= hdr->str_off) {
--              pr_debug("BTF type section offset >= string section offset. No type?\n");
--              return -EINVAL;
--      }
--
--      if (hdr->type_off & 0x02) {
-+      if (hdr->type_off % 4) {
-               pr_debug("BTF type section is not aligned to 4 bytes\n");
-               return -EINVAL;
-       }
--- 
-2.27.0
-
index 5564bf45d6f541785bd93a0485b307b55ccbe6d6..5d61989b62c92908ec79722a906289f1462fce80 100644 (file)
@@ -52,7 +52,6 @@ scsi-aacraid-improve-compat_ioctl-handlers.patch
 pinctrl-core-add-missing-ifdef-config_gpiolib.patch
 asoc-pcm-drain-support-reactivation.patch
 drm-bridge-tpd12s015-fix-irq-registering-in-tpd12s01.patch
-libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch
 crypto-arm64-poly1305-neon-reorder-pac-authenticatio.patch
 crypto-arm-aes-neonbs-fix-usage-of-cbc-aes-fallback.patch
 crypto-caam-fix-printing-on-xts-fallback-allocation-.patch
diff --git a/queue-5.4/libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch b/queue-5.4/libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch
deleted file mode 100644 (file)
index 3087808..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From 1f2d746c4fb643b5e9a7394a8df008b8ed56afc4 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 Nov 2020 20:33:57 -0800
-Subject: libbpf: Fix BTF data layout checks and allow empty BTF
-
-From: Andrii Nakryiko <andrii@kernel.org>
-
-[ Upstream commit d8123624506cd62730c9cd9c7672c698e462703d ]
-
-Make data section layout checks stricter, disallowing overlap of types and
-strings data.
-
-Additionally, allow BTFs with no type data. There is nothing inherently wrong
-with having BTF with no types (put potentially with some strings). This could
-be a situation with kernel module BTFs, if module doesn't introduce any new
-type information.
-
-Also fix invalid offset alignment check for btf->hdr->type_off.
-
-Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
-Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
-Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-Link: https://lore.kernel.org/bpf/20201105043402.2530976-8-andrii@kernel.org
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/lib/bpf/btf.c | 16 ++++++----------
- 1 file changed, 6 insertions(+), 10 deletions(-)
-
-diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
-index d606a358480da..3380aadb74655 100644
---- a/tools/lib/bpf/btf.c
-+++ b/tools/lib/bpf/btf.c
-@@ -100,22 +100,18 @@ static int btf_parse_hdr(struct btf *btf)
-               return -EINVAL;
-       }
--      if (meta_left < hdr->type_off) {
--              pr_debug("Invalid BTF type section offset:%u\n", hdr->type_off);
-+      if (meta_left < hdr->str_off + hdr->str_len) {
-+              pr_debug("Invalid BTF total size:%u\n", btf->raw_size);
-               return -EINVAL;
-       }
--      if (meta_left < hdr->str_off) {
--              pr_debug("Invalid BTF string section offset:%u\n", hdr->str_off);
-+      if (hdr->type_off + hdr->type_len > hdr->str_off) {
-+              pr_debug("Invalid BTF data sections layout: type data at %u + %u, strings data at %u + %u\n",
-+                       hdr->type_off, hdr->type_len, hdr->str_off, hdr->str_len);
-               return -EINVAL;
-       }
--      if (hdr->type_off >= hdr->str_off) {
--              pr_debug("BTF type section offset >= string section offset. No type?\n");
--              return -EINVAL;
--      }
--
--      if (hdr->type_off & 0x02) {
-+      if (hdr->type_off % 4) {
-               pr_debug("BTF type section is not aligned to 4 bytes\n");
-               return -EINVAL;
-       }
--- 
-2.27.0
-
index c384b5fee1e6c7ca5110c2a18bc6fa28b30edbec..bcbcc8453626a4841fd3499d63af23073d0e88ca 100644 (file)
@@ -103,7 +103,6 @@ f2fs-call-f2fs_get_meta_page_retry-for-nat-page.patch
 drm-msm-dsi_pll_10nm-restore-vco-rate-during-restore.patch
 spi-spi-mem-fix-reference-leak-in-spi_mem_access_sta.patch
 asoc-pcm-drain-support-reactivation.patch
-libbpf-fix-btf-data-layout-checks-and-allow-empty-bt.patch
 selinux-fix-inode_doinit_with_dentry-label_invalid-e.patch
 spi-stm32-fix-reference-leak-in-stm32_spi_resume.patch
 brcmfmac-fix-memory-leak-for-unpaired-brcmf_-alloc-f.patch