From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31AAC2C2353 for ; Mon, 22 Dec 2025 22:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766441917; cv=none; b=QgRywdF1Qv8244N1AbwpGh1RCoXZA/P1NJFVMkWAGhZK30vUuy47O94UHR2bYwSFWfhL6zsl7JueU95HtVRY+PKJfLDyN1xhPHUZQqB86LbaBkMu89V/KrwBydh7Lu1HqinTLBN7K0hc06EIPw32ywIhMBz09MW/oUcyCNobMAo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766441917; c=relaxed/simple; bh=fEUMhHxeSwminA/lpNh31LkYhzWLAOIwT4he5PZamVk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n1VYSUoZydKhIbuoUWclDx4ugc5LQjzDXFYirbj29DE04qwo+DXEan5e1sq7f5SxGlfYS5Lmv8DK5lxI50MHSybU9o9RNgefio1OXhFXPEmbq0cjUSOILuexp5ZJnDEbd0wCllYQSL85gtAZ5p0uYehLqS5y3kCJgBRLv4sV/uE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TrMXRrFF; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=G1WgcY0a; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TrMXRrFF"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="G1WgcY0a" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766441913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=baQtHdFzu48XzxJedKWBE8MiYiBmE5aODElt4QVekp8=; b=TrMXRrFFe1EFBQSLq2l6lQf+W6zfq86IqBVYyVNVwRNp59M61PWxOEUOnqqImQkxkqxEhy wPCtJh/HumRXls1/GTrxQRCnY3J2BE75nqZLytlXaoG1pRgaHMhNZy1p72Uz61TxcjVjT8 E6KEw/S8oiwbwtGF5zlAu+aoY33CVTs= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608-cwrIAetUMoaMoecfNg2eYA-1; Mon, 22 Dec 2025 17:18:32 -0500 X-MC-Unique: cwrIAetUMoaMoecfNg2eYA-1 X-Mimecast-MFC-AGG-ID: cwrIAetUMoaMoecfNg2eYA_1766441911 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-430f527f5easo3025055f8f.1 for ; Mon, 22 Dec 2025 14:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1766441911; x=1767046711; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=baQtHdFzu48XzxJedKWBE8MiYiBmE5aODElt4QVekp8=; b=G1WgcY0a6eoIpqdMDw9awWKvvleYQlnDq0w/0AphWIJ0qG7HHfJMiIV3wOIP/f1TMQ nnUJe7dGNoAHZ9kX8eSxXCLV1R/pGnoL7UwsOn4pZuPGZaxvbwjl6HFwYlZEkSYPJFj3 rh0zRfc4cgWibjbNddIpDnxmbPDcIyNJHiQc57xxcgSqW/SXHVCTTF2MhLjO5NQrDbgv OVNZZJOD76et18dhILkEZRowCw/kr9lcgtYbY2OTIIM14xkW3RqGxKyuExBjOGeg7+jm cecYgAk60z2wZn52d5q3EE8uXuf7ouajfCxQhlFrYoAVDBe2iAscfw/Wz+ZjxxB5+mo+ mTBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766441911; x=1767046711; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=baQtHdFzu48XzxJedKWBE8MiYiBmE5aODElt4QVekp8=; b=plX1gcEE9CokuuJMmJBn4q3pNzXYrqb7WCdPaWnxVwJbMFdCWXPORr3VwDQo60h9uB NLuWHE4zfxPd/zo/+Gv6h0w1txyIJ84/jUKQktRGQe37dFWI7/mxmZ2xZ4qIFkyx5PDD 8na69lFO1YQ2WCSGBfSD5pwjrW1xgGp9oecmHRZXNufOo0HcaTU+7QOwhKrCGle19y9A 9lpyle3RnASPTtOEVV6XGe2FMpvIFyk6KTYVIX4vuhndQE1AIzDXwprlQNH9RcajT2xI Cu/OD3d5OtBfVK7nEN8AMU/JO/f8jvq+hw9zcqy50acRWpss3ssng7tWsYUFvme8WEDJ k8/Q== X-Forwarded-Encrypted: i=1; AJvYcCWGd7ZAedFL/EVdwc+fmwrAlZRJnFXEpeqAQGutP9Sqdmq2lc2AzNIhNqT/PuKOJax0pgbZqvX46OjDBt8=@vger.kernel.org X-Gm-Message-State: AOJu0YwN9mmz8za+jaO7Yt7SXRExqfWHJZGzwRLz2KLY7Qu4DNaDnzr5 IZI7UliSroUy+vJj+AlBj1G/+4Wz0bzV+4jMKFGzyBR3cnmojWrXd+5VOu9sIPo8NPkCl9WcolU Tw4yM1JLdAXzCokyVnw35SEI6dQObSWXdQRmkmXOTCdMLPea3LCH9n8qcMD95tMensQ== X-Gm-Gg: AY/fxX4ohC1AZ8ykgAjM7rGO28IY9mM+dy1fmneYWIzzzvozgS9kBaABWIxm/gUdCOp KtR5groc3KpuDJkUDPxot0uTWPJ/WhuQpgAydTgR6L/UZm9A445A8KYjS/kgVJsas3oOndjZgIm vnvc5Wf8blr1dnNKliebvM58S2z17TTUyx9ygd8+pufVBzEk4yRS/jLHZ1uQLaKC/fJAbP2P2YT euIaNAfFjj4OZ6BPnhWYr0TD2t/aV+pqp5M/D19OJETP3lFWJVsjv/lACELm6HyfcQZQvHBEQPG svLalO78UtQX4Xs36OJKQB1GEoCePvo92FkJ+qz02R7wnQKSQTd22ca/Sfwec1Q/nGvECr1IG/5 1lKC50qKd6cuxoXDRLiOoQlHyKiJcrn6XQw== X-Received: by 2002:a5d:5888:0:b0:431:307:21fc with SMTP id ffacd0b85a97d-4324e42e79emr15948891f8f.23.1766441910879; Mon, 22 Dec 2025 14:18:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5lxuAUi2eLxexBNOCp+Rn8R0fHS47riPDOd9eqpxxHDGTvYtGJLP1Z3qs5yMU65szhlGTPw== X-Received: by 2002:a5d:5888:0:b0:431:307:21fc with SMTP id ffacd0b85a97d-4324e42e79emr15948873f8f.23.1766441910467; Mon, 22 Dec 2025 14:18:30 -0800 (PST) Received: from redhat.com (IGLD-80-230-31-118.inter.net.il. [80.230.31.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea82feasm24055548f8f.24.2025.12.22.14.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 14:18:29 -0800 (PST) Date: Mon, 22 Dec 2025 17:18:26 -0500 From: "Michael S. Tsirkin" To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH] virtio: uapi: avoid usage of libc types Message-ID: <20251222171742-mutt-send-email-mst@kernel.org> References: <20251222-uapi-virtio-v1-1-29390f87bcad@linutronix.de> <20251222033807-mutt-send-email-mst@kernel.org> <20251222111044-611cdccb-327c-4ed8-a75b-1a65aa353802@linutronix.de> <20251222052818-mutt-send-email-mst@kernel.org> <20251222114303-6d63eff5-792c-4727-8bb1-61a024884616@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 > > > > > > > > > > > > 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