]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop bpf-resolve-fext-program-type-when-checking-map-comp.patch again :)
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Jan 2023 10:48:12 +0000 (11:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Jan 2023 10:48:12 +0000 (11:48 +0100)
queue-6.0/bpf-resolve-fext-program-type-when-checking-map-comp.patch [deleted file]
queue-6.0/series
queue-6.1/bpf-resolve-fext-program-type-when-checking-map-comp.patch [deleted file]
queue-6.1/series

diff --git a/queue-6.0/bpf-resolve-fext-program-type-when-checking-map-comp.patch b/queue-6.0/bpf-resolve-fext-program-type-when-checking-map-comp.patch
deleted file mode 100644 (file)
index a296e5e..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-From 23ee1709c1c32837b72b50038065aedf25815e0d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 15 Dec 2022 00:02:53 +0100
-Subject: bpf: Resolve fext program type when checking map compatibility
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Toke Høiland-Jørgensen <toke@redhat.com>
-
-[ Upstream commit 1c123c567fb138ebd187480b7fc0610fcb0851f5 ]
-
-The bpf_prog_map_compatible() check makes sure that BPF program types are
-not mixed inside BPF map types that can contain programs (tail call maps,
-cpumaps and devmaps). It does this by setting the fields of the map->owner
-struct to the values of the first program being checked against, and
-rejecting any subsequent programs if the values don't match.
-
-One of the values being set in the map owner struct is the program type,
-and since the code did not resolve the prog type for fext programs, the map
-owner type would be set to PROG_TYPE_EXT and subsequent loading of programs
-of the target type into the map would fail.
-
-This bug is seen in particular for XDP programs that are loaded as
-PROG_TYPE_EXT using libxdp; these cannot insert programs into devmaps and
-cpumaps because the check fails as described above.
-
-Fix the bug by resolving the fext program type to its target program type
-as elsewhere in the verifier.
-
-v3:
-- Add Yonghong's ACK
-
-Fixes: f45d5b6ce2e8 ("bpf: generalise tail call map compatibility check")
-Acked-by: Yonghong Song <yhs@fb.com>
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Link: https://lore.kernel.org/r/20221214230254.790066-1-toke@redhat.com
-Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/bpf/core.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
-index c4600a5781de..7d315c94b80a 100644
---- a/kernel/bpf/core.c
-+++ b/kernel/bpf/core.c
-@@ -2088,6 +2088,7 @@ static unsigned int __bpf_prog_ret0_warn(const void *ctx,
- bool bpf_prog_map_compatible(struct bpf_map *map,
-                            const struct bpf_prog *fp)
- {
-+      enum bpf_prog_type prog_type = resolve_prog_type(fp);
-       bool ret;
-       if (fp->kprobe_override)
-@@ -2098,12 +2099,12 @@ bool bpf_prog_map_compatible(struct bpf_map *map,
-               /* There's no owner yet where we could check for
-                * compatibility.
-                */
--              map->owner.type  = fp->type;
-+              map->owner.type  = prog_type;
-               map->owner.jited = fp->jited;
-               map->owner.xdp_has_frags = fp->aux->xdp_has_frags;
-               ret = true;
-       } else {
--              ret = map->owner.type  == fp->type &&
-+              ret = map->owner.type  == prog_type &&
-                     map->owner.jited == fp->jited &&
-                     map->owner.xdp_has_frags == fp->aux->xdp_has_frags;
-       }
--- 
-2.35.1
-
index febfe338fa756e8a7b22edf38e75b041e6db5181..d69029af43d48f3efb4776bc304b6ccbf81f220e 100644 (file)
@@ -9,7 +9,6 @@ blk-cgroup-pass-a-gendisk-to-blkg_destroy_all.patch
 blk-iolatency-fix-memory-leak-on-add_disk-failures.patch
 cifs-fix-static-checker-warning.patch
 cifs-don-t-leak-enomem-in-smb2_open_file.patch
-bpf-resolve-fext-program-type-when-checking-map-comp.patch
 nvme-pci-fix-doorbell-buffer-value-endianness.patch
 nvme-pci-fix-mempool-alloc-size.patch
 nvme-pci-fix-page-size-checks.patch
diff --git a/queue-6.1/bpf-resolve-fext-program-type-when-checking-map-comp.patch b/queue-6.1/bpf-resolve-fext-program-type-when-checking-map-comp.patch
deleted file mode 100644 (file)
index d2ac5da..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-From b97e4ecc947c2baab8e19956c2d23c72deba7048 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 15 Dec 2022 00:02:53 +0100
-Subject: bpf: Resolve fext program type when checking map compatibility
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Toke Høiland-Jørgensen <toke@redhat.com>
-
-[ Upstream commit 1c123c567fb138ebd187480b7fc0610fcb0851f5 ]
-
-The bpf_prog_map_compatible() check makes sure that BPF program types are
-not mixed inside BPF map types that can contain programs (tail call maps,
-cpumaps and devmaps). It does this by setting the fields of the map->owner
-struct to the values of the first program being checked against, and
-rejecting any subsequent programs if the values don't match.
-
-One of the values being set in the map owner struct is the program type,
-and since the code did not resolve the prog type for fext programs, the map
-owner type would be set to PROG_TYPE_EXT and subsequent loading of programs
-of the target type into the map would fail.
-
-This bug is seen in particular for XDP programs that are loaded as
-PROG_TYPE_EXT using libxdp; these cannot insert programs into devmaps and
-cpumaps because the check fails as described above.
-
-Fix the bug by resolving the fext program type to its target program type
-as elsewhere in the verifier.
-
-v3:
-- Add Yonghong's ACK
-
-Fixes: f45d5b6ce2e8 ("bpf: generalise tail call map compatibility check")
-Acked-by: Yonghong Song <yhs@fb.com>
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Link: https://lore.kernel.org/r/20221214230254.790066-1-toke@redhat.com
-Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/bpf/core.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
-index 25a54e04560e..17ab3e15ac25 100644
---- a/kernel/bpf/core.c
-+++ b/kernel/bpf/core.c
-@@ -2088,6 +2088,7 @@ static unsigned int __bpf_prog_ret0_warn(const void *ctx,
- bool bpf_prog_map_compatible(struct bpf_map *map,
-                            const struct bpf_prog *fp)
- {
-+      enum bpf_prog_type prog_type = resolve_prog_type(fp);
-       bool ret;
-       if (fp->kprobe_override)
-@@ -2098,12 +2099,12 @@ bool bpf_prog_map_compatible(struct bpf_map *map,
-               /* There's no owner yet where we could check for
-                * compatibility.
-                */
--              map->owner.type  = fp->type;
-+              map->owner.type  = prog_type;
-               map->owner.jited = fp->jited;
-               map->owner.xdp_has_frags = fp->aux->xdp_has_frags;
-               ret = true;
-       } else {
--              ret = map->owner.type  == fp->type &&
-+              ret = map->owner.type  == prog_type &&
-                     map->owner.jited == fp->jited &&
-                     map->owner.xdp_has_frags == fp->aux->xdp_has_frags;
-       }
--- 
-2.35.1
-
index a9aff00c7b8676b4547e8aa3fe16170ce00f8d94..b08f789ab782e53f3753e1bee20d7431514a43b9 100644 (file)
@@ -1,7 +1,6 @@
 eventpoll-add-epoll_uring_wake-poll-wakeup-flag.patch
 eventfd-provide-a-eventfd_signal_mask-helper.patch
 io_uring-pass-in-epoll_uring_wake-for-eventfd-signal.patch
-bpf-resolve-fext-program-type-when-checking-map-comp.patch
 nvme-pci-fix-doorbell-buffer-value-endianness.patch
 nvme-pci-fix-mempool-alloc-size.patch
 nvme-pci-fix-page-size-checks.patch