From: Leon Hwang <leon.hwang@linux.dev>
To: xu.xin16@zte.com.cn, leon.hwang@linux.dev
Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com,
martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
jolsa@kernel.org, emil@etsalapatis.com, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, xu.xin@linux.dev
Subject: Re: [PATCH bpf-next] bpf:syscall: Log error code on trampoline unlink failure
Date: Thu, 16 Jul 2026 14:09:12 +0800 [thread overview]
Message-ID: <acc8805c-2e66-49c9-95be-43ce1c954ee7@linux.dev> (raw)
In-Reply-To: <20260716135515586meEuKQ_R48nXmdnpldURM@zte.com.cn>
On 16/7/26 13:55, xu.xin16@zte.com.cn wrote:
>> In subject, 'bpf:' is enough, 'syscall:' can be dropped.
>
> Ok, thanks.
>
>>
>> On 16/7/26 11:34, xu.xin16@zte.com.cn wrote:
>>> From: xu xin <xu.xin16@zte.com.cn>
>>>
>>> Replace silent WARN_ON_ONCE with WARN_ONCE that prints the actual error
>>> code from bpf_trampoline_unlink_prog(). This aids debugging of race
>>> conditions during link teardown, while keeping the warning rate limited
>>> to avoid log flooding.
>>
>>
>> Have you tried to trace bpf_trampoline_unlink_prog() with fexit?
>>
>> bpftrace -lv 'fexit:bpf_trampoline_unlink_prog'
>> kretfunc:vmlinux:bpf_trampoline_unlink_prog
>> struct bpf_tramp_node * node
>> struct bpf_trampoline * tr
>> struct bpf_prog * tgt_prog
>> int retval
>>
>> Since bpf_trampoline_unlink_prog() can be traced with fexit, it seems
>> unnecessary for this change?
>
> Well, the crash may happen when the kernel is booting, or too hard to reproduce,
> in which case, bpftrace does not work.
Do you enable kernel.panic_on_warn sysctl?
If it's not enabled, the kernel won't crash, I think.
Thanks,
Leon
>
> So this change will be more helpful, I believe.
>
> Thanks,
> xu xin
>
next prev parent reply other threads:[~2026-07-16 6:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 3:34 [PATCH bpf-next] bpf:syscall: Log error code on trampoline unlink failure xu.xin16
2026-07-16 4:58 ` Leon Hwang
2026-07-16 5:55 ` xu.xin16
2026-07-16 6:09 ` Leon Hwang [this message]
2026-07-16 6:26 ` xu.xin16
2026-07-16 6:56 ` Leon Hwang
2026-07-16 7:03 ` xu.xin16
2026-07-16 8:01 ` Leon Hwang
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=acc8805c-2e66-49c9-95be-43ce1c954ee7@linux.dev \
--to=leon.hwang@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=song@kernel.org \
--cc=xu.xin16@zte.com.cn \
--cc=xu.xin@linux.dev \
--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