Re: [PATCH 6.1] bpf: Prevent tail call between progs attached to different hooks

[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: 28ead3eaabc16ecc907cfb71876da028080f6356

WARNING: Author mismatch between patch and upstream commit:
Backport author: hsimeliere.opensource@xxxxxxxxxxx
Commit author: Xu Kuohai<xukuohai@xxxxxxxxxx>


Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 5d5e3b4cbe8e)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1:  28ead3eaabc1 ! 1:  40e6bff2b282 bpf: Prevent tail call between progs attached to different hooks
    @@ Metadata
      ## Commit message ##
         bpf: Prevent tail call between progs attached to different hooks
     
    +    [ Upstream commit 28ead3eaabc16ecc907cfb71876da028080f6356 ]
    +
         bpf progs can be attached to kernel functions, and the attached functions
         can take different parameters or return different return values. If
         prog attached to one kernel function tail calls prog attached to another
    @@ Commit message
         Link: https://lore.kernel.org/r/20240719110059.797546-4-xukuohai@xxxxxxxxxxxxxxx
         Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
         Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    +    Signed-off-by: BRUNO VERNAY <bruno.vernay@xxxxxx>
    +    Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@xxxxxxxxxxx>
     
      ## include/linux/bpf.h ##
     @@ include/linux/bpf.h: struct bpf_map {
    @@ kernel/bpf/core.c: bool bpf_prog_map_compatible(struct bpf_map *map,
      
      	if (fp->kprobe_override)
      		return false;
    -@@ kernel/bpf/core.c: bool bpf_prog_map_compatible(struct bpf_map *map,
    - 	 * in the case of devmap and cpumap). Until device checks
    - 	 * are implemented, prohibit adding dev-bound programs to program maps.
    - 	 */
    --	if (bpf_prog_is_dev_bound(fp->aux))
    -+	if (bpf_prog_is_dev_bound(aux))
    - 		return false;
    - 
    - 	spin_lock(&map->owner.lock);
     @@ kernel/bpf/core.c: bool bpf_prog_map_compatible(struct bpf_map *map,
      		 */
      		map->owner.type  = prog_type;
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.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