diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 20 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 8 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 2 |
3 files changed, 25 insertions, 5 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index cc20f0e3a7d3..2d021626c1a6 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -905,6 +905,26 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta | |||
905 | return ret; | 905 | return ret; |
906 | } | 906 | } |
907 | 907 | ||
908 | asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename, | ||
909 | struct stat64_emu31 __user* statbuf, int flag) | ||
910 | { | ||
911 | struct kstat stat; | ||
912 | int error = -EINVAL; | ||
913 | |||
914 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
915 | goto out; | ||
916 | |||
917 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
918 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
919 | else | ||
920 | error = vfs_stat_fd(dfd, filename, &stat); | ||
921 | |||
922 | if (!error) | ||
923 | error = cp_stat64(statbuf, &stat); | ||
924 | out: | ||
925 | return error; | ||
926 | } | ||
927 | |||
908 | /* | 928 | /* |
909 | * Linux/i386 didn't use to be able to handle more than | 929 | * Linux/i386 didn't use to be able to handle more than |
910 | * 4 system call parameters, so these system calls used a memory | 930 | * 4 system call parameters, so these system calls used a memory |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 38a6ef5ec624..dd2d6c3e8df8 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1523,13 +1523,13 @@ compat_sys_futimesat_wrapper: | |||
1523 | llgtr %r4,%r4 # struct timeval * | 1523 | llgtr %r4,%r4 # struct timeval * |
1524 | jg compat_sys_futimesat | 1524 | jg compat_sys_futimesat |
1525 | 1525 | ||
1526 | .globl compat_sys_newfstatat_wrapper | 1526 | .globl sys32_fstatat_wrapper |
1527 | compat_sys_newfstatat_wrapper: | 1527 | sys32_fstatat_wrapper: |
1528 | llgfr %r2,%r2 # unsigned int | 1528 | llgfr %r2,%r2 # unsigned int |
1529 | llgtr %r3,%r3 # char * | 1529 | llgtr %r3,%r3 # char * |
1530 | llgtr %r4,%r4 # struct stat * | 1530 | llgtr %r4,%r4 # struct stat64 * |
1531 | lgfr %r5,%r5 # int | 1531 | lgfr %r5,%r5 # int |
1532 | jg compat_sys_newfstatat | 1532 | jg sys32_fstatat |
1533 | 1533 | ||
1534 | .globl sys_unlinkat_wrapper | 1534 | .globl sys_unlinkat_wrapper |
1535 | sys_unlinkat_wrapper: | 1535 | sys_unlinkat_wrapper: |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index e86a4debb160..84921fe8d266 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -301,7 +301,7 @@ SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper) | |||
301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ | 301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ |
302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) | 302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) |
303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) | 303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) |
304 | SYSCALL(sys_newfstatat,sys_newfstatat,compat_sys_newfstatat_wrapper) | 304 | SYSCALL(sys_fstatat64,sys_newfstatat,sys32_fstatat_wrapper) |
305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) | 305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) |
306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ | 306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ |
307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) | 307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) |