Commit 20bbb79d authored by Anton Blanchard's avatar Anton Blanchard

ppc64: 32 bit syscall cleanup, first step in making this stuff generic.

parent 18020d06
...@@ -95,8 +95,6 @@ asmlinkage long sys32_utime(char * filename, struct utimbuf32 *times) ...@@ -95,8 +95,6 @@ asmlinkage long sys32_utime(char * filename, struct utimbuf32 *times)
int ret; int ret;
char *filenam; char *filenam;
PPCDBG(PPCDBG_SYS32NI, "sys32_utime - running - filename=%s, times=%p - pid=%ld, comm=%s \n", filename, times, current->pid, current->comm);
if (!times) if (!times)
return sys_utime(filename, NULL); return sys_utime(filename, NULL);
if (get_user(t.actime, &times->actime) || __get_user(t.modtime, &times->modtime)) if (get_user(t.actime, &times->actime) || __get_user(t.modtime, &times->modtime))
...@@ -225,8 +223,6 @@ asmlinkage long sys32_readv(u32 fd, struct iovec32 *vector, u32 count) ...@@ -225,8 +223,6 @@ asmlinkage long sys32_readv(u32 fd, struct iovec32 *vector, u32 count)
struct file *file; struct file *file;
long ret = -EBADF; long ret = -EBADF;
PPCDBG(PPCDBG_SYS32, "sys32_readv - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
file = fget(fd); file = fget(fd);
if(!file) if(!file)
goto bad_file; goto bad_file;
...@@ -237,7 +233,6 @@ asmlinkage long sys32_readv(u32 fd, struct iovec32 *vector, u32 count) ...@@ -237,7 +233,6 @@ asmlinkage long sys32_readv(u32 fd, struct iovec32 *vector, u32 count)
fput(file); fput(file);
bad_file: bad_file:
PPCDBG(PPCDBG_SYS32, "sys32_readv - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -246,8 +241,6 @@ asmlinkage long sys32_writev(u32 fd, struct iovec32 *vector, u32 count) ...@@ -246,8 +241,6 @@ asmlinkage long sys32_writev(u32 fd, struct iovec32 *vector, u32 count)
struct file *file; struct file *file;
int ret = -EBADF; int ret = -EBADF;
PPCDBG(PPCDBG_SYS32, "sys32_writev - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
file = fget(fd); file = fget(fd);
if(!file) if(!file)
goto bad_file; goto bad_file;
...@@ -257,7 +250,6 @@ asmlinkage long sys32_writev(u32 fd, struct iovec32 *vector, u32 count) ...@@ -257,7 +250,6 @@ asmlinkage long sys32_writev(u32 fd, struct iovec32 *vector, u32 count)
fput(file); fput(file);
bad_file: bad_file:
PPCDBG(PPCDBG_SYS32, "sys32_writev - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -404,8 +396,6 @@ asmlinkage long sys32_mount(char *dev_name, char *dir_name, char *type, unsigned ...@@ -404,8 +396,6 @@ asmlinkage long sys32_mount(char *dev_name, char *dir_name, char *type, unsigned
unsigned long dir_page = 0; unsigned long dir_page = 0;
int err, is_smb, is_ncp; int err, is_smb, is_ncp;
PPCDBG(PPCDBG_SYS32, "sys32_mount - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
is_smb = is_ncp = 0; is_smb = is_ncp = 0;
err = copy_mount_stuff_to_kernel((const void *)type, &type_page); err = copy_mount_stuff_to_kernel((const void *)type, &type_page);
...@@ -460,9 +450,6 @@ asmlinkage long sys32_mount(char *dev_name, char *dir_name, char *type, unsigned ...@@ -460,9 +450,6 @@ asmlinkage long sys32_mount(char *dev_name, char *dir_name, char *type, unsigned
free_page(type_page); free_page(type_page);
out: out:
PPCDBG(PPCDBG_SYS32, "sys32_mount - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return err; return err;
} }
...@@ -594,8 +581,6 @@ asmlinkage long sys32_getdents(unsigned int fd, struct linux_dirent32 *dirent, u ...@@ -594,8 +581,6 @@ asmlinkage long sys32_getdents(unsigned int fd, struct linux_dirent32 *dirent, u
struct getdents_callback32 buf; struct getdents_callback32 buf;
int error = -EBADF; int error = -EBADF;
PPCDBG(PPCDBG_SYS32NI, "sys32_getdents - running - fd=%x, pid=%ld, comm=%s \n", fd, current->pid, current->comm);
file = fget(fd); file = fget(fd);
if (!file) if (!file)
goto out; goto out;
...@@ -711,8 +696,6 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x) ...@@ -711,8 +696,6 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x)
long timeout; long timeout;
int ret, size; int ret, size;
PPCDBG(PPCDBG_SYS32X, "sys32_select - entered - n=%x, inp=%p, outp=%p - pid=%ld comm=%s \n", n, inp, outp, current->pid, current->comm);
timeout = MAX_SCHEDULE_TIMEOUT; timeout = MAX_SCHEDULE_TIMEOUT;
if (tvp) { if (tvp) {
time_t sec, usec; time_t sec, usec;
...@@ -776,7 +759,7 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x) ...@@ -776,7 +759,7 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x)
put_user(usec, &tvp->tv_usec); put_user(usec, &tvp->tv_usec);
} }
if (ret < 0) if (ret < 0)
goto out; goto out;
if (!ret) { if (!ret) {
ret = -ERESTARTNOHAND; ret = -ERESTARTNOHAND;
...@@ -793,7 +776,6 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x) ...@@ -793,7 +776,6 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x)
kfree(bits); kfree(bits);
out_nofds: out_nofds:
PPCDBG(PPCDBG_SYS32X, "sys32_select - exited - pid=%ld, comm=%s \n", current->pid, current->comm);
return ret; return ret;
} }
...@@ -894,8 +876,6 @@ asmlinkage long sys32_statfs(const char * path, struct statfs32 *buf) ...@@ -894,8 +876,6 @@ asmlinkage long sys32_statfs(const char * path, struct statfs32 *buf)
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
char *pth; char *pth;
PPCDBG(PPCDBG_SYS32X, "sys32_statfs - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
pth = getname (path); pth = getname (path);
ret = PTR_ERR(pth); ret = PTR_ERR(pth);
if (!IS_ERR(pth)) { if (!IS_ERR(pth)) {
...@@ -907,8 +887,6 @@ asmlinkage long sys32_statfs(const char * path, struct statfs32 *buf) ...@@ -907,8 +887,6 @@ asmlinkage long sys32_statfs(const char * path, struct statfs32 *buf)
return -EFAULT; return -EFAULT;
} }
PPCDBG(PPCDBG_SYS32X, "sys32_statfs - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -920,16 +898,12 @@ asmlinkage long sys32_fstatfs(unsigned int fd, struct statfs32 *buf) ...@@ -920,16 +898,12 @@ asmlinkage long sys32_fstatfs(unsigned int fd, struct statfs32 *buf)
struct statfs s; struct statfs s;
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
PPCDBG(PPCDBG_SYS32X, "sys32_fstatfs - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
set_fs (KERNEL_DS); set_fs (KERNEL_DS);
ret = sys_fstatfs(fd, &s); ret = sys_fstatfs(fd, &s);
set_fs (old_fs); set_fs (old_fs);
if (put_statfs(buf, &s)) if (put_statfs(buf, &s))
return -EFAULT; return -EFAULT;
PPCDBG(PPCDBG_SYS32X, "sys32_fstatfs - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -944,7 +918,6 @@ extern asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long a ...@@ -944,7 +918,6 @@ extern asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long a
*/ */
asmlinkage long sys32_sysfs(u32 option, u32 arg1, u32 arg2) asmlinkage long sys32_sysfs(u32 option, u32 arg1, u32 arg2)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_sysfs - running - pid=%ld, comm=%s\n", current->pid, current->comm);
return sys_sysfs((int)option, arg1, arg2); return sys_sysfs((int)option, arg1, arg2);
} }
...@@ -961,10 +934,6 @@ asmlinkage unsigned long sys32_mremap(unsigned long addr, unsigned long old_len, ...@@ -961,10 +934,6 @@ asmlinkage unsigned long sys32_mremap(unsigned long addr, unsigned long old_len,
unsigned long ret = -EINVAL; unsigned long ret = -EINVAL;
unsigned long new_addr = AA(__new_addr); unsigned long new_addr = AA(__new_addr);
PPCDBG(PPCDBG_SYS32, "sys32_mremap - entered - pid=%ld current=%lx comm=%s\n",
current->pid, current, current->comm);
if (old_len > 0xf0000000UL || new_len > 0xf0000000UL) if (old_len > 0xf0000000UL || new_len > 0xf0000000UL)
goto out; goto out;
if (addr > 0xf0000000UL - old_len) if (addr > 0xf0000000UL - old_len)
...@@ -986,10 +955,6 @@ asmlinkage unsigned long sys32_mremap(unsigned long addr, unsigned long old_len, ...@@ -986,10 +955,6 @@ asmlinkage unsigned long sys32_mremap(unsigned long addr, unsigned long old_len,
out_sem: out_sem:
up_write(&current->mm->mmap_sem); up_write(&current->mm->mmap_sem);
out: out:
PPCDBG(PPCDBG_SYS32, "sys32_mremap - exited - pid=%ld current=%lx comm=%s\n",
current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -1017,8 +982,6 @@ asmlinkage long sys32_adjtimex(struct timex32 *utp) ...@@ -1017,8 +982,6 @@ asmlinkage long sys32_adjtimex(struct timex32 *utp)
struct timex txc; struct timex txc;
int ret; int ret;
PPCDBG(PPCDBG_SYS32, "sys32_adjtimex - running - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
memset(&txc, 0, sizeof(struct timex)); memset(&txc, 0, sizeof(struct timex));
if(get_user(txc.modes, &utp->modes) || if(get_user(txc.modes, &utp->modes) ||
...@@ -1081,9 +1044,6 @@ extern asmlinkage unsigned long sys_create_module(const char *name_user, size_t ...@@ -1081,9 +1044,6 @@ extern asmlinkage unsigned long sys_create_module(const char *name_user, size_t
asmlinkage unsigned long sys32_create_module(const char *name_user, __kernel_size_t32 size) asmlinkage unsigned long sys32_create_module(const char *name_user, __kernel_size_t32 size)
{ {
PPCDBG(PPCDBG_SYS32M, "sys32_create_module - running - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return sys_create_module(name_user, (size_t)size); return sys_create_module(name_user, (size_t)size);
} }
...@@ -1093,9 +1053,6 @@ extern asmlinkage long sys_init_module(const char *name_user, struct module *mod ...@@ -1093,9 +1053,6 @@ extern asmlinkage long sys_init_module(const char *name_user, struct module *mod
asmlinkage long sys32_init_module(const char *name_user, struct module *mod_user) asmlinkage long sys32_init_module(const char *name_user, struct module *mod_user)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_init_module - running - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return sys_init_module(name_user, mod_user); return sys_init_module(name_user, mod_user);
} }
...@@ -1105,9 +1062,6 @@ extern asmlinkage long sys_delete_module(const char *name_user); ...@@ -1105,9 +1062,6 @@ extern asmlinkage long sys_delete_module(const char *name_user);
asmlinkage long sys32_delete_module(const char *name_user) asmlinkage long sys32_delete_module(const char *name_user)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_delete_module - running - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return sys_delete_module(name_user); return sys_delete_module(name_user);
} }
...@@ -1384,9 +1338,6 @@ asmlinkage long sys32_query_module(char *name_user, u32 which, char *buf, __kern ...@@ -1384,9 +1338,6 @@ asmlinkage long sys32_query_module(char *name_user, u32 which, char *buf, __kern
struct module *mod; struct module *mod;
int err; int err;
PPCDBG(PPCDBG_SYS32M, "sys32_query_module - entered - pid=%ld current=%lx comm=%s\n",
current->pid, current, current->comm);
lock_kernel(); lock_kernel();
if (name_user == 0) { if (name_user == 0) {
/* This finds "kernel_module" which is not exported. */ /* This finds "kernel_module" which is not exported. */
...@@ -1439,8 +1390,6 @@ asmlinkage long sys32_query_module(char *name_user, u32 which, char *buf, __kern ...@@ -1439,8 +1390,6 @@ asmlinkage long sys32_query_module(char *name_user, u32 which, char *buf, __kern
out: out:
unlock_kernel(); unlock_kernel();
PPCDBG(PPCDBG_SYS32, "sys32_query_module - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return err; return err;
} }
...@@ -1459,9 +1408,6 @@ asmlinkage long sys32_get_kernel_syms(struct kernel_sym32 *table) ...@@ -1459,9 +1408,6 @@ asmlinkage long sys32_get_kernel_syms(struct kernel_sym32 *table)
struct kernel_sym *tbl; struct kernel_sym *tbl;
mm_segment_t old_fs; mm_segment_t old_fs;
PPCDBG(PPCDBG_SYS32, "sys32_get_kernel_syms - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
len = sys_get_kernel_syms(NULL); len = sys_get_kernel_syms(NULL);
if (!table) return len; if (!table) return len;
tbl = kmalloc (len * sizeof (struct kernel_sym), GFP_KERNEL); tbl = kmalloc (len * sizeof (struct kernel_sym), GFP_KERNEL);
...@@ -1477,8 +1423,6 @@ asmlinkage long sys32_get_kernel_syms(struct kernel_sym32 *table) ...@@ -1477,8 +1423,6 @@ asmlinkage long sys32_get_kernel_syms(struct kernel_sym32 *table)
} }
kfree (tbl); kfree (tbl);
PPCDBG(PPCDBG_SYS32, "sys32_get_kernel_syms - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return i; return i;
} }
...@@ -1486,23 +1430,16 @@ asmlinkage long sys32_get_kernel_syms(struct kernel_sym32 *table) ...@@ -1486,23 +1430,16 @@ asmlinkage long sys32_get_kernel_syms(struct kernel_sym32 *table)
asmlinkage unsigned long sys32_create_module(const char *name_user, size_t size) asmlinkage unsigned long sys32_create_module(const char *name_user, size_t size)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_create_module - running - pid=%ld, comm=%s\n", current->pid, current->comm);
return -ENOSYS; return -ENOSYS;
} }
asmlinkage long sys32_init_module(const char *name_user, struct module *mod_user) asmlinkage long sys32_init_module(const char *name_user, struct module *mod_user)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_init_module - running - pid=%ld, comm=%s\n", current->pid, current->comm);
return -ENOSYS; return -ENOSYS;
} }
asmlinkage long sys32_delete_module(const char *name_user) asmlinkage long sys32_delete_module(const char *name_user)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_delete_module - running - pid=%ld, comm=%s\n", current->pid, current->comm);
return -ENOSYS; return -ENOSYS;
} }
...@@ -1513,20 +1450,15 @@ asmlinkage long sys32_delete_module(const char *name_user) ...@@ -1513,20 +1450,15 @@ asmlinkage long sys32_delete_module(const char *name_user)
*/ */
asmlinkage long sys32_query_module(const char *name_user, u32 which, char *buf, size_t bufsize, size_t *ret) asmlinkage long sys32_query_module(const char *name_user, u32 which, char *buf, size_t bufsize, size_t *ret)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_query_module - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
/* Let the program know about the new interface. Not that it'll do them much good. */ /* Let the program know about the new interface. Not that it'll do them much good. */
if ((int)which == 0) if ((int)which == 0)
return 0; return 0;
PPCDBG(PPCDBG_SYS32, "sys32_query_module - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return -ENOSYS; return -ENOSYS;
} }
asmlinkage long sys32_get_kernel_syms(struct kernel_sym *table) asmlinkage long sys32_get_kernel_syms(struct kernel_sym *table)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_get_kernel_syms - running - pid=%ld, comm=%s\n", current->pid, current->comm);
return -ENOSYS; return -ENOSYS;
} }
...@@ -1893,8 +1825,6 @@ asmlinkage long sys32_nanosleep(struct timespec32 *rqtp, struct timespec32 *rmtp ...@@ -1893,8 +1825,6 @@ asmlinkage long sys32_nanosleep(struct timespec32 *rqtp, struct timespec32 *rmtp
int ret; int ret;
mm_segment_t old_fs = get_fs (); mm_segment_t old_fs = get_fs ();
PPCDBG(PPCDBG_SYS32NI, "sys32_nanosleep - running - pid=%ld, comm=%s \n", current->pid, current->comm);
if (get_user (t.tv_sec, &rqtp->tv_sec) || if (get_user (t.tv_sec, &rqtp->tv_sec) ||
__get_user (t.tv_nsec, &rqtp->tv_nsec)) __get_user (t.tv_nsec, &rqtp->tv_nsec))
return -EFAULT; return -EFAULT;
...@@ -1916,9 +1846,6 @@ asmlinkage long sys32_nanosleep(struct timespec32 *rqtp, struct timespec32 *rmtp ...@@ -1916,9 +1846,6 @@ asmlinkage long sys32_nanosleep(struct timespec32 *rqtp, struct timespec32 *rmtp
/* These are here just in case some old sparc32 binary calls it. */ /* These are here just in case some old sparc32 binary calls it. */
asmlinkage long sys32_pause(void) asmlinkage long sys32_pause(void)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_pause - running - pid=%ld, comm=%s \n", current->pid, current->comm);
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
schedule(); schedule();
...@@ -1974,14 +1901,10 @@ asmlinkage long sys32_getitimer(u32 which, struct itimerval32 *it) ...@@ -1974,14 +1901,10 @@ asmlinkage long sys32_getitimer(u32 which, struct itimerval32 *it)
struct itimerval kit; struct itimerval kit;
int error; int error;
PPCDBG(PPCDBG_SYS32, "sys32_getitimer - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
error = do_getitimer((int)which, &kit); error = do_getitimer((int)which, &kit);
if (!error && put_it32(it, &kit)) if (!error && put_it32(it, &kit))
error = -EFAULT; error = -EFAULT;
PPCDBG(PPCDBG_SYS32, "sys32_getitimer - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return error; return error;
} }
...@@ -1999,8 +1922,6 @@ asmlinkage long sys32_setitimer(u32 which, struct itimerval32 *in, struct itimer ...@@ -1999,8 +1922,6 @@ asmlinkage long sys32_setitimer(u32 which, struct itimerval32 *in, struct itimer
struct itimerval kin, kout; struct itimerval kin, kout;
int error; int error;
PPCDBG(PPCDBG_SYS32, "sys32_setitimer - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
if (in) { if (in) {
if (get_it32(&kin, in)) if (get_it32(&kin, in))
return -EFAULT; return -EFAULT;
...@@ -2013,8 +1934,6 @@ asmlinkage long sys32_setitimer(u32 which, struct itimerval32 *in, struct itimer ...@@ -2013,8 +1934,6 @@ asmlinkage long sys32_setitimer(u32 which, struct itimerval32 *in, struct itimer
if (put_it32(out, &kout)) if (put_it32(out, &kout))
return -EFAULT; return -EFAULT;
PPCDBG(PPCDBG_SYS32, "sys32_setitimer - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return 0; return 0;
} }
...@@ -2049,32 +1968,23 @@ asmlinkage long sys32_old_getrlimit(unsigned int resource, struct rlimit32* rlim ...@@ -2049,32 +1968,23 @@ asmlinkage long sys32_old_getrlimit(unsigned int resource, struct rlimit32* rlim
{ {
struct rlimit x; // 64-bit version of the resource limits. struct rlimit x; // 64-bit version of the resource limits.
struct rlimit32 x32; // 32-bit version of the resource limits. struct rlimit32 x32; // 32-bit version of the resource limits.
long rc = 0;
if (resource >= RLIM_NLIMITS)
if (resource >= RLIM_NLIMITS) {
PPCDBG(PPCDBG_SYS32, "sys32_old_getrlimit - specified resource is too large (%x) - pid=%ld, comm=%s\n", resource, current->pid, current->comm);
return -EINVAL; return -EINVAL;
}
memcpy(&x, current->rlim+resource, sizeof(struct rlimit)); memcpy(&x, current->rlim+resource, sizeof(struct rlimit));
if(x.rlim_cur > RLIM_INFINITY32) if (x.rlim_cur > RLIM_INFINITY32)
x32.rlim_cur = RLIM_INFINITY32; x32.rlim_cur = RLIM_INFINITY32;
else else
x32.rlim_cur = x.rlim_cur; x32.rlim_cur = x.rlim_cur;
if(x.rlim_max > RLIM_INFINITY32) if (x.rlim_max > RLIM_INFINITY32)
x32.rlim_max = RLIM_INFINITY32; x32.rlim_max = RLIM_INFINITY32;
else else
x32.rlim_max = x.rlim_max; x32.rlim_max = x.rlim_max;
rc = (copy_to_user(rlim, &x32, sizeof(x32))) ? (-EFAULT) : 0; return (copy_to_user(rlim, &x32, sizeof(x32))) ? (-EFAULT) : 0;
if (rc == 0) {
PPCDBG(PPCDBG_SYS32, "sys32_old_getrlimit - current=%x, maximum=%x - pid=%ld, comm=%s\n", x32.rlim_cur, x32.rlim_max, current->pid, current->comm);
} else {
PPCDBG(PPCDBG_SYS32, "sys32_old_getrlimit - unable to copy into user's storage - pid=%ld, comm=%s\n", current->pid, current->comm);
}
return rc;
} }
extern asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit *rlim); extern asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit *rlim);
...@@ -2084,8 +1994,6 @@ asmlinkage long sys32_setrlimit(unsigned int resource, struct rlimit32 *rlim) ...@@ -2084,8 +1994,6 @@ asmlinkage long sys32_setrlimit(unsigned int resource, struct rlimit32 *rlim)
long ret; long ret;
mm_segment_t old_fs = get_fs (); mm_segment_t old_fs = get_fs ();
PPCDBG(PPCDBG_SYS32, "sys32_setrlimit - entered - resource=%x, rlim=%p - pid=%ld, comm=%s\n", resource, rlim, current->pid, current->comm);
if (resource >= RLIM_NLIMITS) return -EINVAL; if (resource >= RLIM_NLIMITS) return -EINVAL;
if (get_user (r.rlim_cur, &rlim->rlim_cur) || if (get_user (r.rlim_cur, &rlim->rlim_cur) ||
__get_user (r.rlim_max, &rlim->rlim_max)) __get_user (r.rlim_max, &rlim->rlim_max))
...@@ -2098,7 +2006,6 @@ asmlinkage long sys32_setrlimit(unsigned int resource, struct rlimit32 *rlim) ...@@ -2098,7 +2006,6 @@ asmlinkage long sys32_setrlimit(unsigned int resource, struct rlimit32 *rlim)
ret = sys_setrlimit(resource, &r); ret = sys_setrlimit(resource, &r);
set_fs (old_fs); set_fs (old_fs);
PPCDBG(PPCDBG_SYS32, "sys32_setrlimit - exited w/ ret=%x - pid=%ld, comm=%s\n", ret, current->pid, current->comm);
return ret; return ret;
} }
...@@ -2161,8 +2068,6 @@ asmlinkage long sys32_getrusage(u32 who, struct rusage32 *ru) ...@@ -2161,8 +2068,6 @@ asmlinkage long sys32_getrusage(u32 who, struct rusage32 *ru)
int ret; int ret;
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
PPCDBG(PPCDBG_SYS32X, "sys32_getrusage - running - pid=%ld, comm=%s\n", current->pid, current->comm);
set_fs (KERNEL_DS); set_fs (KERNEL_DS);
ret = sys_getrusage((int)who, &r); ret = sys_getrusage((int)who, &r);
set_fs (old_fs); set_fs (old_fs);
...@@ -2196,8 +2101,6 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 *info) ...@@ -2196,8 +2101,6 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 *info)
int ret, err; int ret, err;
mm_segment_t old_fs = get_fs (); mm_segment_t old_fs = get_fs ();
PPCDBG(PPCDBG_SYS32, "sys32_sysinfo - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
set_fs (KERNEL_DS); set_fs (KERNEL_DS);
ret = sys_sysinfo(&s); ret = sys_sysinfo(&s);
set_fs (old_fs); set_fs (old_fs);
...@@ -2215,8 +2118,6 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 *info) ...@@ -2215,8 +2118,6 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 *info)
if (err) if (err)
return -EFAULT; return -EFAULT;
PPCDBG(PPCDBG_SYS32, "sys32_sysinfo - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -2230,9 +2131,6 @@ extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz); ...@@ -2230,9 +2131,6 @@ extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz);
asmlinkage long sys32_gettimeofday(struct timeval32 *tv, struct timezone *tz) asmlinkage long sys32_gettimeofday(struct timeval32 *tv, struct timezone *tz)
{ {
PPCDBG(PPCDBG_SYS32X, "sys32_gettimeofday - running - pid=%ld, comm=%s\n", current->pid, current->comm);
if (tv) { if (tv) {
struct timeval ktv; struct timeval ktv;
do_gettimeofday(&ktv); do_gettimeofday(&ktv);
...@@ -2254,8 +2152,6 @@ asmlinkage long sys32_settimeofday(struct timeval32 *tv, struct timezone *tz) ...@@ -2254,8 +2152,6 @@ asmlinkage long sys32_settimeofday(struct timeval32 *tv, struct timezone *tz)
struct timeval ktv; struct timeval ktv;
struct timezone ktz; struct timezone ktz;
PPCDBG(PPCDBG_SYS32, "sys32_settimeofday - running - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
if (tv) { if (tv) {
if (get_tv32(&ktv, tv)) if (get_tv32(&ktv, tv))
return -EFAULT; return -EFAULT;
...@@ -2269,8 +2165,6 @@ asmlinkage long sys32_settimeofday(struct timeval32 *tv, struct timezone *tz) ...@@ -2269,8 +2165,6 @@ asmlinkage long sys32_settimeofday(struct timeval32 *tv, struct timezone *tz)
} }
struct tms32 { struct tms32 {
__kernel_clock_t32 tms_utime; __kernel_clock_t32 tms_utime;
__kernel_clock_t32 tms_stime; __kernel_clock_t32 tms_stime;
...@@ -2287,8 +2181,6 @@ asmlinkage long sys32_times(struct tms32 *tbuf) ...@@ -2287,8 +2181,6 @@ asmlinkage long sys32_times(struct tms32 *tbuf)
mm_segment_t old_fs = get_fs (); mm_segment_t old_fs = get_fs ();
int err; int err;
PPCDBG(PPCDBG_SYS32, "sys32_times - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
set_fs (KERNEL_DS); set_fs (KERNEL_DS);
ret = sys_times(tbuf ? &t : NULL); ret = sys_times(tbuf ? &t : NULL);
set_fs (old_fs); set_fs (old_fs);
...@@ -2301,8 +2193,6 @@ asmlinkage long sys32_times(struct tms32 *tbuf) ...@@ -2301,8 +2193,6 @@ asmlinkage long sys32_times(struct tms32 *tbuf)
ret = -EFAULT; ret = -EFAULT;
} }
PPCDBG(PPCDBG_SYS32, "sys32_times - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -2847,9 +2737,6 @@ asmlinkage long sys32_ipc(u32 call, u32 first_parm, u32 second_parm, u32 third_p ...@@ -2847,9 +2737,6 @@ asmlinkage long sys32_ipc(u32 call, u32 first_parm, u32 second_parm, u32 third_p
int third = (int)third_parm; int third = (int)third_parm;
int version, err; int version, err;
PPCDBG(PPCDBG_SYS32, "sys32_ipc - entered - call=%x, parm1=%x, parm2=%x, parm3=%x, parm4=%x, parm5=%x \n",
call, first_parm, second_parm, third_parm, ptr, fifth);
version = call >> 16; /* hack for backward compatibility */ version = call >> 16; /* hack for backward compatibility */
call &= 0xffff; call &= 0xffff;
...@@ -2900,9 +2787,6 @@ asmlinkage long sys32_ipc(u32 call, u32 first_parm, u32 second_parm, u32 third_p ...@@ -2900,9 +2787,6 @@ asmlinkage long sys32_ipc(u32 call, u32 first_parm, u32 second_parm, u32 third_p
err = -EINVAL; err = -EINVAL;
break; break;
} }
PPCDBG(PPCDBG_SYS32, "sys32_ipc - exited w/ %d/0x%x \n", err, err);
return err; return err;
} }
...@@ -2999,9 +2883,6 @@ extern asmlinkage int sys_setsockopt(int fd, int level, int optname, char *optva ...@@ -2999,9 +2883,6 @@ extern asmlinkage int sys_setsockopt(int fd, int level, int optname, char *optva
asmlinkage long sys32_setsockopt(int fd, int level, int optname, char* optval, int optlen) asmlinkage long sys32_setsockopt(int fd, int level, int optname, char* optval, int optlen)
{ {
PPCDBG(PPCDBG_SYS32,"sys32_setsockopt - running - pid=%ld, comm=%s\n", current->pid, current->comm);
if (optname == SO_ATTACH_FILTER) { if (optname == SO_ATTACH_FILTER) {
struct sock_fprog32 { struct sock_fprog32 {
__u16 len; __u16 len;
...@@ -3272,8 +3153,6 @@ asmlinkage long sys32_sendmsg(int fd, struct msghdr32* user_msg, unsigned int us ...@@ -3272,8 +3153,6 @@ asmlinkage long sys32_sendmsg(int fd, struct msghdr32* user_msg, unsigned int us
struct msghdr kern_msg; struct msghdr kern_msg;
int err, total_len; int err, total_len;
PPCDBG(PPCDBG_SYS32, "sys32_sendmsg - entered - fd=%x, user_msg@=%p, user_flags=%x \n", fd, user_msg, user_flags);
if(msghdr_from_user32_to_kern(&kern_msg, user_msg)) if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
return -EFAULT; return -EFAULT;
if(kern_msg.msg_iovlen > UIO_MAXIOV) if(kern_msg.msg_iovlen > UIO_MAXIOV)
...@@ -3306,8 +3185,6 @@ asmlinkage long sys32_sendmsg(int fd, struct msghdr32* user_msg, unsigned int us ...@@ -3306,8 +3185,6 @@ asmlinkage long sys32_sendmsg(int fd, struct msghdr32* user_msg, unsigned int us
if(kern_msg.msg_iov != iov) if(kern_msg.msg_iov != iov)
kfree(kern_msg.msg_iov); kfree(kern_msg.msg_iov);
out: out:
PPCDBG(PPCDBG_SYS32, "sys32_sendmsg - exited w/ %lx \n", err);
return err; return err;
} }
...@@ -3510,8 +3387,6 @@ asmlinkage long sys32_recvmsg(int fd, struct msghdr32* user_msg, unsigned int us ...@@ -3510,8 +3387,6 @@ asmlinkage long sys32_recvmsg(int fd, struct msghdr32* user_msg, unsigned int us
unsigned long cmsg_ptr; unsigned long cmsg_ptr;
int err, total_len, len = 0; int err, total_len, len = 0;
PPCDBG(PPCDBG_SYS32, "sys32_recvmsg - entered - fd=%x, user_msg@=%p, user_flags=%x \n", fd, user_msg, user_flags);
if(msghdr_from_user32_to_kern(&kern_msg, user_msg)) if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
return -EFAULT; return -EFAULT;
if(kern_msg.msg_iovlen > UIO_MAXIOV) if(kern_msg.msg_iovlen > UIO_MAXIOV)
...@@ -3579,7 +3454,6 @@ asmlinkage long sys32_recvmsg(int fd, struct msghdr32* user_msg, unsigned int us ...@@ -3579,7 +3454,6 @@ asmlinkage long sys32_recvmsg(int fd, struct msghdr32* user_msg, unsigned int us
if(err < 0) if(err < 0)
return err; return err;
PPCDBG(PPCDBG_SYS32, "sys32_recvmsg - exited w/ %lx \n", len);
return len; return len;
} }
...@@ -3804,8 +3678,6 @@ extern asmlinkage int sys_prctl(int option, unsigned long arg2, unsigned long ar ...@@ -3804,8 +3678,6 @@ extern asmlinkage int sys_prctl(int option, unsigned long arg2, unsigned long ar
*/ */
asmlinkage long sys32_prctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5) asmlinkage long sys32_prctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_prctl - running - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return sys_prctl((int)option, return sys_prctl((int)option,
(unsigned long) arg2, (unsigned long) arg2,
(unsigned long) arg3, (unsigned long) arg3,
...@@ -3826,8 +3698,6 @@ asmlinkage int sys32_sched_rr_get_interval(u32 pid, struct timespec32 *interval) ...@@ -3826,8 +3698,6 @@ asmlinkage int sys32_sched_rr_get_interval(u32 pid, struct timespec32 *interval)
int ret; int ret;
mm_segment_t old_fs = get_fs (); mm_segment_t old_fs = get_fs ();
PPCDBG(PPCDBG_SYS32, "sys32_sched_rr_get_interval - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
set_fs (KERNEL_DS); set_fs (KERNEL_DS);
ret = sys_sched_rr_get_interval((int)pid, &t); ret = sys_sched_rr_get_interval((int)pid, &t);
set_fs (old_fs); set_fs (old_fs);
...@@ -3835,7 +3705,6 @@ asmlinkage int sys32_sched_rr_get_interval(u32 pid, struct timespec32 *interval) ...@@ -3835,7 +3705,6 @@ asmlinkage int sys32_sched_rr_get_interval(u32 pid, struct timespec32 *interval)
__put_user (t.tv_nsec, &interval->tv_nsec)) __put_user (t.tv_nsec, &interval->tv_nsec))
return -EFAULT; return -EFAULT;
PPCDBG(PPCDBG_SYS32, "sys32_sched_rr_get_interval - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -3844,9 +3713,6 @@ extern asmlinkage int sys_pciconfig_read(unsigned long bus, unsigned long dfn, u ...@@ -3844,9 +3713,6 @@ extern asmlinkage int sys_pciconfig_read(unsigned long bus, unsigned long dfn, u
asmlinkage int sys32_pciconfig_read(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf) asmlinkage int sys32_pciconfig_read(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_pciconfig_read - running - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return sys_pciconfig_read((unsigned long) bus, return sys_pciconfig_read((unsigned long) bus,
(unsigned long) dfn, (unsigned long) dfn,
(unsigned long) off, (unsigned long) off,
...@@ -3862,9 +3728,6 @@ extern asmlinkage int sys_pciconfig_write(unsigned long bus, unsigned long dfn, ...@@ -3862,9 +3728,6 @@ extern asmlinkage int sys_pciconfig_write(unsigned long bus, unsigned long dfn,
asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf) asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_pciconfig_write - running - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return sys_pciconfig_write((unsigned long) bus, return sys_pciconfig_write((unsigned long) bus,
(unsigned long) dfn, (unsigned long) dfn,
(unsigned long) off, (unsigned long) off,
...@@ -3962,8 +3825,6 @@ extern asmlinkage long sys_wait4(pid_t pid, unsigned int * stat_addr, int option ...@@ -3962,8 +3825,6 @@ extern asmlinkage long sys_wait4(pid_t pid, unsigned int * stat_addr, int option
*/ */
asmlinkage long sys32_wait4(u32 pid, unsigned int * stat_addr, u32 options, struct rusage * ru) asmlinkage long sys32_wait4(u32 pid, unsigned int * stat_addr, u32 options, struct rusage * ru)
{ {
PPCDBG(PPCDBG_SYS32, "sys32_wait4 - running - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
if (!ru) if (!ru)
return sys_wait4((int)pid, stat_addr, options, NULL); return sys_wait4((int)pid, stat_addr, options, NULL);
else { else {
......
...@@ -86,8 +86,6 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -86,8 +86,6 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
{ {
int version, ret; int version, ret;
PPCDBG(PPCDBG_SYS64X, "sys_ipc - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
version = call >> 16; /* hack for backward compatibility */ version = call >> 16; /* hack for backward compatibility */
call &= 0xffff; call &= 0xffff;
...@@ -174,7 +172,6 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -174,7 +172,6 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
break; break;
} }
PPCDBG(PPCDBG_SYS64X, "sys_ipc - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret; return ret;
} }
...@@ -187,15 +184,12 @@ asmlinkage int sys_pipe(int *fildes) ...@@ -187,15 +184,12 @@ asmlinkage int sys_pipe(int *fildes)
int fd[2]; int fd[2];
int error; int error;
PPCDBG(PPCDBG_SYS64X, "sys_pipe - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
error = do_pipe(fd); error = do_pipe(fd);
if (!error) { if (!error) {
if (copy_to_user(fildes, fd, 2*sizeof(int))) if (copy_to_user(fildes, fd, 2*sizeof(int)))
error = -EFAULT; error = -EFAULT;
} }
PPCDBG(PPCDBG_SYS64X, "sys_pipe - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return error; return error;
} }
...@@ -206,8 +200,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, ...@@ -206,8 +200,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
struct file * file = NULL; struct file * file = NULL;
unsigned long ret = -EBADF; unsigned long ret = -EBADF;
PPCDBG(PPCDBG_SYS64X, "sys_mmap - entered - addr=%lx, len=%lx - pid=%ld, comm=%s \n", addr, len, current->pid, current->comm);
if (!(flags & MAP_ANONYMOUS)) { if (!(flags & MAP_ANONYMOUS)) {
if (!(file = fget(fd))) if (!(file = fget(fd)))
goto out; goto out;
...@@ -221,9 +213,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, ...@@ -221,9 +213,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
fput(file); fput(file);
out: out:
PPCDBG(PPCDBG_SYS64X, "sys_mmap - exited - ret=%x \n", ret);
return ret; return ret;
} }
...@@ -240,14 +229,11 @@ asmlinkage int sys_uname(struct old_utsname * name) ...@@ -240,14 +229,11 @@ asmlinkage int sys_uname(struct old_utsname * name)
{ {
int err = -EFAULT; int err = -EFAULT;
PPCDBG(PPCDBG_SYS64X, "sys_uname - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
down_read(&uts_sem); down_read(&uts_sem);
if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))
err = 0; err = 0;
up_read(&uts_sem); up_read(&uts_sem);
PPCDBG(PPCDBG_SYS64X, "sys_uname - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return err; return err;
} }
...@@ -255,8 +241,6 @@ asmlinkage int sys_olduname(struct oldold_utsname * name) ...@@ -255,8 +241,6 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
{ {
int error; int error;
PPCDBG(PPCDBG_SYS64X, "sys_olduname - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
if (!name) if (!name)
return -EFAULT; return -EFAULT;
if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
...@@ -277,7 +261,6 @@ asmlinkage int sys_olduname(struct oldold_utsname * name) ...@@ -277,7 +261,6 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
error = error ? -EFAULT : 0; error = error ? -EFAULT : 0;
PPCDBG(PPCDBG_SYS64X, "sys_olduname - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment