Re: [PATCH Linux-6.12.y 1/1] selftests/bpf: Add test to verify tailcall and freplace restrictions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: 021611d33e78694f4bd54573093c6fc70a812644

WARNING: Author mismatch between patch and upstream commit:
Backport author: Yifei Liu<yifei.l.liu@xxxxxxxxxx>
Commit author: Leon Hwang<leon.hwang@xxxxxxxxx>


Status in newer kernel trees:
6.13.y | Present (exact SHA1)
6.12.y | Not found

Note: The patch differs from the upstream commit:
---
1:  021611d33e786 ! 1:  f573e53561b20 selftests/bpf: Add test to verify tailcall and freplace restrictions
    @@ Metadata
      ## Commit message ##
         selftests/bpf: Add test to verify tailcall and freplace restrictions
     
    +    [ Upstream commit 021611d33e78694f4bd54573093c6fc70a812644 ]
    +
         Add a test case to ensure that attaching a tail callee program with an
         freplace program fails, and that updating an extended program to a
         prog_array map is also prohibited.
    @@ Commit message
         Signed-off-by: Leon Hwang <leon.hwang@xxxxxxxxx>
         Link: https://lore.kernel.org/r/20241015150207.70264-3-leon.hwang@xxxxxxxxx
         Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    +    (cherry picked from commit 021611d33e78694f4bd54573093c6fc70a812644)
    +    [Yifei: bpf freplace update is backported to linux-6.12 by commit 987aa730bad3 ("bpf: Prevent tailcall infinite
    +    loop caused by freplace"). It will cause selftest #336/25 failed. Then backport this commit]
    +    Signed-off-by: Yifei Liu <yifei.l.liu@xxxxxxxxxx>
     
      ## tools/testing/selftests/bpf/prog_tests/tailcalls.c ##
     @@ tools/testing/selftests/bpf/prog_tests/tailcalls.c: static void test_tailcall_bpf2bpf_hierarchy_3(void)
    @@ tools/testing/selftests/bpf/progs/tc_bpf2bpf.c
      
     +	__sink(skb);
      	__sink(ret);
    - 	return ret;
    - }
    + 	/* let verifier know that 'subprog_tc' can change pointers to skb->data */
    + 	bpf_skb_change_proto(skb, 0, 0);
     @@ tools/testing/selftests/bpf/progs/tc_bpf2bpf.c: int subprog(struct __sk_buff *skb)
      SEC("tc")
      int entry_tc(struct __sk_buff *skb)
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.12.y       |  Success    |  Success   |




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux