Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247405 > unrolled thread

[PATCH v4 00/79] Userspace compile test and fixes for exported uapi header files

Started byMikko Rapeli <mikko.rapeli@iki.fi>
First post2015-10-15 08:00 +0200
Last post2015-10-15 09:10 +0200
Articles 20 on this page of 105 — 11 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 00/79] Userspace compile test and fixes for exported uapi header files Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 42/79] include/uapi/linux/ipv6_route.h: include linux/in6.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 04/79] drm_mode.h: use __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
      Re: [PATCH v4 04/79] drm_mode.h: use __u32 and __u64 from linux/types.h Alex Deucher <alexdeucher@gmail.com> - 2015-10-15 15:40 +0200
        Re: [PATCH v4 04/79] drm_mode.h: use __u32 and __u64 from  linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 15:50 +0200
    [PATCH v4 26/79] scsi_netlink.h: use __u8, __u16 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 12/79] include/uapi/drm/sis_drm.h: move sis_file_private to drivers/gpu/drm/sis/sis_drv.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 40/79] include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 03/79] drm.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 02/79] scripts/headers_compile_test.sh: compile test script for exported headers Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
      Re: [PATCH v4 02/79] scripts/headers_compile_test.sh: compile test script for exported headers Alexander Stein <alexander.stein@systec-electronic.com> - 2015-10-15 09:20 +0200
        Re: [PATCH v4 02/79] scripts/headers_compile_test.sh: compile test  script for exported headers Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 09:30 +0200
    [PATCH v4 36/79] include/uapi/asm-generic/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 38/79] include/uapi/linux/rds.h: include linux/socket.h and linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
      Re: [PATCH v4 38/79] include/uapi/linux/rds.h: include  linux/socket.h and linux/types.h Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-10-15 13:20 +0200
    [PATCH v4 08/79] r128_drm.h: include drm/drm.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
      Re: [PATCH v4 08/79] r128_drm.h: include drm/drm.h Daniel Vetter <daniel@ffwll.ch> - 2015-10-15 09:50 +0200
    [PATCH v4 27/79] scsi_netlink_fc.h: use __u16, __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 39/79] include/uapi/linux/if_pppox.h: include linux/if.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:00 +0200
    [PATCH v4 48/79] include/uapi/linux/mqueue.h: include linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 32/79] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 49/79] include/uapi/linux/mroute.h: include linux/in.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 44/79] include/uapi/linux/if_pppox.h: include linux/in.h and linux/in6.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 30/79] gntdev.h: use __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
      Re: [Xen-devel] [PATCH v4 30/79] gntdev.h: use __u32 and __u64 from  linux/types.h David Vrabel <david.vrabel@citrix.com> - 2015-10-15 13:00 +0200
    [PATCH v4 24/79] sctp.h: use __u8 and __u32 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 20/79] include/uapi/linux/hsi/cs-protocol.h: include linux/time.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 21/79] ebtables.h: use __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 31/79] include/uapi/linux/sysctl.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 34/79] include/uapi/asm-generic/shmbuf.h: include fixes Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 33/79] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
      Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64  from linux/types.h Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-10-15 13:10 +0200
        Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64  from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-16 00:10 +0200
          Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64  from linux/types.h Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-10-16 00:30 +0200
            Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64  from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-16 00:40 +0200
              Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64  from linux/types.h Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-10-16 01:10 +0200
    [PATCH v4 28/79] hdspm.h: use __u8, __u32 and __u64 from linux/types.h instead of stdint.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
      Re: [PATCH v4 28/79] hdspm.h: use __u8, __u32 and __u64 from linux/types.h instead of stdint.h Takashi Iwai <tiwai@suse.de> - 2015-10-15 10:10 +0200
    [PATCH v4 25/79] scsi_bsg_fc.h: use __u8, __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 19/79] hsi_char.h: use __u32 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 46/79] include/uapi/linux/packet_diag.h: include linux/netdevice.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 47/79] include/uapi/linux/llc.h: include linux/if.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 37/79] include/uapi/linux/socket.h: include sys/socket.h in userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 43/79] include/uapi/linux/if_pppol2tp.h: include linux/in.h and linux/in6.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 35/79] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 41/79] include/uapi/linux/ipv6_route.h: include linux/in6.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
    [PATCH v4 17/79] include/uapi/sound/emu10k1.h: added EMU10K1 version of DECLARE_BITMAP macro Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
      Re: [PATCH v4 17/79] include/uapi/sound/emu10k1.h: added EMU10K1 version of DECLARE_BITMAP macro Takashi Iwai <tiwai@suse.de> - 2015-10-15 10:10 +0200
    [PATCH v4 18/79] dm-log-userspace.h: use __u32, __s32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:10 +0200
      Re: [PATCH v4 18/79] dm-log-userspace.h: use __u32, __s32 and __u64  from linux/types.h Mike Snitzer <snitzer@redhat.com> - 2015-10-15 10:20 +0200
        Re: [PATCH v4 18/79] dm-log-userspace.h: use __u32, __s32 and __u64  from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 20:00 +0200
    [PATCH v4 06/79] nouveau_drm.h: use __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
    [PATCH v4 13/79] drm/i810_drm.h: include drm/drm.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
      Re: [PATCH v4 13/79] drm/i810_drm.h: include drm/drm.h Daniel Vetter <daniel@ffwll.ch> - 2015-10-15 09:50 +0200
    [PATCH v4 14/79] include/uapi/drm/vmwgfx_drm.h: use __s32, __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
    [PATCH v4 15/79] include/uapi/drm/qxl_drm.h: use __s32, __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
    [PATCH v4 10/79] via_drm.h: move struct via_file_private definition to drivers/gpu/drm/via/via_drv.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
    [PATCH v4 11/79] savage_drm.h: include <drm/drm.h> Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
      Re: [PATCH v4 11/79] savage_drm.h: include <drm/drm.h> Daniel Vetter <daniel@ffwll.ch> - 2015-10-15 08:50 +0200
    [PATCH v4 07/79] radeon_drm.h: use __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
    [PATCH v4 09/79] via_drm.h: don't include non-existing via_drmclient.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
    [PATCH v4 16/79] include/uapi/linux/agpgart.h: include stdlib.h in userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
    [PATCH v4 05/79] exynos_drm.h: use __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:20 +0200
      Re: [PATCH v4 05/79] exynos_drm.h: use __u64 from linux/types.h Gustavo Padovan <gustavo@padovan.org> - 2015-10-15 18:20 +0200
    [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation in userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:30 +0200
      Re: [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation  in userspace David Vrabel <david.vrabel@citrix.com> - 2015-10-15 12:30 +0200
        Re: [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation in  userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 13:20 +0200
          Re: [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation  in userspace David Vrabel <david.vrabel@citrix.com> - 2015-10-15 13:30 +0200
            Re: [PATCH v4 75/79] include/uapi/xen/privcmd.h: fix compilation in  userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 13:40 +0200
    [PATCH v4 68/79] arch/x86/include/uapi/asm/sembuf.h: include linux/types.h and linux/ipc.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:30 +0200
    [PATCH v4 62/79] include/uapi/linux/btrfs.h: define NULL Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:30 +0200
    [PATCH v4 63/79] include/uapi/linux/kexec.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:30 +0200
    [PATCH v4 53/79] include/uapi/linux/errqueue.h: include linux/time.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:30 +0200
    [PATCH v4 78/79] include/uapi/linux/errqueue.h: include time.h in userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:30 +0200
    [PATCH v4 76/79] coda_psdev.h: move upc_req definition from uapi to kernel side headers Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:30 +0200
    [PATCH v4 55/79] arch/x86/include/uapi/asm/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 52/79] include/uapi/netfilter/*.h: fix include files for compilation Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 77/79] include/uapi/linux/elfcore.h: remove non-compiling userspace parts Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 51/79] include/uapi/linux/ip6_tunnel.h: include linux/if.h and linux/in6.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 66/79] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 69/79] include/uapi/linux/dvb/video.h: remove stdint.h include Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 67/79] include/uapi/linux/android/binder.h: use __kernel_pid_t and __kernel_uid_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 56/79] include/uapi/linux/auto_fs.h: include linux/limits.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 65/79] include/uapi/linux/patchkey.h: change #error to #warning if file included directly Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:40 +0200
    [PATCH v4 59/79] include/uapi/linux/omapfb.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 50/79] include/uapi/linux/dlm_netlink.h: include linux/dlmconstants.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 79/79] arch/arm/include/uapi/asm/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 60/79] include/uapi/linux/atm_zatm.h: include linux/time.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
      Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h  also in userspace Miklos Szeredi <miklos@szeredi.hu> - 2015-10-15 17:30 +0200
        Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h  also in userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 19:50 +0200
          Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h  also in userspace Miklos Szeredi <miklos@szeredi.hu> - 2015-10-15 20:40 +0200
            Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace Arnd Bergmann <arnd@arndb.de> - 2015-10-15 21:00 +0200
              Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h  also in userspace Miklos Szeredi <miklos@szeredi.hu> - 2015-10-15 21:30 +0200
                Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h  also in userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 23:10 +0200
    [PATCH v4 61/79] include/uapi/linux/scc.h: include linux/sockios.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 57/79] include/uapi/linux/openvswitch.h: use __u32 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 58/79] include/uapi/linux/target_core_user.h: use __u8, __u16, __u32 and __u64 from linux/types.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 70/79] include/uapi/mtd/mtd-user.h: remove stdint.h include Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 08:50 +0200
    [PATCH v4 54/79] include/uapi/asm-generic/ucontext.h: include asm/signal.h and asm/sigcontext.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 09:00 +0200
    [PATCH v4 64/79] include/uapi/linux/reiserfs_xattr.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 09:00 +0200
    [PATCH v4 72/79] include/linux/ipmi-fru.h: use linux/types.h instead of stdint.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 09:00 +0200
    [PATCH v4 74/79] include/linux/xz.h: use linux/types.h types instead of stdint.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 09:10 +0200
    [PATCH v4 73/79] include/linux/sdb.h: use linux/types.h types instead of stdint.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-10-15 09:10 +0200

Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6  Next page →


#1247476 — [PATCH v4 66/79] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:40 +0200
Subject[PATCH v4 66/79] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace
Message-ID<qjKmJ-6HK-15@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compilation errors about unknown pid_t, u_short etc types.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/coda.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/coda.h b/include/uapi/linux/coda.h
index 695fade..591bb42 100644
--- a/include/uapi/linux/coda.h
+++ b/include/uapi/linux/coda.h
@@ -100,7 +100,14 @@ typedef unsigned long long u_quad_t;
 #if defined(__linux__)
 #include <linux/time.h>
 #define cdev_t u_quad_t
+typedef unsigned long u_long;
+typedef unsigned int u_int;
+typedef unsigned short u_short;
+typedef u_long ino_t;
+
 #ifndef __KERNEL__
+typedef u_long dev_t;
+typedef void * caddr_t;
 #if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
 #define _UQUAD_T_ 1
 typedef unsigned long long u_quad_t;
@@ -295,8 +302,8 @@ struct coda_statfs {
 struct coda_in_hdr {
     u_int32_t opcode;
     u_int32_t unique;	    /* Keep multiple outstanding msgs distinct */
-    pid_t pid;
-    pid_t pgid;
+    __kernel_pid_t pid;
+    __kernel_pid_t pgid;
     vuid_t uid;
 };
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247477 — [PATCH v4 69/79] include/uapi/linux/dvb/video.h: remove stdint.h include

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:40 +0200
Subject[PATCH v4 69/79] include/uapi/linux/dvb/video.h: remove stdint.h include
Message-ID<qjKmK-6HK-27@gated-at.bofh.it>
In reply to#1247405
Kernel headers should use linux/types.h instead.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/dvb/video.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h
index d3d14a59..4939256 100644
--- a/include/uapi/linux/dvb/video.h
+++ b/include/uapi/linux/dvb/video.h
@@ -26,7 +26,6 @@
 
 #include <linux/types.h>
 #ifndef __KERNEL__
-#include <stdint.h>
 #include <time.h>
 #endif
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247478 — [PATCH v4 67/79] include/uapi/linux/android/binder.h: use __kernel_pid_t and __kernel_uid_t

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:40 +0200
Subject[PATCH v4 67/79] include/uapi/linux/android/binder.h: use __kernel_pid_t and __kernel_uid_t
Message-ID<qjKmK-6HK-29@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compilation errors:

error: unknown type name ‘pid_t’
  pid_t  sender_pid
error: unknown type name ‘uid_t’
  uid_t  sender_euid;

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/android/binder.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
index 41420e3..4e4a385 100644
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@ -142,8 +142,8 @@ struct binder_transaction_data {
 
 	/* General information about the transaction. */
 	__u32	        flags;
-	pid_t		sender_pid;
-	uid_t		sender_euid;
+	__kernel_pid_t		sender_pid;
+	__kernel_uid_t		sender_euid;
 	binder_size_t	data_size;	/* number of bytes of data */
 	binder_size_t	offsets_size;	/* number of bytes of offsets */
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247480 — [PATCH v4 56/79] include/uapi/linux/auto_fs.h: include linux/limits.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:40 +0200
Subject[PATCH v4 56/79] include/uapi/linux/auto_fs.h: include linux/limits.h
Message-ID<qjKmK-6HK-33@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compilation error:

error: ‘NAME_MAX’ undeclared here (not in a function)

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/auto_fs.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h
index bb991df..edffdd5 100644
--- a/include/uapi/linux/auto_fs.h
+++ b/include/uapi/linux/auto_fs.h
@@ -15,6 +15,7 @@
 #define _UAPI_LINUX_AUTO_FS_H
 
 #include <linux/types.h>
+#include <linux/limits.h>
 #ifndef __KERNEL__
 #include <sys/ioctl.h>
 #endif /* __KERNEL__ */
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247481 — [PATCH v4 65/79] include/uapi/linux/patchkey.h: change #error to #warning if file included directly

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:40 +0200
Subject[PATCH v4 65/79] include/uapi/linux/patchkey.h: change #error to #warning if file included directly
Message-ID<qjKmK-6HK-35@gated-at.bofh.it>
In reply to#1247405
Would be nice to be able to compile all userspace header files also alone.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/patchkey.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/patchkey.h b/include/uapi/linux/patchkey.h
index 1bda0e5..cee195d 100644
--- a/include/uapi/linux/patchkey.h
+++ b/include/uapi/linux/patchkey.h
@@ -11,7 +11,7 @@
  */
 
 #ifndef _LINUX_PATCHKEY_H_INDIRECT
-#error "patchkey.h included directly"
+#warning "patchkey.h included directly"
 #endif
 
 #ifndef _UAPI_LINUX_PATCHKEY_H
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247482 — [PATCH v4 59/79] include/uapi/linux/omapfb.h: use __kernel_size_t instead of size_t

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 59/79] include/uapi/linux/omapfb.h: use __kernel_size_t instead of size_t
Message-ID<qjKwp-6Te-1@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compilation error:

error: unknown type name ‘size_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/omapfb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/omapfb.h b/include/uapi/linux/omapfb.h
index 7c97bc0..b637a92 100644
--- a/include/uapi/linux/omapfb.h
+++ b/include/uapi/linux/omapfb.h
@@ -181,7 +181,7 @@ struct omapfb_memory_read {
 	__u16 y;
 	__u16 w;
 	__u16 h;
-	size_t buffer_size;
+	__kernel_size_t buffer_size;
 	void __user *buffer;
 };
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247483 — [PATCH v4 50/79] include/uapi/linux/dlm_netlink.h: include linux/dlmconstants.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 50/79] include/uapi/linux/dlm_netlink.h: include linux/dlmconstants.h
Message-ID<qjKwp-6Te-3@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compilation error:

error: ‘DLM_RESNAME_MAXLEN’ undeclared here (not in a function)
  char resource_name[DLM_RESNAME_MAXLEN];

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/dlm_netlink.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/dlm_netlink.h b/include/uapi/linux/dlm_netlink.h
index 647c8ef..ef1e2e0 100644
--- a/include/uapi/linux/dlm_netlink.h
+++ b/include/uapi/linux/dlm_netlink.h
@@ -10,6 +10,7 @@
 #define _DLM_NETLINK_H
 
 #include <linux/types.h>
+#include <linux/dlmconstants.h>
 
 enum {
 	DLM_STATUS_WAITING = 1,
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247484 — [PATCH v4 79/79] arch/arm/include/uapi/asm/signal.h: use __kernel_size_t instead of size_t

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 79/79] arch/arm/include/uapi/asm/signal.h: use __kernel_size_t instead of size_t
Message-ID<qjKwq-6Te-9@gated-at.bofh.it>
In reply to#1247405
Fixes uapi header compilation error from userspace on ARCH=arm:

asm/signal.h:112:2: error: unknown type name ‘size_t’
  size_t ss_size;

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 arch/arm/include/uapi/asm/signal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/uapi/asm/signal.h b/arch/arm/include/uapi/asm/signal.h
index 33073bd..859f2de 100644
--- a/arch/arm/include/uapi/asm/signal.h
+++ b/arch/arm/include/uapi/asm/signal.h
@@ -113,7 +113,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247485 — [PATCH v4 60/79] include/uapi/linux/atm_zatm.h: include linux/time.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 60/79] include/uapi/linux/atm_zatm.h: include linux/time.h
Message-ID<qjKwq-6Te-11@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compile error:

error: field ‘real’ has incomplete type
 struct timeval real;  /* real (wall-clock) time */

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/atm_zatm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/atm_zatm.h b/include/uapi/linux/atm_zatm.h
index 10f0fa2..adbaa6c 100644
--- a/include/uapi/linux/atm_zatm.h
+++ b/include/uapi/linux/atm_zatm.h
@@ -14,6 +14,7 @@
 
 #include <linux/atmapi.h>
 #include <linux/atmioc.h>
+#include <linux/time.h>
 
 #define ZATM_GETPOOL	_IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
 						/* get pool statistics */
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247488 — [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace
Message-ID<qjKwq-6Te-25@gated-at.bofh.it>
In reply to#1247405
Kernel headers should not use stdint.h.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/fuse.h | 440 +++++++++++++++++++++++-----------------------
 1 file changed, 218 insertions(+), 222 deletions(-)

diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index c9aca04..a25e329 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -107,11 +107,7 @@
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
-#ifdef __KERNEL__
 #include <linux/types.h>
-#else
-#include <stdint.h>
-#endif
 
 /*
  * Version negotiation:
@@ -146,42 +142,42 @@
    userspace works under 64bit kernels */
 
 struct fuse_attr {
-	uint64_t	ino;
-	uint64_t	size;
-	uint64_t	blocks;
-	uint64_t	atime;
-	uint64_t	mtime;
-	uint64_t	ctime;
-	uint32_t	atimensec;
-	uint32_t	mtimensec;
-	uint32_t	ctimensec;
-	uint32_t	mode;
-	uint32_t	nlink;
-	uint32_t	uid;
-	uint32_t	gid;
-	uint32_t	rdev;
-	uint32_t	blksize;
-	uint32_t	padding;
+	__u64	ino;
+	__u64	size;
+	__u64	blocks;
+	__u64	atime;
+	__u64	mtime;
+	__u64	ctime;
+	__u32	atimensec;
+	__u32	mtimensec;
+	__u32	ctimensec;
+	__u32	mode;
+	__u32	nlink;
+	__u32	uid;
+	__u32	gid;
+	__u32	rdev;
+	__u32	blksize;
+	__u32	padding;
 };
 
 struct fuse_kstatfs {
-	uint64_t	blocks;
-	uint64_t	bfree;
-	uint64_t	bavail;
-	uint64_t	files;
-	uint64_t	ffree;
-	uint32_t	bsize;
-	uint32_t	namelen;
-	uint32_t	frsize;
-	uint32_t	padding;
-	uint32_t	spare[6];
+	__u64	blocks;
+	__u64	bfree;
+	__u64	bavail;
+	__u64	files;
+	__u64	ffree;
+	__u32	bsize;
+	__u32	namelen;
+	__u32	frsize;
+	__u32	padding;
+	__u32	spare[6];
 };
 
 struct fuse_file_lock {
-	uint64_t	start;
-	uint64_t	end;
-	uint32_t	type;
-	uint32_t	pid; /* tgid */
+	__u64	start;
+	__u64	end;
+	__u32	type;
+	__u32	pid; /* tgid */
 };
 
 /**
@@ -379,149 +375,149 @@ enum fuse_notify_code {
 #define FUSE_COMPAT_ENTRY_OUT_SIZE 120
 
 struct fuse_entry_out {
-	uint64_t	nodeid;		/* Inode ID */
-	uint64_t	generation;	/* Inode generation: nodeid:gen must
+	__u64	nodeid;		/* Inode ID */
+	__u64	generation;	/* Inode generation: nodeid:gen must
 					   be unique for the fs's lifetime */
-	uint64_t	entry_valid;	/* Cache timeout for the name */
-	uint64_t	attr_valid;	/* Cache timeout for the attributes */
-	uint32_t	entry_valid_nsec;
-	uint32_t	attr_valid_nsec;
+	__u64	entry_valid;	/* Cache timeout for the name */
+	__u64	attr_valid;	/* Cache timeout for the attributes */
+	__u32	entry_valid_nsec;
+	__u32	attr_valid_nsec;
 	struct fuse_attr attr;
 };
 
 struct fuse_forget_in {
-	uint64_t	nlookup;
+	__u64	nlookup;
 };
 
 struct fuse_forget_one {
-	uint64_t	nodeid;
-	uint64_t	nlookup;
+	__u64	nodeid;
+	__u64	nlookup;
 };
 
 struct fuse_batch_forget_in {
-	uint32_t	count;
-	uint32_t	dummy;
+	__u32	count;
+	__u32	dummy;
 };
 
 struct fuse_getattr_in {
-	uint32_t	getattr_flags;
-	uint32_t	dummy;
-	uint64_t	fh;
+	__u32	getattr_flags;
+	__u32	dummy;
+	__u64	fh;
 };
 
 #define FUSE_COMPAT_ATTR_OUT_SIZE 96
 
 struct fuse_attr_out {
-	uint64_t	attr_valid;	/* Cache timeout for the attributes */
-	uint32_t	attr_valid_nsec;
-	uint32_t	dummy;
+	__u64	attr_valid;	/* Cache timeout for the attributes */
+	__u32	attr_valid_nsec;
+	__u32	dummy;
 	struct fuse_attr attr;
 };
 
 #define FUSE_COMPAT_MKNOD_IN_SIZE 8
 
 struct fuse_mknod_in {
-	uint32_t	mode;
-	uint32_t	rdev;
-	uint32_t	umask;
-	uint32_t	padding;
+	__u32	mode;
+	__u32	rdev;
+	__u32	umask;
+	__u32	padding;
 };
 
 struct fuse_mkdir_in {
-	uint32_t	mode;
-	uint32_t	umask;
+	__u32	mode;
+	__u32	umask;
 };
 
 struct fuse_rename_in {
-	uint64_t	newdir;
+	__u64	newdir;
 };
 
 struct fuse_rename2_in {
-	uint64_t	newdir;
-	uint32_t	flags;
-	uint32_t	padding;
+	__u64	newdir;
+	__u32	flags;
+	__u32	padding;
 };
 
 struct fuse_link_in {
-	uint64_t	oldnodeid;
+	__u64	oldnodeid;
 };
 
 struct fuse_setattr_in {
-	uint32_t	valid;
-	uint32_t	padding;
-	uint64_t	fh;
-	uint64_t	size;
-	uint64_t	lock_owner;
-	uint64_t	atime;
-	uint64_t	mtime;
-	uint64_t	ctime;
-	uint32_t	atimensec;
-	uint32_t	mtimensec;
-	uint32_t	ctimensec;
-	uint32_t	mode;
-	uint32_t	unused4;
-	uint32_t	uid;
-	uint32_t	gid;
-	uint32_t	unused5;
+	__u32	valid;
+	__u32	padding;
+	__u64	fh;
+	__u64	size;
+	__u64	lock_owner;
+	__u64	atime;
+	__u64	mtime;
+	__u64	ctime;
+	__u32	atimensec;
+	__u32	mtimensec;
+	__u32	ctimensec;
+	__u32	mode;
+	__u32	unused4;
+	__u32	uid;
+	__u32	gid;
+	__u32	unused5;
 };
 
 struct fuse_open_in {
-	uint32_t	flags;
-	uint32_t	unused;
+	__u32	flags;
+	__u32	unused;
 };
 
 struct fuse_create_in {
-	uint32_t	flags;
-	uint32_t	mode;
-	uint32_t	umask;
-	uint32_t	padding;
+	__u32	flags;
+	__u32	mode;
+	__u32	umask;
+	__u32	padding;
 };
 
 struct fuse_open_out {
-	uint64_t	fh;
-	uint32_t	open_flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u32	open_flags;
+	__u32	padding;
 };
 
 struct fuse_release_in {
-	uint64_t	fh;
-	uint32_t	flags;
-	uint32_t	release_flags;
-	uint64_t	lock_owner;
+	__u64	fh;
+	__u32	flags;
+	__u32	release_flags;
+	__u64	lock_owner;
 };
 
 struct fuse_flush_in {
-	uint64_t	fh;
-	uint32_t	unused;
-	uint32_t	padding;
-	uint64_t	lock_owner;
+	__u64	fh;
+	__u32	unused;
+	__u32	padding;
+	__u64	lock_owner;
 };
 
 struct fuse_read_in {
-	uint64_t	fh;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	read_flags;
-	uint64_t	lock_owner;
-	uint32_t	flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u64	offset;
+	__u32	size;
+	__u32	read_flags;
+	__u64	lock_owner;
+	__u32	flags;
+	__u32	padding;
 };
 
 #define FUSE_COMPAT_WRITE_IN_SIZE 24
 
 struct fuse_write_in {
-	uint64_t	fh;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	write_flags;
-	uint64_t	lock_owner;
-	uint32_t	flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u64	offset;
+	__u32	size;
+	__u32	write_flags;
+	__u64	lock_owner;
+	__u32	flags;
+	__u32	padding;
 };
 
 struct fuse_write_out {
-	uint32_t	size;
-	uint32_t	padding;
+	__u32	size;
+	__u32	padding;
 };
 
 #define FUSE_COMPAT_STATFS_SIZE 48
@@ -531,32 +527,32 @@ struct fuse_statfs_out {
 };
 
 struct fuse_fsync_in {
-	uint64_t	fh;
-	uint32_t	fsync_flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u32	fsync_flags;
+	__u32	padding;
 };
 
 struct fuse_setxattr_in {
-	uint32_t	size;
-	uint32_t	flags;
+	__u32	size;
+	__u32	flags;
 };
 
 struct fuse_getxattr_in {
-	uint32_t	size;
-	uint32_t	padding;
+	__u32	size;
+	__u32	padding;
 };
 
 struct fuse_getxattr_out {
-	uint32_t	size;
-	uint32_t	padding;
+	__u32	size;
+	__u32	padding;
 };
 
 struct fuse_lk_in {
-	uint64_t	fh;
-	uint64_t	owner;
+	__u64	fh;
+	__u64	owner;
 	struct fuse_file_lock lk;
-	uint32_t	lk_flags;
-	uint32_t	padding;
+	__u32	lk_flags;
+	__u32	padding;
 };
 
 struct fuse_lk_out {
@@ -564,140 +560,140 @@ struct fuse_lk_out {
 };
 
 struct fuse_access_in {
-	uint32_t	mask;
-	uint32_t	padding;
+	__u32	mask;
+	__u32	padding;
 };
 
 struct fuse_init_in {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	max_readahead;
-	uint32_t	flags;
+	__u32	major;
+	__u32	minor;
+	__u32	max_readahead;
+	__u32	flags;
 };
 
 #define FUSE_COMPAT_INIT_OUT_SIZE 8
 #define FUSE_COMPAT_22_INIT_OUT_SIZE 24
 
 struct fuse_init_out {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	max_readahead;
-	uint32_t	flags;
-	uint16_t	max_background;
-	uint16_t	congestion_threshold;
-	uint32_t	max_write;
-	uint32_t	time_gran;
-	uint32_t	unused[9];
+	__u32	major;
+	__u32	minor;
+	__u32	max_readahead;
+	__u32	flags;
+	__u16	max_background;
+	__u16	congestion_threshold;
+	__u32	max_write;
+	__u32	time_gran;
+	__u32	unused[9];
 };
 
 #define CUSE_INIT_INFO_MAX 4096
 
 struct cuse_init_in {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	unused;
-	uint32_t	flags;
+	__u32	major;
+	__u32	minor;
+	__u32	unused;
+	__u32	flags;
 };
 
 struct cuse_init_out {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	unused;
-	uint32_t	flags;
-	uint32_t	max_read;
-	uint32_t	max_write;
-	uint32_t	dev_major;		/* chardev major */
-	uint32_t	dev_minor;		/* chardev minor */
-	uint32_t	spare[10];
+	__u32	major;
+	__u32	minor;
+	__u32	unused;
+	__u32	flags;
+	__u32	max_read;
+	__u32	max_write;
+	__u32	dev_major;		/* chardev major */
+	__u32	dev_minor;		/* chardev minor */
+	__u32	spare[10];
 };
 
 struct fuse_interrupt_in {
-	uint64_t	unique;
+	__u64	unique;
 };
 
 struct fuse_bmap_in {
-	uint64_t	block;
-	uint32_t	blocksize;
-	uint32_t	padding;
+	__u64	block;
+	__u32	blocksize;
+	__u32	padding;
 };
 
 struct fuse_bmap_out {
-	uint64_t	block;
+	__u64	block;
 };
 
 struct fuse_ioctl_in {
-	uint64_t	fh;
-	uint32_t	flags;
-	uint32_t	cmd;
-	uint64_t	arg;
-	uint32_t	in_size;
-	uint32_t	out_size;
+	__u64	fh;
+	__u32	flags;
+	__u32	cmd;
+	__u64	arg;
+	__u32	in_size;
+	__u32	out_size;
 };
 
 struct fuse_ioctl_iovec {
-	uint64_t	base;
-	uint64_t	len;
+	__u64	base;
+	__u64	len;
 };
 
 struct fuse_ioctl_out {
-	int32_t		result;
-	uint32_t	flags;
-	uint32_t	in_iovs;
-	uint32_t	out_iovs;
+	__s32		result;
+	__u32	flags;
+	__u32	in_iovs;
+	__u32	out_iovs;
 };
 
 struct fuse_poll_in {
-	uint64_t	fh;
-	uint64_t	kh;
-	uint32_t	flags;
-	uint32_t	events;
+	__u64	fh;
+	__u64	kh;
+	__u32	flags;
+	__u32	events;
 };
 
 struct fuse_poll_out {
-	uint32_t	revents;
-	uint32_t	padding;
+	__u32	revents;
+	__u32	padding;
 };
 
 struct fuse_notify_poll_wakeup_out {
-	uint64_t	kh;
+	__u64	kh;
 };
 
 struct fuse_fallocate_in {
-	uint64_t	fh;
-	uint64_t	offset;
-	uint64_t	length;
-	uint32_t	mode;
-	uint32_t	padding;
+	__u64	fh;
+	__u64	offset;
+	__u64	length;
+	__u32	mode;
+	__u32	padding;
 };
 
 struct fuse_in_header {
-	uint32_t	len;
-	uint32_t	opcode;
-	uint64_t	unique;
-	uint64_t	nodeid;
-	uint32_t	uid;
-	uint32_t	gid;
-	uint32_t	pid;
-	uint32_t	padding;
+	__u32	len;
+	__u32	opcode;
+	__u64	unique;
+	__u64	nodeid;
+	__u32	uid;
+	__u32	gid;
+	__u32	pid;
+	__u32	padding;
 };
 
 struct fuse_out_header {
-	uint32_t	len;
-	int32_t		error;
-	uint64_t	unique;
+	__u32	len;
+	__s32		error;
+	__u64	unique;
 };
 
 struct fuse_dirent {
-	uint64_t	ino;
-	uint64_t	off;
-	uint32_t	namelen;
-	uint32_t	type;
+	__u64	ino;
+	__u64	off;
+	__u32	namelen;
+	__u32	type;
 	char name[];
 };
 
 #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
 #define FUSE_DIRENT_ALIGN(x) \
-	(((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
+	(((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
 #define FUSE_DIRENT_SIZE(d) \
 	FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
 
@@ -712,47 +708,47 @@ struct fuse_direntplus {
 	FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
 
 struct fuse_notify_inval_inode_out {
-	uint64_t	ino;
-	int64_t		off;
-	int64_t		len;
+	__u64	ino;
+	__s64		off;
+	__s64		len;
 };
 
 struct fuse_notify_inval_entry_out {
-	uint64_t	parent;
-	uint32_t	namelen;
-	uint32_t	padding;
+	__u64	parent;
+	__u32	namelen;
+	__u32	padding;
 };
 
 struct fuse_notify_delete_out {
-	uint64_t	parent;
-	uint64_t	child;
-	uint32_t	namelen;
-	uint32_t	padding;
+	__u64	parent;
+	__u64	child;
+	__u32	namelen;
+	__u32	padding;
 };
 
 struct fuse_notify_store_out {
-	uint64_t	nodeid;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	padding;
+	__u64	nodeid;
+	__u64	offset;
+	__u32	size;
+	__u32	padding;
 };
 
 struct fuse_notify_retrieve_out {
-	uint64_t	notify_unique;
-	uint64_t	nodeid;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	padding;
+	__u64	notify_unique;
+	__u64	nodeid;
+	__u64	offset;
+	__u32	size;
+	__u32	padding;
 };
 
 /* Matches the size of fuse_write_in */
 struct fuse_notify_retrieve_in {
-	uint64_t	dummy1;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	dummy2;
-	uint64_t	dummy3;
-	uint64_t	dummy4;
+	__u64	dummy1;
+	__u64	offset;
+	__u32	size;
+	__u32	dummy2;
+	__u64	dummy3;
+	__u64	dummy4;
 };
 
 /* Device ioctls: */
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247890 — Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace

FromMiklos Szeredi <miklos@szeredi.hu>
Date2015-10-15 17:30 +0200
SubjectRe: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace
Message-ID<qjSDE-1Zy-17@gated-at.bofh.it>
In reply to#1247488
On Thu, Oct 15, 2015 at 7:56 AM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> Kernel headers should not use stdint.h.

Including <linux/types.h> breaks compile of library on non-Linux
archs.  Allowing this patch would mean having a different header in
the fuse lib as the one in the kernel.  This is useless complexity and
a source of bugs.  We've already been there, and much prefer the
current state.

NAK.

Thanks,
Miklos


>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  include/uapi/linux/fuse.h | 440 +++++++++++++++++++++++-----------------------
>  1 file changed, 218 insertions(+), 222 deletions(-)
>
> diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
> index c9aca04..a25e329 100644
> --- a/include/uapi/linux/fuse.h
> +++ b/include/uapi/linux/fuse.h
> @@ -107,11 +107,7 @@
>  #ifndef _LINUX_FUSE_H
>  #define _LINUX_FUSE_H
>
> -#ifdef __KERNEL__
>  #include <linux/types.h>
> -#else
> -#include <stdint.h>
> -#endif
>
>  /*
>   * Version negotiation:
> @@ -146,42 +142,42 @@
>     userspace works under 64bit kernels */
>
>  struct fuse_attr {
> -       uint64_t        ino;
> -       uint64_t        size;
> -       uint64_t        blocks;
> -       uint64_t        atime;
> -       uint64_t        mtime;
> -       uint64_t        ctime;
> -       uint32_t        atimensec;
> -       uint32_t        mtimensec;
> -       uint32_t        ctimensec;
> -       uint32_t        mode;
> -       uint32_t        nlink;
> -       uint32_t        uid;
> -       uint32_t        gid;
> -       uint32_t        rdev;
> -       uint32_t        blksize;
> -       uint32_t        padding;
> +       __u64   ino;
> +       __u64   size;
> +       __u64   blocks;
> +       __u64   atime;
> +       __u64   mtime;
> +       __u64   ctime;
> +       __u32   atimensec;
> +       __u32   mtimensec;
> +       __u32   ctimensec;
> +       __u32   mode;
> +       __u32   nlink;
> +       __u32   uid;
> +       __u32   gid;
> +       __u32   rdev;
> +       __u32   blksize;
> +       __u32   padding;
>  };
>
>  struct fuse_kstatfs {
> -       uint64_t        blocks;
> -       uint64_t        bfree;
> -       uint64_t        bavail;
> -       uint64_t        files;
> -       uint64_t        ffree;
> -       uint32_t        bsize;
> -       uint32_t        namelen;
> -       uint32_t        frsize;
> -       uint32_t        padding;
> -       uint32_t        spare[6];
> +       __u64   blocks;
> +       __u64   bfree;
> +       __u64   bavail;
> +       __u64   files;
> +       __u64   ffree;
> +       __u32   bsize;
> +       __u32   namelen;
> +       __u32   frsize;
> +       __u32   padding;
> +       __u32   spare[6];
>  };
>
>  struct fuse_file_lock {
> -       uint64_t        start;
> -       uint64_t        end;
> -       uint32_t        type;
> -       uint32_t        pid; /* tgid */
> +       __u64   start;
> +       __u64   end;
> +       __u32   type;
> +       __u32   pid; /* tgid */
>  };
>
>  /**
> @@ -379,149 +375,149 @@ enum fuse_notify_code {
>  #define FUSE_COMPAT_ENTRY_OUT_SIZE 120
>
>  struct fuse_entry_out {
> -       uint64_t        nodeid;         /* Inode ID */
> -       uint64_t        generation;     /* Inode generation: nodeid:gen must
> +       __u64   nodeid;         /* Inode ID */
> +       __u64   generation;     /* Inode generation: nodeid:gen must
>                                            be unique for the fs's lifetime */
> -       uint64_t        entry_valid;    /* Cache timeout for the name */
> -       uint64_t        attr_valid;     /* Cache timeout for the attributes */
> -       uint32_t        entry_valid_nsec;
> -       uint32_t        attr_valid_nsec;
> +       __u64   entry_valid;    /* Cache timeout for the name */
> +       __u64   attr_valid;     /* Cache timeout for the attributes */
> +       __u32   entry_valid_nsec;
> +       __u32   attr_valid_nsec;
>         struct fuse_attr attr;
>  };
>
>  struct fuse_forget_in {
> -       uint64_t        nlookup;
> +       __u64   nlookup;
>  };
>
>  struct fuse_forget_one {
> -       uint64_t        nodeid;
> -       uint64_t        nlookup;
> +       __u64   nodeid;
> +       __u64   nlookup;
>  };
>
>  struct fuse_batch_forget_in {
> -       uint32_t        count;
> -       uint32_t        dummy;
> +       __u32   count;
> +       __u32   dummy;
>  };
>
>  struct fuse_getattr_in {
> -       uint32_t        getattr_flags;
> -       uint32_t        dummy;
> -       uint64_t        fh;
> +       __u32   getattr_flags;
> +       __u32   dummy;
> +       __u64   fh;
>  };
>
>  #define FUSE_COMPAT_ATTR_OUT_SIZE 96
>
>  struct fuse_attr_out {
> -       uint64_t        attr_valid;     /* Cache timeout for the attributes */
> -       uint32_t        attr_valid_nsec;
> -       uint32_t        dummy;
> +       __u64   attr_valid;     /* Cache timeout for the attributes */
> +       __u32   attr_valid_nsec;
> +       __u32   dummy;
>         struct fuse_attr attr;
>  };
>
>  #define FUSE_COMPAT_MKNOD_IN_SIZE 8
>
>  struct fuse_mknod_in {
> -       uint32_t        mode;
> -       uint32_t        rdev;
> -       uint32_t        umask;
> -       uint32_t        padding;
> +       __u32   mode;
> +       __u32   rdev;
> +       __u32   umask;
> +       __u32   padding;
>  };
>
>  struct fuse_mkdir_in {
> -       uint32_t        mode;
> -       uint32_t        umask;
> +       __u32   mode;
> +       __u32   umask;
>  };
>
>  struct fuse_rename_in {
> -       uint64_t        newdir;
> +       __u64   newdir;
>  };
>
>  struct fuse_rename2_in {
> -       uint64_t        newdir;
> -       uint32_t        flags;
> -       uint32_t        padding;
> +       __u64   newdir;
> +       __u32   flags;
> +       __u32   padding;
>  };
>
>  struct fuse_link_in {
> -       uint64_t        oldnodeid;
> +       __u64   oldnodeid;
>  };
>
>  struct fuse_setattr_in {
> -       uint32_t        valid;
> -       uint32_t        padding;
> -       uint64_t        fh;
> -       uint64_t        size;
> -       uint64_t        lock_owner;
> -       uint64_t        atime;
> -       uint64_t        mtime;
> -       uint64_t        ctime;
> -       uint32_t        atimensec;
> -       uint32_t        mtimensec;
> -       uint32_t        ctimensec;
> -       uint32_t        mode;
> -       uint32_t        unused4;
> -       uint32_t        uid;
> -       uint32_t        gid;
> -       uint32_t        unused5;
> +       __u32   valid;
> +       __u32   padding;
> +       __u64   fh;
> +       __u64   size;
> +       __u64   lock_owner;
> +       __u64   atime;
> +       __u64   mtime;
> +       __u64   ctime;
> +       __u32   atimensec;
> +       __u32   mtimensec;
> +       __u32   ctimensec;
> +       __u32   mode;
> +       __u32   unused4;
> +       __u32   uid;
> +       __u32   gid;
> +       __u32   unused5;
>  };
>
>  struct fuse_open_in {
> -       uint32_t        flags;
> -       uint32_t        unused;
> +       __u32   flags;
> +       __u32   unused;
>  };
>
>  struct fuse_create_in {
> -       uint32_t        flags;
> -       uint32_t        mode;
> -       uint32_t        umask;
> -       uint32_t        padding;
> +       __u32   flags;
> +       __u32   mode;
> +       __u32   umask;
> +       __u32   padding;
>  };
>
>  struct fuse_open_out {
> -       uint64_t        fh;
> -       uint32_t        open_flags;
> -       uint32_t        padding;
> +       __u64   fh;
> +       __u32   open_flags;
> +       __u32   padding;
>  };
>
>  struct fuse_release_in {
> -       uint64_t        fh;
> -       uint32_t        flags;
> -       uint32_t        release_flags;
> -       uint64_t        lock_owner;
> +       __u64   fh;
> +       __u32   flags;
> +       __u32   release_flags;
> +       __u64   lock_owner;
>  };
>
>  struct fuse_flush_in {
> -       uint64_t        fh;
> -       uint32_t        unused;
> -       uint32_t        padding;
> -       uint64_t        lock_owner;
> +       __u64   fh;
> +       __u32   unused;
> +       __u32   padding;
> +       __u64   lock_owner;
>  };
>
>  struct fuse_read_in {
> -       uint64_t        fh;
> -       uint64_t        offset;
> -       uint32_t        size;
> -       uint32_t        read_flags;
> -       uint64_t        lock_owner;
> -       uint32_t        flags;
> -       uint32_t        padding;
> +       __u64   fh;
> +       __u64   offset;
> +       __u32   size;
> +       __u32   read_flags;
> +       __u64   lock_owner;
> +       __u32   flags;
> +       __u32   padding;
>  };
>
>  #define FUSE_COMPAT_WRITE_IN_SIZE 24
>
>  struct fuse_write_in {
> -       uint64_t        fh;
> -       uint64_t        offset;
> -       uint32_t        size;
> -       uint32_t        write_flags;
> -       uint64_t        lock_owner;
> -       uint32_t        flags;
> -       uint32_t        padding;
> +       __u64   fh;
> +       __u64   offset;
> +       __u32   size;
> +       __u32   write_flags;
> +       __u64   lock_owner;
> +       __u32   flags;
> +       __u32   padding;
>  };
>
>  struct fuse_write_out {
> -       uint32_t        size;
> -       uint32_t        padding;
> +       __u32   size;
> +       __u32   padding;
>  };
>
>  #define FUSE_COMPAT_STATFS_SIZE 48
> @@ -531,32 +527,32 @@ struct fuse_statfs_out {
>  };
>
>  struct fuse_fsync_in {
> -       uint64_t        fh;
> -       uint32_t        fsync_flags;
> -       uint32_t        padding;
> +       __u64   fh;
> +       __u32   fsync_flags;
> +       __u32   padding;
>  };
>
>  struct fuse_setxattr_in {
> -       uint32_t        size;
> -       uint32_t        flags;
> +       __u32   size;
> +       __u32   flags;
>  };
>
>  struct fuse_getxattr_in {
> -       uint32_t        size;
> -       uint32_t        padding;
> +       __u32   size;
> +       __u32   padding;
>  };
>
>  struct fuse_getxattr_out {
> -       uint32_t        size;
> -       uint32_t        padding;
> +       __u32   size;
> +       __u32   padding;
>  };
>
>  struct fuse_lk_in {
> -       uint64_t        fh;
> -       uint64_t        owner;
> +       __u64   fh;
> +       __u64   owner;
>         struct fuse_file_lock lk;
> -       uint32_t        lk_flags;
> -       uint32_t        padding;
> +       __u32   lk_flags;
> +       __u32   padding;
>  };
>
>  struct fuse_lk_out {
> @@ -564,140 +560,140 @@ struct fuse_lk_out {
>  };
>
>  struct fuse_access_in {
> -       uint32_t        mask;
> -       uint32_t        padding;
> +       __u32   mask;
> +       __u32   padding;
>  };
>
>  struct fuse_init_in {
> -       uint32_t        major;
> -       uint32_t        minor;
> -       uint32_t        max_readahead;
> -       uint32_t        flags;
> +       __u32   major;
> +       __u32   minor;
> +       __u32   max_readahead;
> +       __u32   flags;
>  };
>
>  #define FUSE_COMPAT_INIT_OUT_SIZE 8
>  #define FUSE_COMPAT_22_INIT_OUT_SIZE 24
>
>  struct fuse_init_out {
> -       uint32_t        major;
> -       uint32_t        minor;
> -       uint32_t        max_readahead;
> -       uint32_t        flags;
> -       uint16_t        max_background;
> -       uint16_t        congestion_threshold;
> -       uint32_t        max_write;
> -       uint32_t        time_gran;
> -       uint32_t        unused[9];
> +       __u32   major;
> +       __u32   minor;
> +       __u32   max_readahead;
> +       __u32   flags;
> +       __u16   max_background;
> +       __u16   congestion_threshold;
> +       __u32   max_write;
> +       __u32   time_gran;
> +       __u32   unused[9];
>  };
>
>  #define CUSE_INIT_INFO_MAX 4096
>
>  struct cuse_init_in {
> -       uint32_t        major;
> -       uint32_t        minor;
> -       uint32_t        unused;
> -       uint32_t        flags;
> +       __u32   major;
> +       __u32   minor;
> +       __u32   unused;
> +       __u32   flags;
>  };
>
>  struct cuse_init_out {
> -       uint32_t        major;
> -       uint32_t        minor;
> -       uint32_t        unused;
> -       uint32_t        flags;
> -       uint32_t        max_read;
> -       uint32_t        max_write;
> -       uint32_t        dev_major;              /* chardev major */
> -       uint32_t        dev_minor;              /* chardev minor */
> -       uint32_t        spare[10];
> +       __u32   major;
> +       __u32   minor;
> +       __u32   unused;
> +       __u32   flags;
> +       __u32   max_read;
> +       __u32   max_write;
> +       __u32   dev_major;              /* chardev major */
> +       __u32   dev_minor;              /* chardev minor */
> +       __u32   spare[10];
>  };
>
>  struct fuse_interrupt_in {
> -       uint64_t        unique;
> +       __u64   unique;
>  };
>
>  struct fuse_bmap_in {
> -       uint64_t        block;
> -       uint32_t        blocksize;
> -       uint32_t        padding;
> +       __u64   block;
> +       __u32   blocksize;
> +       __u32   padding;
>  };
>
>  struct fuse_bmap_out {
> -       uint64_t        block;
> +       __u64   block;
>  };
>
>  struct fuse_ioctl_in {
> -       uint64_t        fh;
> -       uint32_t        flags;
> -       uint32_t        cmd;
> -       uint64_t        arg;
> -       uint32_t        in_size;
> -       uint32_t        out_size;
> +       __u64   fh;
> +       __u32   flags;
> +       __u32   cmd;
> +       __u64   arg;
> +       __u32   in_size;
> +       __u32   out_size;
>  };
>
>  struct fuse_ioctl_iovec {
> -       uint64_t        base;
> -       uint64_t        len;
> +       __u64   base;
> +       __u64   len;
>  };
>
>  struct fuse_ioctl_out {
> -       int32_t         result;
> -       uint32_t        flags;
> -       uint32_t        in_iovs;
> -       uint32_t        out_iovs;
> +       __s32           result;
> +       __u32   flags;
> +       __u32   in_iovs;
> +       __u32   out_iovs;
>  };
>
>  struct fuse_poll_in {
> -       uint64_t        fh;
> -       uint64_t        kh;
> -       uint32_t        flags;
> -       uint32_t        events;
> +       __u64   fh;
> +       __u64   kh;
> +       __u32   flags;
> +       __u32   events;
>  };
>
>  struct fuse_poll_out {
> -       uint32_t        revents;
> -       uint32_t        padding;
> +       __u32   revents;
> +       __u32   padding;
>  };
>
>  struct fuse_notify_poll_wakeup_out {
> -       uint64_t        kh;
> +       __u64   kh;
>  };
>
>  struct fuse_fallocate_in {
> -       uint64_t        fh;
> -       uint64_t        offset;
> -       uint64_t        length;
> -       uint32_t        mode;
> -       uint32_t        padding;
> +       __u64   fh;
> +       __u64   offset;
> +       __u64   length;
> +       __u32   mode;
> +       __u32   padding;
>  };
>
>  struct fuse_in_header {
> -       uint32_t        len;
> -       uint32_t        opcode;
> -       uint64_t        unique;
> -       uint64_t        nodeid;
> -       uint32_t        uid;
> -       uint32_t        gid;
> -       uint32_t        pid;
> -       uint32_t        padding;
> +       __u32   len;
> +       __u32   opcode;
> +       __u64   unique;
> +       __u64   nodeid;
> +       __u32   uid;
> +       __u32   gid;
> +       __u32   pid;
> +       __u32   padding;
>  };
>
>  struct fuse_out_header {
> -       uint32_t        len;
> -       int32_t         error;
> -       uint64_t        unique;
> +       __u32   len;
> +       __s32           error;
> +       __u64   unique;
>  };
>
>  struct fuse_dirent {
> -       uint64_t        ino;
> -       uint64_t        off;
> -       uint32_t        namelen;
> -       uint32_t        type;
> +       __u64   ino;
> +       __u64   off;
> +       __u32   namelen;
> +       __u32   type;
>         char name[];
>  };
>
>  #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
>  #define FUSE_DIRENT_ALIGN(x) \
> -       (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
> +       (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
>  #define FUSE_DIRENT_SIZE(d) \
>         FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
>
> @@ -712,47 +708,47 @@ struct fuse_direntplus {
>         FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
>
>  struct fuse_notify_inval_inode_out {
> -       uint64_t        ino;
> -       int64_t         off;
> -       int64_t         len;
> +       __u64   ino;
> +       __s64           off;
> +       __s64           len;
>  };
>
>  struct fuse_notify_inval_entry_out {
> -       uint64_t        parent;
> -       uint32_t        namelen;
> -       uint32_t        padding;
> +       __u64   parent;
> +       __u32   namelen;
> +       __u32   padding;
>  };
>
>  struct fuse_notify_delete_out {
> -       uint64_t        parent;
> -       uint64_t        child;
> -       uint32_t        namelen;
> -       uint32_t        padding;
> +       __u64   parent;
> +       __u64   child;
> +       __u32   namelen;
> +       __u32   padding;
>  };
>
>  struct fuse_notify_store_out {
> -       uint64_t        nodeid;
> -       uint64_t        offset;
> -       uint32_t        size;
> -       uint32_t        padding;
> +       __u64   nodeid;
> +       __u64   offset;
> +       __u32   size;
> +       __u32   padding;
>  };
>
>  struct fuse_notify_retrieve_out {
> -       uint64_t        notify_unique;
> -       uint64_t        nodeid;
> -       uint64_t        offset;
> -       uint32_t        size;
> -       uint32_t        padding;
> +       __u64   notify_unique;
> +       __u64   nodeid;
> +       __u64   offset;
> +       __u32   size;
> +       __u32   padding;
>  };
>
>  /* Matches the size of fuse_write_in */
>  struct fuse_notify_retrieve_in {
> -       uint64_t        dummy1;
> -       uint64_t        offset;
> -       uint32_t        size;
> -       uint32_t        dummy2;
> -       uint64_t        dummy3;
> -       uint64_t        dummy4;
> +       __u64   dummy1;
> +       __u64   offset;
> +       __u32   size;
> +       __u32   dummy2;
> +       __u64   dummy3;
> +       __u64   dummy4;
>  };
>
>  /* Device ioctls: */
> --
> 2.5.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248043 — Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 19:50 +0200
SubjectRe: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace
Message-ID<qjUP8-54K-9@gated-at.bofh.it>
In reply to#1247890
On Thu, Oct 15, 2015 at 05:20:24PM +0200, Miklos Szeredi wrote:
> On Thu, Oct 15, 2015 at 7:56 AM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> > Kernel headers should not use stdint.h.
> 
> Including <linux/types.h> breaks compile of library on non-Linux
> archs.  Allowing this patch would mean having a different header in
> the fuse lib as the one in the kernel.  This is useless complexity and
> a source of bugs.  We've already been there, and much prefer the
> current state.

Hmm. Why should Linux uapi header care about non-Linux platforms?

If fuse lib already has an embedded copy of this header, why should
this change break anything fuse lib?

In my other patches I got review comments that kernel headers should not
use <stdint.h> and also Documentation/CodingStyle section 5 says:

 (e) Types safe for use in userspace.

     In certain structures which are visible to userspace, we cannot
     require C99 types and cannot use the 'u32' form above. Thus, we
     use __u32 and similar types in all structures which are shared
     with userspace.

-Mikko

> NAK.
> 
> Thanks,
> Miklos
> 
> 
> >
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  include/uapi/linux/fuse.h | 440 +++++++++++++++++++++++-----------------------
> >  1 file changed, 218 insertions(+), 222 deletions(-)
> >
> > diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
> > index c9aca04..a25e329 100644
> > --- a/include/uapi/linux/fuse.h
> > +++ b/include/uapi/linux/fuse.h
> > @@ -107,11 +107,7 @@
> >  #ifndef _LINUX_FUSE_H
> >  #define _LINUX_FUSE_H
> >
> > -#ifdef __KERNEL__
> >  #include <linux/types.h>
> > -#else
> > -#include <stdint.h>
> > -#endif
> >
> >  /*
> >   * Version negotiation:
> > @@ -146,42 +142,42 @@
> >     userspace works under 64bit kernels */
> >
> >  struct fuse_attr {
> > -       uint64_t        ino;
> > -       uint64_t        size;
> > -       uint64_t        blocks;
> > -       uint64_t        atime;
> > -       uint64_t        mtime;
> > -       uint64_t        ctime;
> > -       uint32_t        atimensec;
> > -       uint32_t        mtimensec;
> > -       uint32_t        ctimensec;
> > -       uint32_t        mode;
> > -       uint32_t        nlink;
> > -       uint32_t        uid;
> > -       uint32_t        gid;
> > -       uint32_t        rdev;
> > -       uint32_t        blksize;
> > -       uint32_t        padding;
> > +       __u64   ino;
> > +       __u64   size;
> > +       __u64   blocks;
> > +       __u64   atime;
> > +       __u64   mtime;
> > +       __u64   ctime;
> > +       __u32   atimensec;
> > +       __u32   mtimensec;
> > +       __u32   ctimensec;
> > +       __u32   mode;
> > +       __u32   nlink;
> > +       __u32   uid;
> > +       __u32   gid;
> > +       __u32   rdev;
> > +       __u32   blksize;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_kstatfs {
> > -       uint64_t        blocks;
> > -       uint64_t        bfree;
> > -       uint64_t        bavail;
> > -       uint64_t        files;
> > -       uint64_t        ffree;
> > -       uint32_t        bsize;
> > -       uint32_t        namelen;
> > -       uint32_t        frsize;
> > -       uint32_t        padding;
> > -       uint32_t        spare[6];
> > +       __u64   blocks;
> > +       __u64   bfree;
> > +       __u64   bavail;
> > +       __u64   files;
> > +       __u64   ffree;
> > +       __u32   bsize;
> > +       __u32   namelen;
> > +       __u32   frsize;
> > +       __u32   padding;
> > +       __u32   spare[6];
> >  };
> >
> >  struct fuse_file_lock {
> > -       uint64_t        start;
> > -       uint64_t        end;
> > -       uint32_t        type;
> > -       uint32_t        pid; /* tgid */
> > +       __u64   start;
> > +       __u64   end;
> > +       __u32   type;
> > +       __u32   pid; /* tgid */
> >  };
> >
> >  /**
> > @@ -379,149 +375,149 @@ enum fuse_notify_code {
> >  #define FUSE_COMPAT_ENTRY_OUT_SIZE 120
> >
> >  struct fuse_entry_out {
> > -       uint64_t        nodeid;         /* Inode ID */
> > -       uint64_t        generation;     /* Inode generation: nodeid:gen must
> > +       __u64   nodeid;         /* Inode ID */
> > +       __u64   generation;     /* Inode generation: nodeid:gen must
> >                                            be unique for the fs's lifetime */
> > -       uint64_t        entry_valid;    /* Cache timeout for the name */
> > -       uint64_t        attr_valid;     /* Cache timeout for the attributes */
> > -       uint32_t        entry_valid_nsec;
> > -       uint32_t        attr_valid_nsec;
> > +       __u64   entry_valid;    /* Cache timeout for the name */
> > +       __u64   attr_valid;     /* Cache timeout for the attributes */
> > +       __u32   entry_valid_nsec;
> > +       __u32   attr_valid_nsec;
> >         struct fuse_attr attr;
> >  };
> >
> >  struct fuse_forget_in {
> > -       uint64_t        nlookup;
> > +       __u64   nlookup;
> >  };
> >
> >  struct fuse_forget_one {
> > -       uint64_t        nodeid;
> > -       uint64_t        nlookup;
> > +       __u64   nodeid;
> > +       __u64   nlookup;
> >  };
> >
> >  struct fuse_batch_forget_in {
> > -       uint32_t        count;
> > -       uint32_t        dummy;
> > +       __u32   count;
> > +       __u32   dummy;
> >  };
> >
> >  struct fuse_getattr_in {
> > -       uint32_t        getattr_flags;
> > -       uint32_t        dummy;
> > -       uint64_t        fh;
> > +       __u32   getattr_flags;
> > +       __u32   dummy;
> > +       __u64   fh;
> >  };
> >
> >  #define FUSE_COMPAT_ATTR_OUT_SIZE 96
> >
> >  struct fuse_attr_out {
> > -       uint64_t        attr_valid;     /* Cache timeout for the attributes */
> > -       uint32_t        attr_valid_nsec;
> > -       uint32_t        dummy;
> > +       __u64   attr_valid;     /* Cache timeout for the attributes */
> > +       __u32   attr_valid_nsec;
> > +       __u32   dummy;
> >         struct fuse_attr attr;
> >  };
> >
> >  #define FUSE_COMPAT_MKNOD_IN_SIZE 8
> >
> >  struct fuse_mknod_in {
> > -       uint32_t        mode;
> > -       uint32_t        rdev;
> > -       uint32_t        umask;
> > -       uint32_t        padding;
> > +       __u32   mode;
> > +       __u32   rdev;
> > +       __u32   umask;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_mkdir_in {
> > -       uint32_t        mode;
> > -       uint32_t        umask;
> > +       __u32   mode;
> > +       __u32   umask;
> >  };
> >
> >  struct fuse_rename_in {
> > -       uint64_t        newdir;
> > +       __u64   newdir;
> >  };
> >
> >  struct fuse_rename2_in {
> > -       uint64_t        newdir;
> > -       uint32_t        flags;
> > -       uint32_t        padding;
> > +       __u64   newdir;
> > +       __u32   flags;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_link_in {
> > -       uint64_t        oldnodeid;
> > +       __u64   oldnodeid;
> >  };
> >
> >  struct fuse_setattr_in {
> > -       uint32_t        valid;
> > -       uint32_t        padding;
> > -       uint64_t        fh;
> > -       uint64_t        size;
> > -       uint64_t        lock_owner;
> > -       uint64_t        atime;
> > -       uint64_t        mtime;
> > -       uint64_t        ctime;
> > -       uint32_t        atimensec;
> > -       uint32_t        mtimensec;
> > -       uint32_t        ctimensec;
> > -       uint32_t        mode;
> > -       uint32_t        unused4;
> > -       uint32_t        uid;
> > -       uint32_t        gid;
> > -       uint32_t        unused5;
> > +       __u32   valid;
> > +       __u32   padding;
> > +       __u64   fh;
> > +       __u64   size;
> > +       __u64   lock_owner;
> > +       __u64   atime;
> > +       __u64   mtime;
> > +       __u64   ctime;
> > +       __u32   atimensec;
> > +       __u32   mtimensec;
> > +       __u32   ctimensec;
> > +       __u32   mode;
> > +       __u32   unused4;
> > +       __u32   uid;
> > +       __u32   gid;
> > +       __u32   unused5;
> >  };
> >
> >  struct fuse_open_in {
> > -       uint32_t        flags;
> > -       uint32_t        unused;
> > +       __u32   flags;
> > +       __u32   unused;
> >  };
> >
> >  struct fuse_create_in {
> > -       uint32_t        flags;
> > -       uint32_t        mode;
> > -       uint32_t        umask;
> > -       uint32_t        padding;
> > +       __u32   flags;
> > +       __u32   mode;
> > +       __u32   umask;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_open_out {
> > -       uint64_t        fh;
> > -       uint32_t        open_flags;
> > -       uint32_t        padding;
> > +       __u64   fh;
> > +       __u32   open_flags;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_release_in {
> > -       uint64_t        fh;
> > -       uint32_t        flags;
> > -       uint32_t        release_flags;
> > -       uint64_t        lock_owner;
> > +       __u64   fh;
> > +       __u32   flags;
> > +       __u32   release_flags;
> > +       __u64   lock_owner;
> >  };
> >
> >  struct fuse_flush_in {
> > -       uint64_t        fh;
> > -       uint32_t        unused;
> > -       uint32_t        padding;
> > -       uint64_t        lock_owner;
> > +       __u64   fh;
> > +       __u32   unused;
> > +       __u32   padding;
> > +       __u64   lock_owner;
> >  };
> >
> >  struct fuse_read_in {
> > -       uint64_t        fh;
> > -       uint64_t        offset;
> > -       uint32_t        size;
> > -       uint32_t        read_flags;
> > -       uint64_t        lock_owner;
> > -       uint32_t        flags;
> > -       uint32_t        padding;
> > +       __u64   fh;
> > +       __u64   offset;
> > +       __u32   size;
> > +       __u32   read_flags;
> > +       __u64   lock_owner;
> > +       __u32   flags;
> > +       __u32   padding;
> >  };
> >
> >  #define FUSE_COMPAT_WRITE_IN_SIZE 24
> >
> >  struct fuse_write_in {
> > -       uint64_t        fh;
> > -       uint64_t        offset;
> > -       uint32_t        size;
> > -       uint32_t        write_flags;
> > -       uint64_t        lock_owner;
> > -       uint32_t        flags;
> > -       uint32_t        padding;
> > +       __u64   fh;
> > +       __u64   offset;
> > +       __u32   size;
> > +       __u32   write_flags;
> > +       __u64   lock_owner;
> > +       __u32   flags;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_write_out {
> > -       uint32_t        size;
> > -       uint32_t        padding;
> > +       __u32   size;
> > +       __u32   padding;
> >  };
> >
> >  #define FUSE_COMPAT_STATFS_SIZE 48
> > @@ -531,32 +527,32 @@ struct fuse_statfs_out {
> >  };
> >
> >  struct fuse_fsync_in {
> > -       uint64_t        fh;
> > -       uint32_t        fsync_flags;
> > -       uint32_t        padding;
> > +       __u64   fh;
> > +       __u32   fsync_flags;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_setxattr_in {
> > -       uint32_t        size;
> > -       uint32_t        flags;
> > +       __u32   size;
> > +       __u32   flags;
> >  };
> >
> >  struct fuse_getxattr_in {
> > -       uint32_t        size;
> > -       uint32_t        padding;
> > +       __u32   size;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_getxattr_out {
> > -       uint32_t        size;
> > -       uint32_t        padding;
> > +       __u32   size;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_lk_in {
> > -       uint64_t        fh;
> > -       uint64_t        owner;
> > +       __u64   fh;
> > +       __u64   owner;
> >         struct fuse_file_lock lk;
> > -       uint32_t        lk_flags;
> > -       uint32_t        padding;
> > +       __u32   lk_flags;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_lk_out {
> > @@ -564,140 +560,140 @@ struct fuse_lk_out {
> >  };
> >
> >  struct fuse_access_in {
> > -       uint32_t        mask;
> > -       uint32_t        padding;
> > +       __u32   mask;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_init_in {
> > -       uint32_t        major;
> > -       uint32_t        minor;
> > -       uint32_t        max_readahead;
> > -       uint32_t        flags;
> > +       __u32   major;
> > +       __u32   minor;
> > +       __u32   max_readahead;
> > +       __u32   flags;
> >  };
> >
> >  #define FUSE_COMPAT_INIT_OUT_SIZE 8
> >  #define FUSE_COMPAT_22_INIT_OUT_SIZE 24
> >
> >  struct fuse_init_out {
> > -       uint32_t        major;
> > -       uint32_t        minor;
> > -       uint32_t        max_readahead;
> > -       uint32_t        flags;
> > -       uint16_t        max_background;
> > -       uint16_t        congestion_threshold;
> > -       uint32_t        max_write;
> > -       uint32_t        time_gran;
> > -       uint32_t        unused[9];
> > +       __u32   major;
> > +       __u32   minor;
> > +       __u32   max_readahead;
> > +       __u32   flags;
> > +       __u16   max_background;
> > +       __u16   congestion_threshold;
> > +       __u32   max_write;
> > +       __u32   time_gran;
> > +       __u32   unused[9];
> >  };
> >
> >  #define CUSE_INIT_INFO_MAX 4096
> >
> >  struct cuse_init_in {
> > -       uint32_t        major;
> > -       uint32_t        minor;
> > -       uint32_t        unused;
> > -       uint32_t        flags;
> > +       __u32   major;
> > +       __u32   minor;
> > +       __u32   unused;
> > +       __u32   flags;
> >  };
> >
> >  struct cuse_init_out {
> > -       uint32_t        major;
> > -       uint32_t        minor;
> > -       uint32_t        unused;
> > -       uint32_t        flags;
> > -       uint32_t        max_read;
> > -       uint32_t        max_write;
> > -       uint32_t        dev_major;              /* chardev major */
> > -       uint32_t        dev_minor;              /* chardev minor */
> > -       uint32_t        spare[10];
> > +       __u32   major;
> > +       __u32   minor;
> > +       __u32   unused;
> > +       __u32   flags;
> > +       __u32   max_read;
> > +       __u32   max_write;
> > +       __u32   dev_major;              /* chardev major */
> > +       __u32   dev_minor;              /* chardev minor */
> > +       __u32   spare[10];
> >  };
> >
> >  struct fuse_interrupt_in {
> > -       uint64_t        unique;
> > +       __u64   unique;
> >  };
> >
> >  struct fuse_bmap_in {
> > -       uint64_t        block;
> > -       uint32_t        blocksize;
> > -       uint32_t        padding;
> > +       __u64   block;
> > +       __u32   blocksize;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_bmap_out {
> > -       uint64_t        block;
> > +       __u64   block;
> >  };
> >
> >  struct fuse_ioctl_in {
> > -       uint64_t        fh;
> > -       uint32_t        flags;
> > -       uint32_t        cmd;
> > -       uint64_t        arg;
> > -       uint32_t        in_size;
> > -       uint32_t        out_size;
> > +       __u64   fh;
> > +       __u32   flags;
> > +       __u32   cmd;
> > +       __u64   arg;
> > +       __u32   in_size;
> > +       __u32   out_size;
> >  };
> >
> >  struct fuse_ioctl_iovec {
> > -       uint64_t        base;
> > -       uint64_t        len;
> > +       __u64   base;
> > +       __u64   len;
> >  };
> >
> >  struct fuse_ioctl_out {
> > -       int32_t         result;
> > -       uint32_t        flags;
> > -       uint32_t        in_iovs;
> > -       uint32_t        out_iovs;
> > +       __s32           result;
> > +       __u32   flags;
> > +       __u32   in_iovs;
> > +       __u32   out_iovs;
> >  };
> >
> >  struct fuse_poll_in {
> > -       uint64_t        fh;
> > -       uint64_t        kh;
> > -       uint32_t        flags;
> > -       uint32_t        events;
> > +       __u64   fh;
> > +       __u64   kh;
> > +       __u32   flags;
> > +       __u32   events;
> >  };
> >
> >  struct fuse_poll_out {
> > -       uint32_t        revents;
> > -       uint32_t        padding;
> > +       __u32   revents;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_notify_poll_wakeup_out {
> > -       uint64_t        kh;
> > +       __u64   kh;
> >  };
> >
> >  struct fuse_fallocate_in {
> > -       uint64_t        fh;
> > -       uint64_t        offset;
> > -       uint64_t        length;
> > -       uint32_t        mode;
> > -       uint32_t        padding;
> > +       __u64   fh;
> > +       __u64   offset;
> > +       __u64   length;
> > +       __u32   mode;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_in_header {
> > -       uint32_t        len;
> > -       uint32_t        opcode;
> > -       uint64_t        unique;
> > -       uint64_t        nodeid;
> > -       uint32_t        uid;
> > -       uint32_t        gid;
> > -       uint32_t        pid;
> > -       uint32_t        padding;
> > +       __u32   len;
> > +       __u32   opcode;
> > +       __u64   unique;
> > +       __u64   nodeid;
> > +       __u32   uid;
> > +       __u32   gid;
> > +       __u32   pid;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_out_header {
> > -       uint32_t        len;
> > -       int32_t         error;
> > -       uint64_t        unique;
> > +       __u32   len;
> > +       __s32           error;
> > +       __u64   unique;
> >  };
> >
> >  struct fuse_dirent {
> > -       uint64_t        ino;
> > -       uint64_t        off;
> > -       uint32_t        namelen;
> > -       uint32_t        type;
> > +       __u64   ino;
> > +       __u64   off;
> > +       __u32   namelen;
> > +       __u32   type;
> >         char name[];
> >  };
> >
> >  #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
> >  #define FUSE_DIRENT_ALIGN(x) \
> > -       (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
> > +       (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
> >  #define FUSE_DIRENT_SIZE(d) \
> >         FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
> >
> > @@ -712,47 +708,47 @@ struct fuse_direntplus {
> >         FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
> >
> >  struct fuse_notify_inval_inode_out {
> > -       uint64_t        ino;
> > -       int64_t         off;
> > -       int64_t         len;
> > +       __u64   ino;
> > +       __s64           off;
> > +       __s64           len;
> >  };
> >
> >  struct fuse_notify_inval_entry_out {
> > -       uint64_t        parent;
> > -       uint32_t        namelen;
> > -       uint32_t        padding;
> > +       __u64   parent;
> > +       __u32   namelen;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_notify_delete_out {
> > -       uint64_t        parent;
> > -       uint64_t        child;
> > -       uint32_t        namelen;
> > -       uint32_t        padding;
> > +       __u64   parent;
> > +       __u64   child;
> > +       __u32   namelen;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_notify_store_out {
> > -       uint64_t        nodeid;
> > -       uint64_t        offset;
> > -       uint32_t        size;
> > -       uint32_t        padding;
> > +       __u64   nodeid;
> > +       __u64   offset;
> > +       __u32   size;
> > +       __u32   padding;
> >  };
> >
> >  struct fuse_notify_retrieve_out {
> > -       uint64_t        notify_unique;
> > -       uint64_t        nodeid;
> > -       uint64_t        offset;
> > -       uint32_t        size;
> > -       uint32_t        padding;
> > +       __u64   notify_unique;
> > +       __u64   nodeid;
> > +       __u64   offset;
> > +       __u32   size;
> > +       __u32   padding;
> >  };
> >
> >  /* Matches the size of fuse_write_in */
> >  struct fuse_notify_retrieve_in {
> > -       uint64_t        dummy1;
> > -       uint64_t        offset;
> > -       uint32_t        size;
> > -       uint32_t        dummy2;
> > -       uint64_t        dummy3;
> > -       uint64_t        dummy4;
> > +       __u64   dummy1;
> > +       __u64   offset;
> > +       __u32   size;
> > +       __u32   dummy2;
> > +       __u64   dummy3;
> > +       __u64   dummy4;
> >  };
> >
> >  /* Device ioctls: */
> > --
> > 2.5.0
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248070 — Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace

FromMiklos Szeredi <miklos@szeredi.hu>
Date2015-10-15 20:40 +0200
SubjectRe: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace
Message-ID<qjVBw-6l0-13@gated-at.bofh.it>
In reply to#1248043
On Thu, Oct 15, 2015 at 7:41 PM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> On Thu, Oct 15, 2015 at 05:20:24PM +0200, Miklos Szeredi wrote:
>> On Thu, Oct 15, 2015 at 7:56 AM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
>> > Kernel headers should not use stdint.h.
>>
>> Including <linux/types.h> breaks compile of library on non-Linux
>> archs.  Allowing this patch would mean having a different header in
>> the fuse lib as the one in the kernel.  This is useless complexity and
>> a source of bugs.  We've already been there, and much prefer the
>> current state.
>
> Hmm. Why should Linux uapi header care about non-Linux platforms?
>
> If fuse lib already has an embedded copy of this header, why should
> this change break anything fuse lib?

It has a copy, but that copy is often updated with new features taken
from the kernel.  There's no reason to have two different versions of
the header file for no good reason.

> In my other patches I got review comments that kernel headers should not
> use <stdint.h> and also Documentation/CodingStyle section 5 says:
>
>  (e) Types safe for use in userspace.
>
>      In certain structures which are visible to userspace, we cannot
>      require C99 types and cannot use the 'u32' form above. Thus, we
>      use __u32 and similar types in all structures which are shared
>      with userspace.

Ok, if you cannot require C99, then the __uXX types are the way to go.
But for the fuse API we *can* use C99 types, nothing preventing us
from doing it.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248085 — Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace

FromArnd Bergmann <arnd@arndb.de>
Date2015-10-15 21:00 +0200
SubjectRe: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace
Message-ID<qjVUS-6LD-19@gated-at.bofh.it>
In reply to#1248070
On Thursday 15 October 2015 20:32:45 Miklos Szeredi wrote:
> > In my other patches I got review comments that kernel headers should not
> > use <stdint.h> and also Documentation/CodingStyle section 5 says:
> >
> >  (e) Types safe for use in userspace.
> >
> >      In certain structures which are visible to userspace, we cannot
> >      require C99 types and cannot use the 'u32' form above. Thus, we
> >      use __u32 and similar types in all structures which are shared
> >      with userspace.
> 
> Ok, if you cannot require C99, then the __uXX types are the way to go.
> But for the fuse API we *can* use C99 types, nothing preventing us
> from doing it.

What the sentence above means is that you should not rely on the
user including <stdint.h> before including a kernel header, and
that kernel headers are not allowed to include <stdint.h> themselves,
because that would break any pre-C99 user space that defines types
with the same names in their own headers and that relies on that
header not to be included implicitly.

It's possible that it has never been a problem for the fuse headers,
but it has been a problem for other headers in the past and what
Mikko is trying to achieve is to ensure that none of the kernel
headers do this so we can make it an error in 'make headers_install'.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248100 — Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace

FromMiklos Szeredi <miklos@szeredi.hu>
Date2015-10-15 21:30 +0200
SubjectRe: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace
Message-ID<qjWnU-7zG-13@gated-at.bofh.it>
In reply to#1248085
On Thu, Oct 15, 2015 at 8:59 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 15 October 2015 20:32:45 Miklos Szeredi wrote:
>> > In my other patches I got review comments that kernel headers should not
>> > use <stdint.h> and also Documentation/CodingStyle section 5 says:
>> >
>> >  (e) Types safe for use in userspace.
>> >
>> >      In certain structures which are visible to userspace, we cannot
>> >      require C99 types and cannot use the 'u32' form above. Thus, we
>> >      use __u32 and similar types in all structures which are shared
>> >      with userspace.
>>
>> Ok, if you cannot require C99, then the __uXX types are the way to go.
>> But for the fuse API we *can* use C99 types, nothing preventing us
>> from doing it.
>
> What the sentence above means is that you should not rely on the
> user including <stdint.h> before including a kernel header, and
> that kernel headers are not allowed to include <stdint.h> themselves,
> because that would break any pre-C99 user space that defines types
> with the same names in their own headers and that relies on that
> header not to be included implicitly.
>
> It's possible that it has never been a problem for the fuse headers,
> but it has been a problem for other headers in the past and what
> Mikko is trying to achieve is to ensure that none of the kernel
> headers do this so we can make it an error in 'make headers_install'.

"in some cases including <stdint.h> might be a problem" is not a very
strong argument in favour of making it an error.  And since it would
be a step backwards for the fuse header I object to making it an
error.

If this is really such a big issue, then why not make it a warning
(and add a mechanism to silence that warning)?

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248180 — Re: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 23:10 +0200
SubjectRe: [PATCH v4 71/79] include/uapi/linux/fuse.h: use linux/types.h also in userspace
Message-ID<qjXWG-1Ez-15@gated-at.bofh.it>
In reply to#1248100
On Thu, Oct 15, 2015 at 09:25:30PM +0200, Miklos Szeredi wrote:
> On Thu, Oct 15, 2015 at 8:59 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Thursday 15 October 2015 20:32:45 Miklos Szeredi wrote:
> >> > In my other patches I got review comments that kernel headers should not
> >> > use <stdint.h> and also Documentation/CodingStyle section 5 says:
> >> >
> >> >  (e) Types safe for use in userspace.
> >> >
> >> >      In certain structures which are visible to userspace, we cannot
> >> >      require C99 types and cannot use the 'u32' form above. Thus, we
> >> >      use __u32 and similar types in all structures which are shared
> >> >      with userspace.
> >>
> >> Ok, if you cannot require C99, then the __uXX types are the way to go.
> >> But for the fuse API we *can* use C99 types, nothing preventing us
> >> from doing it.
> >
> > What the sentence above means is that you should not rely on the
> > user including <stdint.h> before including a kernel header, and
> > that kernel headers are not allowed to include <stdint.h> themselves,
> > because that would break any pre-C99 user space that defines types
> > with the same names in their own headers and that relies on that
> > header not to be included implicitly.
> >
> > It's possible that it has never been a problem for the fuse headers,
> > but it has been a problem for other headers in the past and what
> > Mikko is trying to achieve is to ensure that none of the kernel
> > headers do this so we can make it an error in 'make headers_install'.
> 
> "in some cases including <stdint.h> might be a problem" is not a very
> strong argument in favour of making it an error.  And since it would
> be a step backwards for the fuse header I object to making it an
> error.
> 
> If this is really such a big issue, then why not make it a warning
> (and add a mechanism to silence that warning)?

I tried compiling fuse userspace library with this patch applied and
it compiles without any problems:

$ make
Making all in include
make[1]: Entering directory '/home/mcfrisk/src/fuse-fuse/include'
make  all-am
make[2]: Entering directory '/home/mcfrisk/src/fuse-fuse/include'
make[2]: Leaving directory '/home/mcfrisk/src/fuse-fuse/include'
make[1]: Leaving directory '/home/mcfrisk/src/fuse-fuse/include'
Making all in lib
make[1]: Entering directory '/home/mcfrisk/src/fuse-fuse/lib'
  CC       fuse.lo
  CC       fuse_loop_mt.lo
  CC       fuse_lowlevel.lo
  CC       cuse_lowlevel.lo
  CCLD     libfuse3.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[1]: Leaving directory '/home/mcfrisk/src/fuse-fuse/lib'
Making all in util
make[1]: Entering directory '/home/mcfrisk/src/fuse-fuse/util'
make  all-am
make[2]: Entering directory '/home/mcfrisk/src/fuse-fuse/util'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/home/mcfrisk/src/fuse-fuse/util'
make[1]: Leaving directory '/home/mcfrisk/src/fuse-fuse/util'
Making all in example
make[1]: Entering directory '/home/mcfrisk/src/fuse-fuse/example'
  CCLD     fusexmp
  CCLD     fusexmp_fh
  CCLD     null
  CCLD     hello
  CCLD     hello_ll
  CCLD     fioc
  CCLD     fsel
  CCLD     cusexmp
  CCLD     fuse_lo-plus
make[1]: Leaving directory '/home/mcfrisk/src/fuse-fuse/example'
Making all in doc
make[1]: Entering directory '/home/mcfrisk/src/fuse-fuse/doc'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/mcfrisk/src/fuse-fuse/doc'
make[1]: Entering directory '/home/mcfrisk/src/fuse-fuse'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/mcfrisk/src/fuse-fuse'

$ git diff
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index c9aca04..a25e329 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -107,11 +107,7 @@
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
-#ifdef __KERNEL__
 #include <linux/types.h>
-#else
-#include <stdint.h>
-#endif
 
 /*
  * Version negotiation:
@@ -146,42 +142,42 @@
    userspace works under 64bit kernels */
 
 struct fuse_attr {
-	uint64_t	ino;
-	uint64_t	size;
-	uint64_t	blocks;
-	uint64_t	atime;
-	uint64_t	mtime;
-	uint64_t	ctime;
-	uint32_t	atimensec;
-	uint32_t	mtimensec;
-	uint32_t	ctimensec;
-	uint32_t	mode;
-	uint32_t	nlink;
-	uint32_t	uid;
-	uint32_t	gid;
-	uint32_t	rdev;
-	uint32_t	blksize;
-	uint32_t	padding;
+	__u64	ino;
+	__u64	size;
+	__u64	blocks;
+	__u64	atime;
+	__u64	mtime;
+	__u64	ctime;
+	__u32	atimensec;
+	__u32	mtimensec;
+	__u32	ctimensec;
+	__u32	mode;
+	__u32	nlink;
+	__u32	uid;
+	__u32	gid;
+	__u32	rdev;
+	__u32	blksize;
+	__u32	padding;
 };
 
 struct fuse_kstatfs {
-	uint64_t	blocks;
-	uint64_t	bfree;
-	uint64_t	bavail;
-	uint64_t	files;
-	uint64_t	ffree;
-	uint32_t	bsize;
-	uint32_t	namelen;
-	uint32_t	frsize;
-	uint32_t	padding;
-	uint32_t	spare[6];
+	__u64	blocks;
+	__u64	bfree;
+	__u64	bavail;
+	__u64	files;
+	__u64	ffree;
+	__u32	bsize;
+	__u32	namelen;
+	__u32	frsize;
+	__u32	padding;
+	__u32	spare[6];
 };
 
 struct fuse_file_lock {
-	uint64_t	start;
-	uint64_t	end;
-	uint32_t	type;
-	uint32_t	pid; /* tgid */
+	__u64	start;
+	__u64	end;
+	__u32	type;
+	__u32	pid; /* tgid */
 };
 
 /**
@@ -379,149 +375,149 @@ enum fuse_notify_code {
 #define FUSE_COMPAT_ENTRY_OUT_SIZE 120
 
 struct fuse_entry_out {
-	uint64_t	nodeid;		/* Inode ID */
-	uint64_t	generation;	/* Inode generation: nodeid:gen must
+	__u64	nodeid;		/* Inode ID */
+	__u64	generation;	/* Inode generation: nodeid:gen must
 					   be unique for the fs's lifetime */
-	uint64_t	entry_valid;	/* Cache timeout for the name */
-	uint64_t	attr_valid;	/* Cache timeout for the attributes */
-	uint32_t	entry_valid_nsec;
-	uint32_t	attr_valid_nsec;
+	__u64	entry_valid;	/* Cache timeout for the name */
+	__u64	attr_valid;	/* Cache timeout for the attributes */
+	__u32	entry_valid_nsec;
+	__u32	attr_valid_nsec;
 	struct fuse_attr attr;
 };
 
 struct fuse_forget_in {
-	uint64_t	nlookup;
+	__u64	nlookup;
 };
 
 struct fuse_forget_one {
-	uint64_t	nodeid;
-	uint64_t	nlookup;
+	__u64	nodeid;
+	__u64	nlookup;
 };
 
 struct fuse_batch_forget_in {
-	uint32_t	count;
-	uint32_t	dummy;
+	__u32	count;
+	__u32	dummy;
 };
 
 struct fuse_getattr_in {
-	uint32_t	getattr_flags;
-	uint32_t	dummy;
-	uint64_t	fh;
+	__u32	getattr_flags;
+	__u32	dummy;
+	__u64	fh;
 };
 
 #define FUSE_COMPAT_ATTR_OUT_SIZE 96
 
 struct fuse_attr_out {
-	uint64_t	attr_valid;	/* Cache timeout for the attributes */
-	uint32_t	attr_valid_nsec;
-	uint32_t	dummy;
+	__u64	attr_valid;	/* Cache timeout for the attributes */
+	__u32	attr_valid_nsec;
+	__u32	dummy;
 	struct fuse_attr attr;
 };
 
 #define FUSE_COMPAT_MKNOD_IN_SIZE 8
 
 struct fuse_mknod_in {
-	uint32_t	mode;
-	uint32_t	rdev;
-	uint32_t	umask;
-	uint32_t	padding;
+	__u32	mode;
+	__u32	rdev;
+	__u32	umask;
+	__u32	padding;
 };
 
 struct fuse_mkdir_in {
-	uint32_t	mode;
-	uint32_t	umask;
+	__u32	mode;
+	__u32	umask;
 };
 
 struct fuse_rename_in {
-	uint64_t	newdir;
+	__u64	newdir;
 };
 
 struct fuse_rename2_in {
-	uint64_t	newdir;
-	uint32_t	flags;
-	uint32_t	padding;
+	__u64	newdir;
+	__u32	flags;
+	__u32	padding;
 };
 
 struct fuse_link_in {
-	uint64_t	oldnodeid;
+	__u64	oldnodeid;
 };
 
 struct fuse_setattr_in {
-	uint32_t	valid;
-	uint32_t	padding;
-	uint64_t	fh;
-	uint64_t	size;
-	uint64_t	lock_owner;
-	uint64_t	atime;
-	uint64_t	mtime;
-	uint64_t	ctime;
-	uint32_t	atimensec;
-	uint32_t	mtimensec;
-	uint32_t	ctimensec;
-	uint32_t	mode;
-	uint32_t	unused4;
-	uint32_t	uid;
-	uint32_t	gid;
-	uint32_t	unused5;
+	__u32	valid;
+	__u32	padding;
+	__u64	fh;
+	__u64	size;
+	__u64	lock_owner;
+	__u64	atime;
+	__u64	mtime;
+	__u64	ctime;
+	__u32	atimensec;
+	__u32	mtimensec;
+	__u32	ctimensec;
+	__u32	mode;
+	__u32	unused4;
+	__u32	uid;
+	__u32	gid;
+	__u32	unused5;
 };
 
 struct fuse_open_in {
-	uint32_t	flags;
-	uint32_t	unused;
+	__u32	flags;
+	__u32	unused;
 };
 
 struct fuse_create_in {
-	uint32_t	flags;
-	uint32_t	mode;
-	uint32_t	umask;
-	uint32_t	padding;
+	__u32	flags;
+	__u32	mode;
+	__u32	umask;
+	__u32	padding;
 };
 
 struct fuse_open_out {
-	uint64_t	fh;
-	uint32_t	open_flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u32	open_flags;
+	__u32	padding;
 };
 
 struct fuse_release_in {
-	uint64_t	fh;
-	uint32_t	flags;
-	uint32_t	release_flags;
-	uint64_t	lock_owner;
+	__u64	fh;
+	__u32	flags;
+	__u32	release_flags;
+	__u64	lock_owner;
 };
 
 struct fuse_flush_in {
-	uint64_t	fh;
-	uint32_t	unused;
-	uint32_t	padding;
-	uint64_t	lock_owner;
+	__u64	fh;
+	__u32	unused;
+	__u32	padding;
+	__u64	lock_owner;
 };
 
 struct fuse_read_in {
-	uint64_t	fh;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	read_flags;
-	uint64_t	lock_owner;
-	uint32_t	flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u64	offset;
+	__u32	size;
+	__u32	read_flags;
+	__u64	lock_owner;
+	__u32	flags;
+	__u32	padding;
 };
 
 #define FUSE_COMPAT_WRITE_IN_SIZE 24
 
 struct fuse_write_in {
-	uint64_t	fh;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	write_flags;
-	uint64_t	lock_owner;
-	uint32_t	flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u64	offset;
+	__u32	size;
+	__u32	write_flags;
+	__u64	lock_owner;
+	__u32	flags;
+	__u32	padding;
 };
 
 struct fuse_write_out {
-	uint32_t	size;
-	uint32_t	padding;
+	__u32	size;
+	__u32	padding;
 };
 
 #define FUSE_COMPAT_STATFS_SIZE 48
@@ -531,32 +527,32 @@ struct fuse_statfs_out {
 };
 
 struct fuse_fsync_in {
-	uint64_t	fh;
-	uint32_t	fsync_flags;
-	uint32_t	padding;
+	__u64	fh;
+	__u32	fsync_flags;
+	__u32	padding;
 };
 
 struct fuse_setxattr_in {
-	uint32_t	size;
-	uint32_t	flags;
+	__u32	size;
+	__u32	flags;
 };
 
 struct fuse_getxattr_in {
-	uint32_t	size;
-	uint32_t	padding;
+	__u32	size;
+	__u32	padding;
 };
 
 struct fuse_getxattr_out {
-	uint32_t	size;
-	uint32_t	padding;
+	__u32	size;
+	__u32	padding;
 };
 
 struct fuse_lk_in {
-	uint64_t	fh;
-	uint64_t	owner;
+	__u64	fh;
+	__u64	owner;
 	struct fuse_file_lock lk;
-	uint32_t	lk_flags;
-	uint32_t	padding;
+	__u32	lk_flags;
+	__u32	padding;
 };
 
 struct fuse_lk_out {
@@ -564,140 +560,140 @@ struct fuse_lk_out {
 };
 
 struct fuse_access_in {
-	uint32_t	mask;
-	uint32_t	padding;
+	__u32	mask;
+	__u32	padding;
 };
 
 struct fuse_init_in {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	max_readahead;
-	uint32_t	flags;
+	__u32	major;
+	__u32	minor;
+	__u32	max_readahead;
+	__u32	flags;
 };
 
 #define FUSE_COMPAT_INIT_OUT_SIZE 8
 #define FUSE_COMPAT_22_INIT_OUT_SIZE 24
 
 struct fuse_init_out {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	max_readahead;
-	uint32_t	flags;
-	uint16_t	max_background;
-	uint16_t	congestion_threshold;
-	uint32_t	max_write;
-	uint32_t	time_gran;
-	uint32_t	unused[9];
+	__u32	major;
+	__u32	minor;
+	__u32	max_readahead;
+	__u32	flags;
+	__u16	max_background;
+	__u16	congestion_threshold;
+	__u32	max_write;
+	__u32	time_gran;
+	__u32	unused[9];
 };
 
 #define CUSE_INIT_INFO_MAX 4096
 
 struct cuse_init_in {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	unused;
-	uint32_t	flags;
+	__u32	major;
+	__u32	minor;
+	__u32	unused;
+	__u32	flags;
 };
 
 struct cuse_init_out {
-	uint32_t	major;
-	uint32_t	minor;
-	uint32_t	unused;
-	uint32_t	flags;
-	uint32_t	max_read;
-	uint32_t	max_write;
-	uint32_t	dev_major;		/* chardev major */
-	uint32_t	dev_minor;		/* chardev minor */
-	uint32_t	spare[10];
+	__u32	major;
+	__u32	minor;
+	__u32	unused;
+	__u32	flags;
+	__u32	max_read;
+	__u32	max_write;
+	__u32	dev_major;		/* chardev major */
+	__u32	dev_minor;		/* chardev minor */
+	__u32	spare[10];
 };
 
 struct fuse_interrupt_in {
-	uint64_t	unique;
+	__u64	unique;
 };
 
 struct fuse_bmap_in {
-	uint64_t	block;
-	uint32_t	blocksize;
-	uint32_t	padding;
+	__u64	block;
+	__u32	blocksize;
+	__u32	padding;
 };
 
 struct fuse_bmap_out {
-	uint64_t	block;
+	__u64	block;
 };
 
 struct fuse_ioctl_in {
-	uint64_t	fh;
-	uint32_t	flags;
-	uint32_t	cmd;
-	uint64_t	arg;
-	uint32_t	in_size;
-	uint32_t	out_size;
+	__u64	fh;
+	__u32	flags;
+	__u32	cmd;
+	__u64	arg;
+	__u32	in_size;
+	__u32	out_size;
 };
 
 struct fuse_ioctl_iovec {
-	uint64_t	base;
-	uint64_t	len;
+	__u64	base;
+	__u64	len;
 };
 
 struct fuse_ioctl_out {
-	int32_t		result;
-	uint32_t	flags;
-	uint32_t	in_iovs;
-	uint32_t	out_iovs;
+	__s32		result;
+	__u32	flags;
+	__u32	in_iovs;
+	__u32	out_iovs;
 };
 
 struct fuse_poll_in {
-	uint64_t	fh;
-	uint64_t	kh;
-	uint32_t	flags;
-	uint32_t	events;
+	__u64	fh;
+	__u64	kh;
+	__u32	flags;
+	__u32	events;
 };
 
 struct fuse_poll_out {
-	uint32_t	revents;
-	uint32_t	padding;
+	__u32	revents;
+	__u32	padding;
 };
 
 struct fuse_notify_poll_wakeup_out {
-	uint64_t	kh;
+	__u64	kh;
 };
 
 struct fuse_fallocate_in {
-	uint64_t	fh;
-	uint64_t	offset;
-	uint64_t	length;
-	uint32_t	mode;
-	uint32_t	padding;
+	__u64	fh;
+	__u64	offset;
+	__u64	length;
+	__u32	mode;
+	__u32	padding;
 };
 
 struct fuse_in_header {
-	uint32_t	len;
-	uint32_t	opcode;
-	uint64_t	unique;
-	uint64_t	nodeid;
-	uint32_t	uid;
-	uint32_t	gid;
-	uint32_t	pid;
-	uint32_t	padding;
+	__u32	len;
+	__u32	opcode;
+	__u64	unique;
+	__u64	nodeid;
+	__u32	uid;
+	__u32	gid;
+	__u32	pid;
+	__u32	padding;
 };
 
 struct fuse_out_header {
-	uint32_t	len;
-	int32_t		error;
-	uint64_t	unique;
+	__u32	len;
+	__s32		error;
+	__u64	unique;
 };
 
 struct fuse_dirent {
-	uint64_t	ino;
-	uint64_t	off;
-	uint32_t	namelen;
-	uint32_t	type;
+	__u64	ino;
+	__u64	off;
+	__u32	namelen;
+	__u32	type;
 	char name[];
 };
 
 #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
 #define FUSE_DIRENT_ALIGN(x) \
-	(((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
+	(((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
 #define FUSE_DIRENT_SIZE(d) \
 	FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
 
@@ -712,47 +708,47 @@ struct fuse_direntplus {
 	FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
 
 struct fuse_notify_inval_inode_out {
-	uint64_t	ino;
-	int64_t		off;
-	int64_t		len;
+	__u64	ino;
+	__s64		off;
+	__s64		len;
 };
 
 struct fuse_notify_inval_entry_out {
-	uint64_t	parent;
-	uint32_t	namelen;
-	uint32_t	padding;
+	__u64	parent;
+	__u32	namelen;
+	__u32	padding;
 };
 
 struct fuse_notify_delete_out {
-	uint64_t	parent;
-	uint64_t	child;
-	uint32_t	namelen;
-	uint32_t	padding;
+	__u64	parent;
+	__u64	child;
+	__u32	namelen;
+	__u32	padding;
 };
 
 struct fuse_notify_store_out {
-	uint64_t	nodeid;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	padding;
+	__u64	nodeid;
+	__u64	offset;
+	__u32	size;
+	__u32	padding;
 };
 
 struct fuse_notify_retrieve_out {
-	uint64_t	notify_unique;
-	uint64_t	nodeid;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	padding;
+	__u64	notify_unique;
+	__u64	nodeid;
+	__u64	offset;
+	__u32	size;
+	__u32	padding;
 };
 
 /* Matches the size of fuse_write_in */
 struct fuse_notify_retrieve_in {
-	uint64_t	dummy1;
-	uint64_t	offset;
-	uint32_t	size;
-	uint32_t	dummy2;
-	uint64_t	dummy3;
-	uint64_t	dummy4;
+	__u64	dummy1;
+	__u64	offset;
+	__u32	size;
+	__u32	dummy2;
+	__u64	dummy3;
+	__u64	dummy4;
 };
 
 /* Device ioctls: */

-Mikko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247490 — [PATCH v4 61/79] include/uapi/linux/scc.h: include linux/sockios.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 61/79] include/uapi/linux/scc.h: include linux/sockios.h
Message-ID<qjKwq-6Te-31@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compilation error:

error: ‘SIOCDEVPRIVATE’ undeclared here (not in a function)
  SIOCSCCRESERVED = SIOCDEVPRIVATE

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/scc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/scc.h b/include/uapi/linux/scc.h
index 72b6b81..2992b88 100644
--- a/include/uapi/linux/scc.h
+++ b/include/uapi/linux/scc.h
@@ -3,6 +3,7 @@
 #ifndef _UAPI_SCC_H
 #define _UAPI_SCC_H
 
+#include <linux/sockios.h>
 
 /* selection of hardware types */
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247491 — [PATCH v4 57/79] include/uapi/linux/openvswitch.h: use __u32 from linux/types.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 57/79] include/uapi/linux/openvswitch.h: use __u32 from linux/types.h
Message-ID<qjKwr-6Te-33@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compiler error:

error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/openvswitch.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index 32e07d8..80c39a1 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -612,8 +612,8 @@ enum ovs_hash_alg {
  * @hash_basis: basis used for computing hash.
  */
 struct ovs_action_hash {
-	uint32_t  hash_alg;     /* One of ovs_hash_alg. */
-	uint32_t  hash_basis;
+	__u32  hash_alg;     /* One of ovs_hash_alg. */
+	__u32  hash_basis;
 };
 
 /**
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247492 — [PATCH v4 58/79] include/uapi/linux/target_core_user.h: use __u8, __u16, __u32 and __u64 from linux/types.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 58/79] include/uapi/linux/target_core_user.h: use __u8, __u16, __u32 and __u64 from linux/types.h
Message-ID<qjKwq-6Te-21@gated-at.bofh.it>
In reply to#1247405
Fixes userspace compilation errors like:

error: unknown type name ‘uint16_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/target_core_user.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h
index 95c6521..440b52a 100644
--- a/include/uapi/linux/target_core_user.h
+++ b/include/uapi/linux/target_core_user.h
@@ -104,26 +104,26 @@ struct tcmu_cmd_entry {
 
 	union {
 		struct {
-			uint32_t iov_cnt;
-			uint32_t iov_bidi_cnt;
-			uint32_t iov_dif_cnt;
-			uint64_t cdb_off;
-			uint64_t __pad1;
-			uint64_t __pad2;
+			__u32 iov_cnt;
+			__u32 iov_bidi_cnt;
+			__u32 iov_dif_cnt;
+			__u64 cdb_off;
+			__u64 __pad1;
+			__u64 __pad2;
 			struct iovec iov[0];
 		} req;
 		struct {
-			uint8_t scsi_status;
-			uint8_t __pad1;
-			uint16_t __pad2;
-			uint32_t __pad3;
+			__u8 scsi_status;
+			__u8 __pad1;
+			__u16 __pad2;
+			__u32 __pad3;
 			char sense_buffer[TCMU_SENSE_BUFFERSIZE];
 		} rsp;
 	};
 
 } __packed;
 
-#define TCMU_OP_ALIGN_SIZE sizeof(uint64_t)
+#define TCMU_OP_ALIGN_SIZE sizeof(__u64)
 
 enum tcmu_genl_cmd {
 	TCMU_CMD_UNSPEC,
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247493 — [PATCH v4 70/79] include/uapi/mtd/mtd-user.h: remove stdint.h include

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-10-15 08:50 +0200
Subject[PATCH v4 70/79] include/uapi/mtd/mtd-user.h: remove stdint.h include
Message-ID<qjKwr-6Te-35@gated-at.bofh.it>
In reply to#1247405
Kernel headers should use linux/types.h instead.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/mtd/mtd-user.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/uapi/mtd/mtd-user.h b/include/uapi/mtd/mtd-user.h
index 83327c8..e71d555 100644
--- a/include/uapi/mtd/mtd-user.h
+++ b/include/uapi/mtd/mtd-user.h
@@ -20,8 +20,6 @@
 #ifndef __MTD_USER_H__
 #define __MTD_USER_H__
 
-#include <stdint.h>
-
 /* This file is blessed for inclusion by userspace */
 #include <mtd/mtd-abi.h>
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6  Next page →

Back to top | Article view | linux.kernel


csiph-web