aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compat.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-11-28 04:09:09 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-03-27 14:43:57 -0400
commit2b1c6bd77d4e6a727ffac8630cd154b2144b751a (patch)
treeffc4237dbeed66492124ef2ccecf48db0767531a /include/linux/compat.h
parentec1ab0abde0af586a59541ad71841f022dcac3e7 (diff)
generic compat_sys_ustat
Due to a different size of ino_t ustat needs a compat handler, but currently only x86 and mips provide one. Add a generic compat_sys_ustat and switch all architectures over to it. Instead of doing various user copy hacks compat_sys_ustat just reimplements sys_ustat as it's trivial. This was suggested by Arnd Bergmann. Found by Eric Sandeen when running xfstests/017 on ppc64, which causes stack smashing warnings on RHEL/Fedora due to the too large amount of data writen by the syscall. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r--include/linux/compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3fd2194ff573..b880864672de 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -125,6 +125,13 @@ struct compat_dirent {
125 char d_name[256]; 125 char d_name[256];
126}; 126};
127 127
128struct compat_ustat {
129 compat_daddr_t f_tfree;
130 compat_ino_t f_tinode;
131 char f_fname[6];
132 char f_fpack[6];
133};
134
128typedef union compat_sigval { 135typedef union compat_sigval {
129 compat_int_t sival_int; 136 compat_int_t sival_int;
130 compat_uptr_t sival_ptr; 137 compat_uptr_t sival_ptr;
@@ -178,6 +185,7 @@ long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
178 unsigned nsems, const struct compat_timespec __user *timeout); 185 unsigned nsems, const struct compat_timespec __user *timeout);
179asmlinkage long compat_sys_keyctl(u32 option, 186asmlinkage long compat_sys_keyctl(u32 option,
180 u32 arg2, u32 arg3, u32 arg4, u32 arg5); 187 u32 arg2, u32 arg3, u32 arg4, u32 arg5);
188asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
181 189
182asmlinkage ssize_t compat_sys_readv(unsigned long fd, 190asmlinkage ssize_t compat_sys_readv(unsigned long fd,
183 const struct compat_iovec __user *vec, unsigned long vlen); 191 const struct compat_iovec __user *vec, unsigned long vlen);