History

Merge 5.1-rc3 into char-misc-next

We want the char-misc fixes in here as well.

Greg Kroah-Hartman committed 7 years ago

Commit 62fa7842 parents ae21f41 79a3aaa558 files · +6042 −7184Browse files

Showing the changes to include/linux (16 of 558 files). Show all

Unified · Split

16 files
  1. include/linux/atalk.h +1 −1
  2. include/linux/bpf.h +0 −1
  3. include/linux/bpf_verifier.h +40 −0
  4. include/linux/brcmphy.h +16 −0
  5. include/linux/device.h +0 −2
  6. include/linux/hugetlb.h +7 −1
  7. include/linux/kcore.h +0 −11
  8. include/linux/list.h +1 −1
  9. include/linux/net.h +6 −0
  10. include/linux/page-isolation.h +0 −10
  11. include/linux/parport.h +0 −13
  12. include/linux/platform_data/gpio/gpio-amd-fch.h +1 −1
  13. include/linux/sched/signal.h +18 −0
  14. include/linux/slab.h +2 −0
  15. include/linux/socket.h +6 −6
  16. include/linux/vbox_utils.h +7 −5
include/linux/atalk.h+1−1
@@ -108,7 +108,7 @@ static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb) · 107 unmodified lines
108108 #define AARP_RESOLVE_TIME (10 * HZ)
109109
110110 extern struct datalink_proto *ddp_dl, *aarp_dl;
111−extern void aarp_proto_init(void);
111+extern int aarp_proto_init(void);
112112
113113 /* Inter module exports */
114114
include/linux/bpf.h+0−1
@@ -193,7 +193,6 @@ enum bpf_arg_type { · 192 unmodified lines
193193
194194 ARG_PTR_TO_CTX, /* pointer to context */
195195 ARG_ANYTHING, /* any (initialized) argument is ok */
196− ARG_PTR_TO_SOCKET, /* pointer to bpf_sock */
197196 ARG_PTR_TO_SPIN_LOCK, /* pointer to bpf_spin_lock */
198197 ARG_PTR_TO_SOCK_COMMON, /* pointer to sock_common */
199198 };
include/linux/bpf_verifier.h+40−0
@@ -66,6 +66,46 @@ struct bpf_reg_state { · 65 unmodified lines
6666 * same reference to the socket, to determine proper reference freeing.
6767 */
6868 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;
69109 /* For scalar types (SCALAR_VALUE), this represents our knowledge of
70110 * the actual value.
71111 * For pointer types, this represents the variable part of the offset
include/linux/brcmphy.h+16−0
@@ -148,6 +148,22 @@ · 147 unmodified lines
148148 #define BCM_LED_SRC_OFF 0xe /* Tied high */
149149 #define BCM_LED_SRC_ON 0xf /* Tied low */
150150
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
151167
152168 /*
153169 * BCM5482: Shadow registers
include/linux/device.h+0−2
@@ -49,8 +49,6 @@ struct bus_attribute { · 48 unmodified lines
4949 ssize_t (*store)(struct bus_type *bus, const char *buf, size_t count);
5050 };
5151
52−#define BUS_ATTR(_name, _mode, _show, _store) \
53− struct bus_attribute bus_attr_##_name = __ATTR(_name, _mode, _show, _store)
5452 #define BUS_ATTR_RW(_name) \
5553 struct bus_attribute bus_attr_##_name = __ATTR_RW(_name)
5654 #define BUS_ATTR_RO(_name) \
include/linux/hugetlb.h+7−1
@@ -203,7 +203,6 @@ static inline void hugetlb_show_meminfo(void) · 202 unmodified lines
203203 #define pud_huge(x) 0
204204 #define is_hugepage_only_range(mm, addr, len) 0
205205 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
206−#define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; })
207206 #define hugetlb_mcopy_atomic_pte(dst_mm, dst_pte, dst_vma, dst_addr, \
208207 src_addr, pagep) ({ BUG(); 0; })
209208 #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
234233 {
235234 BUG();
236235 }
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+}
237243
238244 #endif /* !CONFIG_HUGETLB_PAGE */
239245 /*
include/linux/kcore.h+0−11
@@ -38,12 +38,6 @@ struct vmcoredd_node { · 37 unmodified lines
3838
3939 #ifdef CONFIG_PROC_KCORE
4040 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−}
4741
4842 extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn));
4943 #else
@@ -51,11 +45,6 @@ static inline · 1 unmodified line
5145 void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
5246 {
5347 }
54−
55−static inline
56−void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz)
57−{
58−}
5948 #endif
6049
6150 #endif /* _LINUX_KCORE_H */
include/linux/list.h+1−1
@@ -207,7 +207,7 @@ static inline void list_bulk_move_tail(struct list_head *head, · 206 unmodified lines
207207 }
208208
209209 /**
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
211211 * @list: the entry to test
212212 * @head: the head of the list
213213 */
include/linux/net.h+6−0
@@ -83,6 +83,12 @@ enum sock_type { · 82 unmodified lines
8383
8484 #endif /* ARCH_HAS_SOCKET_TYPES */
8585
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+ */
8692 enum sock_shutdown_cmd {
8793 SHUT_RD,
8894 SHUT_WR,
include/linux/page-isolation.h+0−10
@@ -41,16 +41,6 @@ int move_freepages_block(struct zone *zone, struct page *page, · 40 unmodified lines
4141
4242 /*
4343 * 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
5444 */
5545 int
5646 start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
include/linux/parport.h+0−13
@@ -460,7 +460,6 @@ extern size_t parport_ieee1284_epp_read_addr (struct parport *, · 459 unmodified lines
460460 void *, size_t, int);
461461
462462 /* IEEE1284.3 functions */
463−#define daisy_dev_name "Device ID probe"
464463 extern int parport_daisy_init (struct parport *port);
465464 extern void parport_daisy_fini (struct parport *port);
466465 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
469468 extern void parport_daisy_deselect_all (struct parport *port);
470469 extern int parport_daisy_select (struct parport *port, int daisy, int mode);
471470
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−
484471 /* Lowlevel drivers _can_ call this support function to handle irqs. */
485472 static inline void parport_generic_irq(struct parport *port)
486473 {
include/linux/platform_data/gpio/gpio-amd-fch.h+1−1
@@ -1,4 +1,4 @@
1−/* SPDX-License-Identifier: GPL+ */
1+/* SPDX-License-Identifier: GPL-2.0+ */
22
33 /*
44 * AMD FCH gpio driver platform-data
include/linux/sched/signal.h+18−0
@@ -418,10 +418,20 @@ static inline void set_restore_sigmask(void) · 417 unmodified lines
418418 set_thread_flag(TIF_RESTORE_SIGMASK);
419419 WARN_ON(!test_thread_flag(TIF_SIGPENDING));
420420 }
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+
421427 static inline void clear_restore_sigmask(void)
422428 {
423429 clear_thread_flag(TIF_RESTORE_SIGMASK);
424430 }
431+static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)
432+{
433+ return test_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK);
434+}
425435 static inline bool test_restore_sigmask(void)
426436 {
427437 return test_thread_flag(TIF_RESTORE_SIGMASK);
@@ -439,6 +449,10 @@ static inline void set_restore_sigmask(void) · 11 unmodified lines
439449 current->restore_sigmask = true;
440450 WARN_ON(!test_thread_flag(TIF_SIGPENDING));
441451 }
452+static inline void clear_tsk_restore_sigmask(struct task_struct *tsk)
453+{
454+ tsk->restore_sigmask = false;
455+}
442456 static inline void clear_restore_sigmask(void)
443457 {
444458 current->restore_sigmask = false;
@@ -447,6 +461,10 @@ static inline bool test_restore_sigmask(void) · 2 unmodified lines
447461 {
448462 return current->restore_sigmask;
449463 }
464+static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)
465+{
466+ return tsk->restore_sigmask;
467+}
450468 static inline bool test_and_clear_restore_sigmask(void)
451469 {
452470 if (!current->restore_sigmask)
include/linux/slab.h+2−0
@@ -32,6 +32,8 @@ · 31 unmodified lines
3232 #define SLAB_HWCACHE_ALIGN ((slab_flags_t __force)0x00002000U)
3333 /* Use GFP_DMA memory */
3434 #define SLAB_CACHE_DMA ((slab_flags_t __force)0x00004000U)
35+/* Use GFP_DMA32 memory */
36+#define SLAB_CACHE_DMA32 ((slab_flags_t __force)0x00008000U)
3537 /* DEBUG: Store the last owner for bug hunting */
3638 #define SLAB_STORE_USER ((slab_flags_t __force)0x00010000U)
3739 /* Panic if kmem_cache_create() fails */
include/linux/socket.h+6−6
@@ -26,7 +26,7 @@ typedef __kernel_sa_family_t sa_family_t; · 25 unmodified lines
2626 /*
2727 * 1003.1g requires sa_family_t and that sa_data is char.
2828 */
29−
29+
3030 struct sockaddr {
3131 sa_family_t sa_family; /* address family, AF_xxx */
3232 char sa_data[14]; /* 14 bytes of protocol address */
@@ -44,7 +44,7 @@ struct linger { · 11 unmodified lines
4444 * system, not 4.3. Thus msg_accrights(len) are now missing. They
4545 * belong in an obscure libc emulation or the bin.
4646 */
47−
47+
4848 struct msghdr {
4949 void *msg_name; /* ptr to socket address structure */
5050 int msg_namelen; /* size of socket address structure */
@@ -54,7 +54,7 @@ struct msghdr { · 3 unmodified lines
5454 unsigned int msg_flags; /* flags on received message */
5555 struct kiocb *msg_iocb; /* ptr to iocb for async requests */
5656 };
57−
57+
5858 struct user_msghdr {
5959 void __user *msg_name; /* ptr to socket address structure */
6060 int msg_namelen; /* size of socket address structure */
@@ -122,7 +122,7 @@ struct cmsghdr { · 61 unmodified lines
122122 * inside range, given by msg->msg_controllen before using
123123 * ancillary object DATA. --ANK (980731)
124124 */
125−
125+
126126 static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
127127 struct cmsghdr *__cmsg)
128128 {
@@ -264,10 +264,10 @@ struct ucred { · 135 unmodified lines
264264 /* Maximum queue length specifiable by listen. */
265265 #define SOMAXCONN 128
266266
267−/* Flags we can use with send/ and recv.
267+/* Flags we can use with send/ and recv.
268268 Added those for 1003.1g not all are supported yet
269269 */
270−
270+
271271 #define MSG_OOB 1
272272 #define MSG_PEEK 2
273273 #define MSG_DONTROUTE 4
include/linux/vbox_utils.h+7−5
@@ -24,15 +24,17 @@ __printf(1, 2) void vbg_debug(const char *fmt, ...); · 23 unmodified lines
2424 #define vbg_debug pr_debug
2525 #endif
2626
27−int vbg_hgcm_connect(struct vbg_dev *gdev,
27+int vbg_hgcm_connect(struct vbg_dev *gdev, u32 requestor,
2828 struct vmmdev_hgcm_service_location *loc,
2929 u32 *client_id, int *vbox_status);
3030
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);
3233
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);
3638
3739 /**
3840 * Convert a VirtualBox status code to a standard Linux kernel return value.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t