Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/20240819151129.1366484-1-cupertino.miranda@oracle.com
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>

+5 -4
+1
tools/testing/selftests/bpf/Makefile
··· 58 58 progs/test_sk_lookup.c-CFLAGS := -fno-strict-aliasing 59 59 progs/timer_crash.c-CFLAGS := -fno-strict-aliasing 60 60 progs/test_global_func9.c-CFLAGS := -fno-strict-aliasing 61 + progs/verifier_nocsr.c-CFLAGS := -fno-strict-aliasing 61 62 62 63 ifneq ($(LLVM),) 63 64 # Silence some warnings when compiled with clang
+2 -2
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c
··· 58 58 SEC("tc") 59 59 int tailcall_bpf2bpf_hierarchy_2(struct __sk_buff *skb) 60 60 { 61 - volatile int ret = 0; 61 + int ret = 0; 62 62 63 63 subprog_tail0(skb); 64 64 subprog_tail1(skb); 65 65 66 - asm volatile (""::"r+"(ret)); 66 + __sink(ret); 67 67 return (count1 << 16) | count0; 68 68 } 69 69
+2 -2
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c
··· 51 51 SEC("tc") 52 52 int tailcall_bpf2bpf_hierarchy_3(struct __sk_buff *skb) 53 53 { 54 - volatile int ret = 0; 54 + int ret = 0; 55 55 56 56 bpf_tail_call_static(skb, &jmp_table0, 0); 57 57 58 - asm volatile (""::"r+"(ret)); 58 + __sink(ret); 59 59 return ret; 60 60 } 61 61