Loading arch/parisc/Makefile +2 −6 Original line number Diff line number Diff line Loading @@ -35,12 +35,8 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align OBJCOPY_FLAGS =-O binary -R .note -R .comment -S GCC_VERSION := $(call cc-version) ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),) $(error Sorry, couldn't find ($(cc-version)).) endif ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),) $(error Sorry, your compiler is too old ($(GCC_VERSION)). GCC v3.3 or above is required.) ifneq ($(call cc-ifversion, -lt, 0303, "bad"),) $(error Sorry, GCC v3.3 or above is required.) endif cflags-y := -pipe Loading arch/parisc/hpux/fs.c +13 −13 Original line number Diff line number Diff line Loading @@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs) int error; char *filename; filename = getname((char *) regs->gr[26]); filename = getname((char __user *) regs->gr[26]); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = do_execve(filename, (char **) regs->gr[25], (char **)regs->gr[24], regs); error = do_execve(filename, (char __user * __user *) regs->gr[25], (char __user * __user *) regs->gr[24], regs); if (error == 0) { task_lock(current); Loading @@ -63,19 +63,19 @@ struct hpux_dirent { }; struct getdents_callback { struct hpux_dirent *current_dir; struct hpux_dirent *previous; struct hpux_dirent __user *current_dir; struct hpux_dirent __user *previous; int count; int error; }; #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) #define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) static int filldir(void * __buf, const char * name, int namlen, loff_t offset, u64 ino, unsigned d_type) { struct hpux_dirent * dirent; struct hpux_dirent __user * dirent; struct getdents_callback * buf = (struct getdents_callback *) __buf; ino_t d_ino; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); Loading Loading @@ -105,10 +105,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, #undef NAME_OFFSET #undef ROUND_UP int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count) int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) { struct file * file; struct hpux_dirent * lastdirent; struct hpux_dirent __user * lastdirent; struct getdents_callback buf; int error = -EBADF; Loading Loading @@ -143,7 +143,7 @@ int hpux_mount(const char *fs, const char *path, int mflag, return -ENOSYS; } static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf) { struct hpux_stat64 tmp; Loading @@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; } long hpux_stat64(char *filename, struct hpux_stat64 *statbuf) long hpux_stat64(char __user *filename, struct hpux_stat64 __user *statbuf) { struct kstat stat; int error = vfs_stat(filename, &stat); Loading @@ -180,7 +180,7 @@ long hpux_stat64(char *filename, struct hpux_stat64 *statbuf) return error; } long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf) long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf) { struct kstat stat; int error = vfs_fstat(fd, &stat); Loading @@ -191,7 +191,7 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf) return error; } long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf) long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf) { struct kstat stat; int error = vfs_lstat(filename, &stat); Loading arch/parisc/hpux/sys_hpux.c +16 −14 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ int hpux_ptrace(void) return -ENOSYS; } int hpux_wait(int *stat_loc) int hpux_wait(int __user *stat_loc) { return sys_waitpid(-1, stat_loc, 0); } Loading Loading @@ -255,7 +255,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf) /* TODO: Are these put_user calls OK? Should they pass an int? * (I copied it from sys_i386.c like this.) */ static int hpux_uname(struct hpux_utsname *name) static int hpux_uname(struct hpux_utsname __user *name) { int error; Loading Loading @@ -300,14 +300,14 @@ static int hpux_uname(struct hpux_utsname *name) /* Note: HP-UX just uses the old suser() function to check perms * in this system call. We'll use capable(CAP_SYS_ADMIN). */ int hpux_utssys(char *ubuf, int n, int type) int hpux_utssys(char __user *ubuf, int n, int type) { int len; int error; switch( type ) { case 0: /* uname(): */ return( hpux_uname( (struct hpux_utsname *)ubuf ) ); return hpux_uname((struct hpux_utsname __user *)ubuf); break ; case 1: /* Obsolete (used to be umask().) */ Loading @@ -315,7 +315,8 @@ int hpux_utssys(char *ubuf, int n, int type) break ; case 2: /* ustat(): */ return( hpux_ustat(new_decode_dev(n), (struct hpux_ustat *)ubuf) ); return hpux_ustat(new_decode_dev(n), (struct hpux_ustat __user *)ubuf); break; case 3: /* setuname(): Loading @@ -332,7 +333,7 @@ int hpux_utssys(char *ubuf, int n, int type) return -EINVAL ; /* Unlike Linux, HP-UX truncates it if n is too big: */ len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; return( sys_sethostname(ubuf, len) ); return sys_sethostname(ubuf, len); break ; case 4: /* sethostname(): Loading @@ -346,7 +347,7 @@ int hpux_utssys(char *ubuf, int n, int type) return -EINVAL ; /* Unlike Linux, HP-UX truncates it if n is too big: */ len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; return( sys_sethostname(ubuf, len) ); return sys_sethostname(ubuf, len); break ; case 5: /* gethostname(): Loading @@ -356,7 +357,7 @@ int hpux_utssys(char *ubuf, int n, int type) /* Unlike Linux, HP-UX returns an error if n==0: */ if ( n <= 0 ) return -EINVAL ; return( sys_gethostname(ubuf, n) ); return sys_gethostname(ubuf, n); break ; case 6: /* Supposedly called from setuname() in libc. Loading Loading @@ -420,7 +421,7 @@ int hpux_utssys(char *ubuf, int n, int type) } } int hpux_getdomainname(char *name, int len) int hpux_getdomainname(char __user *name, int len) { int nlen; int err = -EFAULT; Loading Loading @@ -471,7 +472,8 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1); if ( opcode == 1 ) { /* GETFSIND */ len = strlen_user((char *)arg1); char __user *user_fsname = (char __user *)arg1; len = strlen_user(user_fsname); printk(KERN_DEBUG "len of arg1 = %d\n", len); if (len == 0) return 0; Loading @@ -481,7 +483,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) return 0; } if ( copy_from_user(fsname, (char *)arg1, len) ) { if (copy_from_user(fsname, user_fsname, len)) { printk(KERN_DEBUG "failed to copy_from_user fsname\n"); kfree(fsname); return 0; Loading @@ -495,7 +497,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) fstype = 0; } else { fstype = 0; }; } kfree(fsname); Loading arch/parisc/kernel/drivers.c +5 −3 Original line number Diff line number Diff line Loading @@ -689,7 +689,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath) .fn = check_parent, }; device_for_each_child(parent, &recurse_data, descend_children); if (device_for_each_child(parent, &recurse_data, descend_children)) /* nothing */; return d.dev; } Loading Loading @@ -835,8 +837,8 @@ static void print_parisc_device(struct parisc_device *dev) static int count; print_pa_hwpath(dev, hw_path); printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", ++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type, printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type, dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); if (dev->num_addrs) { Loading arch/parisc/kernel/module.c +2 −1 Original line number Diff line number Diff line Loading @@ -822,7 +822,8 @@ int module_finalize(const Elf_Ehdr *hdr, me->name, strtab, symhdr); if(me->arch.got_count > MAX_GOTS) { printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS); printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n", me->name, me->arch.got_count, MAX_GOTS); return -EINVAL; } Loading Loading
arch/parisc/Makefile +2 −6 Original line number Diff line number Diff line Loading @@ -35,12 +35,8 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align OBJCOPY_FLAGS =-O binary -R .note -R .comment -S GCC_VERSION := $(call cc-version) ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),) $(error Sorry, couldn't find ($(cc-version)).) endif ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),) $(error Sorry, your compiler is too old ($(GCC_VERSION)). GCC v3.3 or above is required.) ifneq ($(call cc-ifversion, -lt, 0303, "bad"),) $(error Sorry, GCC v3.3 or above is required.) endif cflags-y := -pipe Loading
arch/parisc/hpux/fs.c +13 −13 Original line number Diff line number Diff line Loading @@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs) int error; char *filename; filename = getname((char *) regs->gr[26]); filename = getname((char __user *) regs->gr[26]); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = do_execve(filename, (char **) regs->gr[25], (char **)regs->gr[24], regs); error = do_execve(filename, (char __user * __user *) regs->gr[25], (char __user * __user *) regs->gr[24], regs); if (error == 0) { task_lock(current); Loading @@ -63,19 +63,19 @@ struct hpux_dirent { }; struct getdents_callback { struct hpux_dirent *current_dir; struct hpux_dirent *previous; struct hpux_dirent __user *current_dir; struct hpux_dirent __user *previous; int count; int error; }; #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) #define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) static int filldir(void * __buf, const char * name, int namlen, loff_t offset, u64 ino, unsigned d_type) { struct hpux_dirent * dirent; struct hpux_dirent __user * dirent; struct getdents_callback * buf = (struct getdents_callback *) __buf; ino_t d_ino; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); Loading Loading @@ -105,10 +105,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, #undef NAME_OFFSET #undef ROUND_UP int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count) int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) { struct file * file; struct hpux_dirent * lastdirent; struct hpux_dirent __user * lastdirent; struct getdents_callback buf; int error = -EBADF; Loading Loading @@ -143,7 +143,7 @@ int hpux_mount(const char *fs, const char *path, int mflag, return -ENOSYS; } static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf) { struct hpux_stat64 tmp; Loading @@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; } long hpux_stat64(char *filename, struct hpux_stat64 *statbuf) long hpux_stat64(char __user *filename, struct hpux_stat64 __user *statbuf) { struct kstat stat; int error = vfs_stat(filename, &stat); Loading @@ -180,7 +180,7 @@ long hpux_stat64(char *filename, struct hpux_stat64 *statbuf) return error; } long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf) long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf) { struct kstat stat; int error = vfs_fstat(fd, &stat); Loading @@ -191,7 +191,7 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf) return error; } long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf) long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf) { struct kstat stat; int error = vfs_lstat(filename, &stat); Loading
arch/parisc/hpux/sys_hpux.c +16 −14 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ int hpux_ptrace(void) return -ENOSYS; } int hpux_wait(int *stat_loc) int hpux_wait(int __user *stat_loc) { return sys_waitpid(-1, stat_loc, 0); } Loading Loading @@ -255,7 +255,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf) /* TODO: Are these put_user calls OK? Should they pass an int? * (I copied it from sys_i386.c like this.) */ static int hpux_uname(struct hpux_utsname *name) static int hpux_uname(struct hpux_utsname __user *name) { int error; Loading Loading @@ -300,14 +300,14 @@ static int hpux_uname(struct hpux_utsname *name) /* Note: HP-UX just uses the old suser() function to check perms * in this system call. We'll use capable(CAP_SYS_ADMIN). */ int hpux_utssys(char *ubuf, int n, int type) int hpux_utssys(char __user *ubuf, int n, int type) { int len; int error; switch( type ) { case 0: /* uname(): */ return( hpux_uname( (struct hpux_utsname *)ubuf ) ); return hpux_uname((struct hpux_utsname __user *)ubuf); break ; case 1: /* Obsolete (used to be umask().) */ Loading @@ -315,7 +315,8 @@ int hpux_utssys(char *ubuf, int n, int type) break ; case 2: /* ustat(): */ return( hpux_ustat(new_decode_dev(n), (struct hpux_ustat *)ubuf) ); return hpux_ustat(new_decode_dev(n), (struct hpux_ustat __user *)ubuf); break; case 3: /* setuname(): Loading @@ -332,7 +333,7 @@ int hpux_utssys(char *ubuf, int n, int type) return -EINVAL ; /* Unlike Linux, HP-UX truncates it if n is too big: */ len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; return( sys_sethostname(ubuf, len) ); return sys_sethostname(ubuf, len); break ; case 4: /* sethostname(): Loading @@ -346,7 +347,7 @@ int hpux_utssys(char *ubuf, int n, int type) return -EINVAL ; /* Unlike Linux, HP-UX truncates it if n is too big: */ len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; return( sys_sethostname(ubuf, len) ); return sys_sethostname(ubuf, len); break ; case 5: /* gethostname(): Loading @@ -356,7 +357,7 @@ int hpux_utssys(char *ubuf, int n, int type) /* Unlike Linux, HP-UX returns an error if n==0: */ if ( n <= 0 ) return -EINVAL ; return( sys_gethostname(ubuf, n) ); return sys_gethostname(ubuf, n); break ; case 6: /* Supposedly called from setuname() in libc. Loading Loading @@ -420,7 +421,7 @@ int hpux_utssys(char *ubuf, int n, int type) } } int hpux_getdomainname(char *name, int len) int hpux_getdomainname(char __user *name, int len) { int nlen; int err = -EFAULT; Loading Loading @@ -471,7 +472,8 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1); if ( opcode == 1 ) { /* GETFSIND */ len = strlen_user((char *)arg1); char __user *user_fsname = (char __user *)arg1; len = strlen_user(user_fsname); printk(KERN_DEBUG "len of arg1 = %d\n", len); if (len == 0) return 0; Loading @@ -481,7 +483,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) return 0; } if ( copy_from_user(fsname, (char *)arg1, len) ) { if (copy_from_user(fsname, user_fsname, len)) { printk(KERN_DEBUG "failed to copy_from_user fsname\n"); kfree(fsname); return 0; Loading @@ -495,7 +497,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) fstype = 0; } else { fstype = 0; }; } kfree(fsname); Loading
arch/parisc/kernel/drivers.c +5 −3 Original line number Diff line number Diff line Loading @@ -689,7 +689,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath) .fn = check_parent, }; device_for_each_child(parent, &recurse_data, descend_children); if (device_for_each_child(parent, &recurse_data, descend_children)) /* nothing */; return d.dev; } Loading Loading @@ -835,8 +837,8 @@ static void print_parisc_device(struct parisc_device *dev) static int count; print_pa_hwpath(dev, hw_path); printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", ++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type, printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type, dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); if (dev->num_addrs) { Loading
arch/parisc/kernel/module.c +2 −1 Original line number Diff line number Diff line Loading @@ -822,7 +822,8 @@ int module_finalize(const Elf_Ehdr *hdr, me->name, strtab, symhdr); if(me->arch.got_count > MAX_GOTS) { printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS); printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n", me->name, me->arch.got_count, MAX_GOTS); return -EINVAL; } Loading