bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Leon Hwang <leon.hwang@linux.dev>, bpf@vger.kernel.org
Cc: ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net,
	martin.lau@linux.dev, 	song@kernel.org, yonghong.song@linux.dev,
	kernel-patches-bot@fb.com
Subject: Re: [PATCH bpf-next v2 2/2] selftests/bpf: Add case to test bpf_in_interrupt kfunc
Date: Tue, 26 Aug 2025 15:31:36 -0700	[thread overview]
Message-ID: <10876516b0da85f1d167920a76616b191a4f894d.camel@gmail.com> (raw)
In-Reply-To: <312530ee-3f80-4f07-a533-7341bc1d09a8@linux.dev>

On Tue, 2025-08-26 at 11:05 +0800, Leon Hwang wrote:

[...]

> > > diff --git a/tools/testing/selftests/bpf/progs/irq.c b/tools/testing/selftests/bpf/progs/irq.c
> > > index 74d912b22de90..65a796fd1d615 100644
> > > --- a/tools/testing/selftests/bpf/progs/irq.c
> > > +++ b/tools/testing/selftests/bpf/progs/irq.c
> > > @@ -563,4 +563,11 @@ int irq_wrong_kfunc_class_2(struct __sk_buff *ctx)
> > >  	return 0;
> > >  }
> > >  
> > > +SEC("?tc")
> > > +__success
> > 
> > Could you please extend this test to verify generated x86 assembly
> > code? (see __arch_x86_64 and __jited macro usage in verifier_tailcall_jit.c).
> 
> I’ll try to extend it, depending on the specific x86 implementation.
> 
> > Also, is it necessary to extend this test to actually verify returned
> > value?
> 
> Not necessary — let’s just return 0 here.

I mean a bit more broadly, make the bpf program run in an interrupt
and outside of the interrupt context and check the return value.
If it is a small wrapper around existing kernel function probably not
worth it, but you are adding custom logic with inlining.

Basically same thing Alexei asked in the sibling thread.

      reply	other threads:[~2025-08-26 22:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25 13:14 [PATCH bpf-next v2 0/2] bpf: Introduce bpf_in_interrupt kfunc Leon Hwang
2025-08-25 13:15 ` [PATCH bpf-next v2 1/2] " Leon Hwang
2025-08-25 15:17   ` Alexei Starovoitov
2025-08-26  3:00     ` Leon Hwang
2025-08-26 22:18       ` Alexei Starovoitov
2025-09-01 15:12         ` Leon Hwang
2025-09-02  2:29           ` Alexei Starovoitov
2025-09-03  5:22             ` Leon Hwang
2025-08-25 13:15 ` [PATCH bpf-next v2 2/2] selftests/bpf: Add case to test " Leon Hwang
2025-08-25 17:26   ` Eduard Zingerman
2025-08-26  3:05     ` Leon Hwang
2025-08-26 22:31       ` Eduard Zingerman [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=10876516b0da85f1d167920a76616b191a4f894d.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-patches-bot@fb.com \
    --cc=leon.hwang@linux.dev \
    --cc=martin.lau@linux.dev \
    --cc=song@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).