diff options
Diffstat (limited to 'include')
39 files changed, 269 insertions, 110 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 8390859e79e7..f1af7d63d678 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
@@ -368,6 +368,11 @@ static inline void __bpf_prog_uncharge(struct user_struct *user, u32 pages) | |||
368 | { | 368 | { |
369 | } | 369 | } |
370 | 370 | ||
371 | static inline int bpf_obj_get_user(const char __user *pathname) | ||
372 | { | ||
373 | return -EOPNOTSUPP; | ||
374 | } | ||
375 | |||
371 | static inline struct net_device *__dev_map_lookup_elem(struct bpf_map *map, | 376 | static inline struct net_device *__dev_map_lookup_elem(struct bpf_map *map, |
372 | u32 key) | 377 | u32 key) |
373 | { | 378 | { |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index c8dae555eccf..446b24cac67d 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -232,6 +232,7 @@ int generic_write_end(struct file *, struct address_space *, | |||
232 | loff_t, unsigned, unsigned, | 232 | loff_t, unsigned, unsigned, |
233 | struct page *, void *); | 233 | struct page *, void *); |
234 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); | 234 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); |
235 | void clean_page_buffers(struct page *page); | ||
235 | int cont_write_begin(struct file *, struct address_space *, loff_t, | 236 | int cont_write_begin(struct file *, struct address_space *, loff_t, |
236 | unsigned, unsigned, struct page **, void **, | 237 | unsigned, unsigned, struct page **, void **, |
237 | get_block_t *, loff_t *); | 238 | get_block_t *, loff_t *); |
diff --git a/include/linux/filter.h b/include/linux/filter.h index d29e58fde364..818a0b26249e 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -728,7 +728,7 @@ void xdp_do_flush_map(void); | |||
728 | void bpf_warn_invalid_xdp_action(u32 act); | 728 | void bpf_warn_invalid_xdp_action(u32 act); |
729 | void bpf_warn_invalid_xdp_redirect(u32 ifindex); | 729 | void bpf_warn_invalid_xdp_redirect(u32 ifindex); |
730 | 730 | ||
731 | struct sock *do_sk_redirect_map(void); | 731 | struct sock *do_sk_redirect_map(struct sk_buff *skb); |
732 | 732 | ||
733 | #ifdef CONFIG_BPF_JIT | 733 | #ifdef CONFIG_BPF_JIT |
734 | extern int bpf_jit_enable; | 734 | extern int bpf_jit_enable; |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index c458d7b7ad19..6431087816ba 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -1403,7 +1403,7 @@ extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, u8 *buf, | |||
1403 | const int *srv_version, int srv_vercnt, | 1403 | const int *srv_version, int srv_vercnt, |
1404 | int *nego_fw_version, int *nego_srv_version); | 1404 | int *nego_fw_version, int *nego_srv_version); |
1405 | 1405 | ||
1406 | void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid); | 1406 | void hv_process_channel_removal(u32 relid); |
1407 | 1407 | ||
1408 | void vmbus_setevent(struct vmbus_channel *channel); | 1408 | void vmbus_setevent(struct vmbus_channel *channel); |
1409 | /* | 1409 | /* |
diff --git a/include/linux/if_tap.h b/include/linux/if_tap.h index 4837157da0dc..9ae41cdd0d4c 100644 --- a/include/linux/if_tap.h +++ b/include/linux/if_tap.h | |||
@@ -73,8 +73,8 @@ void tap_del_queues(struct tap_dev *tap); | |||
73 | int tap_get_minor(dev_t major, struct tap_dev *tap); | 73 | int tap_get_minor(dev_t major, struct tap_dev *tap); |
74 | void tap_free_minor(dev_t major, struct tap_dev *tap); | 74 | void tap_free_minor(dev_t major, struct tap_dev *tap); |
75 | int tap_queue_resize(struct tap_dev *tap); | 75 | int tap_queue_resize(struct tap_dev *tap); |
76 | int tap_create_cdev(struct cdev *tap_cdev, | 76 | int tap_create_cdev(struct cdev *tap_cdev, dev_t *tap_major, |
77 | dev_t *tap_major, const char *device_name); | 77 | const char *device_name, struct module *module); |
78 | void tap_destroy_cdev(dev_t major, struct cdev *tap_cdev); | 78 | void tap_destroy_cdev(dev_t major, struct cdev *tap_cdev); |
79 | 79 | ||
80 | #endif /*_LINUX_IF_TAP_H_*/ | 80 | #endif /*_LINUX_IF_TAP_H_*/ |
diff --git a/include/linux/input.h b/include/linux/input.h index fb5e23c7ed98..7c7516eb7d76 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -234,6 +234,10 @@ struct input_dev { | |||
234 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" | 234 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" |
235 | #endif | 235 | #endif |
236 | 236 | ||
237 | #if INPUT_PROP_MAX != INPUT_DEVICE_ID_PROP_MAX | ||
238 | #error "INPUT_PROP_MAX and INPUT_DEVICE_ID_PROP_MAX do not match" | ||
239 | #endif | ||
240 | |||
237 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ | 241 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ |
238 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) | 242 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) |
239 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ | 243 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ |
@@ -469,6 +473,9 @@ int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke); | |||
469 | int input_set_keycode(struct input_dev *dev, | 473 | int input_set_keycode(struct input_dev *dev, |
470 | const struct input_keymap_entry *ke); | 474 | const struct input_keymap_entry *ke); |
471 | 475 | ||
476 | bool input_match_device_id(const struct input_dev *dev, | ||
477 | const struct input_device_id *id); | ||
478 | |||
472 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period); | 479 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period); |
473 | 480 | ||
474 | extern struct class input_class; | 481 | extern struct class input_class; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index d4728bf6a537..5ad10948ea95 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -1009,7 +1009,7 @@ void irq_gc_mask_clr_bit(struct irq_data *d); | |||
1009 | void irq_gc_unmask_enable_reg(struct irq_data *d); | 1009 | void irq_gc_unmask_enable_reg(struct irq_data *d); |
1010 | void irq_gc_ack_set_bit(struct irq_data *d); | 1010 | void irq_gc_ack_set_bit(struct irq_data *d); |
1011 | void irq_gc_ack_clr_bit(struct irq_data *d); | 1011 | void irq_gc_ack_clr_bit(struct irq_data *d); |
1012 | void irq_gc_mask_disable_reg_and_ack(struct irq_data *d); | 1012 | void irq_gc_mask_disable_and_ack_set(struct irq_data *d); |
1013 | void irq_gc_eoi(struct irq_data *d); | 1013 | void irq_gc_eoi(struct irq_data *d); |
1014 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); | 1014 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); |
1015 | 1015 | ||
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 1ea576c8126f..14b74f22d43c 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h | |||
@@ -372,6 +372,8 @@ | |||
372 | #define GITS_BASER_ENTRY_SIZE_SHIFT (48) | 372 | #define GITS_BASER_ENTRY_SIZE_SHIFT (48) |
373 | #define GITS_BASER_ENTRY_SIZE(r) ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1) | 373 | #define GITS_BASER_ENTRY_SIZE(r) ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1) |
374 | #define GITS_BASER_ENTRY_SIZE_MASK GENMASK_ULL(52, 48) | 374 | #define GITS_BASER_ENTRY_SIZE_MASK GENMASK_ULL(52, 48) |
375 | #define GITS_BASER_PHYS_52_to_48(phys) \ | ||
376 | (((phys) & GENMASK_ULL(47, 16)) | (((phys) >> 48) & 0xf) << 12) | ||
375 | #define GITS_BASER_SHAREABILITY_SHIFT (10) | 377 | #define GITS_BASER_SHAREABILITY_SHIFT (10) |
376 | #define GITS_BASER_InnerShareable \ | 378 | #define GITS_BASER_InnerShareable \ |
377 | GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable) | 379 | GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 0ad4c3044cf9..91189bb0c818 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -44,6 +44,12 @@ | |||
44 | 44 | ||
45 | #define STACK_MAGIC 0xdeadbeef | 45 | #define STACK_MAGIC 0xdeadbeef |
46 | 46 | ||
47 | /** | ||
48 | * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value | ||
49 | * @x: value to repeat | ||
50 | * | ||
51 | * NOTE: @x is not checked for > 0xff; larger values produce odd results. | ||
52 | */ | ||
47 | #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) | 53 | #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) |
48 | 54 | ||
49 | /* @a is a power of 2 value */ | 55 | /* @a is a power of 2 value */ |
@@ -57,6 +63,10 @@ | |||
57 | #define READ 0 | 63 | #define READ 0 |
58 | #define WRITE 1 | 64 | #define WRITE 1 |
59 | 65 | ||
66 | /** | ||
67 | * ARRAY_SIZE - get the number of elements in array @arr | ||
68 | * @arr: array to be sized | ||
69 | */ | ||
60 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 70 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
61 | 71 | ||
62 | #define u64_to_user_ptr(x) ( \ | 72 | #define u64_to_user_ptr(x) ( \ |
@@ -76,7 +86,15 @@ | |||
76 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) | 86 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) |
77 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) | 87 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) |
78 | 88 | ||
89 | /** | ||
90 | * FIELD_SIZEOF - get the size of a struct's field | ||
91 | * @t: the target struct | ||
92 | * @f: the target struct's field | ||
93 | * Return: the size of @f in the struct definition without having a | ||
94 | * declared instance of @t. | ||
95 | */ | ||
79 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 96 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
97 | |||
80 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | 98 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP |
81 | 99 | ||
82 | #define DIV_ROUND_DOWN_ULL(ll, d) \ | 100 | #define DIV_ROUND_DOWN_ULL(ll, d) \ |
@@ -107,7 +125,7 @@ | |||
107 | /* | 125 | /* |
108 | * Divide positive or negative dividend by positive or negative divisor | 126 | * Divide positive or negative dividend by positive or negative divisor |
109 | * and round to closest integer. Result is undefined for negative | 127 | * and round to closest integer. Result is undefined for negative |
110 | * divisors if he dividend variable type is unsigned and for negative | 128 | * divisors if the dividend variable type is unsigned and for negative |
111 | * dividends if the divisor variable type is unsigned. | 129 | * dividends if the divisor variable type is unsigned. |
112 | */ | 130 | */ |
113 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | 131 | #define DIV_ROUND_CLOSEST(x, divisor)( \ |
@@ -247,13 +265,13 @@ extern int _cond_resched(void); | |||
247 | * @ep_ro: right open interval endpoint | 265 | * @ep_ro: right open interval endpoint |
248 | * | 266 | * |
249 | * Perform a "reciprocal multiplication" in order to "scale" a value into | 267 | * Perform a "reciprocal multiplication" in order to "scale" a value into |
250 | * range [0, ep_ro), where the upper interval endpoint is right-open. | 268 | * range [0, @ep_ro), where the upper interval endpoint is right-open. |
251 | * This is useful, e.g. for accessing a index of an array containing | 269 | * This is useful, e.g. for accessing a index of an array containing |
252 | * ep_ro elements, for example. Think of it as sort of modulus, only that | 270 | * @ep_ro elements, for example. Think of it as sort of modulus, only that |
253 | * the result isn't that of modulo. ;) Note that if initial input is a | 271 | * the result isn't that of modulo. ;) Note that if initial input is a |
254 | * small value, then result will return 0. | 272 | * small value, then result will return 0. |
255 | * | 273 | * |
256 | * Return: a result based on val in interval [0, ep_ro). | 274 | * Return: a result based on @val in interval [0, @ep_ro). |
257 | */ | 275 | */ |
258 | static inline u32 reciprocal_scale(u32 val, u32 ep_ro) | 276 | static inline u32 reciprocal_scale(u32 val, u32 ep_ro) |
259 | { | 277 | { |
@@ -618,8 +636,8 @@ do { \ | |||
618 | * trace_printk - printf formatting in the ftrace buffer | 636 | * trace_printk - printf formatting in the ftrace buffer |
619 | * @fmt: the printf format for printing | 637 | * @fmt: the printf format for printing |
620 | * | 638 | * |
621 | * Note: __trace_printk is an internal function for trace_printk and | 639 | * Note: __trace_printk is an internal function for trace_printk() and |
622 | * the @ip is passed in via the trace_printk macro. | 640 | * the @ip is passed in via the trace_printk() macro. |
623 | * | 641 | * |
624 | * This function allows a kernel developer to debug fast path sections | 642 | * This function allows a kernel developer to debug fast path sections |
625 | * that printk is not appropriate for. By scattering in various | 643 | * that printk is not appropriate for. By scattering in various |
@@ -629,7 +647,7 @@ do { \ | |||
629 | * This is intended as a debugging tool for the developer only. | 647 | * This is intended as a debugging tool for the developer only. |
630 | * Please refrain from leaving trace_printks scattered around in | 648 | * Please refrain from leaving trace_printks scattered around in |
631 | * your code. (Extra memory is used for special buffers that are | 649 | * your code. (Extra memory is used for special buffers that are |
632 | * allocated when trace_printk() is used) | 650 | * allocated when trace_printk() is used.) |
633 | * | 651 | * |
634 | * A little optization trick is done here. If there's only one | 652 | * A little optization trick is done here. If there's only one |
635 | * argument, there's no need to scan the string for printf formats. | 653 | * argument, there's no need to scan the string for printf formats. |
@@ -681,7 +699,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...); | |||
681 | * the @ip is passed in via the trace_puts macro. | 699 | * the @ip is passed in via the trace_puts macro. |
682 | * | 700 | * |
683 | * This is similar to trace_printk() but is made for those really fast | 701 | * This is similar to trace_printk() but is made for those really fast |
684 | * paths that a developer wants the least amount of "Heisenbug" affects, | 702 | * paths that a developer wants the least amount of "Heisenbug" effects, |
685 | * where the processing of the print format is still too much. | 703 | * where the processing of the print format is still too much. |
686 | * | 704 | * |
687 | * This function allows a kernel developer to debug fast path sections | 705 | * This function allows a kernel developer to debug fast path sections |
@@ -692,7 +710,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...); | |||
692 | * This is intended as a debugging tool for the developer only. | 710 | * This is intended as a debugging tool for the developer only. |
693 | * Please refrain from leaving trace_puts scattered around in | 711 | * Please refrain from leaving trace_puts scattered around in |
694 | * your code. (Extra memory is used for special buffers that are | 712 | * your code. (Extra memory is used for special buffers that are |
695 | * allocated when trace_puts() is used) | 713 | * allocated when trace_puts() is used.) |
696 | * | 714 | * |
697 | * Returns: 0 if nothing was written, positive # if string was. | 715 | * Returns: 0 if nothing was written, positive # if string was. |
698 | * (1 when __trace_bputs is used, strlen(str) when __trace_puts is used) | 716 | * (1 when __trace_bputs is used, strlen(str) when __trace_puts is used) |
@@ -771,6 +789,12 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
771 | t2 min2 = (y); \ | 789 | t2 min2 = (y); \ |
772 | (void) (&min1 == &min2); \ | 790 | (void) (&min1 == &min2); \ |
773 | min1 < min2 ? min1 : min2; }) | 791 | min1 < min2 ? min1 : min2; }) |
792 | |||
793 | /** | ||
794 | * min - return minimum of two values of the same or compatible types | ||
795 | * @x: first value | ||
796 | * @y: second value | ||
797 | */ | ||
774 | #define min(x, y) \ | 798 | #define min(x, y) \ |
775 | __min(typeof(x), typeof(y), \ | 799 | __min(typeof(x), typeof(y), \ |
776 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ | 800 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ |
@@ -781,12 +805,31 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
781 | t2 max2 = (y); \ | 805 | t2 max2 = (y); \ |
782 | (void) (&max1 == &max2); \ | 806 | (void) (&max1 == &max2); \ |
783 | max1 > max2 ? max1 : max2; }) | 807 | max1 > max2 ? max1 : max2; }) |
808 | |||
809 | /** | ||
810 | * max - return maximum of two values of the same or compatible types | ||
811 | * @x: first value | ||
812 | * @y: second value | ||
813 | */ | ||
784 | #define max(x, y) \ | 814 | #define max(x, y) \ |
785 | __max(typeof(x), typeof(y), \ | 815 | __max(typeof(x), typeof(y), \ |
786 | __UNIQUE_ID(max1_), __UNIQUE_ID(max2_), \ | 816 | __UNIQUE_ID(max1_), __UNIQUE_ID(max2_), \ |
787 | x, y) | 817 | x, y) |
788 | 818 | ||
819 | /** | ||
820 | * min3 - return minimum of three values | ||
821 | * @x: first value | ||
822 | * @y: second value | ||
823 | * @z: third value | ||
824 | */ | ||
789 | #define min3(x, y, z) min((typeof(x))min(x, y), z) | 825 | #define min3(x, y, z) min((typeof(x))min(x, y), z) |
826 | |||
827 | /** | ||
828 | * max3 - return maximum of three values | ||
829 | * @x: first value | ||
830 | * @y: second value | ||
831 | * @z: third value | ||
832 | */ | ||
790 | #define max3(x, y, z) max((typeof(x))max(x, y), z) | 833 | #define max3(x, y, z) max((typeof(x))max(x, y), z) |
791 | 834 | ||
792 | /** | 835 | /** |
@@ -805,8 +848,8 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
805 | * @lo: lowest allowable value | 848 | * @lo: lowest allowable value |
806 | * @hi: highest allowable value | 849 | * @hi: highest allowable value |
807 | * | 850 | * |
808 | * This macro does strict typechecking of lo/hi to make sure they are of the | 851 | * This macro does strict typechecking of @lo/@hi to make sure they are of the |
809 | * same type as val. See the unnecessary pointer comparisons. | 852 | * same type as @val. See the unnecessary pointer comparisons. |
810 | */ | 853 | */ |
811 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) | 854 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) |
812 | 855 | ||
@@ -816,11 +859,24 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
816 | * | 859 | * |
817 | * Or not use min/max/clamp at all, of course. | 860 | * Or not use min/max/clamp at all, of course. |
818 | */ | 861 | */ |
862 | |||
863 | /** | ||
864 | * min_t - return minimum of two values, using the specified type | ||
865 | * @type: data type to use | ||
866 | * @x: first value | ||
867 | * @y: second value | ||
868 | */ | ||
819 | #define min_t(type, x, y) \ | 869 | #define min_t(type, x, y) \ |
820 | __min(type, type, \ | 870 | __min(type, type, \ |
821 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ | 871 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ |
822 | x, y) | 872 | x, y) |
823 | 873 | ||
874 | /** | ||
875 | * max_t - return maximum of two values, using the specified type | ||
876 | * @type: data type to use | ||
877 | * @x: first value | ||
878 | * @y: second value | ||
879 | */ | ||
824 | #define max_t(type, x, y) \ | 880 | #define max_t(type, x, y) \ |
825 | __max(type, type, \ | 881 | __max(type, type, \ |
826 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ | 882 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ |
@@ -834,7 +890,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
834 | * @hi: maximum allowable value | 890 | * @hi: maximum allowable value |
835 | * | 891 | * |
836 | * This macro does no typechecking and uses temporary variables of type | 892 | * This macro does no typechecking and uses temporary variables of type |
837 | * 'type' to make all the comparisons. | 893 | * @type to make all the comparisons. |
838 | */ | 894 | */ |
839 | #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) | 895 | #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) |
840 | 896 | ||
@@ -845,15 +901,17 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
845 | * @hi: maximum allowable value | 901 | * @hi: maximum allowable value |
846 | * | 902 | * |
847 | * This macro does no typechecking and uses temporary variables of whatever | 903 | * This macro does no typechecking and uses temporary variables of whatever |
848 | * type the input argument 'val' is. This is useful when val is an unsigned | 904 | * type the input argument @val is. This is useful when @val is an unsigned |
849 | * type and min and max are literals that will otherwise be assigned a signed | 905 | * type and @lo and @hi are literals that will otherwise be assigned a signed |
850 | * integer type. | 906 | * integer type. |
851 | */ | 907 | */ |
852 | #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) | 908 | #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) |
853 | 909 | ||
854 | 910 | ||
855 | /* | 911 | /** |
856 | * swap - swap value of @a and @b | 912 | * swap - swap values of @a and @b |
913 | * @a: first value | ||
914 | * @b: second value | ||
857 | */ | 915 | */ |
858 | #define swap(a, b) \ | 916 | #define swap(a, b) \ |
859 | do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) | 917 | do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) |
diff --git a/include/linux/key.h b/include/linux/key.h index e315e16b6ff8..8a15cabe928d 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -138,6 +138,11 @@ struct key_restriction { | |||
138 | struct key_type *keytype; | 138 | struct key_type *keytype; |
139 | }; | 139 | }; |
140 | 140 | ||
141 | enum key_state { | ||
142 | KEY_IS_UNINSTANTIATED, | ||
143 | KEY_IS_POSITIVE, /* Positively instantiated */ | ||
144 | }; | ||
145 | |||
141 | /*****************************************************************************/ | 146 | /*****************************************************************************/ |
142 | /* | 147 | /* |
143 | * authentication token / access credential / keyring | 148 | * authentication token / access credential / keyring |
@@ -169,6 +174,7 @@ struct key { | |||
169 | * - may not match RCU dereferenced payload | 174 | * - may not match RCU dereferenced payload |
170 | * - payload should contain own length | 175 | * - payload should contain own length |
171 | */ | 176 | */ |
177 | short state; /* Key state (+) or rejection error (-) */ | ||
172 | 178 | ||
173 | #ifdef KEY_DEBUGGING | 179 | #ifdef KEY_DEBUGGING |
174 | unsigned magic; | 180 | unsigned magic; |
@@ -176,18 +182,16 @@ struct key { | |||
176 | #endif | 182 | #endif |
177 | 183 | ||
178 | unsigned long flags; /* status flags (change with bitops) */ | 184 | unsigned long flags; /* status flags (change with bitops) */ |
179 | #define KEY_FLAG_INSTANTIATED 0 /* set if key has been instantiated */ | 185 | #define KEY_FLAG_DEAD 0 /* set if key type has been deleted */ |
180 | #define KEY_FLAG_DEAD 1 /* set if key type has been deleted */ | 186 | #define KEY_FLAG_REVOKED 1 /* set if key had been revoked */ |
181 | #define KEY_FLAG_REVOKED 2 /* set if key had been revoked */ | 187 | #define KEY_FLAG_IN_QUOTA 2 /* set if key consumes quota */ |
182 | #define KEY_FLAG_IN_QUOTA 3 /* set if key consumes quota */ | 188 | #define KEY_FLAG_USER_CONSTRUCT 3 /* set if key is being constructed in userspace */ |
183 | #define KEY_FLAG_USER_CONSTRUCT 4 /* set if key is being constructed in userspace */ | 189 | #define KEY_FLAG_ROOT_CAN_CLEAR 4 /* set if key can be cleared by root without permission */ |
184 | #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */ | 190 | #define KEY_FLAG_INVALIDATED 5 /* set if key has been invalidated */ |
185 | #define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */ | 191 | #define KEY_FLAG_BUILTIN 6 /* set if key is built in to the kernel */ |
186 | #define KEY_FLAG_INVALIDATED 7 /* set if key has been invalidated */ | 192 | #define KEY_FLAG_ROOT_CAN_INVAL 7 /* set if key can be invalidated by root without permission */ |
187 | #define KEY_FLAG_BUILTIN 8 /* set if key is built in to the kernel */ | 193 | #define KEY_FLAG_KEEP 8 /* set if key should not be removed */ |
188 | #define KEY_FLAG_ROOT_CAN_INVAL 9 /* set if key can be invalidated by root without permission */ | 194 | #define KEY_FLAG_UID_KEYRING 9 /* set if key is a user or user session keyring */ |
189 | #define KEY_FLAG_KEEP 10 /* set if key should not be removed */ | ||
190 | #define KEY_FLAG_UID_KEYRING 11 /* set if key is a user or user session keyring */ | ||
191 | 195 | ||
192 | /* the key type and key description string | 196 | /* the key type and key description string |
193 | * - the desc is used to match a key against search criteria | 197 | * - the desc is used to match a key against search criteria |
@@ -213,7 +217,6 @@ struct key { | |||
213 | struct list_head name_link; | 217 | struct list_head name_link; |
214 | struct assoc_array keys; | 218 | struct assoc_array keys; |
215 | }; | 219 | }; |
216 | int reject_error; | ||
217 | }; | 220 | }; |
218 | 221 | ||
219 | /* This is set on a keyring to restrict the addition of a link to a key | 222 | /* This is set on a keyring to restrict the addition of a link to a key |
@@ -353,17 +356,27 @@ extern void key_set_timeout(struct key *, unsigned); | |||
353 | #define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */ | 356 | #define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */ |
354 | #define KEY_NEED_ALL 0x3f /* All the above permissions */ | 357 | #define KEY_NEED_ALL 0x3f /* All the above permissions */ |
355 | 358 | ||
359 | static inline short key_read_state(const struct key *key) | ||
360 | { | ||
361 | /* Barrier versus mark_key_instantiated(). */ | ||
362 | return smp_load_acquire(&key->state); | ||
363 | } | ||
364 | |||
356 | /** | 365 | /** |
357 | * key_is_instantiated - Determine if a key has been positively instantiated | 366 | * key_is_positive - Determine if a key has been positively instantiated |
358 | * @key: The key to check. | 367 | * @key: The key to check. |
359 | * | 368 | * |
360 | * Return true if the specified key has been positively instantiated, false | 369 | * Return true if the specified key has been positively instantiated, false |
361 | * otherwise. | 370 | * otherwise. |
362 | */ | 371 | */ |
363 | static inline bool key_is_instantiated(const struct key *key) | 372 | static inline bool key_is_positive(const struct key *key) |
373 | { | ||
374 | return key_read_state(key) == KEY_IS_POSITIVE; | ||
375 | } | ||
376 | |||
377 | static inline bool key_is_negative(const struct key *key) | ||
364 | { | 378 | { |
365 | return test_bit(KEY_FLAG_INSTANTIATED, &key->flags) && | 379 | return key_read_state(key) < 0; |
366 | !test_bit(KEY_FLAG_NEGATIVE, &key->flags); | ||
367 | } | 380 | } |
368 | 381 | ||
369 | #define dereference_key_rcu(KEY) \ | 382 | #define dereference_key_rcu(KEY) \ |
diff --git a/include/linux/mbus.h b/include/linux/mbus.h index 0d3f14fd2621..4773145246ed 100644 --- a/include/linux/mbus.h +++ b/include/linux/mbus.h | |||
@@ -31,8 +31,8 @@ struct mbus_dram_target_info | |||
31 | struct mbus_dram_window { | 31 | struct mbus_dram_window { |
32 | u8 cs_index; | 32 | u8 cs_index; |
33 | u8 mbus_attr; | 33 | u8 mbus_attr; |
34 | u32 base; | 34 | u64 base; |
35 | u32 size; | 35 | u64 size; |
36 | } cs[4]; | 36 | } cs[4]; |
37 | }; | 37 | }; |
38 | 38 | ||
diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h index c57d4b7de3a8..c59af8ab753a 100644 --- a/include/linux/mlx5/port.h +++ b/include/linux/mlx5/port.h | |||
@@ -157,6 +157,8 @@ int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, u8 *prio_tc); | |||
157 | int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev, | 157 | int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev, |
158 | u8 prio, u8 *tc); | 158 | u8 prio, u8 *tc); |
159 | int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, u8 *tc_group); | 159 | int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, u8 *tc_group); |
160 | int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev, | ||
161 | u8 tc, u8 *tc_group); | ||
160 | int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *tc_bw); | 162 | int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *tc_bw); |
161 | int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev, | 163 | int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev, |
162 | u8 tc, u8 *bw_pct); | 164 | u8 tc, u8 *bw_pct); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 46f4ecf5479a..1861ea8dba77 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -445,6 +445,9 @@ struct mm_struct { | |||
445 | unsigned long flags; /* Must use atomic bitops to access the bits */ | 445 | unsigned long flags; /* Must use atomic bitops to access the bits */ |
446 | 446 | ||
447 | struct core_state *core_state; /* coredumping support */ | 447 | struct core_state *core_state; /* coredumping support */ |
448 | #ifdef CONFIG_MEMBARRIER | ||
449 | atomic_t membarrier_state; | ||
450 | #endif | ||
448 | #ifdef CONFIG_AIO | 451 | #ifdef CONFIG_AIO |
449 | spinlock_t ioctx_lock; | 452 | spinlock_t ioctx_lock; |
450 | struct kioctx_table __rcu *ioctx_table; | 453 | struct kioctx_table __rcu *ioctx_table; |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 694cebb50f72..2657f9f51536 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -293,6 +293,7 @@ struct pcmcia_device_id { | |||
293 | #define INPUT_DEVICE_ID_SND_MAX 0x07 | 293 | #define INPUT_DEVICE_ID_SND_MAX 0x07 |
294 | #define INPUT_DEVICE_ID_FF_MAX 0x7f | 294 | #define INPUT_DEVICE_ID_FF_MAX 0x7f |
295 | #define INPUT_DEVICE_ID_SW_MAX 0x0f | 295 | #define INPUT_DEVICE_ID_SW_MAX 0x0f |
296 | #define INPUT_DEVICE_ID_PROP_MAX 0x1f | ||
296 | 297 | ||
297 | #define INPUT_DEVICE_ID_MATCH_BUS 1 | 298 | #define INPUT_DEVICE_ID_MATCH_BUS 1 |
298 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 | 299 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 |
@@ -308,6 +309,7 @@ struct pcmcia_device_id { | |||
308 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 | 309 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 |
309 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 | 310 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 |
310 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | 311 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 |
312 | #define INPUT_DEVICE_ID_MATCH_PROPBIT 0x2000 | ||
311 | 313 | ||
312 | struct input_device_id { | 314 | struct input_device_id { |
313 | 315 | ||
@@ -327,6 +329,7 @@ struct input_device_id { | |||
327 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; | 329 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; |
328 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; | 330 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; |
329 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; | 331 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; |
332 | kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1]; | ||
330 | 333 | ||
331 | kernel_ulong_t driver_info; | 334 | kernel_ulong_t driver_info; |
332 | }; | 335 | }; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f535779d9dc1..2eaac7d75af4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3694,6 +3694,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, | |||
3694 | unsigned char name_assign_type, | 3694 | unsigned char name_assign_type, |
3695 | void (*setup)(struct net_device *), | 3695 | void (*setup)(struct net_device *), |
3696 | unsigned int txqs, unsigned int rxqs); | 3696 | unsigned int txqs, unsigned int rxqs); |
3697 | int dev_get_valid_name(struct net *net, struct net_device *dev, | ||
3698 | const char *name); | ||
3699 | |||
3697 | #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \ | 3700 | #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \ |
3698 | alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1) | 3701 | alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1) |
3699 | 3702 | ||
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index 2c2a5514b0df..528b24c78308 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
@@ -108,9 +108,10 @@ struct ebt_table { | |||
108 | 108 | ||
109 | #define EBT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & \ | 109 | #define EBT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & \ |
110 | ~(__alignof__(struct _xt_align)-1)) | 110 | ~(__alignof__(struct _xt_align)-1)) |
111 | extern struct ebt_table *ebt_register_table(struct net *net, | 111 | extern int ebt_register_table(struct net *net, |
112 | const struct ebt_table *table, | 112 | const struct ebt_table *table, |
113 | const struct nf_hook_ops *); | 113 | const struct nf_hook_ops *ops, |
114 | struct ebt_table **res); | ||
114 | extern void ebt_unregister_table(struct net *net, struct ebt_table *table, | 115 | extern void ebt_unregister_table(struct net *net, struct ebt_table *table, |
115 | const struct nf_hook_ops *); | 116 | const struct nf_hook_ops *); |
116 | extern unsigned int ebt_do_table(struct sk_buff *skb, | 117 | extern unsigned int ebt_do_table(struct sk_buff *skb, |
diff --git a/include/linux/of.h b/include/linux/of.h index cfc34117fc92..b240ed69dc96 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -734,6 +734,16 @@ static inline struct device_node *of_get_cpu_node(int cpu, | |||
734 | return NULL; | 734 | return NULL; |
735 | } | 735 | } |
736 | 736 | ||
737 | static inline int of_n_addr_cells(struct device_node *np) | ||
738 | { | ||
739 | return 0; | ||
740 | |||
741 | } | ||
742 | static inline int of_n_size_cells(struct device_node *np) | ||
743 | { | ||
744 | return 0; | ||
745 | } | ||
746 | |||
737 | static inline int of_property_read_u64(const struct device_node *np, | 747 | static inline int of_property_read_u64(const struct device_node *np, |
738 | const char *propname, u64 *out_value) | 748 | const char *propname, u64 *out_value) |
739 | { | 749 | { |
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 032b55909145..6737a8c9e8c6 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h | |||
@@ -27,16 +27,17 @@ enum pm_qos_flags_status { | |||
27 | PM_QOS_FLAGS_ALL, | 27 | PM_QOS_FLAGS_ALL, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #define PM_QOS_DEFAULT_VALUE -1 | 30 | #define PM_QOS_DEFAULT_VALUE (-1) |
31 | #define PM_QOS_LATENCY_ANY S32_MAX | ||
31 | 32 | ||
32 | #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) | 33 | #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) |
33 | #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) | 34 | #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) |
34 | #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 | 35 | #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 |
35 | #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0 | 36 | #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0 |
36 | #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 | 37 | #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 |
38 | #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY | ||
37 | #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 | 39 | #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 |
38 | #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) | 40 | #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) |
39 | #define PM_QOS_LATENCY_ANY ((s32)(~(__u32)0 >> 1)) | ||
40 | 41 | ||
41 | #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) | 42 | #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) |
42 | #define PM_QOS_FLAG_REMOTE_WAKEUP (1 << 1) | 43 | #define PM_QOS_FLAG_REMOTE_WAKEUP (1 << 1) |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index b1fd8bf85fdc..2bea1d5e9930 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -276,7 +276,7 @@ static inline void list_splice_tail_init_rcu(struct list_head *list, | |||
276 | #define list_entry_rcu(ptr, type, member) \ | 276 | #define list_entry_rcu(ptr, type, member) \ |
277 | container_of(lockless_dereference(ptr), type, member) | 277 | container_of(lockless_dereference(ptr), type, member) |
278 | 278 | ||
279 | /** | 279 | /* |
280 | * Where are list_empty_rcu() and list_first_entry_rcu()? | 280 | * Where are list_empty_rcu() and list_first_entry_rcu()? |
281 | * | 281 | * |
282 | * Implementing those functions following their counterparts list_empty() and | 282 | * Implementing those functions following their counterparts list_empty() and |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index de50d8a4cf41..1a9f70d44af9 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -523,7 +523,7 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
523 | * Return the value of the specified RCU-protected pointer, but omit | 523 | * Return the value of the specified RCU-protected pointer, but omit |
524 | * both the smp_read_barrier_depends() and the READ_ONCE(). This | 524 | * both the smp_read_barrier_depends() and the READ_ONCE(). This |
525 | * is useful in cases where update-side locks prevent the value of the | 525 | * is useful in cases where update-side locks prevent the value of the |
526 | * pointer from changing. Please note that this primitive does -not- | 526 | * pointer from changing. Please note that this primitive does *not* |
527 | * prevent the compiler from repeating this reference or combining it | 527 | * prevent the compiler from repeating this reference or combining it |
528 | * with other references, so it should not be used without protection | 528 | * with other references, so it should not be used without protection |
529 | * of appropriate locks. | 529 | * of appropriate locks. |
@@ -568,7 +568,7 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
568 | * is handed off from RCU to some other synchronization mechanism, for | 568 | * is handed off from RCU to some other synchronization mechanism, for |
569 | * example, reference counting or locking. In C11, it would map to | 569 | * example, reference counting or locking. In C11, it would map to |
570 | * kill_dependency(). It could be used as follows: | 570 | * kill_dependency(). It could be used as follows: |
571 | * | 571 | * `` |
572 | * rcu_read_lock(); | 572 | * rcu_read_lock(); |
573 | * p = rcu_dereference(gp); | 573 | * p = rcu_dereference(gp); |
574 | * long_lived = is_long_lived(p); | 574 | * long_lived = is_long_lived(p); |
@@ -579,6 +579,7 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
579 | * p = rcu_pointer_handoff(p); | 579 | * p = rcu_pointer_handoff(p); |
580 | * } | 580 | * } |
581 | * rcu_read_unlock(); | 581 | * rcu_read_unlock(); |
582 | *`` | ||
582 | */ | 583 | */ |
583 | #define rcu_pointer_handoff(p) (p) | 584 | #define rcu_pointer_handoff(p) (p) |
584 | 585 | ||
@@ -778,18 +779,21 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
778 | 779 | ||
779 | /** | 780 | /** |
780 | * RCU_INIT_POINTER() - initialize an RCU protected pointer | 781 | * RCU_INIT_POINTER() - initialize an RCU protected pointer |
782 | * @p: The pointer to be initialized. | ||
783 | * @v: The value to initialized the pointer to. | ||
781 | * | 784 | * |
782 | * Initialize an RCU-protected pointer in special cases where readers | 785 | * Initialize an RCU-protected pointer in special cases where readers |
783 | * do not need ordering constraints on the CPU or the compiler. These | 786 | * do not need ordering constraints on the CPU or the compiler. These |
784 | * special cases are: | 787 | * special cases are: |
785 | * | 788 | * |
786 | * 1. This use of RCU_INIT_POINTER() is NULLing out the pointer -or- | 789 | * 1. This use of RCU_INIT_POINTER() is NULLing out the pointer *or* |
787 | * 2. The caller has taken whatever steps are required to prevent | 790 | * 2. The caller has taken whatever steps are required to prevent |
788 | * RCU readers from concurrently accessing this pointer -or- | 791 | * RCU readers from concurrently accessing this pointer *or* |
789 | * 3. The referenced data structure has already been exposed to | 792 | * 3. The referenced data structure has already been exposed to |
790 | * readers either at compile time or via rcu_assign_pointer() -and- | 793 | * readers either at compile time or via rcu_assign_pointer() *and* |
791 | * a. You have not made -any- reader-visible changes to | 794 | * |
792 | * this structure since then -or- | 795 | * a. You have not made *any* reader-visible changes to |
796 | * this structure since then *or* | ||
793 | * b. It is OK for readers accessing this structure from its | 797 | * b. It is OK for readers accessing this structure from its |
794 | * new location to see the old state of the structure. (For | 798 | * new location to see the old state of the structure. (For |
795 | * example, the changes were to statistical counters or to | 799 | * example, the changes were to statistical counters or to |
@@ -805,7 +809,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
805 | * by a single external-to-structure RCU-protected pointer, then you may | 809 | * by a single external-to-structure RCU-protected pointer, then you may |
806 | * use RCU_INIT_POINTER() to initialize the internal RCU-protected | 810 | * use RCU_INIT_POINTER() to initialize the internal RCU-protected |
807 | * pointers, but you must use rcu_assign_pointer() to initialize the | 811 | * pointers, but you must use rcu_assign_pointer() to initialize the |
808 | * external-to-structure pointer -after- you have completely initialized | 812 | * external-to-structure pointer *after* you have completely initialized |
809 | * the reader-accessible portions of the linked structure. | 813 | * the reader-accessible portions of the linked structure. |
810 | * | 814 | * |
811 | * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no | 815 | * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no |
@@ -819,6 +823,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
819 | 823 | ||
820 | /** | 824 | /** |
821 | * RCU_POINTER_INITIALIZER() - statically initialize an RCU protected pointer | 825 | * RCU_POINTER_INITIALIZER() - statically initialize an RCU protected pointer |
826 | * @p: The pointer to be initialized. | ||
827 | * @v: The value to initialized the pointer to. | ||
822 | * | 828 | * |
823 | * GCC-style initialization for an RCU-protected pointer in a structure field. | 829 | * GCC-style initialization for an RCU-protected pointer in a structure field. |
824 | */ | 830 | */ |
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h index ae53e413fb13..ab9bf7b73954 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h | |||
@@ -211,4 +211,20 @@ static inline void memalloc_noreclaim_restore(unsigned int flags) | |||
211 | current->flags = (current->flags & ~PF_MEMALLOC) | flags; | 211 | current->flags = (current->flags & ~PF_MEMALLOC) | flags; |
212 | } | 212 | } |
213 | 213 | ||
214 | #ifdef CONFIG_MEMBARRIER | ||
215 | enum { | ||
216 | MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY = (1U << 0), | ||
217 | MEMBARRIER_STATE_SWITCH_MM = (1U << 1), | ||
218 | }; | ||
219 | |||
220 | static inline void membarrier_execve(struct task_struct *t) | ||
221 | { | ||
222 | atomic_set(&t->mm->membarrier_state, 0); | ||
223 | } | ||
224 | #else | ||
225 | static inline void membarrier_execve(struct task_struct *t) | ||
226 | { | ||
227 | } | ||
228 | #endif | ||
229 | |||
214 | #endif /* _LINUX_SCHED_MM_H */ | 230 | #endif /* _LINUX_SCHED_MM_H */ |
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h index d7b6dab956ec..7d065abc7a47 100644 --- a/include/linux/sched/topology.h +++ b/include/linux/sched/topology.h | |||
@@ -71,14 +71,6 @@ struct sched_domain_shared { | |||
71 | atomic_t ref; | 71 | atomic_t ref; |
72 | atomic_t nr_busy_cpus; | 72 | atomic_t nr_busy_cpus; |
73 | int has_idle_cores; | 73 | int has_idle_cores; |
74 | |||
75 | /* | ||
76 | * Some variables from the most recent sd_lb_stats for this domain, | ||
77 | * used by wake_affine(). | ||
78 | */ | ||
79 | unsigned long nr_running; | ||
80 | unsigned long load; | ||
81 | unsigned long capacity; | ||
82 | }; | 74 | }; |
83 | 75 | ||
84 | struct sched_domain { | 76 | struct sched_domain { |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 82b171e1aa0b..da803dfc7a39 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -231,7 +231,7 @@ struct sctp_datahdr { | |||
231 | __be32 tsn; | 231 | __be32 tsn; |
232 | __be16 stream; | 232 | __be16 stream; |
233 | __be16 ssn; | 233 | __be16 ssn; |
234 | __be32 ppid; | 234 | __u32 ppid; |
235 | __u8 payload[0]; | 235 | __u8 payload[0]; |
236 | }; | 236 | }; |
237 | 237 | ||
@@ -716,28 +716,28 @@ struct sctp_reconf_chunk { | |||
716 | 716 | ||
717 | struct sctp_strreset_outreq { | 717 | struct sctp_strreset_outreq { |
718 | struct sctp_paramhdr param_hdr; | 718 | struct sctp_paramhdr param_hdr; |
719 | __u32 request_seq; | 719 | __be32 request_seq; |
720 | __u32 response_seq; | 720 | __be32 response_seq; |
721 | __u32 send_reset_at_tsn; | 721 | __be32 send_reset_at_tsn; |
722 | __u16 list_of_streams[0]; | 722 | __be16 list_of_streams[0]; |
723 | }; | 723 | }; |
724 | 724 | ||
725 | struct sctp_strreset_inreq { | 725 | struct sctp_strreset_inreq { |
726 | struct sctp_paramhdr param_hdr; | 726 | struct sctp_paramhdr param_hdr; |
727 | __u32 request_seq; | 727 | __be32 request_seq; |
728 | __u16 list_of_streams[0]; | 728 | __be16 list_of_streams[0]; |
729 | }; | 729 | }; |
730 | 730 | ||
731 | struct sctp_strreset_tsnreq { | 731 | struct sctp_strreset_tsnreq { |
732 | struct sctp_paramhdr param_hdr; | 732 | struct sctp_paramhdr param_hdr; |
733 | __u32 request_seq; | 733 | __be32 request_seq; |
734 | }; | 734 | }; |
735 | 735 | ||
736 | struct sctp_strreset_addstrm { | 736 | struct sctp_strreset_addstrm { |
737 | struct sctp_paramhdr param_hdr; | 737 | struct sctp_paramhdr param_hdr; |
738 | __u32 request_seq; | 738 | __be32 request_seq; |
739 | __u16 number_of_streams; | 739 | __be16 number_of_streams; |
740 | __u16 reserved; | 740 | __be16 reserved; |
741 | }; | 741 | }; |
742 | 742 | ||
743 | enum { | 743 | enum { |
@@ -752,16 +752,16 @@ enum { | |||
752 | 752 | ||
753 | struct sctp_strreset_resp { | 753 | struct sctp_strreset_resp { |
754 | struct sctp_paramhdr param_hdr; | 754 | struct sctp_paramhdr param_hdr; |
755 | __u32 response_seq; | 755 | __be32 response_seq; |
756 | __u32 result; | 756 | __be32 result; |
757 | }; | 757 | }; |
758 | 758 | ||
759 | struct sctp_strreset_resptsn { | 759 | struct sctp_strreset_resptsn { |
760 | struct sctp_paramhdr param_hdr; | 760 | struct sctp_paramhdr param_hdr; |
761 | __u32 response_seq; | 761 | __be32 response_seq; |
762 | __u32 result; | 762 | __be32 result; |
763 | __u32 senders_next_tsn; | 763 | __be32 senders_next_tsn; |
764 | __u32 receivers_next_tsn; | 764 | __be32 receivers_next_tsn; |
765 | }; | 765 | }; |
766 | 766 | ||
767 | #endif /* __LINUX_SCTP_H__ */ | 767 | #endif /* __LINUX_SCTP_H__ */ |
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 39af9bc0f653..62be8966e837 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
@@ -78,6 +78,7 @@ void synchronize_srcu(struct srcu_struct *sp); | |||
78 | 78 | ||
79 | /** | 79 | /** |
80 | * srcu_read_lock_held - might we be in SRCU read-side critical section? | 80 | * srcu_read_lock_held - might we be in SRCU read-side critical section? |
81 | * @sp: The srcu_struct structure to check | ||
81 | * | 82 | * |
82 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU | 83 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU |
83 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, | 84 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, |
diff --git a/include/linux/swait.h b/include/linux/swait.h index 73e97a08d3d0..cf30f5022472 100644 --- a/include/linux/swait.h +++ b/include/linux/swait.h | |||
@@ -9,13 +9,16 @@ | |||
9 | /* | 9 | /* |
10 | * Simple wait queues | 10 | * Simple wait queues |
11 | * | 11 | * |
12 | * While these are very similar to the other/complex wait queues (wait.h) the | 12 | * While these are very similar to regular wait queues (wait.h) the most |
13 | * most important difference is that the simple waitqueue allows for | 13 | * important difference is that the simple waitqueue allows for deterministic |
14 | * deterministic behaviour -- IOW it has strictly bounded IRQ and lock hold | 14 | * behaviour -- IOW it has strictly bounded IRQ and lock hold times. |
15 | * times. | ||
16 | * | 15 | * |
17 | * In order to make this so, we had to drop a fair number of features of the | 16 | * Mainly, this is accomplished by two things. Firstly not allowing swake_up_all |
18 | * other waitqueue code; notably: | 17 | * from IRQ disabled, and dropping the lock upon every wakeup, giving a higher |
18 | * priority task a chance to run. | ||
19 | * | ||
20 | * Secondly, we had to drop a fair number of features of the other waitqueue | ||
21 | * code; notably: | ||
19 | * | 22 | * |
20 | * - mixing INTERRUPTIBLE and UNINTERRUPTIBLE sleeps on the same waitqueue; | 23 | * - mixing INTERRUPTIBLE and UNINTERRUPTIBLE sleeps on the same waitqueue; |
21 | * all wakeups are TASK_NORMAL in order to avoid O(n) lookups for the right | 24 | * all wakeups are TASK_NORMAL in order to avoid O(n) lookups for the right |
@@ -24,12 +27,14 @@ | |||
24 | * - the exclusive mode; because this requires preserving the list order | 27 | * - the exclusive mode; because this requires preserving the list order |
25 | * and this is hard. | 28 | * and this is hard. |
26 | * | 29 | * |
27 | * - custom wake functions; because you cannot give any guarantees about | 30 | * - custom wake callback functions; because you cannot give any guarantees |
28 | * random code. | 31 | * about random code. This also allows swait to be used in RT, such that |
29 | * | 32 | * raw spinlock can be used for the swait queue head. |
30 | * As a side effect of this; the data structures are slimmer. | ||
31 | * | 33 | * |
32 | * One would recommend using this wait queue where possible. | 34 | * As a side effect of these; the data structures are slimmer albeit more ad-hoc. |
35 | * For all the above, note that simple wait queues should _only_ be used under | ||
36 | * very specific realtime constraints -- it is best to stick with the regular | ||
37 | * wait queues in most cases. | ||
33 | */ | 38 | */ |
34 | 39 | ||
35 | struct task_struct; | 40 | struct task_struct; |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 905d769d8ddc..5f7eeab990fe 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -42,7 +42,7 @@ enum { | |||
42 | #define THREAD_ALIGN THREAD_SIZE | 42 | #define THREAD_ALIGN THREAD_SIZE |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #ifdef CONFIG_DEBUG_STACK_USAGE | 45 | #if IS_ENABLED(CONFIG_DEBUG_STACK_USAGE) || IS_ENABLED(CONFIG_DEBUG_KMEMLEAK) |
46 | # define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \ | 46 | # define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \ |
47 | __GFP_ZERO) | 47 | __GFP_ZERO) |
48 | #else | 48 | #else |
diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h index 4e6131cd3f43..ac1a2317941e 100644 --- a/include/net/fq_impl.h +++ b/include/net/fq_impl.h | |||
@@ -146,6 +146,7 @@ static void fq_tin_enqueue(struct fq *fq, | |||
146 | fq_flow_get_default_t get_default_func) | 146 | fq_flow_get_default_t get_default_func) |
147 | { | 147 | { |
148 | struct fq_flow *flow; | 148 | struct fq_flow *flow; |
149 | bool oom; | ||
149 | 150 | ||
150 | lockdep_assert_held(&fq->lock); | 151 | lockdep_assert_held(&fq->lock); |
151 | 152 | ||
@@ -167,8 +168,8 @@ static void fq_tin_enqueue(struct fq *fq, | |||
167 | } | 168 | } |
168 | 169 | ||
169 | __skb_queue_tail(&flow->queue, skb); | 170 | __skb_queue_tail(&flow->queue, skb); |
170 | 171 | oom = (fq->memory_usage > fq->memory_limit); | |
171 | if (fq->backlog > fq->limit || fq->memory_usage > fq->memory_limit) { | 172 | while (fq->backlog > fq->limit || oom) { |
172 | flow = list_first_entry_or_null(&fq->backlogs, | 173 | flow = list_first_entry_or_null(&fq->backlogs, |
173 | struct fq_flow, | 174 | struct fq_flow, |
174 | backlogchain); | 175 | backlogchain); |
@@ -183,8 +184,10 @@ static void fq_tin_enqueue(struct fq *fq, | |||
183 | 184 | ||
184 | flow->tin->overlimit++; | 185 | flow->tin->overlimit++; |
185 | fq->overlimit++; | 186 | fq->overlimit++; |
186 | if (fq->memory_usage > fq->memory_limit) | 187 | if (oom) { |
187 | fq->overmemory++; | 188 | fq->overmemory++; |
189 | oom = (fq->memory_usage > fq->memory_limit); | ||
190 | } | ||
188 | } | 191 | } |
189 | } | 192 | } |
190 | 193 | ||
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index aa95053dfc78..db8162dd8c0b 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -96,7 +96,7 @@ struct inet_request_sock { | |||
96 | kmemcheck_bitfield_end(flags); | 96 | kmemcheck_bitfield_end(flags); |
97 | u32 ir_mark; | 97 | u32 ir_mark; |
98 | union { | 98 | union { |
99 | struct ip_options_rcu *opt; | 99 | struct ip_options_rcu __rcu *ireq_opt; |
100 | #if IS_ENABLED(CONFIG_IPV6) | 100 | #if IS_ENABLED(CONFIG_IPV6) |
101 | struct { | 101 | struct { |
102 | struct ipv6_txoptions *ipv6_opt; | 102 | struct ipv6_txoptions *ipv6_opt; |
@@ -132,6 +132,12 @@ static inline int inet_request_bound_dev_if(const struct sock *sk, | |||
132 | return sk->sk_bound_dev_if; | 132 | return sk->sk_bound_dev_if; |
133 | } | 133 | } |
134 | 134 | ||
135 | static inline struct ip_options_rcu *ireq_opt_deref(const struct inet_request_sock *ireq) | ||
136 | { | ||
137 | return rcu_dereference_check(ireq->ireq_opt, | ||
138 | refcount_read(&ireq->req.rsk_refcnt) > 0); | ||
139 | } | ||
140 | |||
135 | struct inet_cork { | 141 | struct inet_cork { |
136 | unsigned int flags; | 142 | unsigned int flags; |
137 | __be32 addr; | 143 | __be32 addr; |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index e80edd8879ef..3009547f3c66 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __NET_PKT_CLS_H | 2 | #define __NET_PKT_CLS_H |
3 | 3 | ||
4 | #include <linux/pkt_cls.h> | 4 | #include <linux/pkt_cls.h> |
5 | #include <linux/workqueue.h> | ||
5 | #include <net/sch_generic.h> | 6 | #include <net/sch_generic.h> |
6 | #include <net/act_api.h> | 7 | #include <net/act_api.h> |
7 | 8 | ||
@@ -17,6 +18,8 @@ struct tcf_walker { | |||
17 | int register_tcf_proto_ops(struct tcf_proto_ops *ops); | 18 | int register_tcf_proto_ops(struct tcf_proto_ops *ops); |
18 | int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); | 19 | int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); |
19 | 20 | ||
21 | bool tcf_queue_work(struct work_struct *work); | ||
22 | |||
20 | #ifdef CONFIG_NET_CLS | 23 | #ifdef CONFIG_NET_CLS |
21 | struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index, | 24 | struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index, |
22 | bool create); | 25 | bool create); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 135f5a2dd931..0dec8a23be57 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/dynamic_queue_limits.h> | 10 | #include <linux/dynamic_queue_limits.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/refcount.h> | 12 | #include <linux/refcount.h> |
13 | #include <linux/workqueue.h> | ||
13 | #include <net/gen_stats.h> | 14 | #include <net/gen_stats.h> |
14 | #include <net/rtnetlink.h> | 15 | #include <net/rtnetlink.h> |
15 | 16 | ||
@@ -271,6 +272,7 @@ struct tcf_chain { | |||
271 | 272 | ||
272 | struct tcf_block { | 273 | struct tcf_block { |
273 | struct list_head chain_list; | 274 | struct list_head chain_list; |
275 | struct work_struct work; | ||
274 | }; | 276 | }; |
275 | 277 | ||
276 | static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) | 278 | static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 2db3d3a9ce1d..88233cf8b8d4 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -261,7 +261,7 @@ struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc, | |||
261 | struct sctp_fwdtsn_skip *skiplist); | 261 | struct sctp_fwdtsn_skip *skiplist); |
262 | struct sctp_chunk *sctp_make_auth(const struct sctp_association *asoc); | 262 | struct sctp_chunk *sctp_make_auth(const struct sctp_association *asoc); |
263 | struct sctp_chunk *sctp_make_strreset_req(const struct sctp_association *asoc, | 263 | struct sctp_chunk *sctp_make_strreset_req(const struct sctp_association *asoc, |
264 | __u16 stream_num, __u16 *stream_list, | 264 | __u16 stream_num, __be16 *stream_list, |
265 | bool out, bool in); | 265 | bool out, bool in); |
266 | struct sctp_chunk *sctp_make_strreset_tsnreq( | 266 | struct sctp_chunk *sctp_make_strreset_tsnreq( |
267 | const struct sctp_association *asoc); | 267 | const struct sctp_association *asoc); |
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index b8c86ec1a8f5..231dc42f1da6 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h | |||
@@ -130,7 +130,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_sender_dry_event( | |||
130 | 130 | ||
131 | struct sctp_ulpevent *sctp_ulpevent_make_stream_reset_event( | 131 | struct sctp_ulpevent *sctp_ulpevent_make_stream_reset_event( |
132 | const struct sctp_association *asoc, __u16 flags, | 132 | const struct sctp_association *asoc, __u16 flags, |
133 | __u16 stream_num, __u16 *stream_list, gfp_t gfp); | 133 | __u16 stream_num, __be16 *stream_list, gfp_t gfp); |
134 | 134 | ||
135 | struct sctp_ulpevent *sctp_ulpevent_make_assoc_reset_event( | 135 | struct sctp_ulpevent *sctp_ulpevent_make_assoc_reset_event( |
136 | const struct sctp_association *asoc, __u16 flags, | 136 | const struct sctp_association *asoc, __u16 flags, |
diff --git a/include/net/strparser.h b/include/net/strparser.h index 7dc131d62ad5..d96b59f45eba 100644 --- a/include/net/strparser.h +++ b/include/net/strparser.h | |||
@@ -74,10 +74,9 @@ struct strparser { | |||
74 | u32 unrecov_intr : 1; | 74 | u32 unrecov_intr : 1; |
75 | 75 | ||
76 | struct sk_buff **skb_nextp; | 76 | struct sk_buff **skb_nextp; |
77 | struct timer_list msg_timer; | ||
78 | struct sk_buff *skb_head; | 77 | struct sk_buff *skb_head; |
79 | unsigned int need_bytes; | 78 | unsigned int need_bytes; |
80 | struct delayed_work delayed_work; | 79 | struct delayed_work msg_timer_work; |
81 | struct work_struct work; | 80 | struct work_struct work; |
82 | struct strp_stats stats; | 81 | struct strp_stats stats; |
83 | struct strp_callbacks cb; | 82 | struct strp_callbacks cb; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 89974c5286d8..33599d17522d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -840,6 +840,12 @@ struct tcp_skb_cb { | |||
840 | struct inet6_skb_parm h6; | 840 | struct inet6_skb_parm h6; |
841 | #endif | 841 | #endif |
842 | } header; /* For incoming skbs */ | 842 | } header; /* For incoming skbs */ |
843 | struct { | ||
844 | __u32 key; | ||
845 | __u32 flags; | ||
846 | struct bpf_map *map; | ||
847 | void *data_end; | ||
848 | } bpf; | ||
843 | }; | 849 | }; |
844 | }; | 850 | }; |
845 | 851 | ||
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index f90860d1f897..0d7948ce2128 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
@@ -575,7 +575,7 @@ union bpf_attr { | |||
575 | * @map: pointer to sockmap | 575 | * @map: pointer to sockmap |
576 | * @key: key to lookup sock in map | 576 | * @key: key to lookup sock in map |
577 | * @flags: reserved for future use | 577 | * @flags: reserved for future use |
578 | * Return: SK_REDIRECT | 578 | * Return: SK_PASS |
579 | * | 579 | * |
580 | * int bpf_sock_map_update(skops, map, key, flags) | 580 | * int bpf_sock_map_update(skops, map, key, flags) |
581 | * @skops: pointer to bpf_sock_ops | 581 | * @skops: pointer to bpf_sock_ops |
@@ -786,8 +786,8 @@ struct xdp_md { | |||
786 | }; | 786 | }; |
787 | 787 | ||
788 | enum sk_action { | 788 | enum sk_action { |
789 | SK_ABORTED = 0, | 789 | SK_DROP = 0, |
790 | SK_DROP, | 790 | SK_PASS, |
791 | SK_REDIRECT, | 791 | SK_REDIRECT, |
792 | }; | 792 | }; |
793 | 793 | ||
diff --git a/include/uapi/linux/membarrier.h b/include/uapi/linux/membarrier.h index 6d47b3249d8a..4e01ad7ffe98 100644 --- a/include/uapi/linux/membarrier.h +++ b/include/uapi/linux/membarrier.h | |||
@@ -52,21 +52,30 @@ | |||
52 | * (non-running threads are de facto in such a | 52 | * (non-running threads are de facto in such a |
53 | * state). This only covers threads from the | 53 | * state). This only covers threads from the |
54 | * same processes as the caller thread. This | 54 | * same processes as the caller thread. This |
55 | * command returns 0. The "expedited" commands | 55 | * command returns 0 on success. The |
56 | * complete faster than the non-expedited ones, | 56 | * "expedited" commands complete faster than |
57 | * they never block, but have the downside of | 57 | * the non-expedited ones, they never block, |
58 | * causing extra overhead. | 58 | * but have the downside of causing extra |
59 | * overhead. A process needs to register its | ||
60 | * intent to use the private expedited command | ||
61 | * prior to using it, otherwise this command | ||
62 | * returns -EPERM. | ||
63 | * @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: | ||
64 | * Register the process intent to use | ||
65 | * MEMBARRIER_CMD_PRIVATE_EXPEDITED. Always | ||
66 | * returns 0. | ||
59 | * | 67 | * |
60 | * Command to be passed to the membarrier system call. The commands need to | 68 | * Command to be passed to the membarrier system call. The commands need to |
61 | * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to | 69 | * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to |
62 | * the value 0. | 70 | * the value 0. |
63 | */ | 71 | */ |
64 | enum membarrier_cmd { | 72 | enum membarrier_cmd { |
65 | MEMBARRIER_CMD_QUERY = 0, | 73 | MEMBARRIER_CMD_QUERY = 0, |
66 | MEMBARRIER_CMD_SHARED = (1 << 0), | 74 | MEMBARRIER_CMD_SHARED = (1 << 0), |
67 | /* reserved for MEMBARRIER_CMD_SHARED_EXPEDITED (1 << 1) */ | 75 | /* reserved for MEMBARRIER_CMD_SHARED_EXPEDITED (1 << 1) */ |
68 | /* reserved for MEMBARRIER_CMD_PRIVATE (1 << 2) */ | 76 | /* reserved for MEMBARRIER_CMD_PRIVATE (1 << 2) */ |
69 | MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3), | 77 | MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3), |
78 | MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4), | ||
70 | }; | 79 | }; |
71 | 80 | ||
72 | #endif /* _UAPI_LINUX_MEMBARRIER_H */ | 81 | #endif /* _UAPI_LINUX_MEMBARRIER_H */ |
diff --git a/include/uapi/linux/netfilter/xt_bpf.h b/include/uapi/linux/netfilter/xt_bpf.h index b97725af2ac0..da161b56c79e 100644 --- a/include/uapi/linux/netfilter/xt_bpf.h +++ b/include/uapi/linux/netfilter/xt_bpf.h | |||
@@ -23,6 +23,7 @@ enum xt_bpf_modes { | |||
23 | XT_BPF_MODE_FD_PINNED, | 23 | XT_BPF_MODE_FD_PINNED, |
24 | XT_BPF_MODE_FD_ELF, | 24 | XT_BPF_MODE_FD_ELF, |
25 | }; | 25 | }; |
26 | #define XT_BPF_MODE_PATH_PINNED XT_BPF_MODE_FD_PINNED | ||
26 | 27 | ||
27 | struct xt_bpf_info_v1 { | 28 | struct xt_bpf_info_v1 { |
28 | __u16 mode; | 29 | __u16 mode; |
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h index 6217ff8500a1..84fc2914b7fb 100644 --- a/include/uapi/linux/sctp.h +++ b/include/uapi/linux/sctp.h | |||
@@ -376,7 +376,7 @@ struct sctp_remote_error { | |||
376 | __u16 sre_type; | 376 | __u16 sre_type; |
377 | __u16 sre_flags; | 377 | __u16 sre_flags; |
378 | __u32 sre_length; | 378 | __u32 sre_length; |
379 | __u16 sre_error; | 379 | __be16 sre_error; |
380 | sctp_assoc_t sre_assoc_id; | 380 | sctp_assoc_t sre_assoc_id; |
381 | __u8 sre_data[0]; | 381 | __u8 sre_data[0]; |
382 | }; | 382 | }; |
diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h index dd5f21e75805..856de39d0b89 100644 --- a/include/uapi/linux/spi/spidev.h +++ b/include/uapi/linux/spi/spidev.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define SPIDEV_H | 23 | #define SPIDEV_H |
24 | 24 | ||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/ioctl.h> | ||
26 | 27 | ||
27 | /* User space versions of kernel symbols for SPI clocking modes, | 28 | /* User space versions of kernel symbols for SPI clocking modes, |
28 | * matching <linux/spi/spi.h> | 29 | * matching <linux/spi/spi.h> |