Showing the changes to include/linux (6 of 146 files). Show all
Unified · Split
| @@ -34,41 +34,41 @@ static inline u32 __bitrev32(u32 x) · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | #define __constant_bitrev32(x) \ | 35 | #define __constant_bitrev32(x) \ |
| 36 | ({ \ | 36 | ({ \ |
| 37 | u32 __x = x; \ | 37 | u32 ___x = x; \ |
| 38 | __x = (__x >> 16) | (__x << 16); \ | 38 | ___x = (___x >> 16) | (___x << 16); \ |
| 39 | __x = ((__x & (u32)0xFF00FF00UL) >> 8) | ((__x & (u32)0x00FF00FFUL) << 8); \ | 39 | ___x = ((___x & (u32)0xFF00FF00UL) >> 8) | ((___x & (u32)0x00FF00FFUL) << 8); \ |
| 40 | __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ | 40 | ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \ |
| 41 | __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ | 41 | ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \ |
| 42 | __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ | 42 | ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \ |
| 43 | __x; \ | 43 | ___x; \ |
| 44 | }) | 44 | }) |
| 45 | 45 | ||
| 46 | #define __constant_bitrev16(x) \ | 46 | #define __constant_bitrev16(x) \ |
| 47 | ({ \ | 47 | ({ \ |
| 48 | u16 __x = x; \ | 48 | u16 ___x = x; \ |
| 49 | __x = (__x >> 8) | (__x << 8); \ | 49 | ___x = (___x >> 8) | (___x << 8); \ |
| 50 | __x = ((__x & (u16)0xF0F0U) >> 4) | ((__x & (u16)0x0F0FU) << 4); \ | 50 | ___x = ((___x & (u16)0xF0F0U) >> 4) | ((___x & (u16)0x0F0FU) << 4); \ |
| 51 | __x = ((__x & (u16)0xCCCCU) >> 2) | ((__x & (u16)0x3333U) << 2); \ | 51 | ___x = ((___x & (u16)0xCCCCU) >> 2) | ((___x & (u16)0x3333U) << 2); \ |
| 52 | __x = ((__x & (u16)0xAAAAU) >> 1) | ((__x & (u16)0x5555U) << 1); \ | 52 | ___x = ((___x & (u16)0xAAAAU) >> 1) | ((___x & (u16)0x5555U) << 1); \ |
| 53 | __x; \ | 53 | ___x; \ |
| 54 | }) | 54 | }) |
| 55 | 55 | ||
| 56 | #define __constant_bitrev8x4(x) \ | 56 | #define __constant_bitrev8x4(x) \ |
| 57 | ({ \ | 57 | ({ \ |
| 58 | u32 __x = x; \ | 58 | u32 ___x = x; \ |
| 59 | __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ | 59 | ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \ |
| 60 | __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ | 60 | ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \ |
| 61 | __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ | 61 | ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \ |
| 62 | __x; \ | 62 | ___x; \ |
| 63 | }) | 63 | }) |
| 64 | 64 | ||
| 65 | #define __constant_bitrev8(x) \ | 65 | #define __constant_bitrev8(x) \ |
| 66 | ({ \ | 66 | ({ \ |
| 67 | u8 __x = x; \ | 67 | u8 ___x = x; \ |
| 68 | __x = (__x >> 4) | (__x << 4); \ | 68 | ___x = (___x >> 4) | (___x << 4); \ |
| 69 | __x = ((__x & (u8)0xCCU) >> 2) | ((__x & (u8)0x33U) << 2); \ | 69 | ___x = ((___x & (u8)0xCCU) >> 2) | ((___x & (u8)0x33U) << 2); \ |
| 70 | __x = ((__x & (u8)0xAAU) >> 1) | ((__x & (u8)0x55U) << 1); \ | 70 | ___x = ((___x & (u8)0xAAU) >> 1) | ((___x & (u8)0x55U) << 1); \ |
| 71 | __x; \ | 71 | ___x; \ |
| 72 | }) | 72 | }) |
| 73 | 73 | ||
| 74 | #define bitrev32(x) \ | 74 | #define bitrev32(x) \ |
| @@ -158,6 +158,9 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset, · 157 unmodified lines | |||
| 158 | #define FMODE_OPENED ((__force fmode_t)0x80000) | 158 | #define FMODE_OPENED ((__force fmode_t)0x80000) |
| 159 | #define FMODE_CREATED ((__force fmode_t)0x100000) | 159 | #define FMODE_CREATED ((__force fmode_t)0x100000) |
| 160 | 160 | ||
| 161 | /* File is stream-like */ | ||
| 162 | #define FMODE_STREAM ((__force fmode_t)0x200000) | ||
| 163 | |||
| 161 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 164 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
| 162 | #define FMODE_NONOTIFY ((__force fmode_t)0x4000000) | 165 | #define FMODE_NONOTIFY ((__force fmode_t)0x4000000) |
| 163 | 166 | ||
| @@ -3074,6 +3077,7 @@ extern loff_t no_seek_end_llseek_size(struct file *, loff_t, int, loff_t); · 2910 unmodified lines | |||
| 3074 | extern loff_t no_seek_end_llseek(struct file *, loff_t, int); | 3077 | extern loff_t no_seek_end_llseek(struct file *, loff_t, int); |
| 3075 | extern int generic_file_open(struct inode * inode, struct file * filp); | 3078 | extern int generic_file_open(struct inode * inode, struct file * filp); |
| 3076 | extern int nonseekable_open(struct inode * inode, struct file * filp); | 3079 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
| 3080 | extern int stream_open(struct inode * inode, struct file * filp); | ||
| 3077 | 3081 | ||
| 3078 | #ifdef CONFIG_BLOCK | 3082 | #ifdef CONFIG_BLOCK |
| 3079 | typedef void (dio_submit_t)(struct bio *bio, struct inode *inode, | 3083 | typedef void (dio_submit_t)(struct bio *bio, struct inode *inode, |
| @@ -566,7 +566,10 @@ struct mem_cgroup *lock_page_memcg(struct page *page); · 565 unmodified lines | |||
| 566 | void __unlock_page_memcg(struct mem_cgroup *memcg); | 566 | void __unlock_page_memcg(struct mem_cgroup *memcg); |
| 567 | void unlock_page_memcg(struct page *page); | 567 | void unlock_page_memcg(struct page *page); |
| 568 | 568 | ||
| 569 | /* idx can be of type enum memcg_stat_item or node_stat_item */ | 569 | /* |
| 570 | * idx can be of type enum memcg_stat_item or node_stat_item. | ||
| 571 | * Keep in sync with memcg_exact_page_state(). | ||
| 572 | */ | ||
| 570 | static inline unsigned long memcg_page_state(struct mem_cgroup *memcg, | 573 | static inline unsigned long memcg_page_state(struct mem_cgroup *memcg, |
| 571 | int idx) | 574 | int idx) |
| 572 | { | 575 | { |
| @@ -671,7 +671,7 @@ enum vm_fault_reason { · 670 unmodified lines | |||
| 671 | 671 | ||
| 672 | /* Encode hstate index for a hwpoisoned large page */ | 672 | /* Encode hstate index for a hwpoisoned large page */ |
| 673 | #define VM_FAULT_SET_HINDEX(x) ((__force vm_fault_t)((x) << 16)) | 673 | #define VM_FAULT_SET_HINDEX(x) ((__force vm_fault_t)((x) << 16)) |
| 674 | #define VM_FAULT_GET_HINDEX(x) (((x) >> 16) & 0xf) | 674 | #define VM_FAULT_GET_HINDEX(x) (((__force unsigned int)(x) >> 16) & 0xf) |
| 675 | 675 | ||
| 676 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | \ | 676 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | \ |
| 677 | VM_FAULT_SIGSEGV | VM_FAULT_HWPOISON | \ | 677 | VM_FAULT_SIGSEGV | VM_FAULT_HWPOISON | \ |
| @@ -9,6 +9,13 @@ · 8 unmodified lines | |||
| 9 | #include <linux/bug.h> /* For BUG_ON. */ | 9 | #include <linux/bug.h> /* For BUG_ON. */ |
| 10 | #include <linux/pid_namespace.h> /* For task_active_pid_ns. */ | 10 | #include <linux/pid_namespace.h> /* For task_active_pid_ns. */ |
| 11 | #include <uapi/linux/ptrace.h> | 11 | #include <uapi/linux/ptrace.h> |
| 12 | #include <linux/seccomp.h> | ||
| 13 | |||
| 14 | /* Add sp to seccomp_data, as seccomp is user API, we don't want to modify it */ | ||
| 15 | struct syscall_info { | ||
| 16 | __u64 sp; | ||
| 17 | struct seccomp_data data; | ||
| 18 | }; | ||
| 12 | 19 | ||
| 13 | extern int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, | 20 | extern int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, |
| 14 | void *buf, int len, unsigned int gup_flags); | 21 | void *buf, int len, unsigned int gup_flags); |
| @@ -407,9 +414,7 @@ static inline void user_single_step_report(struct pt_regs *regs) · 392 unmodified lines | |||
| 407 | #define current_user_stack_pointer() user_stack_pointer(current_pt_regs()) | 414 | #define current_user_stack_pointer() user_stack_pointer(current_pt_regs()) |
| 408 | #endif | 415 | #endif |
| 409 | 416 | ||
| 410 | extern int task_current_syscall(struct task_struct *target, long *callno, | 417 | extern int task_current_syscall(struct task_struct *target, struct syscall_info *info); |
| 411 | unsigned long args[6], unsigned int maxargs, | ||
| 412 | unsigned long *sp, unsigned long *pc); | ||
| 413 | 418 | ||
| 414 | extern void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact); | 419 | extern void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact); |
| 415 | #endif | 420 | #endif |
| @@ -150,6 +150,9 @@ extern void * memscan(void *,int,__kernel_size_t); · 149 unmodified lines | |||
| 150 | #ifndef __HAVE_ARCH_MEMCMP | 150 | #ifndef __HAVE_ARCH_MEMCMP |
| 151 | extern int memcmp(const void *,const void *,__kernel_size_t); | 151 | extern int memcmp(const void *,const void *,__kernel_size_t); |
| 152 | #endif | 152 | #endif |
| 153 | #ifndef __HAVE_ARCH_BCMP | ||
| 154 | extern int bcmp(const void *,const void *,__kernel_size_t); | ||
| 155 | #endif | ||
| 153 | #ifndef __HAVE_ARCH_MEMCHR | 156 | #ifndef __HAVE_ARCH_MEMCHR |
| 154 | extern void * memchr(const void *,int,__kernel_size_t); | 157 | extern void * memchr(const void *,int,__kernel_size_t); |
| 155 | #endif | 158 | #endif |