From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] LoongArch: ptrace: Use UAPI types in UAPI header
Date: Mon, 3 Nov 2025 10:27:22 +0100 [thread overview]
Message-ID: <4f8402e5-2bfa-4ee3-9123-fac887ed866d@t-8ch.de> (raw)
In-Reply-To: <CAAhV-H4oDtOUB_CecFE2sPE-JSQNNWvFRmY8=ZdDOCdD8kdo7g@mail.gmail.com>
Hi Huacai,
On 2025-11-03 17:12:58+0800, Huacai Chen wrote:
> On Wed, Oct 29, 2025 at 11:20 PM Thomas Weißschuh <linux@weissschuh.net> wrote:
> >
> > The kernel UAPI headers already contain fixed-width integer types,
> > there is no need to rely on libc types. There may not be a libc
> > available or it may not provide <stdint.h>, like for example on nolibc.
> >
> > This also aligns the header with the rest of the LoongArch UAPI headers.
> Thank you for your patch, but could you please tell me some history
> and user guide about the three styles: u64, __u64 and unint64_t?
uint64_t -> userspace type, should not be used within the kernel
can technically be used in UAPI it will be somewhat
nonstandard and introduce a dependency on libc with no
upsides.
u64 -> kernel-internal type, used for regular kernel code
defined in include/linux/types.h
__u64 -> UAPI type usable from both kernel and userspace code
defined in include/uapi/linux/types.
As a note: When applying the patch I want to clarify the commit message
a bit, as nolibc indeed has a stdint.h header. The real breakage comes
from a validation step we perform which does not add the libc include
directory to the include path.
Thomas
next prev parent reply other threads:[~2025-11-03 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 15:20 [PATCH] LoongArch: ptrace: Use UAPI types in UAPI header Thomas Weißschuh
2025-11-03 9:12 ` Huacai Chen
2025-11-03 9:27 ` Thomas Weißschuh [this message]
2025-11-03 9:38 ` Huacai Chen
2025-11-08 10:08 ` Thomas Weißschuh
2025-11-03 9:41 ` Arnd Bergmann
2025-11-14 4:41 ` Huacai Chen
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=4f8402e5-2bfa-4ee3-9123-fac887ed866d@t-8ch.de \
--to=linux@weissschuh.net \
--cc=chenhuacai@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox