lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5059733.GXAFRqVoOG@7950hx>
Date: Fri, 06 Feb 2026 22:27:22 +0800
From: Menglong Dong <menglong.dong@...ux.dev>
To: menglong8.dong@...il.com,
 Björn Töpel <bjorn@...nel.org>
Cc: ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
 martin.lau@...ux.dev, eddyz87@...il.com, song@...nel.org,
 yonghong.song@...ux.dev, john.fastabend@...il.com, kpsingh@...nel.org,
 sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org, pulehui@...wei.com,
 puranjay@...nel.org, pjw@...nel.org, palmer@...belt.com,
 aou@...s.berkeley.edu, alex@...ti.fr, bpf@...r.kernel.org,
 linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
 jiang.biao@...ux.dev, martin.lau@...nel.org, clm@...a.com,
 ihor.solodrai@...ux.dev
Subject: Re: [PATCH bpf-next v3 2/3] bpf,
 riscv: add fsession support for trampolines

On 2026/2/6 21:42, Björn Töpel wrote:
> Menglong!
> 
> On Fri, 6 Feb 2026 at 13:51, <bot+bpf-ci@...nel.org> wrote:
> >
> > > diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
> > > --- a/arch/riscv/net/bpf_jit_comp64.c
> > > +++ b/arch/riscv/net/bpf_jit_comp64.c
> >
> > [ ... ]
> >
> > > +static int invoke_bpf(struct bpf_tramp_links *tl, int args_off, int retval_off,
> > > +                   int run_ctx_off, int func_meta_off, bool save_ret, u64 func_meta,
> > > +                   int cookie_off, struct rv_jit_context *ctx)
> > > +{
> > > +     int i, cur_cookie = (cookie_off - args_off) / 8;
> > > +
> > > +     for (i = 0; i < tl->nr_links; i++) {
> > > +             int err;
> > > +
> > > +             if (bpf_prog_calls_session_cookie(&tl->links[i])) {
> >                                                 ^^^^^^^^^^^^^^
> >
> > Should this be tl->links[i] instead of &tl->links[i]?
> >
> > The function bpf_prog_calls_session_cookie() expects a struct bpf_tramp_link
> > pointer, but tl->links is an array of pointers, so tl->links[i] is already
> > a struct bpf_tramp_link pointer. The extra & passes a pointer-to-pointer.
> >
> > For comparison, arm64 uses:
> >
> >     if (bpf_prog_calls_session_cookie(fentry->links[i]))
> >
> > And include/linux/bpf.h uses:
> >
> >     if (bpf_prog_calls_session_cookie(fentries.links[i]))
> >
> > Both without the &.
> >
> > > +                     u64 meta = func_meta | ((u64)cur_cookie << BPF_TRAMP_COOKIE_INDEX_SHIFT);
> > > +
> > > +                     emit_store_stack_imm64(RV_REG_T1, -func_meta_off, meta, ctx);
> > > +                     cur_cookie--;
> > > +             }
> > > +             err = invoke_bpf_prog(tl->links[i], args_off, retval_off, run_ctx_off,
> > > +                                   save_ret, ctx);
> >
> > Note that invoke_bpf_prog() correctly uses tl->links[i] without the &.
> 
> Menglong, the v3 doesn't build. Please refrain from just stressing
> versions out. For v4, make sure you properly build/test. On that note;
> on what hardware/simulator did you perform the tests on?

Ah, sorry that the CONFIG_BPF_JIT is not enabled in my config, which
makes me didn't find this compile error.

I used to test it in qemu. As this is a tiny change, so I didn't run the
test again :/

I'll make sure the build and test pass in the V4.

Thanks!
Menglong Dong

> 
> 





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ