Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170003
b: refs/heads/master
c: 4ddf61e
h: refs/heads/master
i:
  170001: 2b94640
  169999: 065ee7e
v: v3
  • Loading branch information
Eric W. Biederman committed Nov 6, 2009
1 parent eb0398a commit a776fab
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 60 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f78a9a5a56418d955f3119cf7380ea911ab4baf6
refs/heads/master: 4ddf61ea99c1bbed4dcd889803c73213e1b3256b
53 changes: 0 additions & 53 deletions trunk/arch/s390/kernel/compat_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,59 +527,6 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
return ret;
}

#ifdef CONFIG_SYSCTL_SYSCALL
struct __sysctl_args32 {
u32 name;
int nlen;
u32 oldval;
u32 oldlenp;
u32 newval;
u32 newlen;
u32 __unused[4];
};

asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
{
struct __sysctl_args32 tmp;
int error;
size_t oldlen;
size_t __user *oldlenp = NULL;
unsigned long addr = (((unsigned long)&args->__unused[0]) + 7) & ~7;

if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;

if (tmp.oldval && tmp.oldlenp) {
/* Duh, this is ugly and might not work if sysctl_args
is in read-only memory, but do_sysctl does indirectly
a lot of uaccess in both directions and we'd have to
basically copy the whole sysctl.c here, and
glibc's __sysctl uses rw memory for the structure
anyway. */
if (get_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp)) ||
put_user(oldlen, (size_t __user *)addr))
return -EFAULT;
oldlenp = (size_t __user *)addr;
}

lock_kernel();
error = do_sysctl(compat_ptr(tmp.name), tmp.nlen, compat_ptr(tmp.oldval),
oldlenp, compat_ptr(tmp.newval), tmp.newlen);
unlock_kernel();
if (oldlenp) {
if (!error) {
if (get_user(oldlen, (size_t __user *)addr) ||
put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp)))
error = -EFAULT;
}
if (copy_to_user(args->__unused, tmp.__unused,
sizeof(tmp.__unused)))
error = -EFAULT;
}
return error;
}
#endif

struct stat64_emu31 {
unsigned long long st_dev;
unsigned int __pad1;
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/s390/kernel/compat_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ struct ucontext32 {
compat_sigset_t uc_sigmask; /* mask last for extensibility */
};

struct __sysctl_args32;
struct stat64_emu31;
struct mmap_arg_struct_emu31;
struct fadvise64_64_args;
Expand Down Expand Up @@ -212,7 +211,6 @@ long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset,
size_t count);
long sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset,
s32 count);
long sys32_sysctl(struct __sysctl_args32 __user *args);
long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf);
long sys32_lstat64(char __user * filename,
struct stat64_emu31 __user * statbuf);
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/s390/kernel/compat_wrapper.S
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,6 @@ sys32_fdatasync_wrapper:
llgfr %r2,%r2 # unsigned int
jg sys_fdatasync # branch to system call

#sys32_sysctl_wrapper # tbd

.globl sys32_mlock_wrapper
sys32_mlock_wrapper:
llgfr %r2,%r2 # unsigned long
Expand Down Expand Up @@ -1087,8 +1085,8 @@ sys32_stime_wrapper:

.globl sys32_sysctl_wrapper
sys32_sysctl_wrapper:
llgtr %r2,%r2 # struct __sysctl_args32 *
jg sys32_sysctl
llgtr %r2,%r2 # struct compat_sysctl_args *
jg compat_sys_sysctl

.globl sys32_fstat64_wrapper
sys32_fstat64_wrapper:
Expand Down

0 comments on commit a776fab

Please sign in to comment.