mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lecomte, Arnaud" <contact@arnaud-lcm.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Yonghong Song <yonghong.song@linux.dev>,
	Song Liu <song@kernel.org>, Andrii Nakryiko <andrii@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>, bpf <bpf@vger.kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Eduard <eddyz87@gmail.com>, Hao Luo <haoluo@google.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Jiri Olsa <jolsa@kernel.org>, KP Singh <kpsingh@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Stanislav Fomichev <sdf@fomichev.me>,
	syzbot+c9b724fbb41cf2538b7b@syzkaller.appspotmail.com,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: [PATCH bpf-next v6 1/2] bpf: refactor max_depth computation in bpf_get_stack()
Date: Wed, 3 Sep 2025 18:20:43 +0200	[thread overview]
Message-ID: <d6223a4c-3e24-464f-893b-6bef57b973b8@arnaud-lcm.com> (raw)
In-Reply-To: <CAADnVQLf0wj9hV=tAA=p_GXgpQ6DxtB4heoDqTmb5dEc5P6zfg@mail.gmail.com>


On 03/09/2025 18:12, Alexei Starovoitov wrote:
> On Wed, Sep 3, 2025 at 6:52 AM Arnaud Lecomte <contact@arnaud-lcm.com> wrote:
>> A new helper function stack_map_calculate_max_depth() that
>> computes the max depth for a stackmap.
>>
>> Changes in v2:
>>   - Removed the checking 'map_size % map_elem_size' from
>>     stack_map_calculate_max_depth
>>   - Changed stack_map_calculate_max_depth params name to be more generic
>>
>> Changes in v3:
>>   - Changed map size param to size in max depth helper
>>
>> Changes in v4:
>>   - Fixed indentation in max depth helper for args
>>
>> Changes in v5:
>>   - Bound back trace_nr to num_elem in __bpf_get_stack
>>   - Make a copy of sysctl_perf_event_max_stack
>>     in stack_map_calculate_max_depth
>>
>> Changes in v6:
>>   - Restrained max_depth computation only when required
>>   - Additional cleanup from Song in __bpf_get_stack
> This is not a refactor anymore.
> Pls don't squash different things into one patch.
> Keep refactor as patch 1, and another cleanup as patch 2.

The main problem is that patch 2 is not a cleanup too. It is a bug fix 
so it doesn't really
fit either.
We could maybe split this patch into 2 new patches but I don't really 
like this idea.
If we decide to stick to 2 patches format, I don't have any preference 
which patch's scope
should be extended.

>
> pw-bot: cr
>

  reply	other threads:[~2025-09-03 16:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 13:52 Arnaud Lecomte
2025-09-03 13:53 ` Arnaud Lecomte
2025-09-03 13:53 ` [PATCH bpf-next v6 2/2] bpf: fix stackmap overflow check in __bpf_get_stackid() Arnaud Lecomte
2025-09-03 16:12 ` [PATCH bpf-next v6 1/2] bpf: refactor max_depth computation in bpf_get_stack() Alexei Starovoitov
2025-09-03 16:20   ` Lecomte, Arnaud [this message]
2025-09-03 16:22     ` Alexei Starovoitov
2025-09-03 23:46       ` Lecomte, Arnaud

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=d6223a4c-3e24-464f-893b-6bef57b973b8@arnaud-lcm.com \
    --to=contact@arnaud-lcm.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=syzbot+c9b724fbb41cf2538b7b@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®