Re: [PATCH v1 0/2] firewire: Simplify storing pointers in device id struct

"Christian A. Ehrhardt" <[email protected]> Mon, 20 Apr 2026 19:39:32 +0200
Newsgroups gmane.linux.sound,gmane.linux.kernel.firewire.devel
Message-ID <[email protected]>
Hi,

On Mon, Apr 20, 2026 at 06:08:16PM +0900, Takashi Sakamoto wrote:
> Just out of curiosity, what does the CHERI extension adopted to RISC-V
> architecture require in terms of kernel programming? Is taking extra
> care when storing pointer values in long-type variables sufficient in
> driver code?

That is a significant part but there is more to it (entry code,
register size changes, the UABI should better be CHERI aware, ...).

But the issue that a pointer does not fit into an unsigned long
is an issue that pops up all over the kernel while most other
changes are more localized.

There is a working linux kernel in the CHERI alliance github here:
   https://github.com/CHERI-Alliance/linux/tree/codasip-cheri-riscv-6.18
That definitely needs more cleanup but it does work.
Previous work from ARM for the morello project (another CHERI
enabled platform) is available here:
   https://git.morello-project.org/morello/kernel/linux
These should give a rough idea of what is required.

Fixing unsigned long vs. uintptr_t issues helps a lot with this
because it reduces the diff. But it is also a general cleanup.

Best regards,
Christian