From 2b3f96afed297c551a8c0618a8345de80eb50a92 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 1 Feb 2024 10:01:20 -0800 Subject: [PATCH] fix up some comments in a libbpf patch so that quilt doesn't choke Signed-off-by: Greg Kroah-Hartman --- ...tial-uninitialized-tail-padding-with.patch | 42 +++++++++---------- ...tial-uninitialized-tail-padding-with.patch | 42 +++++++++---------- 2 files changed, 38 insertions(+), 46 deletions(-) diff --git a/queue-6.6/libbpf-fix-potential-uninitialized-tail-padding-with.patch b/queue-6.6/libbpf-fix-potential-uninitialized-tail-padding-with.patch index f3fb61eaf85..28c50acdd9a 100644 --- a/queue-6.6/libbpf-fix-potential-uninitialized-tail-padding-with.patch +++ b/queue-6.6/libbpf-fix-potential-uninitialized-tail-padding-with.patch @@ -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 Link: https://lore.kernel.org/bpf/20231107201511.2548645-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman --- - 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 - diff --git a/queue-6.7/libbpf-fix-potential-uninitialized-tail-padding-with.patch b/queue-6.7/libbpf-fix-potential-uninitialized-tail-padding-with.patch index 5ece25d505a..8a203ba3b9c 100644 --- a/queue-6.7/libbpf-fix-potential-uninitialized-tail-padding-with.patch +++ b/queue-6.7/libbpf-fix-potential-uninitialized-tail-padding-with.patch @@ -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 Link: https://lore.kernel.org/bpf/20231107201511.2548645-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman --- - 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 - -- 2.47.3