public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: hsimeliere.opensource@witekio.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1] bpf: Prevent tail call between progs attached to different hooks
Date: Fri, 10 Jan 2025 12:39:12 -0500	[thread overview]
Message-ID: <20250110104631-a53b5b0d75d51d39@stable.kernel.org> (raw)
In-Reply-To: <20250110084000.3208-1-hsimeliere.opensource@witekio.com>

[ 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@witekio.com
Commit author: Xu Kuohai<xukuohai@huawei.com>


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@huaweicloud.com
         Signed-off-by: Alexei Starovoitov <ast@kernel.org>
         Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    +    Signed-off-by: BRUNO VERNAY <bruno.vernay@se.com>
    +    Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
     
      ## 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   |

  reply	other threads:[~2025-01-10 17:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  8:40 [PATCH 6.1] bpf: Prevent tail call between progs attached to different hooks hsimeliere.opensource
2025-01-10 17:39 ` Sasha Levin [this message]
2025-01-12 11:51 ` Greg KH
2025-01-21 15:41   ` [PATCH v2 " hsimeliere.opensource
2025-01-21 17:09     ` Greg KH
2025-02-10  9:44       ` hsimeliere.opensource
2025-02-10  9:55         ` Greg KH
2025-02-10 14:29           ` hsimeliere.opensource
2025-02-10 14:43             ` Greg KH
2025-02-10 16:32           ` hsimeliere.opensource
2025-02-11  6:41             ` Greg KH
2025-01-21 19:52     ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250110104631-a53b5b0d75d51d39@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=hsimeliere.opensource@witekio.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox