We want the char-misc fixes in here as well.
Showing the changes to include/linux (16 of 558 files). Show all
Unified · Split
| @@ -108,7 +108,7 @@ static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb) · 107 unmodified lines | ||
| 108 | 108 | #define AARP_RESOLVE_TIME (10 * HZ) |
| 109 | 109 | |
| 110 | 110 | extern struct datalink_proto *ddp_dl, *aarp_dl; |
| 111 | −extern void aarp_proto_init(void); | |
| 111 | +extern int aarp_proto_init(void); | |
| 112 | 112 | |
| 113 | 113 | /* Inter module exports */ |
| 114 | 114 | |
| @@ -193,7 +193,6 @@ enum bpf_arg_type { · 192 unmodified lines | ||
| 193 | 193 | |
| 194 | 194 | ARG_PTR_TO_CTX, /* pointer to context */ |
| 195 | 195 | ARG_ANYTHING, /* any (initialized) argument is ok */ |
| 196 | − ARG_PTR_TO_SOCKET, /* pointer to bpf_sock */ | |
| 197 | 196 | ARG_PTR_TO_SPIN_LOCK, /* pointer to bpf_spin_lock */ |
| 198 | 197 | ARG_PTR_TO_SOCK_COMMON, /* pointer to sock_common */ |
| 199 | 198 | }; |
| @@ -66,6 +66,46 @@ struct bpf_reg_state { · 65 unmodified lines | ||
| 66 | 66 | * same reference to the socket, to determine proper reference freeing. |
| 67 | 67 | */ |
| 68 | 68 | u32 id; |
| 69 | + /* PTR_TO_SOCKET and PTR_TO_TCP_SOCK could be a ptr returned | |
| 70 | + * from a pointer-cast helper, bpf_sk_fullsock() and | |
| 71 | + * bpf_tcp_sock(). | |
| 72 | + * | |
| 73 | + * Consider the following where "sk" is a reference counted | |
| 74 | + * pointer returned from "sk = bpf_sk_lookup_tcp();": | |
| 75 | + * | |
| 76 | + * 1: sk = bpf_sk_lookup_tcp(); | |
| 77 | + * 2: if (!sk) { return 0; } | |
| 78 | + * 3: fullsock = bpf_sk_fullsock(sk); | |
| 79 | + * 4: if (!fullsock) { bpf_sk_release(sk); return 0; } | |
| 80 | + * 5: tp = bpf_tcp_sock(fullsock); | |
| 81 | + * 6: if (!tp) { bpf_sk_release(sk); return 0; } | |
| 82 | + * 7: bpf_sk_release(sk); | |
| 83 | + * 8: snd_cwnd = tp->snd_cwnd; // verifier will complain | |
| 84 | + * | |
| 85 | + * After bpf_sk_release(sk) at line 7, both "fullsock" ptr and | |
| 86 | + * "tp" ptr should be invalidated also. In order to do that, | |
| 87 | + * the reg holding "fullsock" and "sk" need to remember | |
| 88 | + * the original refcounted ptr id (i.e. sk_reg->id) in ref_obj_id | |
| 89 | + * such that the verifier can reset all regs which have | |
| 90 | + * ref_obj_id matching the sk_reg->id. | |
| 91 | + * | |
| 92 | + * sk_reg->ref_obj_id is set to sk_reg->id at line 1. | |
| 93 | + * sk_reg->id will stay as NULL-marking purpose only. | |
| 94 | + * After NULL-marking is done, sk_reg->id can be reset to 0. | |
| 95 | + * | |
| 96 | + * After "fullsock = bpf_sk_fullsock(sk);" at line 3, | |
| 97 | + * fullsock_reg->ref_obj_id is set to sk_reg->ref_obj_id. | |
| 98 | + * | |
| 99 | + * After "tp = bpf_tcp_sock(fullsock);" at line 5, | |
| 100 | + * tp_reg->ref_obj_id is set to fullsock_reg->ref_obj_id | |
| 101 | + * which is the same as sk_reg->ref_obj_id. | |
| 102 | + * | |
| 103 | + * From the verifier perspective, if sk, fullsock and tp | |
| 104 | + * are not NULL, they are the same ptr with different | |
| 105 | + * reg->type. In particular, bpf_sk_release(tp) is also | |
| 106 | + * allowed and has the same effect as bpf_sk_release(sk). | |
| 107 | + */ | |
| 108 | + u32 ref_obj_id; | |
| 69 | 109 | /* For scalar types (SCALAR_VALUE), this represents our knowledge of |
| 70 | 110 | * the actual value. |
| 71 | 111 | * For pointer types, this represents the variable part of the offset |
| @@ -148,6 +148,22 @@ · 147 unmodified lines | ||
| 148 | 148 | #define BCM_LED_SRC_OFF 0xe /* Tied high */ |
| 149 | 149 | #define BCM_LED_SRC_ON 0xf /* Tied low */ |
| 150 | 150 | |
| 151 | +/* | |
| 152 | + * Broadcom Multicolor LED configurations (expansion register 4) | |
| 153 | + */ | |
| 154 | +#define BCM_EXP_MULTICOLOR (MII_BCM54XX_EXP_SEL_ER + 0x04) | |
| 155 | +#define BCM_LED_MULTICOLOR_IN_PHASE BIT(8) | |
| 156 | +#define BCM_LED_MULTICOLOR_LINK_ACT 0x0 | |
| 157 | +#define BCM_LED_MULTICOLOR_SPEED 0x1 | |
| 158 | +#define BCM_LED_MULTICOLOR_ACT_FLASH 0x2 | |
| 159 | +#define BCM_LED_MULTICOLOR_FDX 0x3 | |
| 160 | +#define BCM_LED_MULTICOLOR_OFF 0x4 | |
| 161 | +#define BCM_LED_MULTICOLOR_ON 0x5 | |
| 162 | +#define BCM_LED_MULTICOLOR_ALT 0x6 | |
| 163 | +#define BCM_LED_MULTICOLOR_FLASH 0x7 | |
| 164 | +#define BCM_LED_MULTICOLOR_LINK 0x8 | |
| 165 | +#define BCM_LED_MULTICOLOR_ACT 0x9 | |
| 166 | +#define BCM_LED_MULTICOLOR_PROGRAM 0xa | |
| 151 | 167 | |
| 152 | 168 | /* |
| 153 | 169 | * BCM5482: Shadow registers |
| @@ -49,8 +49,6 @@ struct bus_attribute { · 48 unmodified lines | ||
| 49 | 49 | ssize_t (*store)(struct bus_type *bus, const char *buf, size_t count); |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | −#define BUS_ATTR(_name, _mode, _show, _store) \ | |
| 53 | − struct bus_attribute bus_attr_##_name = __ATTR(_name, _mode, _show, _store) | |
| 54 | 52 | #define BUS_ATTR_RW(_name) \ |
| 55 | 53 | struct bus_attribute bus_attr_##_name = __ATTR_RW(_name) |
| 56 | 54 | #define BUS_ATTR_RO(_name) \ |
| @@ -203,7 +203,6 @@ static inline void hugetlb_show_meminfo(void) · 202 unmodified lines | ||
| 203 | 203 | #define pud_huge(x) 0 |
| 204 | 204 | #define is_hugepage_only_range(mm, addr, len) 0 |
| 205 | 205 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
| 206 | −#define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) | |
| 207 | 206 | #define hugetlb_mcopy_atomic_pte(dst_mm, dst_pte, dst_vma, dst_addr, \ |
| 208 | 207 | src_addr, pagep) ({ BUG(); 0; }) |
| 209 | 208 | #define huge_pte_offset(mm, address, sz) 0 |
| @@ -234,6 +233,13 @@ static inline void __unmap_hugepage_range(struct mmu_gather *tlb, · 24 unmodified lines | ||
| 234 | 233 | { |
| 235 | 234 | BUG(); |
| 236 | 235 | } |
| 236 | +static inline vm_fault_t hugetlb_fault(struct mm_struct *mm, | |
| 237 | + struct vm_area_struct *vma, unsigned long address, | |
| 238 | + unsigned int flags) | |
| 239 | +{ | |
| 240 | + BUG(); | |
| 241 | + return 0; | |
| 242 | +} | |
| 237 | 243 | |
| 238 | 244 | #endif /* !CONFIG_HUGETLB_PAGE */ |
| 239 | 245 | /* |
| @@ -38,12 +38,6 @@ struct vmcoredd_node { · 37 unmodified lines | ||
| 38 | 38 | |
| 39 | 39 | #ifdef CONFIG_PROC_KCORE |
| 40 | 40 | void __init kclist_add(struct kcore_list *, void *, size_t, int type); |
| 41 | −static inline | |
| 42 | −void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz) | |
| 43 | −{ | |
| 44 | − m->vaddr = (unsigned long)vaddr; | |
| 45 | − kclist_add(m, addr, sz, KCORE_REMAP); | |
| 46 | −} | |
| 47 | 41 | |
| 48 | 42 | extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn)); |
| 49 | 43 | #else |
| @@ -51,11 +45,6 @@ static inline · 1 unmodified line | ||
| 51 | 45 | void kclist_add(struct kcore_list *new, void *addr, size_t size, int type) |
| 52 | 46 | { |
| 53 | 47 | } |
| 54 | − | |
| 55 | −static inline | |
| 56 | −void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz) | |
| 57 | −{ | |
| 58 | −} | |
| 59 | 48 | #endif |
| 60 | 49 | |
| 61 | 50 | #endif /* _LINUX_KCORE_H */ |
| @@ -207,7 +207,7 @@ static inline void list_bulk_move_tail(struct list_head *head, · 206 unmodified lines | ||
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | /** |
| 210 | − * list_is_first -- tests whether @ list is the first entry in list @head | |
| 210 | + * list_is_first -- tests whether @list is the first entry in list @head | |
| 211 | 211 | * @list: the entry to test |
| 212 | 212 | * @head: the head of the list |
| 213 | 213 | */ |
| @@ -83,6 +83,12 @@ enum sock_type { · 82 unmodified lines | ||
| 83 | 83 | |
| 84 | 84 | #endif /* ARCH_HAS_SOCKET_TYPES */ |
| 85 | 85 | |
| 86 | +/** | |
| 87 | + * enum sock_shutdown_cmd - Shutdown types | |
| 88 | + * @SHUT_RD: shutdown receptions | |
| 89 | + * @SHUT_WR: shutdown transmissions | |
| 90 | + * @SHUT_RDWR: shutdown receptions/transmissions | |
| 91 | + */ | |
| 86 | 92 | enum sock_shutdown_cmd { |
| 87 | 93 | SHUT_RD, |
| 88 | 94 | SHUT_WR, |
| @@ -41,16 +41,6 @@ int move_freepages_block(struct zone *zone, struct page *page, · 40 unmodified lines | ||
| 41 | 41 | |
| 42 | 42 | /* |
| 43 | 43 | * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE. |
| 44 | − * If specified range includes migrate types other than MOVABLE or CMA, | |
| 45 | − * this will fail with -EBUSY. | |
| 46 | − * | |
| 47 | − * For isolating all pages in the range finally, the caller have to | |
| 48 | − * free all pages in the range. test_page_isolated() can be used for | |
| 49 | − * test it. | |
| 50 | − * | |
| 51 | − * The following flags are allowed (they can be combined in a bit mask) | |
| 52 | − * SKIP_HWPOISON - ignore hwpoison pages | |
| 53 | − * REPORT_FAILURE - report details about the failure to isolate the range | |
| 54 | 44 | */ |
| 55 | 45 | int |
| 56 | 46 | start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, |
| @@ -460,7 +460,6 @@ extern size_t parport_ieee1284_epp_read_addr (struct parport *, · 459 unmodified lines | ||
| 460 | 460 | void *, size_t, int); |
| 461 | 461 | |
| 462 | 462 | /* IEEE1284.3 functions */ |
| 463 | −#define daisy_dev_name "Device ID probe" | |
| 464 | 463 | extern int parport_daisy_init (struct parport *port); |
| 465 | 464 | extern void parport_daisy_fini (struct parport *port); |
| 466 | 465 | extern struct pardevice *parport_open (int devnum, const char *name); |
| @@ -469,18 +468,6 @@ extern ssize_t parport_device_id (int devnum, char *buffer, size_t len); · 2 unmodified lines | ||
| 469 | 468 | extern void parport_daisy_deselect_all (struct parport *port); |
| 470 | 469 | extern int parport_daisy_select (struct parport *port, int daisy, int mode); |
| 471 | 470 | |
| 472 | −#ifdef CONFIG_PARPORT_1284 | |
| 473 | −extern int daisy_drv_init(void); | |
| 474 | −extern void daisy_drv_exit(void); | |
| 475 | −#else | |
| 476 | −static inline int daisy_drv_init(void) | |
| 477 | −{ | |
| 478 | − return 0; | |
| 479 | −} | |
| 480 | − | |
| 481 | −static inline void daisy_drv_exit(void) {} | |
| 482 | −#endif | |
| 483 | − | |
| 484 | 471 | /* Lowlevel drivers _can_ call this support function to handle irqs. */ |
| 485 | 472 | static inline void parport_generic_irq(struct parport *port) |
| 486 | 473 | { |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL+ */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * AMD FCH gpio driver platform-data |
| @@ -418,10 +418,20 @@ static inline void set_restore_sigmask(void) · 417 unmodified lines | ||
| 418 | 418 | set_thread_flag(TIF_RESTORE_SIGMASK); |
| 419 | 419 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); |
| 420 | 420 | } |
| 421 | + | |
| 422 | +static inline void clear_tsk_restore_sigmask(struct task_struct *tsk) | |
| 423 | +{ | |
| 424 | + clear_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK); | |
| 425 | +} | |
| 426 | + | |
| 421 | 427 | static inline void clear_restore_sigmask(void) |
| 422 | 428 | { |
| 423 | 429 | clear_thread_flag(TIF_RESTORE_SIGMASK); |
| 424 | 430 | } |
| 431 | +static inline bool test_tsk_restore_sigmask(struct task_struct *tsk) | |
| 432 | +{ | |
| 433 | + return test_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK); | |
| 434 | +} | |
| 425 | 435 | static inline bool test_restore_sigmask(void) |
| 426 | 436 | { |
| 427 | 437 | return test_thread_flag(TIF_RESTORE_SIGMASK); |
| @@ -439,6 +449,10 @@ static inline void set_restore_sigmask(void) · 11 unmodified lines | ||
| 439 | 449 | current->restore_sigmask = true; |
| 440 | 450 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); |
| 441 | 451 | } |
| 452 | +static inline void clear_tsk_restore_sigmask(struct task_struct *tsk) | |
| 453 | +{ | |
| 454 | + tsk->restore_sigmask = false; | |
| 455 | +} | |
| 442 | 456 | static inline void clear_restore_sigmask(void) |
| 443 | 457 | { |
| 444 | 458 | current->restore_sigmask = false; |
| @@ -447,6 +461,10 @@ static inline bool test_restore_sigmask(void) · 2 unmodified lines | ||
| 447 | 461 | { |
| 448 | 462 | return current->restore_sigmask; |
| 449 | 463 | } |
| 464 | +static inline bool test_tsk_restore_sigmask(struct task_struct *tsk) | |
| 465 | +{ | |
| 466 | + return tsk->restore_sigmask; | |
| 467 | +} | |
| 450 | 468 | static inline bool test_and_clear_restore_sigmask(void) |
| 451 | 469 | { |
| 452 | 470 | if (!current->restore_sigmask) |
| @@ -32,6 +32,8 @@ · 31 unmodified lines | ||
| 32 | 32 | #define SLAB_HWCACHE_ALIGN ((slab_flags_t __force)0x00002000U) |
| 33 | 33 | /* Use GFP_DMA memory */ |
| 34 | 34 | #define SLAB_CACHE_DMA ((slab_flags_t __force)0x00004000U) |
| 35 | +/* Use GFP_DMA32 memory */ | |
| 36 | +#define SLAB_CACHE_DMA32 ((slab_flags_t __force)0x00008000U) | |
| 35 | 37 | /* DEBUG: Store the last owner for bug hunting */ |
| 36 | 38 | #define SLAB_STORE_USER ((slab_flags_t __force)0x00010000U) |
| 37 | 39 | /* Panic if kmem_cache_create() fails */ |
| @@ -26,7 +26,7 @@ typedef __kernel_sa_family_t sa_family_t; · 25 unmodified lines | ||
| 26 | 26 | /* |
| 27 | 27 | * 1003.1g requires sa_family_t and that sa_data is char. |
| 28 | 28 | */ |
| 29 | − | |
| 29 | + | |
| 30 | 30 | struct sockaddr { |
| 31 | 31 | sa_family_t sa_family; /* address family, AF_xxx */ |
| 32 | 32 | char sa_data[14]; /* 14 bytes of protocol address */ |
| @@ -44,7 +44,7 @@ struct linger { · 11 unmodified lines | ||
| 44 | 44 | * system, not 4.3. Thus msg_accrights(len) are now missing. They |
| 45 | 45 | * belong in an obscure libc emulation or the bin. |
| 46 | 46 | */ |
| 47 | − | |
| 47 | + | |
| 48 | 48 | struct msghdr { |
| 49 | 49 | void *msg_name; /* ptr to socket address structure */ |
| 50 | 50 | int msg_namelen; /* size of socket address structure */ |
| @@ -54,7 +54,7 @@ struct msghdr { · 3 unmodified lines | ||
| 54 | 54 | unsigned int msg_flags; /* flags on received message */ |
| 55 | 55 | struct kiocb *msg_iocb; /* ptr to iocb for async requests */ |
| 56 | 56 | }; |
| 57 | − | |
| 57 | + | |
| 58 | 58 | struct user_msghdr { |
| 59 | 59 | void __user *msg_name; /* ptr to socket address structure */ |
| 60 | 60 | int msg_namelen; /* size of socket address structure */ |
| @@ -122,7 +122,7 @@ struct cmsghdr { · 61 unmodified lines | ||
| 122 | 122 | * inside range, given by msg->msg_controllen before using |
| 123 | 123 | * ancillary object DATA. --ANK (980731) |
| 124 | 124 | */ |
| 125 | − | |
| 125 | + | |
| 126 | 126 | static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, |
| 127 | 127 | struct cmsghdr *__cmsg) |
| 128 | 128 | { |
| @@ -264,10 +264,10 @@ struct ucred { · 135 unmodified lines | ||
| 264 | 264 | /* Maximum queue length specifiable by listen. */ |
| 265 | 265 | #define SOMAXCONN 128 |
| 266 | 266 | |
| 267 | −/* Flags we can use with send/ and recv. | |
| 267 | +/* Flags we can use with send/ and recv. | |
| 268 | 268 | Added those for 1003.1g not all are supported yet |
| 269 | 269 | */ |
| 270 | − | |
| 270 | + | |
| 271 | 271 | #define MSG_OOB 1 |
| 272 | 272 | #define MSG_PEEK 2 |
| 273 | 273 | #define MSG_DONTROUTE 4 |
| @@ -24,15 +24,17 @@ __printf(1, 2) void vbg_debug(const char *fmt, ...); · 23 unmodified lines | ||
| 24 | 24 | #define vbg_debug pr_debug |
| 25 | 25 | #endif |
| 26 | 26 | |
| 27 | −int vbg_hgcm_connect(struct vbg_dev *gdev, | |
| 27 | +int vbg_hgcm_connect(struct vbg_dev *gdev, u32 requestor, | |
| 28 | 28 | struct vmmdev_hgcm_service_location *loc, |
| 29 | 29 | u32 *client_id, int *vbox_status); |
| 30 | 30 | |
| 31 | −int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status); | |
| 31 | +int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 requestor, | |
| 32 | + u32 client_id, int *vbox_status); | |
| 32 | 33 | |
| 33 | −int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function, | |
| 34 | − u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms, | |
| 35 | − u32 parm_count, int *vbox_status); | |
| 34 | +int vbg_hgcm_call(struct vbg_dev *gdev, u32 requestor, u32 client_id, | |
| 35 | + u32 function, u32 timeout_ms, | |
| 36 | + struct vmmdev_hgcm_function_parameter *parms, u32 parm_count, | |
| 37 | + int *vbox_status); | |
| 36 | 38 | |
| 37 | 39 | /** |
| 38 | 40 | * Convert a VirtualBox status code to a standard Linux kernel return value. |