From: sashiko-bot@kernel.org
To: "Pu Lehui" <pulehui@huaweicloud.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] riscv, bpf: Fix missing sign-ext for signed 1-byte and 2-byte kfunc args
Date: Wed, 23 Sep 2026 14:48:16 +0000 [thread overview]
Message-ID: <20260923144817.67C1B1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260923144154.934674-1-pulehui@huaweicloud.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: build failure due to missing sign_extend() definition in RISC-V JIT
--
commit 6d703d57a8b42af3d4a88a2137eead18963e0c3c
Author: Pu Lehui <pulehui@huawei.com>
riscv, bpf: Fix missing sign-ext for signed 1-byte and 2-byte kfunc args
This commit modifies the RISC-V BPF JIT to perform sign-extension for 1-byte
and 2-byte kfunc arguments to comply with the RV64 ABI.
> diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
> index 10e01ff06312d..0c6de02eb33a8 100644
> --- a/arch/riscv/net/bpf_jit_comp64.c
> +++ b/arch/riscv/net/bpf_jit_comp64.c
> @@ -1784,9 +1784,10 @@ int bpf_jit_emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,
>
> for (idx = 0; idx < fm->nr_args; idx++) {
> u8 reg = bpf_to_rv_reg(BPF_REG_1 + idx, ctx);
> + bool sign = fm->arg_flags[idx] & BTF_FMODEL_SIGNED_ARG;
>
> - if (fm->arg_size[idx] == sizeof(int))
> - emit_sextw(reg, reg, ctx);
> + if (sign_extend(reg, reg, fm->arg_size[idx], sign, ctx))
> + return -EINVAL;
[Severity: Low]
Does this introduce a build regression?
Compiling the kernel with RISC-V BPF JIT enabled triggers an implicit
declaration and subsequent linker error because the sign_extend function
is not defined for this usage in bpf_jit_emit_insn.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923144154.934674-1-pulehui@huaweicloud.com?part=1
next prev parent reply other threads:[~2026-09-23 14:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 14:41 [PATCH bpf-next] riscv, bpf: Fix missing sign-ext for signed 1-byte and 2-byte kfunc args Pu Lehui
2026-09-23 14:41 ` Pu Lehui
2026-09-23 14:42 ` Pu Lehui
2026-09-23 14:42 ` Pu Lehui
2026-09-23 14:48 ` sashiko-bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-14 6:47 Pu Lehui
2026-08-14 6:47 ` Pu Lehui
2026-08-14 6:57 ` sashiko-bot
2026-08-14 7:05 ` Pu Lehui
2026-08-14 16:40 ` patchwork-bot+netdevbpf
2026-08-14 16:40 ` patchwork-bot+netdevbpf
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=20260923144817.67C1B1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=pulehui@huaweicloud.com \
--cc=sashiko-reviews@lists.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.