int ret;
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)
return sys_utime(filename, NULL);
if (get_user(t.actime, ×->actime) || __get_user(t.modtime, ×->modtime))
struct file *file;
long ret = -EBADF;
- PPCDBG(PPCDBG_SYS32, "sys32_readv - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
file = fget(fd);
if(!file)
goto bad_file;
fput(file);
bad_file:
- PPCDBG(PPCDBG_SYS32, "sys32_readv - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret;
}
struct file *file;
int ret = -EBADF;
- PPCDBG(PPCDBG_SYS32, "sys32_writev - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
file = fget(fd);
if(!file)
goto bad_file;
fput(file);
bad_file:
- PPCDBG(PPCDBG_SYS32, "sys32_writev - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
return ret;
}
unsigned long dir_page = 0;
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;
err = copy_mount_stuff_to_kernel((const void *)type, &type_page);
free_page(type_page);
out:
-
- PPCDBG(PPCDBG_SYS32, "sys32_mount - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
return err;
}
struct getdents_callback32 buf;
int error = -EBADF;
- PPCDBG(PPCDBG_SYS32NI, "sys32_getdents - running - fd=%x, pid=%ld, comm=%s \n", fd, current->pid, current->comm);
-
file = fget(fd);
if (!file)
goto out;
long timeout;
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;
if (tvp) {
time_t sec, usec;
put_user(usec, &tvp->tv_usec);
}
- if (ret < 0)
+ if (ret < 0)
goto out;
if (!ret) {
ret = -ERESTARTNOHAND;
kfree(bits);
out_nofds:
- PPCDBG(PPCDBG_SYS32X, "sys32_select - exited - pid=%ld, comm=%s \n", current->pid, current->comm);
return ret;
}
mm_segment_t old_fs = get_fs();
char *pth;
- PPCDBG(PPCDBG_SYS32X, "sys32_statfs - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
pth = getname (path);
ret = PTR_ERR(pth);
if (!IS_ERR(pth)) {
return -EFAULT;
}
- PPCDBG(PPCDBG_SYS32X, "sys32_statfs - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
return ret;
}
struct statfs s;
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);
ret = sys_fstatfs(fd, &s);
set_fs (old_fs);
if (put_statfs(buf, &s))
return -EFAULT;
- PPCDBG(PPCDBG_SYS32X, "sys32_fstatfs - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
return ret;
}
*/
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);
}
unsigned long ret = -EINVAL;
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)
goto out;
if (addr > 0xf0000000UL - old_len)
out_sem:
up_write(¤t->mm->mmap_sem);
out:
-
- PPCDBG(PPCDBG_SYS32, "sys32_mremap - exited - pid=%ld current=%lx comm=%s\n",
- current->pid, current, current->comm);
-
return ret;
}
struct timex txc;
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));
if(get_user(txc.modes, &utp->modes) ||
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);
}
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);
}
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);
}
struct module *mod;
int err;
- PPCDBG(PPCDBG_SYS32M, "sys32_query_module - entered - pid=%ld current=%lx comm=%s\n",
- current->pid, current, current->comm);
-
lock_kernel();
if (name_user == 0) {
/* This finds "kernel_module" which is not exported. */
out:
unlock_kernel();
- PPCDBG(PPCDBG_SYS32, "sys32_query_module - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
return err;
}
struct kernel_sym *tbl;
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);
if (!table) return len;
tbl = kmalloc (len * sizeof (struct kernel_sym), GFP_KERNEL);
}
kfree (tbl);
- PPCDBG(PPCDBG_SYS32, "sys32_get_kernel_syms - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
return i;
}
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;
}
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;
}
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;
}
*/
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. */
if ((int)which == 0)
return 0;
- PPCDBG(PPCDBG_SYS32, "sys32_query_module - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return -ENOSYS;
}
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;
}
int ret;
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) ||
__get_user (t.tv_nsec, &rqtp->tv_nsec))
return -EFAULT;
/* These are here just in case some old sparc32 binary calls it. */
asmlinkage long sys32_pause(void)
{
-
- PPCDBG(PPCDBG_SYS32, "sys32_pause - running - pid=%ld, comm=%s \n", current->pid, current->comm);
-
current->state = TASK_INTERRUPTIBLE;
schedule();
struct itimerval kit;
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);
if (!error && put_it32(it, &kit))
error = -EFAULT;
-
- PPCDBG(PPCDBG_SYS32, "sys32_getitimer - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return error;
}
struct itimerval kin, kout;
int error;
- PPCDBG(PPCDBG_SYS32, "sys32_setitimer - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
if (in) {
if (get_it32(&kin, in))
return -EFAULT;
if (put_it32(out, &kout))
return -EFAULT;
-
- PPCDBG(PPCDBG_SYS32, "sys32_setitimer - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
return 0;
}
{
struct rlimit x; // 64-bit version of the resource limits.
struct rlimit32 x32; // 32-bit version of the resource limits.
- long rc = 0;
-
- 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);
+
+ if (resource >= RLIM_NLIMITS)
return -EINVAL;
- }
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;
else
x32.rlim_cur = x.rlim_cur;
- if(x.rlim_max > RLIM_INFINITY32)
+ if (x.rlim_max > RLIM_INFINITY32)
x32.rlim_max = RLIM_INFINITY32;
else
x32.rlim_max = x.rlim_max;
- rc = (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;
+ return (copy_to_user(rlim, &x32, sizeof(x32))) ? (-EFAULT) : 0;
}
extern asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit *rlim);
long ret;
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 (get_user (r.rlim_cur, &rlim->rlim_cur) ||
__get_user (r.rlim_max, &rlim->rlim_max))
ret = sys_setrlimit(resource, &r);
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;
}
int ret;
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);
ret = sys_getrusage((int)who, &r);
set_fs (old_fs);
int ret, err;
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);
ret = sys_sysinfo(&s);
set_fs (old_fs);
if (err)
return -EFAULT;
- PPCDBG(PPCDBG_SYS32, "sys32_sysinfo - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
return ret;
}
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) {
struct timeval ktv;
do_gettimeofday(&ktv);
struct timeval ktv;
struct timezone ktz;
- PPCDBG(PPCDBG_SYS32, "sys32_settimeofday - running - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
if (tv) {
if (get_tv32(&ktv, tv))
return -EFAULT;
}
-
-
struct tms32 {
__kernel_clock_t32 tms_utime;
__kernel_clock_t32 tms_stime;
mm_segment_t old_fs = get_fs ();
int err;
- PPCDBG(PPCDBG_SYS32, "sys32_times - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
set_fs (KERNEL_DS);
ret = sys_times(tbuf ? &t : NULL);
set_fs (old_fs);
ret = -EFAULT;
}
- PPCDBG(PPCDBG_SYS32, "sys32_times - exited - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
return ret;
}
int third = (int)third_parm;
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 */
call &= 0xffff;
err = -EINVAL;
break;
}
-
-
- PPCDBG(PPCDBG_SYS32, "sys32_ipc - exited w/ %d/0x%x \n", err, err);
return err;
}
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) {
struct sock_fprog32 {
__u16 len;
struct msghdr kern_msg;
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))
return -EFAULT;
if(kern_msg.msg_iovlen > UIO_MAXIOV)
if(kern_msg.msg_iov != iov)
kfree(kern_msg.msg_iov);
out:
-
- PPCDBG(PPCDBG_SYS32, "sys32_sendmsg - exited w/ %lx \n", err);
return err;
}
unsigned long cmsg_ptr;
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))
return -EFAULT;
if(kern_msg.msg_iovlen > UIO_MAXIOV)
if(err < 0)
return err;
- PPCDBG(PPCDBG_SYS32, "sys32_recvmsg - exited w/ %lx \n", len);
return len;
}
*/
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,
(unsigned long) arg2,
(unsigned long) arg3,
int ret;
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);
ret = sys_sched_rr_get_interval((int)pid, &t);
set_fs (old_fs);
__put_user (t.tv_nsec, &interval->tv_nsec))
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;
}
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,
(unsigned long) dfn,
(unsigned long) off,
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,
(unsigned long) dfn,
(unsigned long) off,
*/
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)
return sys_wait4((int)pid, stat_addr, options, NULL);
else {