From: Yonghong Song <yonghong.song@linux.dev>
To: Cong Wang <xiyou.wangcong@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Priya Bala Govindasamy <pgovind2@uci.edu>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>, bpf <bpf@vger.kernel.org>,
Hsin-Wei Hung <hsinweih@uci.edu>,
Ardalan Amiri Sani <ardalan@uci.edu>
Subject: Re: Possible deadlock in pcpu_freelist_pop
Date: Sun, 8 Sep 2024 23:08:31 -0700 [thread overview]
Message-ID: <72af9f28-709e-4f2f-bd63-8b2d54740815@linux.dev> (raw)
In-Reply-To: <Zt34sPvu9mO4Tcgv@pop-os.localdomain>
On 9/8/24 12:19 PM, Cong Wang wrote:
> On Thu, Sep 05, 2024 at 11:40:06AM -0700, Alexei Starovoitov wrote:
>> On Thu, Sep 5, 2024 at 11:37 AM Priya Bala Govindasamy <pgovind2@uci.edu> wrote:
>>> SEC("kprobe/__pcpu_freelist_pop+0x58c")
>> We should disallow such recursion in the verifier.
>> All these "bugs" are hard to prioritize as bugs.
>> When people shot themselves in the foot there will be pain.
> diff --git a/kernel/bpf/percpu_freelist.c b/kernel/bpf/percpu_freelist.c
> index 034cf87b54e9..14c9fcf81ac6 100644
> --- a/kernel/bpf/percpu_freelist.c
> +++ b/kernel/bpf/percpu_freelist.c
> @@ -187,6 +187,7 @@ struct pcpu_freelist_node *__pcpu_freelist_pop(struct pcpu_freelist *s)
> return ___pcpu_freelist_pop_nmi(s);
> return ___pcpu_freelist_pop(s);
> }
> +NOKPROBE_SYMBOL(__pcpu_freelist_pop);
Maybe add a 'notrace' attribute to the function?
>
> struct pcpu_freelist_node *pcpu_freelist_pop(struct pcpu_freelist *s)
> {
>
>
prev parent reply other threads:[~2024-09-09 6:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 18:37 Possible deadlock in pcpu_freelist_pop Priya Bala Govindasamy
2024-09-05 18:40 ` Alexei Starovoitov
2024-09-08 19:19 ` Cong Wang
2024-09-09 6:08 ` Yonghong Song [this message]
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=72af9f28-709e-4f2f-bd63-8b2d54740815@linux.dev \
--to=yonghong.song@linux.dev \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ardalan@uci.edu \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hsinweih@uci.edu \
--cc=pgovind2@uci.edu \
--cc=xiyou.wangcong@gmail.com \
/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