[PATCH v3 1/9] uapi: import VDUSE and VFIO header from v7.3-rc5 kernel

David Marchand david.marchand at redhat.com
Tue Sep 29 16:38:30 CEST 2026


On Tue, 29 Sept 2026 at 12:53, Eugenio Pérez <eperezma at redhat.com> wrote:
>
> This header will be used by the Vhost library.
>
> Including also uapi/linux/stddef.h, which defines __counted_by if the
> compiler does not support it.
>
> Signed-off-by: Eugenio Pérez <eperezma at redhat.com>

Unfortunately, we still have a build issue, since linux/vfio.h
includes linux/types.h -> linux/posix_types.h -> linux/stddef.h.
So our local copy of stddef.h is ignored:
https://github.com/ovsrobot/dpdk/actions/runs/36559664854/job/109377193634#step:19:551

I tried to import both those headers, but I hit a guard for a non
sanitised linux/types.h header.

--- /usr/include/linux/types.h 2026-03-04 01:00:00.000000000 +0100
+++ kernel/linux/uapi/linux/types.h 2026-09-29 16:24:57.764056484 +0200
@@ -5,8 +5,13 @@
 #include <asm/types.h>

 #ifndef __ASSEMBLY__
+#ifndef __KERNEL__
+#ifndef __EXPORTED_HEADERS__
+#warning "Attempt to use kernel headers from user space, see
https://kernelnewbies.org/KernelHeaders"
+#endif /* __EXPORTED_HEADERS__ */
+#endif

-#include <linux/posix_types.h>
+#include <uapi/linux/posix_types.h>

 #ifdef __SIZEOF_INT128__
 typedef __signed__ __int128 __s128 __attribute__((aligned(16)));


We are missing an equivalent of scripts/unifdef -U__KERNEL__
-D__EXPORTED_HEADERS__ in the devtools/linux-uapi.sh script.


-- 
David Marchand



More information about the dev mailing list