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 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull tile architecture fixes from Chris Metcalf:
"This fixes the bug that Al Viro spotted with the compat llseek code.
I also fixed the compat syscall definitions to use the new syscall
define macros to properly sign-extend their arguments."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
tile: properly use COMPAT_SYSCALL_DEFINEx
tile: work around bug in the generic sys_llseek

+32 -13
+3
arch/tile/include/asm/compat.h
··· 288 288 long compat_sys_fallocate(int fd, int mode, 289 289 u32 offset_lo, u32 offset_hi, 290 290 u32 len_lo, u32 len_hi); 291 + long compat_sys_llseek(unsigned int fd, unsigned int offset_high, 292 + unsigned int offset_low, loff_t __user * result, 293 + unsigned int origin); 291 294 292 295 /* Assembly trampoline to avoid clobbering r0. */ 293 296 long _compat_sys_rt_sigreturn(void);
+29 -13
arch/tile/kernel/compat.c
··· 32 32 * adapt the usual convention. 33 33 */ 34 34 35 - long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high) 35 + COMPAT_SYSCALL_DEFINE4(truncate64, char __user *, filename, u32, dummy, 36 + u32, low, u32, high) 36 37 { 37 38 return sys_truncate(filename, ((loff_t)high << 32) | low); 38 39 } 39 40 40 - long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high) 41 + COMPAT_SYSCALL_DEFINE4(ftruncate64, unsigned int, fd, u32, dummy, 42 + u32, low, u32, high) 41 43 { 42 44 return sys_ftruncate(fd, ((loff_t)high << 32) | low); 43 45 } 44 46 45 - long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, 46 - u32 dummy, u32 low, u32 high) 47 + COMPAT_SYSCALL_DEFINE6(pread64, unsigned int, fd, char __user *, ubuf, 48 + size_t, count, u32, dummy, u32, low, u32, high) 47 49 { 48 50 return sys_pread64(fd, ubuf, count, ((loff_t)high << 32) | low); 49 51 } 50 52 51 - long compat_sys_pwrite64(unsigned int fd, char __user *ubuf, size_t count, 52 - u32 dummy, u32 low, u32 high) 53 + COMPAT_SYSCALL_DEFINE6(pwrite64, unsigned int, fd, char __user *, ubuf, 54 + size_t, count, u32, dummy, u32, low, u32, high) 53 55 { 54 56 return sys_pwrite64(fd, ubuf, count, ((loff_t)high << 32) | low); 55 57 } 56 58 57 - long compat_sys_lookup_dcookie(u32 low, u32 high, char __user *buf, size_t len) 59 + COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, low, u32, high, 60 + char __user *, buf, size_t, len) 58 61 { 59 62 return sys_lookup_dcookie(((loff_t)high << 32) | low, buf, len); 60 63 } 61 64 62 - long compat_sys_sync_file_range2(int fd, unsigned int flags, 63 - u32 offset_lo, u32 offset_hi, 64 - u32 nbytes_lo, u32 nbytes_hi) 65 + COMPAT_SYSCALL_DEFINE6(sync_file_range2, int, fd, unsigned int, flags, 66 + u32, offset_lo, u32, offset_hi, 67 + u32, nbytes_lo, u32, nbytes_hi) 65 68 { 66 69 return sys_sync_file_range(fd, ((loff_t)offset_hi << 32) | offset_lo, 67 70 ((loff_t)nbytes_hi << 32) | nbytes_lo, 68 71 flags); 69 72 } 70 73 71 - long compat_sys_fallocate(int fd, int mode, 72 - u32 offset_lo, u32 offset_hi, 73 - u32 len_lo, u32 len_hi) 74 + COMPAT_SYSCALL_DEFINE6(fallocate, int, fd, int, mode, 75 + u32, offset_lo, u32, offset_hi, 76 + u32, len_lo, u32, len_hi) 74 77 { 75 78 return sys_fallocate(fd, mode, ((loff_t)offset_hi << 32) | offset_lo, 76 79 ((loff_t)len_hi << 32) | len_lo); 77 80 } 78 81 82 + /* 83 + * Avoid bug in generic sys_llseek() that specifies offset_high and 84 + * offset_low as "unsigned long", thus making it possible to pass 85 + * a sign-extended high 32 bits in offset_low. 86 + */ 87 + COMPAT_SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned int, offset_high, 88 + unsigned int, offset_low, loff_t __user *, result, 89 + unsigned int, origin) 90 + { 91 + return sys_llseek(fd, offset_high, offset_low, result, origin); 92 + } 93 + 79 94 /* Provide the compat syscall number to call mapping. */ 80 95 #undef __SYSCALL 81 96 #define __SYSCALL(nr, call) [nr] = (call), ··· 98 83 /* See comments in sys.c */ 99 84 #define compat_sys_fadvise64_64 sys32_fadvise64_64 100 85 #define compat_sys_readahead sys32_readahead 86 + #define sys_llseek compat_sys_llseek 101 87 102 88 /* Call the assembly trampolines where necessary. */ 103 89 #define compat_sys_rt_sigreturn _compat_sys_rt_sigreturn