From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Christian A. Ehrhardt" <lk@c--e.de>,
Clemens Ladisch <clemens@ladisch.de>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"Christian A. Ehrhardt" <christian.ehrhardt@codasip.com>,
linux1394-devel@lists.sourceforge.net,
linux-sound@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v1 0/2] firewire: Simplify storing pointers in device id struct
Date: Wed, 22 Apr 2026 12:10:25 +0200 [thread overview]
Message-ID: <aeicYlO0VNJB9m5K@monoceros> (raw)
In-Reply-To: <aeiXm6IUIK54iG21@ashevche-desk.local>
[-- Attachment #1: Type: text/plain, Size: 2748 bytes --]
On Wed, Apr 22, 2026 at 12:40:43PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 22, 2026 at 10:40:09AM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > On Wed, Apr 22, 2026 at 10:30:24AM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > > On Wed, Apr 22, 2026 at 10:19:21AM +0300, Andy Shevchenko wrote:
> > > > On Tue, Apr 21, 2026 at 04:07:42PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > > > > On Tue, Apr 21, 2026 at 09:53:57PM +0900, Takashi Sakamoto wrote:
> > > > > > On Mon, Apr 20, 2026 at 07:39:32PM +0200, Christian A. Ehrhardt wrote:
> > > > > > > On Mon, Apr 20, 2026 at 06:08:16PM +0900, Takashi Sakamoto wrote:
>
> ...
>
> > > > > > Thanks for the references. It looks like there is not much to consider
> > > > > > outside of mm subsystem. But I have some concerns if supporting
> > > > > > ARM/RISC-V adoptation of CHERI extension in Linux FireWire subsystem.
> > > > > >
> > > > > > Any structures in UAPI header of this subsystem are defined with
> > > > > > an assumption that the size of pointer in the existing System V
> > > > > > architectures is up to 64 bits at most. We can see many usage of
> > > > > > '__u64' type member for pointers (e.g. 'rom' in fw_cdev_get_info
> > > > > > structure). I imagine to need defining specific structures for this kind
> > > > > > of 'fat' pointer. (The same assumption lays on compat ioctl.)
> > > > >
> > > > > The Standard C answer to that is: The assumption that you can fit a
> > > > > pointer in an unsigned long or u64 is not generally justified. This is
> > > > > "only" given for all current Linux archtectures. And if you want an
> > > > > integer type to store a pointer, use uintptr_t.
> > > >
> > > > No, please don't. Linus was clear about this. Use `unsigned long` in that case.
> > >
> > > On CHERI we have sizeof(unsigned long) = 4 and sizeof(void *) = 8, so
> > > what Linus wants doesn't work.
> >
> > Correction, we have sizeof(unsigned long) = 8 and sizeof(void *) = 16 or
> > course.
>
> CHERI is not specified for 32-bit platforms?
(Attention, half-knowledge alert; take the stuff I'm saying with a grain
of salt.)
There are 32bit riscv CHERI machines (even real hardware[1], while for
64 bit riscv there is currently only qemu and an expensive FPGA by
Codasip), but a difficulty there is that there is >1 incompatible
variant about the semantics of the additional pointer bits which makes
working on that a bit more difficult and ugly. And I'm not aware of an
effort to make Linux work on those. Also I believe that all users who
want CHERI and Linux will stick to 64bit.
Best regards
Uwe
[1] https://lowrisc.org/news/unveiling-sonata-affordable-cheri-hardware-for-embedded-systems/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-04-22 10:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-19 6:42 [PATCH v1 0/2] firewire: Simplify storing pointers in device id struct Uwe Kleine-König (The Capable Hub)
2026-04-19 6:42 ` [PATCH v1 1/2] " Uwe Kleine-König (The Capable Hub)
2026-04-19 6:42 ` [PATCH v1 2/2] ALSA: firewire: Make use of ieee1394's .driver_data_ptr Uwe Kleine-König (The Capable Hub)
2026-04-20 8:48 ` Andy Shevchenko
2026-04-20 9:08 ` [PATCH v1 0/2] firewire: Simplify storing pointers in device id struct Takashi Sakamoto
2026-04-20 17:39 ` Christian A. Ehrhardt
2026-04-21 12:53 ` Takashi Sakamoto
2026-04-21 14:07 ` Uwe Kleine-König (The Capable Hub)
2026-04-22 7:19 ` Andy Shevchenko
2026-04-22 8:30 ` Uwe Kleine-König (The Capable Hub)
2026-04-22 8:40 ` Uwe Kleine-König (The Capable Hub)
2026-04-22 9:40 ` Andy Shevchenko
2026-04-22 10:10 ` Uwe Kleine-König (The Capable Hub) [this message]
2026-04-21 16:20 ` Christian A. Ehrhardt
2026-04-23 14:19 ` Takashi Sakamoto
2026-04-23 16:53 ` Uwe Kleine-König (The Capable Hub)
2026-04-27 6:37 ` Takashi Sakamoto
2026-04-27 8:07 ` Uwe Kleine-König (The Capable Hub)
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=aeicYlO0VNJB9m5K@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=christian.ehrhardt@codasip.com \
--cc=clemens@ladisch.de \
--cc=linux-sound@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=lk@c--e.de \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=torvalds@linux-foundation.org \
--cc=wsa+renesas@sang-engineering.com \
/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.