All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saket Kumar Bhaskar <skb99@linux.ibm.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Hari Bathini <hbathini@linux.ibm.com>,
	sachinpb@linux.ibm.com,
	Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
	Andrii Nakryiko <andrii@kernel.org>, Eduard <eddyz87@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH bpf-next] selftests/bpf: Fix htab_update/reenter_update selftest failure
Date: Tue, 11 Nov 2025 20:02:51 +0530	[thread overview]
Message-ID: <aRNJE5GRUxdlJbZB@linux.ibm.com> (raw)
In-Reply-To: <CAADnVQL3njbb3ANFkDWYRC-EHqAqWSwYs4OSUeKiw4XOYa+UNQ@mail.gmail.com>

On Thu, Nov 06, 2025 at 09:15:39AM -0800, Alexei Starovoitov wrote:
> On Wed, Nov 5, 2025 at 9:26 PM Saket Kumar Bhaskar <skb99@linux.ibm.com> wrote:
> >
> > Since commit 31158ad02ddb ("rqspinlock: Add deadlock detection and recovery")
> > the updated path on re-entrancy now reports deadlock via
> > -EDEADLK instead of the previous -EBUSY.
> >
> > The selftest is updated to align with expected errno
> > with the kernel’s current behavior.
> >
> > Signed-off-by: Saket Kumar Bhaskar <skb99@linux.ibm.com>
> > ---
> >  tools/testing/selftests/bpf/prog_tests/htab_update.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/bpf/prog_tests/htab_update.c b/tools/testing/selftests/bpf/prog_tests/htab_update.c
> > index 2bc85f4814f4..98d52bb1446f 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/htab_update.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/htab_update.c
> > @@ -40,7 +40,7 @@ static void test_reenter_update(void)
> >         if (!ASSERT_OK(err, "add element"))
> >                 goto out;
> >
> > -       ASSERT_EQ(skel->bss->update_err, -EBUSY, "no reentrancy");
> > +       ASSERT_EQ(skel->bss->update_err, -EDEADLK, "no reentrancy");
> 
> Makes sense, but looks like the test was broken for quite some time.
> It fails with
>         /* lookup_elem_raw() may be inlined and find_kernel_btf_id()
> will return -ESRCH */
>         bpf_program__set_autoload(skel->progs.lookup_elem_raw, true);
>         err = htab_update__load(skel);
>         if (!ASSERT_TRUE(!err || err == -ESRCH, "htab_update__load") || err)
> 
> before reaching deadlk check.
> Pls make it more robust.
> __pcpu_freelist_pop() might be better alternative then lookup_elem_raw().
> 
> pw-bot: cr

Hi Alexei,

I tried for __pcpu_freelist_pop, looks like it is not good candidate to
attach fentry for, as it is non traceable:

trace_kprobe: Could not probe notrace function __pcpu_freelist_pop

I wasn't able to find any other function for this.

Thanks
Saket


  reply	other threads:[~2025-11-11 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06  5:26 [PATCH bpf-next] selftests/bpf: Fix htab_update/reenter_update selftest failure Saket Kumar Bhaskar
2025-11-06 17:15 ` Alexei Starovoitov
2025-11-11 14:32   ` Saket Kumar Bhaskar [this message]
2025-11-11 18:35     ` Alexei Starovoitov
2025-11-12 15:08       ` Saket Kumar Bhaskar
2025-11-12 15:40         ` Alexei Starovoitov

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=aRNJE5GRUxdlJbZB@linux.ibm.com \
    --to=skb99@linux.ibm.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=hbathini@linux.ibm.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sachinpb@linux.ibm.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=venkat88@linux.ibm.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 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.