From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: "Jeff Layton" <jlayton@kernel.org>,
"Chuck Lever" <chuck.lever@oracle.com>,
"Alexander Aring" <alex.aring@gmail.com>,
"Jan Kara" <jack@suse.cz>,
"Christian Brauner" <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfs: use UAPI types for new struct delegation definition
Date: Thu, 04 Dec 2025 10:09:01 +0100 [thread overview]
Message-ID: <f6ad9bf5-6010-4974-8b37-eedd3bcc4b66@app.fastmail.com> (raw)
In-Reply-To: <20251204075422-78bae8db-0be5-4053-b0b9-33fc4c7125ae@linutronix.de>
On Thu, Dec 4, 2025, at 07:58, Thomas Weißschuh wrote:
> On Wed, Dec 03, 2025 at 03:14:31PM +0100, Arnd Bergmann wrote:
>> > --- a/include/uapi/linux/fcntl.h
>> > +++ b/include/uapi/linux/fcntl.h
>> > @@ -4,11 +4,7 @@
>> >
>> > #include <asm/fcntl.h>
>> > #include <linux/openat2.h>
>> > -#ifdef __KERNEL__
>> > #include <linux/types.h>
>> > -#else
>> > -#include <stdint.h>
>> > -#endif
>>
>> I think we have a couple more files that could use similar changes,
>> but they tend to be at a larger scale:
>
> To start, let's extend the UAPI header tests to detect such dependencies [0].
> Then we can clean them up without new ones popping up.
Sounds good to me. This also caused some problems when I did some
validation to find implicit padding in uapi data structures (using -Wpadded).
I eventually figured out how to build all uapi headers against nolibc
on all architectures with my cross-compilers and clang.
Specifically, I needed some macro definitions for architecture specific
padding in linux/types.h.
I'll have to rebase my patches after -rc1, and we can see if it's
worth upstreaming, either the bits improve the test coverage or
the actual padding annotations I added.
>> include/uapi/xen/privcmd.h
>
> I have no idea how that header is supposed to work at all, as it depends on
> non-UAPI headers. It is also ignored in the UAPI header tests.
This is the hack I'm using to test-build the header, but I don't
think that is what we want upstream:
--- a/include/uapi/xen/privcmd.h
+++ b/include/uapi/xen/privcmd.h
@@ -36,7 +36,12 @@
#include <linux/types.h>
#include <linux/compiler.h>
+#ifdef __KERNEL__
#include <xen/interface/xen.h>
+#else
+typedef __u16 domid_t;
+typedef __u64 xen_pfn_t;
+#endif
struct privcmd_hypercall {
__u64 op;
Arnd
next prev parent reply other threads:[~2025-12-04 9:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 13:57 Thomas Weißschuh
2025-12-03 14:01 ` Jeff Layton
2025-12-03 14:14 ` Arnd Bergmann
2025-12-04 6:58 ` Thomas Weißschuh
2025-12-04 9:09 ` Arnd Bergmann [this message]
2025-12-04 9:02 ` Christian Brauner
2025-12-04 9:17 ` Thomas Weißschuh
2025-12-05 8:52 ` Christian Brauner
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=f6ad9bf5-6010-4974-8b37-eedd3bcc4b66@app.fastmail.com \
--to=arnd@arndb.de \
--cc=alex.aring@gmail.com \
--cc=brauner@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.weissschuh@linutronix.de \
/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
all inboxes | Powered by JetHome®