]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up some comments in a libbpf patch so that quilt doesn't choke
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 18:01:20 +0000 (10:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 18:01:20 +0000 (10:01 -0800)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
queue-6.6/libbpf-fix-potential-uninitialized-tail-padding-with.patch
queue-6.7/libbpf-fix-potential-uninitialized-tail-padding-with.patch

index f3fb61eaf85e7a169d1a0e9df711e4f1999425f3..28c50acdd9a7be153128e600d33092a291652eb9 100644 (file)
@@ -59,23 +59,23 @@ prog_tests/tc_netkit.c:
 
 Let us make the following source change, note that we have a 4-byte
 tailing padding now.
-  diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
-  index 6cd9c501624f..0dd83910ae9a 100644
-  --- a/tools/lib/bpf/libbpf.h
-  +++ b/tools/lib/bpf/libbpf.h
-  @@ -803,13 +803,13 @@ bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex,
-   struct bpf_netkit_opts {
-        /* size of this struct, for forward/backward compatibility */
-        size_t sz;
-  -       __u32 flags;
-        __u32 relative_fd;
-        __u32 relative_id;
-        __u64 expected_revision;
-  +       __u32 flags;
-        size_t :0;
-   };
-  -#define bpf_netkit_opts__last_field expected_revision
-  +#define bpf_netkit_opts__last_field flags
+#  diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
+#  index 6cd9c501624f..0dd83910ae9a 100644
+#  --- a/tools/lib/bpf/libbpf.h
+#  +++ b/tools/lib/bpf/libbpf.h
+#  @@ -803,13 +803,13 @@ bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex,
+#   struct bpf_netkit_opts {
+#        /* size of this struct, for forward/backward compatibility */
+#        size_t sz;
+#  -       __u32 flags;
+#        __u32 relative_fd;
+#        __u32 relative_id;
+#        __u64 expected_revision;
+#  +       __u32 flags;
+#        size_t :0;
+#   };
+#  -#define bpf_netkit_opts__last_field expected_revision
+#  +#define bpf_netkit_opts__last_field flags
 
 The clang 18 generated asm code looks like below:
     ;       LIBBPF_OPTS_RESET(optl,
@@ -174,12 +174,11 @@ Tested-by: Martin KaFai Lau <martin.lau@kernel.org>
 Link: https://lore.kernel.org/bpf/20231107201511.2548645-1-yonghong.song@linux.dev
 Signed-off-by: Alexei Starovoitov <ast@kernel.org>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- tools/lib/bpf/libbpf_common.h | 13 ++++++++-----
+ tools/lib/bpf/libbpf_common.h |   13 ++++++++-----
  1 file changed, 8 insertions(+), 5 deletions(-)
 
-diff --git a/tools/lib/bpf/libbpf_common.h b/tools/lib/bpf/libbpf_common.h
-index b7060f254486..8fe248e14eb6 100644
 --- a/tools/lib/bpf/libbpf_common.h
 +++ b/tools/lib/bpf/libbpf_common.h
 @@ -79,11 +79,14 @@
@@ -202,6 +201,3 @@ index b7060f254486..8fe248e14eb6 100644
        } while (0)
  
  #endif /* __LIBBPF_LIBBPF_COMMON_H */
--- 
-2.43.0
-
index 5ece25d505a1e99483642201720b9de4d366496d..8a203ba3b9cecebdcafb11930bdf2d870ac8bce1 100644 (file)
@@ -59,23 +59,23 @@ prog_tests/tc_netkit.c:
 
 Let us make the following source change, note that we have a 4-byte
 tailing padding now.
-  diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
-  index 6cd9c501624f..0dd83910ae9a 100644
-  --- a/tools/lib/bpf/libbpf.h
-  +++ b/tools/lib/bpf/libbpf.h
-  @@ -803,13 +803,13 @@ bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex,
-   struct bpf_netkit_opts {
-        /* size of this struct, for forward/backward compatibility */
-        size_t sz;
-  -       __u32 flags;
-        __u32 relative_fd;
-        __u32 relative_id;
-        __u64 expected_revision;
-  +       __u32 flags;
-        size_t :0;
-   };
-  -#define bpf_netkit_opts__last_field expected_revision
-  +#define bpf_netkit_opts__last_field flags
+#  diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
+#  index 6cd9c501624f..0dd83910ae9a 100644
+#  --- a/tools/lib/bpf/libbpf.h
+#  +++ b/tools/lib/bpf/libbpf.h
+#  @@ -803,13 +803,13 @@ bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex,
+#   struct bpf_netkit_opts {
+#        /* size of this struct, for forward/backward compatibility */
+#        size_t sz;
+#  -       __u32 flags;
+#        __u32 relative_fd;
+#        __u32 relative_id;
+#        __u64 expected_revision;
+#  +       __u32 flags;
+#        size_t :0;
+#   };
+#  -#define bpf_netkit_opts__last_field expected_revision
+#  +#define bpf_netkit_opts__last_field flags
 
 The clang 18 generated asm code looks like below:
     ;       LIBBPF_OPTS_RESET(optl,
@@ -174,12 +174,11 @@ Tested-by: Martin KaFai Lau <martin.lau@kernel.org>
 Link: https://lore.kernel.org/bpf/20231107201511.2548645-1-yonghong.song@linux.dev
 Signed-off-by: Alexei Starovoitov <ast@kernel.org>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- tools/lib/bpf/libbpf_common.h | 13 ++++++++-----
+ tools/lib/bpf/libbpf_common.h |   13 ++++++++-----
  1 file changed, 8 insertions(+), 5 deletions(-)
 
-diff --git a/tools/lib/bpf/libbpf_common.h b/tools/lib/bpf/libbpf_common.h
-index b7060f254486..8fe248e14eb6 100644
 --- a/tools/lib/bpf/libbpf_common.h
 +++ b/tools/lib/bpf/libbpf_common.h
 @@ -79,11 +79,14 @@
@@ -202,6 +201,3 @@ index b7060f254486..8fe248e14eb6 100644
        } while (0)
  
  #endif /* __LIBBPF_LIBBPF_COMMON_H */
--- 
-2.43.0
-