[PATCH v4] crypto: riscv/poly1305 - import OpenSSL/CRYPTOGAMS implementation
Eric Biggers
ebiggers at kernel.org
Fri Jun 27 14:51:51 PDT 2025
On Fri, Jun 27, 2025 at 09:10:30AM -0700, Sami Tolvanen wrote:
> > Would it be sufficient to #include <linux/cfi_types.h>?
>
> Yes, but this requires the function to be indirectly called, because
> with CFI_CLANG the compiler only emits CFI type information for
> functions that are address-taken in C. If, like Eric suggested, these
> functions are not currently indirectly called, I would simply leave
> out the lpad instructions for kernel builds and worry about
> kernel-mode CFI annotations when they're actually needed:
>
> # if defined(__riscv_zicfilp) && !defined(__KERNEL__)
> lpad 0
> # endif
These functions aren't indirectly called, and I'm intending to keep it that way.
- Eric
More information about the linux-riscv
mailing list