Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'parisc-3.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:
"Changes include:
- wire up the bpf syscall
- remove CONFIG_64BIT usage from some userspace-exported header files
- use compat functions for msgctl, shmat, shmctl and semtimedop
syscalls"

* 'parisc-3.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Avoid using CONFIG_64BIT in userspace exported headers
parisc: Use compat layer for msgctl, shmat, shmctl and semtimedop syscalls
parisc: Use BUILD_BUG() instead of undefined functions
parisc: Wire up bpf syscall

+41 -49
+8 -11
arch/parisc/include/asm/uaccess.h
··· 9 9 #include <asm/errno.h> 10 10 #include <asm-generic/uaccess-unaligned.h> 11 11 12 + #include <linux/bug.h> 13 + 12 14 #define VERIFY_READ 0 13 15 #define VERIFY_WRITE 1 14 16 ··· 30 28 * that put_user is the same as __put_user, etc. 31 29 */ 32 30 33 - extern int __get_kernel_bad(void); 34 - extern int __get_user_bad(void); 35 - extern int __put_kernel_bad(void); 36 - extern int __put_user_bad(void); 37 - 38 31 static inline long access_ok(int type, const void __user * addr, 39 32 unsigned long size) 40 33 { ··· 40 43 #define get_user __get_user 41 44 42 45 #if !defined(CONFIG_64BIT) 43 - #define LDD_KERNEL(ptr) __get_kernel_bad(); 44 - #define LDD_USER(ptr) __get_user_bad(); 46 + #define LDD_KERNEL(ptr) BUILD_BUG() 47 + #define LDD_USER(ptr) BUILD_BUG() 45 48 #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) 46 49 #define STD_USER(x, ptr) __put_user_asm64(x,ptr) 47 50 #define ASM_WORD_INSN ".word\t" ··· 91 94 case 2: __get_kernel_asm("ldh",ptr); break; \ 92 95 case 4: __get_kernel_asm("ldw",ptr); break; \ 93 96 case 8: LDD_KERNEL(ptr); break; \ 94 - default: __get_kernel_bad(); break; \ 97 + default: BUILD_BUG(); break; \ 95 98 } \ 96 99 } \ 97 100 else { \ ··· 100 103 case 2: __get_user_asm("ldh",ptr); break; \ 101 104 case 4: __get_user_asm("ldw",ptr); break; \ 102 105 case 8: LDD_USER(ptr); break; \ 103 - default: __get_user_bad(); break; \ 106 + default: BUILD_BUG(); break; \ 104 107 } \ 105 108 } \ 106 109 \ ··· 133 136 case 2: __put_kernel_asm("sth",__x,ptr); break; \ 134 137 case 4: __put_kernel_asm("stw",__x,ptr); break; \ 135 138 case 8: STD_KERNEL(__x,ptr); break; \ 136 - default: __put_kernel_bad(); break; \ 139 + default: BUILD_BUG(); break; \ 137 140 } \ 138 141 } \ 139 142 else { \ ··· 142 145 case 2: __put_user_asm("sth",__x,ptr); break; \ 143 146 case 4: __put_user_asm("stw",__x,ptr); break; \ 144 147 case 8: STD_USER(__x,ptr); break; \ 145 - default: __put_user_bad(); break; \ 148 + default: BUILD_BUG(); break; \ 146 149 } \ 147 150 } \ 148 151 \
+1 -7
arch/parisc/include/uapi/asm/bitsperlong.h
··· 1 1 #ifndef __ASM_PARISC_BITSPERLONG_H 2 2 #define __ASM_PARISC_BITSPERLONG_H 3 3 4 - /* 5 - * using CONFIG_* outside of __KERNEL__ is wrong, 6 - * __LP64__ was also removed from headers, so what 7 - * is the right approach on parisc? 8 - * -arnd 9 - */ 10 - #if (defined(__KERNEL__) && defined(CONFIG_64BIT)) || defined (__LP64__) 4 + #if defined(__LP64__) 11 5 #define __BITS_PER_LONG 64 12 6 #define SHIFT_PER_LONG 6 13 7 #else
+5 -3
arch/parisc/include/uapi/asm/msgbuf.h
··· 1 1 #ifndef _PARISC_MSGBUF_H 2 2 #define _PARISC_MSGBUF_H 3 3 4 + #include <asm/bitsperlong.h> 5 + 4 6 /* 5 7 * The msqid64_ds structure for parisc architecture, copied from sparc. 6 8 * Note extra padding because this structure is passed back and forth ··· 15 13 16 14 struct msqid64_ds { 17 15 struct ipc64_perm msg_perm; 18 - #ifndef CONFIG_64BIT 16 + #if __BITS_PER_LONG != 64 19 17 unsigned int __pad1; 20 18 #endif 21 19 __kernel_time_t msg_stime; /* last msgsnd time */ 22 - #ifndef CONFIG_64BIT 20 + #if __BITS_PER_LONG != 64 23 21 unsigned int __pad2; 24 22 #endif 25 23 __kernel_time_t msg_rtime; /* last msgrcv time */ 26 - #ifndef CONFIG_64BIT 24 + #if __BITS_PER_LONG != 64 27 25 unsigned int __pad3; 28 26 #endif 29 27 __kernel_time_t msg_ctime; /* last change time */
+4 -2
arch/parisc/include/uapi/asm/sembuf.h
··· 1 1 #ifndef _PARISC_SEMBUF_H 2 2 #define _PARISC_SEMBUF_H 3 3 4 + #include <asm/bitsperlong.h> 5 + 4 6 /* 5 7 * The semid64_ds structure for parisc architecture. 6 8 * Note extra padding because this structure is passed back and forth ··· 15 13 16 14 struct semid64_ds { 17 15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ 18 - #ifndef CONFIG_64BIT 16 + #if __BITS_PER_LONG != 64 19 17 unsigned int __pad1; 20 18 #endif 21 19 __kernel_time_t sem_otime; /* last semop time */ 22 - #ifndef CONFIG_64BIT 20 + #if __BITS_PER_LONG != 64 23 21 unsigned int __pad2; 24 22 #endif 25 23 __kernel_time_t sem_ctime; /* last change time */
+15 -20
arch/parisc/include/uapi/asm/shmbuf.h
··· 1 1 #ifndef _PARISC_SHMBUF_H 2 2 #define _PARISC_SHMBUF_H 3 3 4 + #include <asm/bitsperlong.h> 5 + 4 6 /* 5 7 * The shmid64_ds structure for parisc architecture. 6 8 * Note extra padding because this structure is passed back and forth ··· 15 13 16 14 struct shmid64_ds { 17 15 struct ipc64_perm shm_perm; /* operation perms */ 18 - #ifndef CONFIG_64BIT 16 + #if __BITS_PER_LONG != 64 19 17 unsigned int __pad1; 20 18 #endif 21 19 __kernel_time_t shm_atime; /* last attach time */ 22 - #ifndef CONFIG_64BIT 20 + #if __BITS_PER_LONG != 64 23 21 unsigned int __pad2; 24 22 #endif 25 23 __kernel_time_t shm_dtime; /* last detach time */ 26 - #ifndef CONFIG_64BIT 24 + #if __BITS_PER_LONG != 64 27 25 unsigned int __pad3; 28 26 #endif 29 27 __kernel_time_t shm_ctime; /* last change time */ 30 - #ifndef CONFIG_64BIT 28 + #if __BITS_PER_LONG != 64 31 29 unsigned int __pad4; 32 30 #endif 33 31 size_t shm_segsz; /* size of segment (bytes) */ ··· 38 36 unsigned int __unused2; 39 37 }; 40 38 41 - #ifdef CONFIG_64BIT 42 - /* The 'unsigned int' (formerly 'unsigned long') data types below will 43 - * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on 44 - * a wide kernel, but if some of these values are meant to contain pointers 45 - * they may need to be 'long long' instead. -PB XXX FIXME 46 - */ 47 - #endif 48 39 struct shminfo64 { 49 - unsigned int shmmax; 50 - unsigned int shmmin; 51 - unsigned int shmmni; 52 - unsigned int shmseg; 53 - unsigned int shmall; 54 - unsigned int __unused1; 55 - unsigned int __unused2; 56 - unsigned int __unused3; 57 - unsigned int __unused4; 40 + unsigned long shmmax; 41 + unsigned long shmmin; 42 + unsigned long shmmni; 43 + unsigned long shmseg; 44 + unsigned long shmall; 45 + unsigned long __unused1; 46 + unsigned long __unused2; 47 + unsigned long __unused3; 48 + unsigned long __unused4; 58 49 }; 59 50 60 51 #endif /* _PARISC_SHMBUF_H */
+1 -1
arch/parisc/include/uapi/asm/signal.h
··· 85 85 struct siginfo; 86 86 87 87 /* Type of a signal handler. */ 88 - #ifdef CONFIG_64BIT 88 + #if defined(__LP64__) 89 89 /* function pointers on 64-bit parisc are pointers to little structs and the 90 90 * compiler doesn't support code which changes or tests the address of 91 91 * the function in the little struct. This is really ugly -PB
+2 -1
arch/parisc/include/uapi/asm/unistd.h
··· 833 833 #define __NR_seccomp (__NR_Linux + 338) 834 834 #define __NR_getrandom (__NR_Linux + 339) 835 835 #define __NR_memfd_create (__NR_Linux + 340) 836 + #define __NR_bpf (__NR_Linux + 341) 836 837 837 - #define __NR_Linux_syscalls (__NR_memfd_create + 1) 838 + #define __NR_Linux_syscalls (__NR_bpf + 1) 838 839 839 840 840 841 #define __IGNORE_select /* newselect */
+5 -4
arch/parisc/kernel/syscall_table.S
··· 286 286 ENTRY_COMP(msgsnd) 287 287 ENTRY_COMP(msgrcv) 288 288 ENTRY_SAME(msgget) /* 190 */ 289 - ENTRY_SAME(msgctl) 290 - ENTRY_SAME(shmat) 289 + ENTRY_COMP(msgctl) 290 + ENTRY_COMP(shmat) 291 291 ENTRY_SAME(shmdt) 292 292 ENTRY_SAME(shmget) 293 - ENTRY_SAME(shmctl) /* 195 */ 293 + ENTRY_COMP(shmctl) /* 195 */ 294 294 ENTRY_SAME(ni_syscall) /* streams1 */ 295 295 ENTRY_SAME(ni_syscall) /* streams2 */ 296 296 ENTRY_SAME(lstat64) ··· 323 323 ENTRY_SAME(epoll_ctl) /* 225 */ 324 324 ENTRY_SAME(epoll_wait) 325 325 ENTRY_SAME(remap_file_pages) 326 - ENTRY_SAME(semtimedop) 326 + ENTRY_COMP(semtimedop) 327 327 ENTRY_COMP(mq_open) 328 328 ENTRY_SAME(mq_unlink) /* 230 */ 329 329 ENTRY_COMP(mq_timedsend) ··· 436 436 ENTRY_SAME(seccomp) 437 437 ENTRY_SAME(getrandom) 438 438 ENTRY_SAME(memfd_create) /* 340 */ 439 + ENTRY_SAME(bpf) 439 440 440 441 /* Nothing yet */ 441 442