aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-05-07 14:31:20 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-05-07 14:31:21 -0700
commiteda80aacd00c016d7c03a2bfe231fafdce0e16b0 (patch)
tree62e0a5e4524fc533da84a074294bff604acd5577
parentbpf: Remove redundant page mask of vmf->address (diff)
parentbpf: Disable some `attribute ignored' warnings in GCC (diff)
downloadwireguard-linux-eda80aacd00c016d7c03a2bfe231fafdce0e16b0.tar.xz
wireguard-linux-eda80aacd00c016d7c03a2bfe231fafdce0e16b0.zip
Merge branch 'bpf-avoid-attribute-ignored-warnings-in-gcc'
Jose E. Marchesi says: ==================== bpf: avoid `attribute ignored' warnings in GCC These two patches avoid warnings (turned into errors) when building the BPF selftests with GCC. [Changes from V1: - As requested by reviewer, an additional patch has been added in order to remove __hidden from the `private' macro in cpumask_common.h. - Typo bening -> benign fixed in the commit message of the second patch.] ==================== Link: https://lore.kernel.org/r/20240507074227.4523-1-jose.marchesi@oracle.com Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
-rw-r--r--tools/testing/selftests/bpf/Makefile2
-rw-r--r--tools/testing/selftests/bpf/progs/cpumask_common.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index ba28d42b74db..5d9c906bc3cb 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -431,7 +431,7 @@ endef
# Build BPF object using GCC
define GCC_BPF_BUILD_RULE
$(call msg,GCC-BPF,$(TRUNNER_BINARY),$2)
- $(Q)$(BPF_GCC) $3 -O2 -c $1 -o $2
+ $(Q)$(BPF_GCC) $3 -Wno-attributes -O2 -c $1 -o $2
endef
SKEL_BLACKLIST := btf__% test_pinning_invalid.c test_sk_assign.c
diff --git a/tools/testing/selftests/bpf/progs/cpumask_common.h b/tools/testing/selftests/bpf/progs/cpumask_common.h
index c705d8112a35..b979e91f55f0 100644
--- a/tools/testing/selftests/bpf/progs/cpumask_common.h
+++ b/tools/testing/selftests/bpf/progs/cpumask_common.h
@@ -9,7 +9,7 @@
int err;
-#define private(name) SEC(".bss." #name) __hidden __attribute__((aligned(8)))
+#define private(name) SEC(".bss." #name) __attribute__((aligned(8)))
private(MASK) static struct bpf_cpumask __kptr * global_mask;
struct __cpumask_map_value {