Skip to content

Commit 01ac89d

Browse files
committed
Merge branch 'correct-recent-gcc-incompatible-changes'
Cupertino Miranda says: ==================== Correct recent GCC incompatible changes. Hi everyone, Apologies for the previous patches which did not include a cover letter. My wish was to send 3 indepepdent patches but after the initial mistake lets keep this as a series although they are all independent from themselves. The changes in this patch series is related to recovering GCC support to build the selftests. A few tests and a makefile change have broken the support for GCC in the last few months. Looking forward to your comments. Best regards, Cupertino ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andrii Nakryiko <[email protected]>
2 parents 955bba7 + d9075ac commit 01ac89d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

tools/testing/selftests/bpf/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ progs/test_pkt_md_access.c-CFLAGS := -fno-strict-aliasing
5858
progs/test_sk_lookup.c-CFLAGS := -fno-strict-aliasing
5959
progs/timer_crash.c-CFLAGS := -fno-strict-aliasing
6060
progs/test_global_func9.c-CFLAGS := -fno-strict-aliasing
61+
progs/verifier_nocsr.c-CFLAGS := -fno-strict-aliasing
6162

6263
ifneq ($(LLVM),)
6364
# Silence some warnings when compiled with clang

tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ __retval(33)
5858
SEC("tc")
5959
int tailcall_bpf2bpf_hierarchy_2(struct __sk_buff *skb)
6060
{
61-
volatile int ret = 0;
61+
int ret = 0;
6262

6363
subprog_tail0(skb);
6464
subprog_tail1(skb);
6565

66-
asm volatile (""::"r+"(ret));
66+
__sink(ret);
6767
return (count1 << 16) | count0;
6868
}
6969

tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ __retval(33)
5151
SEC("tc")
5252
int tailcall_bpf2bpf_hierarchy_3(struct __sk_buff *skb)
5353
{
54-
volatile int ret = 0;
54+
int ret = 0;
5555

5656
bpf_tail_call_static(skb, &jmp_table0, 0);
5757

58-
asm volatile (""::"r+"(ret));
58+
__sink(ret);
5959
return ret;
6060
}
6161

0 commit comments

Comments
 (0)