From: "Arnd Bergmann" <arnd@arndb.de>
To: "Huacai Chen" <chenhuacai@kernel.org>,
"Thomas Weißschuh" <linux@weissschuh.net>
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, 03 Nov 2025 10:41:47 +0100 [thread overview]
Message-ID: <67802ad7-c41d-47ac-a231-abec1e5aae2e@app.fastmail.com> (raw)
In-Reply-To: <CAAhV-H4oDtOUB_CecFE2sPE-JSQNNWvFRmY8=ZdDOCdD8kdo7g@mail.gmail.com>
On Mon, Nov 3, 2025, at 10:12, Huacai Chen wrote:
> Hi, Thomas,
>
> 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.
Thanks! I ran into the same issue for a different series, so this is most welcome.
> 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?
The kernel uapi headers use __u64 etc so they can be included in user
applications without clashing with any types they might define themselves
auch as u64.
The uint64_t style types are problematic because they are provided
by toolchain in userspace, so build-testing the uapi headers would depend
on a working (userspace) cross-compiler rather than just a minimal
(nolibc) toolchain, and because the standard headers are meant to
only be included if specified explicitly by application source code
rather than indirectly from another header.
This was more problematic in the past when it was more common for
applications to be built with pre-c99 compilers that were missing
stdint.h altogether.
Arnd
next prev parent reply other threads:[~2025-11-03 9:42 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
2025-11-03 9:38 ` Huacai Chen
2025-11-08 10:08 ` Thomas Weißschuh
2025-11-03 9:41 ` Arnd Bergmann [this message]
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=67802ad7-c41d-47ac-a231-abec1e5aae2e@app.fastmail.com \
--to=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--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