Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86, x32: Use __kernel_long_t/__kernel_ulong_t in x86-64 stat.h

Both x32 and x86-64 use the same stat system call interface. But x32
long is 32-bit. This patch changes x86 uapi <asm/stat.h> to use
__kernel_long_t/__kernel_ulong_t in x86-64 stat.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Link: http://lkml.kernel.org/r/CAMe9rOquPtWEro0GQ=Z95pZJ=c7GGkSHynjN4FbiB4p445x-Ng@mail.gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

authored by

H.J. Lu and committed by
H. Peter Anvin
b70fedc1 319e2e3f

+20 -18
+20 -18
arch/x86/include/uapi/asm/stat.h
··· 1 1 #ifndef _ASM_X86_STAT_H 2 2 #define _ASM_X86_STAT_H 3 3 4 + #include <asm/posix_types.h> 5 + 4 6 #define STAT_HAVE_NSEC 1 5 7 6 8 #ifdef __i386__ ··· 80 78 #else /* __i386__ */ 81 79 82 80 struct stat { 83 - unsigned long st_dev; 84 - unsigned long st_ino; 85 - unsigned long st_nlink; 81 + __kernel_ulong_t st_dev; 82 + __kernel_ulong_t st_ino; 83 + __kernel_ulong_t st_nlink; 86 84 87 - unsigned int st_mode; 88 - unsigned int st_uid; 89 - unsigned int st_gid; 90 - unsigned int __pad0; 91 - unsigned long st_rdev; 92 - long st_size; 93 - long st_blksize; 94 - long st_blocks; /* Number 512-byte blocks allocated. */ 85 + unsigned int st_mode; 86 + unsigned int st_uid; 87 + unsigned int st_gid; 88 + unsigned int __pad0; 89 + __kernel_ulong_t st_rdev; 90 + __kernel_long_t st_size; 91 + __kernel_long_t st_blksize; 92 + __kernel_long_t st_blocks; /* Number 512-byte blocks allocated. */ 95 93 96 - unsigned long st_atime; 97 - unsigned long st_atime_nsec; 98 - unsigned long st_mtime; 99 - unsigned long st_mtime_nsec; 100 - unsigned long st_ctime; 101 - unsigned long st_ctime_nsec; 102 - long __unused[3]; 94 + __kernel_ulong_t st_atime; 95 + __kernel_ulong_t st_atime_nsec; 96 + __kernel_ulong_t st_mtime; 97 + __kernel_ulong_t st_mtime_nsec; 98 + __kernel_ulong_t st_ctime; 99 + __kernel_ulong_t st_ctime_nsec; 100 + __kernel_long_t __unused[3]; 103 101 }; 104 102 105 103 /* We don't need to memset the whole thing just to initialize the padding */