Commit 462710a0 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 932e3f90 64163067
...@@ -54,7 +54,7 @@ struct systemcfg *systemcfg; ...@@ -54,7 +54,7 @@ struct systemcfg *systemcfg;
.xFPRegsInUse = 1, \ .xFPRegsInUse = 1, \
.xDynProcStatus = 2, \ .xDynProcStatus = 2, \
.xDecrVal = 0x00ff0000, \ .xDecrVal = 0x00ff0000, \
.xEndOfQuantum = 0xffffffffffffffff \ .xEndOfQuantum = 0xfffffffffffffffful \
}, \ }, \
.xRegSav = { \ .xRegSav = { \
.xDesc = 0xd397d9e2, /* "LpRS" */ \ .xDesc = 0xd397d9e2, /* "LpRS" */ \
......
...@@ -410,7 +410,7 @@ int sys_clone(unsigned long clone_flags, unsigned long p2, unsigned long p3, ...@@ -410,7 +410,7 @@ int sys_clone(unsigned long clone_flags, unsigned long p2, unsigned long p3,
} }
return do_fork(clone_flags & ~CLONE_IDLETASK, p2, regs, 0, return do_fork(clone_flags & ~CLONE_IDLETASK, p2, regs, 0,
(int *)parent_tidptr, (int *)child_tidptr); (int __user *)parent_tidptr, (int __user *)child_tidptr);
} }
int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3, int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
...@@ -435,7 +435,7 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, ...@@ -435,7 +435,7 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
int error; int error;
char * filename; char * filename;
filename = getname((char *) a0); filename = getname((char __user *) a0);
error = PTR_ERR(filename); error = PTR_ERR(filename);
if (IS_ERR(filename)) if (IS_ERR(filename))
goto out; goto out;
...@@ -445,7 +445,8 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, ...@@ -445,7 +445,8 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
if (regs->msr & MSR_VEC) if (regs->msr & MSR_VEC)
giveup_altivec(current); giveup_altivec(current);
#endif /* CONFIG_ALTIVEC */ #endif /* CONFIG_ALTIVEC */
error = do_execve(filename, (char **) a1, (char **) a2, regs); error = do_execve(filename, (char __user * __user *) a1,
(char __user * __user *) a2, regs);
if (error == 0) if (error == 0)
current->ptrace &= ~PT_DTRACE; current->ptrace &= ~PT_DTRACE;
......
This diff is collapsed.
...@@ -57,7 +57,7 @@ check_bugs(void) ...@@ -57,7 +57,7 @@ check_bugs(void)
* This is really horribly ugly. * This is really horribly ugly.
*/ */
asmlinkage int asmlinkage int
sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) sys_ipc (uint call, int first, int second, long third, void __user *ptr, long fifth)
{ {
int version, ret; int version, ret;
...@@ -67,12 +67,12 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -67,12 +67,12 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret = -ENOSYS; ret = -ENOSYS;
switch (call) { switch (call) {
case SEMOP: case SEMOP:
ret = sys_semtimedop (first, (struct sembuf *)ptr, second, ret = sys_semtimedop (first, (struct sembuf __user *)ptr, second,
NULL); NULL);
break; break;
case SEMTIMEDOP: case SEMTIMEDOP:
ret = sys_semtimedop (first, (struct sembuf *)ptr, second, ret = sys_semtimedop (first, (struct sembuf __user *)ptr, second,
(const struct timespec *) fifth); (const struct timespec __user *) fifth);
break; break;
case SEMGET: case SEMGET:
ret = sys_semget (first, second, third); ret = sys_semget (first, second, third);
...@@ -83,13 +83,13 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -83,13 +83,13 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret = -EINVAL; ret = -EINVAL;
if (!ptr) if (!ptr)
break; break;
if ((ret = get_user(fourth.__pad, (void **)ptr))) if ((ret = get_user(fourth.__pad, (void __user * __user *)ptr)))
break; break;
ret = sys_semctl (first, second, third, fourth); ret = sys_semctl (first, second, third, fourth);
break; break;
} }
case MSGSND: case MSGSND:
ret = sys_msgsnd (first, (struct msgbuf *) ptr, second, third); ret = sys_msgsnd (first, (struct msgbuf __user *) ptr, second, third);
break; break;
case MSGRCV: case MSGRCV:
switch (version) { switch (version) {
...@@ -100,7 +100,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -100,7 +100,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
if (!ptr) if (!ptr)
break; break;
if ((ret = copy_from_user(&tmp, if ((ret = copy_from_user(&tmp,
(struct ipc_kludge *) ptr, (struct ipc_kludge __user *) ptr,
sizeof (tmp)) ? -EFAULT : 0)) sizeof (tmp)) ? -EFAULT : 0))
break; break;
ret = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, ret = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp,
...@@ -108,7 +108,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -108,7 +108,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
break; break;
} }
default: default:
ret = sys_msgrcv (first, (struct msgbuf *) ptr, ret = sys_msgrcv (first, (struct msgbuf __user *) ptr,
second, fifth, third); second, fifth, third);
break; break;
} }
...@@ -117,35 +117,35 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -117,35 +117,35 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret = sys_msgget ((key_t) first, second); ret = sys_msgget ((key_t) first, second);
break; break;
case MSGCTL: case MSGCTL:
ret = sys_msgctl (first, second, (struct msqid_ds *) ptr); ret = sys_msgctl (first, second, (struct msqid_ds __user *) ptr);
break; break;
case SHMAT: case SHMAT:
switch (version) { switch (version) {
default: { default: {
ulong raddr; ulong raddr;
ret = do_shmat (first, (char *) ptr, second, &raddr); ret = do_shmat (first, (char __user *) ptr, second, &raddr);
if (ret) if (ret)
break; break;
ret = put_user (raddr, (ulong *) third); ret = put_user (raddr, (ulong __user *) third);
break; break;
} }
case 1: /* iBCS2 emulator entry point */ case 1: /* iBCS2 emulator entry point */
ret = -EINVAL; ret = -EINVAL;
if (!segment_eq(get_fs(), get_ds())) if (!segment_eq(get_fs(), get_ds()))
break; break;
ret = do_shmat (first, (char *) ptr, second, ret = do_shmat (first, (char __user *) ptr, second,
(ulong *) third); (ulong *) third);
break; break;
} }
break; break;
case SHMDT: case SHMDT:
ret = sys_shmdt ((char *)ptr); ret = sys_shmdt ((char __user *)ptr);
break; break;
case SHMGET: case SHMGET:
ret = sys_shmget (first, second, third); ret = sys_shmget (first, second, third);
break; break;
case SHMCTL: case SHMCTL:
ret = sys_shmctl (first, second, (struct shmid_ds *) ptr); ret = sys_shmctl (first, second, (struct shmid_ds __user *) ptr);
break; break;
} }
...@@ -156,7 +156,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth) ...@@ -156,7 +156,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
* sys_pipe() is the normal C calling standard for creating * sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though. * a pipe. It's not the way unix traditionally does this, though.
*/ */
asmlinkage int sys_pipe(int *fildes) asmlinkage int sys_pipe(int __user *fildes)
{ {
int fd[2]; int fd[2];
int error; int error;
...@@ -202,7 +202,7 @@ static int __init set_fakeppc(char *str) ...@@ -202,7 +202,7 @@ static int __init set_fakeppc(char *str)
} }
__setup("fakeppc", set_fakeppc); __setup("fakeppc", set_fakeppc);
asmlinkage int sys_uname(struct old_utsname * name) asmlinkage int sys_uname(struct old_utsname __user * name)
{ {
int err = -EFAULT; int err = -EFAULT;
...@@ -214,7 +214,7 @@ asmlinkage int sys_uname(struct old_utsname * name) ...@@ -214,7 +214,7 @@ asmlinkage int sys_uname(struct old_utsname * name)
return err; return err;
} }
asmlinkage time_t sys64_time(time_t* tloc) asmlinkage time_t sys64_time(time_t __user * tloc)
{ {
time_t secs; time_t secs;
time_t usecs; time_t usecs;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
* Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/ */
#include <linux/config.h>
#include <asm/errno.h> #include <asm/errno.h>
/* NOTE: call as jump breaks return stack, we have to avoid that */ /* NOTE: call as jump breaks return stack, we have to avoid that */
...@@ -79,6 +80,18 @@ sys32_mq_timedreceive: ...@@ -79,6 +80,18 @@ sys32_mq_timedreceive:
jmpl %g1 + %lo(compat_sys_mq_timedreceive), %g0 jmpl %g1 + %lo(compat_sys_mq_timedreceive), %g0
srl %o4, 0, %o4 srl %o4, 0, %o4
.globl sys32_select
sys32_select:
sethi %hi(compat_sys_select), %g1
jmpl %g1 + %lo(compat_sys_select), %g0
srl %o4, 0, %o4
.globl sys32_futex
sys32_futex:
sethi %hi(compat_sys_futex), %g1
jmpl %g1 + %lo(compat_sys_futex), %g0
srl %o4, 0, %o4
.align 32 .align 32
.globl sys32_socketcall .globl sys32_socketcall
sys32_socketcall: /* %o0=call, %o1=args */ sys32_socketcall: /* %o0=call, %o1=args */
......
...@@ -37,7 +37,7 @@ sys_call_table32: ...@@ -37,7 +37,7 @@ sys_call_table32:
.word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys32_getgroups16 .word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys32_getgroups16
/*80*/ .word sys32_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64 /*80*/ .word sys32_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64
.word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid .word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
/*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, compat_sys_select, sys_setfsgid /*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid
.word sys_fsync, sys_setpriority32, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall .word sys_fsync, sys_setpriority32, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
/*100*/ .word sys_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending /*100*/ .word sys_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending
.word sys32_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid .word sys32_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
...@@ -47,7 +47,7 @@ sys_call_table32: ...@@ -47,7 +47,7 @@ sys_call_table32:
.word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate .word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate
/*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall /*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys_mkdir, sys_rmdir, sys32_utimes, sys_stat64 .word sys_nis_syscall, sys_mkdir, sys_rmdir, sys32_utimes, sys_stat64
/*140*/ .word sys32_sendfile64, sys_nis_syscall, compat_sys_futex, sys_gettid, compat_sys_getrlimit /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit
.word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
/*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 /*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
.word compat_sys_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount .word compat_sys_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
...@@ -65,7 +65,7 @@ sys_call_table32: ...@@ -65,7 +65,7 @@ sys_call_table32:
.word sys32_ipc, sys32_sigreturn, sys_clone, sys_nis_syscall, sys32_adjtimex .word sys32_ipc, sys32_sigreturn, sys_clone, sys_nis_syscall, sys32_adjtimex
/*220*/ .word compat_sys_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys_getpgid /*220*/ .word compat_sys_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys_getpgid
.word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16 .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
/*230*/ .word compat_sys_select, sys_time, sys_nis_syscall, sys_stime, compat_statfs64 /*230*/ .word sys32_select, sys_time, sys_nis_syscall, sys_stime, compat_statfs64
.word compat_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall .word compat_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler /*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
.word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ extern unsigned long dec_kn_slot_size; ...@@ -23,7 +23,7 @@ extern unsigned long dec_kn_slot_size;
#define RTC_PORT(x) CPHYSADDR(dec_rtc_base) #define RTC_PORT(x) CPHYSADDR(dec_rtc_base)
#define RTC_IO_EXTENT dec_kn_slot_size #define RTC_IO_EXTENT dec_kn_slot_size
#define RTC_IOMAPPED 0 #define RTC_IOMAPPED 0
#define RTC_IRQ 0 #undef RTC_IRQ
#define RTC_DEC_YEAR 0x3f /* Where we store the real year on DECs. */ #define RTC_DEC_YEAR 0x3f /* Where we store the real year on DECs. */
......
...@@ -117,12 +117,12 @@ typedef u32 compat_sigset_word; ...@@ -117,12 +117,12 @@ typedef u32 compat_sigset_word;
*/ */
typedef u32 compat_uptr_t; typedef u32 compat_uptr_t;
static inline void *compat_ptr(compat_uptr_t uptr) static inline void __user *compat_ptr(compat_uptr_t uptr)
{ {
return (void *)(unsigned long)uptr; return (void __user *)(unsigned long)uptr;
} }
static inline void *compat_alloc_user_space(long len) static inline void __user *compat_alloc_user_space(long len)
{ {
struct pt_regs *regs = current->thread.regs; struct pt_regs *regs = current->thread.regs;
unsigned long usp = regs->gpr[1]; unsigned long usp = regs->gpr[1];
...@@ -134,7 +134,7 @@ static inline void *compat_alloc_user_space(long len) ...@@ -134,7 +134,7 @@ static inline void *compat_alloc_user_space(long len)
if (!(test_thread_flag(TIF_32BIT))) if (!(test_thread_flag(TIF_32BIT)))
usp -= 288; usp -= 288;
return (void *) (usp - len); return (void __user *) (usp - len);
} }
/* /*
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
struct ipc_kludge { struct ipc_kludge {
struct msgbuf *msgp; struct msgbuf __user *msgp;
long msgtyp; long msgtyp;
}; };
......
...@@ -455,7 +455,7 @@ int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3, ...@@ -455,7 +455,7 @@ int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3, int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
unsigned long p4, unsigned long p5, unsigned long p6, unsigned long p4, unsigned long p5, unsigned long p6,
struct pt_regs *regs); struct pt_regs *regs);
int sys_pipe(int *fildes); int sys_pipe(int __user *fildes);
int sys_ptrace(long request, long pid, long addr, long data); int sys_ptrace(long request, long pid, long addr, long data);
struct sigaction; struct sigaction;
long sys_rt_sigaction(int sig, const struct sigaction __user *act, long sys_rt_sigaction(int sig, const struct sigaction __user *act,
......
...@@ -362,7 +362,7 @@ static int getequalizer(int __user *arg, ...@@ -362,7 +362,7 @@ static int getequalizer(int __user *arg,
static int aci_mixer_ioctl (int dev, unsigned int cmd, void __user * arg) static int aci_mixer_ioctl (int dev, unsigned int cmd, void __user * arg)
{ {
int vol, buf; int vol, buf;
int __user *p; int __user *p = arg;
switch (cmd) { switch (cmd) {
case SOUND_MIXER_WRITE_VOLUME: case SOUND_MIXER_WRITE_VOLUME:
......
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