ACK/Cmnt: [SRU][N][PATCH v2 0/6] Fix FTBFS on jammy:linux-riscv-6.8

Stefan Bader stefan.bader at canonical.com
Fri Mar 6 09:43:29 UTC 2026


On 05/03/2026 21:37, Sarah Emery wrote:
> BugLink: https://bugs.launchpad.net/bugs/2142235
> 
> SRU Justification:
> 
> [ Impact ]
> 
> Previously applied patches to the generic kernel are making
> jammy:linux-riscv-6.8 FTBFS because of missing declaration of
> some functions in arch/riscv/net/bpf_jit.h.
> 
> Those previous patches were applied in bulk as part of upstream
> stable patchset 2026-01-26.
> See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2139072
> 
> The following commit, fixing CVE-2025-40079, from kernel 6.12,
> uses functions that were not yet defined in 6.8:
>   riscv, bpf: Sign extend struct ops return values properly
> (fd2e08128944a7679e753f920e9eda72057e427c)
> 
> Error log:
> /build/jammy/arch/riscv/net/bpf_jit_comp64.c:582:17:
> error: implicit declaration of function 'emit_sextb';
> did you mean 'emit_sub'? [-Werror=implicit-function-declaration]
> 
> /build/jammy/arch/riscv/net/bpf_jit_comp64.c:585:17:
> error: implicit declaration of function 'emit_sexth';
> did you mean 'emit_zext_32'? [-Werror=implicit-function-declaration]
> 
> /build/jammy/arch/riscv/net/bpf_jit_comp64.c:588:17:
> error: implicit declaration of function 'emit_sextw';
> did you mean 'emit_subw'? [-Werror=implicit-function-declaration]
> ... and more missing functions
> 
> [ Fix ]
> 
> Cherry picked 6 missing commits from upstream:
> - e33758f7493c9ad8cf6960bcf7c70f5761f3acfb
> 	"riscv, bpf: Unify 32-bit sign-extension to emit_sextw"
> - 914c7a5ff18a225f7df254ae3433574f3d47b711
> 	"riscv, bpf: Unify 32-bit zero-extension to emit_zextw"
> - 361db44c3c59cde05e9926647f16255e274a37f4
> 	"riscv, bpf: Simplify sext and zext logics in branch instructions"
> - 647b93f65daa128d9a0e4aac744a5fcf5f58b2d2
> 	"riscv, bpf: Add necessary Zbb instructions"
> - 519fb722bea09ae2664ad21f8ef4360fb799eb2f
> 	"riscv, bpf: Optimize sign-extention mov insns with Zbb support"
> - 06a33d024838414432b6c0f51f994e7f1695b74f
> 	"riscv, bpf: Optimize bswap insns with Zbb support"
> 
> Those commits add definitions for the missing functions emit_sextX and others.
> 
> [ Test Case ]
> 
> Kernel build succeeded.
> 
> Pu Lehui (6):
>    riscv, bpf: Unify 32-bit sign-extension to emit_sextw
>    riscv, bpf: Unify 32-bit zero-extension to emit_zextw
>    riscv, bpf: Simplify sext and zext logics in branch instructions
>    riscv, bpf: Add necessary Zbb instructions
>    riscv, bpf: Optimize sign-extention mov insns with Zbb support
>    riscv, bpf: Optimize bswap insns with Zbb support
> 
>   arch/riscv/net/bpf_jit.h        | 134 ++++++++++++++++++++
>   arch/riscv/net/bpf_jit_comp64.c | 210 +++++++++++---------------------
>   2 files changed, 205 insertions(+), 139 deletions(-)
> 

Late but as it only affects riscv I take your word...

Acked-by: Stefan Bader <stefan.bader at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 52669 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260306/196febb9/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260306/196febb9/attachment-0001.sig>


More information about the kernel-team mailing list