All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: "Jason Wang" <jasowang@redhat.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Arnd Bergmann" <arnd@arndb.de>
Subject: Re: [PATCH] virtio: uapi: avoid usage of libc types
Date: Mon, 22 Dec 2025 17:18:26 -0500	[thread overview]
Message-ID: <20251222171742-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20251222114303-6d63eff5-792c-4727-8bb1-61a024884616@linutronix.de>

On Mon, Dec 22, 2025 at 11:43:52AM +0100, Thomas Weißschuh wrote:
> On Mon, Dec 22, 2025 at 05:28:30AM -0500, Michael S. Tsirkin wrote:
> > On Mon, Dec 22, 2025 at 11:22:16AM +0100, Thomas Weißschuh wrote:
> > > On Mon, Dec 22, 2025 at 03:39:12AM -0500, Michael S. Tsirkin wrote:
> > > > On Mon, Dec 22, 2025 at 09:00:33AM +0100, Thomas Weißschuh wrote:
> > > > > Using libc types and headers from the UAPI headers is problematic as it
> > > > > introduces a dependency on a full C toolchain.
> > > > > 
> > > > > On Linux 'unsigned long' works as a replacement for 'uintptr_t' and does
> > > > > not depend on libc.
> > > > > 
> > > > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > > > 
> > > > 
> > > > are you fixing other uses of uintptr_t ?
> > > 
> > > I am focussing on UAPI headers which include libc headers.
> > > virtio_ring.h seems to be the only such header which uses uintptr_t.
> > > There are a few other UAPI headers which reference uintptr_t, but only
> > > in comments or macros.
> > > 
> > > uintptr_t in regular kernel code is out of scope for me.
> > > While it is iffy, it doesn't actually hurt.
> > > 
> > > 
> > > Thomas
> > 
> > And other uses of stdint.h?
> 
> If they are in UAPI headers I will look at them.
> I also have a series prepared to prevent new users from creeping in.

I don't mind picking this but I'm just curious what's driving all this
effort.

-- 
MST


  reply	other threads:[~2025-12-22 22:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22  8:00 [PATCH] virtio: uapi: avoid usage of libc types Thomas Weißschuh
2025-12-22  8:39 ` Michael S. Tsirkin
2025-12-22 10:22   ` Thomas Weißschuh
2025-12-22 10:28     ` Michael S. Tsirkin
2025-12-22 10:43       ` Thomas Weißschuh
2025-12-22 22:18         ` Michael S. Tsirkin [this message]
2025-12-23  7:10           ` Thomas Weißschuh
2025-12-22  8:46 ` Arnd Bergmann

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=20251222171742-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=arnd@arndb.de \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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.