diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
| commit | bb799d3b980eb803ca2da4a4eefbd9308f8d988a (patch) | |
| tree | 69fbe0cd6d47b23a50f5e1d87bf7489532fae149 /arch/parisc/include | |
| parent | 919fc6e34831d1c2b58bfb5ae261dc3facc9b269 (diff) | |
| parent | 319e2e3f63c348a9b66db4667efa73178e18b17d (diff) | |
Merge tag 'v3.13-rc4' into core/locking
Merge Linux 3.13-rc4, to refresh this rather old tree with the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/parisc/include')
| -rw-r--r-- | arch/parisc/include/asm/serial.h | 2 | ||||
| -rw-r--r-- | arch/parisc/include/asm/socket.h | 11 | ||||
| -rw-r--r-- | arch/parisc/include/asm/uaccess.h | 46 | ||||
| -rw-r--r-- | arch/parisc/include/uapi/asm/socket.h | 11 |
4 files changed, 18 insertions, 52 deletions
diff --git a/arch/parisc/include/asm/serial.h b/arch/parisc/include/asm/serial.h index d7e3cc60dbc3..77e9b67c87ee 100644 --- a/arch/parisc/include/asm/serial.h +++ b/arch/parisc/include/asm/serial.h | |||
| @@ -6,5 +6,3 @@ | |||
| 6 | * This is used for 16550-compatible UARTs | 6 | * This is used for 16550-compatible UARTs |
| 7 | */ | 7 | */ |
| 8 | #define BASE_BAUD ( 1843200 / 16 ) | 8 | #define BASE_BAUD ( 1843200 / 16 ) |
| 9 | |||
| 10 | #define SERIAL_PORT_DFNS | ||
diff --git a/arch/parisc/include/asm/socket.h b/arch/parisc/include/asm/socket.h new file mode 100644 index 000000000000..748016cb122d --- /dev/null +++ b/arch/parisc/include/asm/socket.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef _ASM_SOCKET_H | ||
| 2 | #define _ASM_SOCKET_H | ||
| 3 | |||
| 4 | #include <uapi/asm/socket.h> | ||
| 5 | |||
| 6 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we | ||
| 7 | * have to define SOCK_NONBLOCK to a different value here. | ||
| 8 | */ | ||
| 9 | #define SOCK_NONBLOCK 0x40000000 | ||
| 10 | |||
| 11 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 63f4dd0b49c2..4006964d8e12 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h | |||
| @@ -4,14 +4,11 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * User space memory access functions | 5 | * User space memory access functions |
| 6 | */ | 6 | */ |
| 7 | #include <asm/processor.h> | ||
| 8 | #include <asm/page.h> | 7 | #include <asm/page.h> |
| 9 | #include <asm/cache.h> | 8 | #include <asm/cache.h> |
| 10 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
| 11 | #include <asm-generic/uaccess-unaligned.h> | 10 | #include <asm-generic/uaccess-unaligned.h> |
| 12 | 11 | ||
| 13 | #include <linux/sched.h> | ||
| 14 | |||
| 15 | #define VERIFY_READ 0 | 12 | #define VERIFY_READ 0 |
| 16 | #define VERIFY_WRITE 1 | 13 | #define VERIFY_WRITE 1 |
| 17 | 14 | ||
| @@ -36,43 +33,12 @@ extern int __get_user_bad(void); | |||
| 36 | extern int __put_kernel_bad(void); | 33 | extern int __put_kernel_bad(void); |
| 37 | extern int __put_user_bad(void); | 34 | extern int __put_user_bad(void); |
| 38 | 35 | ||
| 39 | 36 | static inline long access_ok(int type, const void __user * addr, | |
| 40 | /* | 37 | unsigned long size) |
| 41 | * Test whether a block of memory is a valid user space address. | ||
| 42 | * Returns 0 if the range is valid, nonzero otherwise. | ||
| 43 | */ | ||
| 44 | static inline int __range_not_ok(unsigned long addr, unsigned long size, | ||
| 45 | unsigned long limit) | ||
| 46 | { | 38 | { |
| 47 | unsigned long __newaddr = addr + size; | 39 | return 1; |
| 48 | return (__newaddr < addr || __newaddr > limit || size > limit); | ||
| 49 | } | 40 | } |
| 50 | 41 | ||
| 51 | /** | ||
| 52 | * access_ok: - Checks if a user space pointer is valid | ||
| 53 | * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that | ||
| 54 | * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe | ||
| 55 | * to write to a block, it is always safe to read from it. | ||
| 56 | * @addr: User space pointer to start of block to check | ||
| 57 | * @size: Size of block to check | ||
| 58 | * | ||
| 59 | * Context: User context only. This function may sleep. | ||
| 60 | * | ||
| 61 | * Checks if a pointer to a block of memory in user space is valid. | ||
| 62 | * | ||
| 63 | * Returns true (nonzero) if the memory block may be valid, false (zero) | ||
| 64 | * if it is definitely invalid. | ||
| 65 | * | ||
| 66 | * Note that, depending on architecture, this function probably just | ||
| 67 | * checks that the pointer is in the user space range - after calling | ||
| 68 | * this function, memory access functions may still return -EFAULT. | ||
| 69 | */ | ||
| 70 | #define access_ok(type, addr, size) \ | ||
| 71 | ( __chk_user_ptr(addr), \ | ||
| 72 | !__range_not_ok((unsigned long) (__force void *) (addr), \ | ||
| 73 | size, user_addr_max()) \ | ||
| 74 | ) | ||
| 75 | |||
| 76 | #define put_user __put_user | 42 | #define put_user __put_user |
| 77 | #define get_user __get_user | 43 | #define get_user __get_user |
| 78 | 44 | ||
| @@ -253,11 +219,7 @@ extern long lstrnlen_user(const char __user *,long); | |||
| 253 | /* | 219 | /* |
| 254 | * Complex access routines -- macros | 220 | * Complex access routines -- macros |
| 255 | */ | 221 | */ |
| 256 | #ifdef CONFIG_COMPAT | 222 | #define user_addr_max() (~0UL) |
| 257 | #define user_addr_max() (TASK_SIZE) | ||
| 258 | #else | ||
| 259 | #define user_addr_max() (DEFAULT_TASK_SIZE) | ||
| 260 | #endif | ||
| 261 | 223 | ||
| 262 | #define strnlen_user lstrnlen_user | 224 | #define strnlen_user lstrnlen_user |
| 263 | #define strlen_user(str) lstrnlen_user(str, 0x7fffffffL) | 225 | #define strlen_user(str) lstrnlen_user(str, 0x7fffffffL) |
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h index 7c614d01f1fa..f33113a6141e 100644 --- a/arch/parisc/include/uapi/asm/socket.h +++ b/arch/parisc/include/uapi/asm/socket.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _UAPI_ASM_SOCKET_H |
| 2 | #define _ASM_SOCKET_H | 2 | #define _UAPI_ASM_SOCKET_H |
| 3 | 3 | ||
| 4 | #include <asm/sockios.h> | 4 | #include <asm/sockios.h> |
| 5 | 5 | ||
| @@ -77,9 +77,4 @@ | |||
| 77 | 77 | ||
| 78 | #define SO_MAX_PACING_RATE 0x4048 | 78 | #define SO_MAX_PACING_RATE 0x4048 |
| 79 | 79 | ||
| 80 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we | 80 | #endif /* _UAPI_ASM_SOCKET_H */ |
| 81 | * have to define SOCK_NONBLOCK to a different value here. | ||
| 82 | */ | ||
| 83 | #define SOCK_NONBLOCK 0x40000000 | ||
| 84 | |||
| 85 | #endif /* _ASM_SOCKET_H */ | ||
