All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Emil Tsalapatis" <emil@etsalapatis.com>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v1 2/4] bpf: Plumb local storage context
Date: Tue, 24 Nov 2026 06:17:59 +0000	[thread overview]
Message-ID: <sashiko-outbox-230585@kernel.org> (raw)
In-Reply-To: <20261124060357.11700-3-emil@etsalapatis.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] bpf: bpf_local_storage_update() 6th arg breaks selftest
  fexit_update() probes
--

commit ab094afd08fb6622ca0c449a168c674fa21d6976
Author: Emil Tsalapatis <emil@etsalapatis.com>

bpf: Plumb local storage context

This commit passes struct bpf_prog_aux as a hidden fifth argument to the
bpf_*_storage_get() helpers and threads it into bpf_local_storage_update()
while consolidating local storage memory allocation into
bpf_local_storage_alloc_mem().

> diff --git a/include/linux/bpf_local_storage.h b/include/linux/bpf_local_storage.h
> index 6c643ac510799..28f6ffbd75741 100644
> --- a/include/linux/bpf_local_storage.h
> +++ b/include/linux/bpf_local_storage.h
> @@ -213,7 +213,8 @@ bpf_local_storage_alloc(void *owner,
>  
>  struct bpf_local_storage_data *
>  bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap,
> -			 void *value, u64 map_flags, bool swap_uptrs);
> +			 void *value, u64 map_flags, bool swap_uptrs,
> +			 const struct bpf_prog_aux *aux);

[Severity: Medium]
Does adding the sixth parameter to bpf_local_storage_update() break the
SEC("fexit/bpf_local_storage_update") probes in
tools/testing/selftests/bpf/progs/cgrp_ls_sleepable.c and
tools/testing/selftests/bpf/progs/task_local_storage.c?

Both fexit_update() programs still declare five arguments before ret:

tools/testing/selftests/bpf/progs/cgrp_ls_sleepable.c:
SEC("fexit/bpf_local_storage_update")
int BPF_PROG(fexit_update, void *owner, struct bpf_local_storage_map *smap,
	     void *value, u64 map_flags, bool swap_uptrs,
	     struct bpf_local_storage_data *ret)
{
	if (IS_ERR_VALUE(ret))
		update_err = PTR_ERR(ret);
	return 0;
}

With aux at ctx[5] and the return value shifted to ctx[6], ret binds to aux
instead of the return value, so update_err is never set when
bpf_local_storage_update() returns an error pointer.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261124060357.11700-1-emil@etsalapatis.com?part=2

  reply	other threads:[~2026-11-24  6:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  6:03 [PATCH bpf-next v1 0/4] bpf: Use kmalloc for local storage if possible Emil Tsalapatis
2026-11-24  6:03 ` [PATCH bpf-next v1 1/4] bpf: Add call for selecting kmalloc or kmalloc_nolock at call time Emil Tsalapatis
2026-11-24  6:21   ` sashiko-bot
2026-11-24  6:40   ` Alexei Starovoitov
2026-11-24 13:59     ` Harry Yoo
2026-11-24 18:07       ` Emil Tsalapatis
2026-11-25  4:03       ` Alexei Starovoitov
2026-11-25 14:09       ` Peter Zijlstra
2026-11-25 14:30         ` Harry Yoo
2026-11-25 16:04           ` Peter Zijlstra
2026-11-26  1:07             ` Alexei Starovoitov
2026-11-26  1:04         ` Alexei Starovoitov
2026-11-26  9:44           ` Peter Zijlstra
2026-11-26  9:46             ` David Hildenbrand (Arm)
2026-11-26 20:40               ` Alexei Starovoitov
2026-11-26 20:45                 ` David Hildenbrand (Arm)
2026-11-26 21:04                   ` Alexei Starovoitov
2026-11-26 20:39             ` Alexei Starovoitov
2026-11-24  6:40   ` bot+bpf-ci
2026-11-24  6:03 ` [PATCH bpf-next v1 2/4] bpf: Plumb local storage context Emil Tsalapatis
2026-11-24  6:17   ` sashiko-bot [this message]
2026-11-24  6:03 ` [PATCH bpf-next v1 3/4] bpf: Add sleepable local storage Emil Tsalapatis
2026-11-24  6:40   ` bot+bpf-ci
2026-11-24  6:41   ` sashiko-bot
2026-11-24  6:03 ` [PATCH bpf-next v1 4/4] selftests/bpf: Test kmalloc variant selection for task storage Emil Tsalapatis
2026-11-24  6:40   ` bot+bpf-ci

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=sashiko-outbox-230585@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=emil@etsalapatis.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.