diff options
Diffstat (limited to 'include')
64 files changed, 389 insertions, 267 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index faddde44de8c..3063125197ad 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
| @@ -265,33 +265,41 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb, | |||
| 265 | * For now w.r.t page table cache, mark the range_size as PAGE_SIZE | 265 | * For now w.r.t page table cache, mark the range_size as PAGE_SIZE |
| 266 | */ | 266 | */ |
| 267 | 267 | ||
| 268 | #ifndef pte_free_tlb | ||
| 268 | #define pte_free_tlb(tlb, ptep, address) \ | 269 | #define pte_free_tlb(tlb, ptep, address) \ |
| 269 | do { \ | 270 | do { \ |
| 270 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 271 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 271 | __pte_free_tlb(tlb, ptep, address); \ | 272 | __pte_free_tlb(tlb, ptep, address); \ |
| 272 | } while (0) | 273 | } while (0) |
| 274 | #endif | ||
| 273 | 275 | ||
| 276 | #ifndef pmd_free_tlb | ||
| 274 | #define pmd_free_tlb(tlb, pmdp, address) \ | 277 | #define pmd_free_tlb(tlb, pmdp, address) \ |
| 275 | do { \ | 278 | do { \ |
| 276 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 279 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 277 | __pmd_free_tlb(tlb, pmdp, address); \ | 280 | __pmd_free_tlb(tlb, pmdp, address); \ |
| 278 | } while (0) | 281 | } while (0) |
| 282 | #endif | ||
| 279 | 283 | ||
| 280 | #ifndef __ARCH_HAS_4LEVEL_HACK | 284 | #ifndef __ARCH_HAS_4LEVEL_HACK |
| 285 | #ifndef pud_free_tlb | ||
| 281 | #define pud_free_tlb(tlb, pudp, address) \ | 286 | #define pud_free_tlb(tlb, pudp, address) \ |
| 282 | do { \ | 287 | do { \ |
| 283 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 288 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 284 | __pud_free_tlb(tlb, pudp, address); \ | 289 | __pud_free_tlb(tlb, pudp, address); \ |
| 285 | } while (0) | 290 | } while (0) |
| 286 | #endif | 291 | #endif |
| 292 | #endif | ||
| 287 | 293 | ||
| 288 | #ifndef __ARCH_HAS_5LEVEL_HACK | 294 | #ifndef __ARCH_HAS_5LEVEL_HACK |
| 295 | #ifndef p4d_free_tlb | ||
| 289 | #define p4d_free_tlb(tlb, pudp, address) \ | 296 | #define p4d_free_tlb(tlb, pudp, address) \ |
| 290 | do { \ | 297 | do { \ |
| 291 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 298 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 292 | __p4d_free_tlb(tlb, pudp, address); \ | 299 | __p4d_free_tlb(tlb, pudp, address); \ |
| 293 | } while (0) | 300 | } while (0) |
| 294 | #endif | 301 | #endif |
| 302 | #endif | ||
| 295 | 303 | ||
| 296 | #define tlb_migrate_finish(mm) do {} while (0) | 304 | #define tlb_migrate_finish(mm) do {} while (0) |
| 297 | 305 | ||
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index cc414db9da0a..482461d8931d 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h | |||
| @@ -245,7 +245,8 @@ ssize_t af_alg_sendpage(struct socket *sock, struct page *page, | |||
| 245 | int offset, size_t size, int flags); | 245 | int offset, size_t size, int flags); |
| 246 | void af_alg_free_resources(struct af_alg_async_req *areq); | 246 | void af_alg_free_resources(struct af_alg_async_req *areq); |
| 247 | void af_alg_async_cb(struct crypto_async_request *_req, int err); | 247 | void af_alg_async_cb(struct crypto_async_request *_req, int err); |
| 248 | __poll_t af_alg_poll_mask(struct socket *sock, __poll_t events); | 248 | __poll_t af_alg_poll(struct file *file, struct socket *sock, |
| 249 | poll_table *wait); | ||
| 249 | struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, | 250 | struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, |
| 250 | unsigned int areqlen); | 251 | unsigned int areqlen); |
| 251 | int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, | 252 | int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, |
diff --git a/include/dt-bindings/clock/imx6ul-clock.h b/include/dt-bindings/clock/imx6ul-clock.h index 9564597cbfac..0aa1d9c3e0b9 100644 --- a/include/dt-bindings/clock/imx6ul-clock.h +++ b/include/dt-bindings/clock/imx6ul-clock.h | |||
| @@ -235,27 +235,25 @@ | |||
| 235 | #define IMX6UL_CLK_CSI_PODF 222 | 235 | #define IMX6UL_CLK_CSI_PODF 222 |
| 236 | #define IMX6UL_CLK_PLL3_120M 223 | 236 | #define IMX6UL_CLK_PLL3_120M 223 |
| 237 | #define IMX6UL_CLK_KPP 224 | 237 | #define IMX6UL_CLK_KPP 224 |
| 238 | #define IMX6UL_CLK_CKO1_SEL 225 | 238 | #define IMX6ULL_CLK_ESAI_PRED 225 |
| 239 | #define IMX6UL_CLK_CKO1_PODF 226 | 239 | #define IMX6ULL_CLK_ESAI_PODF 226 |
| 240 | #define IMX6UL_CLK_CKO1 227 | 240 | #define IMX6ULL_CLK_ESAI_EXTAL 227 |
| 241 | #define IMX6UL_CLK_CKO2_SEL 228 | 241 | #define IMX6ULL_CLK_ESAI_MEM 228 |
| 242 | #define IMX6UL_CLK_CKO2_PODF 229 | 242 | #define IMX6ULL_CLK_ESAI_IPG 229 |
| 243 | #define IMX6UL_CLK_CKO2 230 | 243 | #define IMX6ULL_CLK_DCP_CLK 230 |
| 244 | #define IMX6UL_CLK_CKO 231 | 244 | #define IMX6ULL_CLK_EPDC_PRE_SEL 231 |
| 245 | 245 | #define IMX6ULL_CLK_EPDC_SEL 232 | |
| 246 | /* For i.MX6ULL */ | 246 | #define IMX6ULL_CLK_EPDC_PODF 233 |
| 247 | #define IMX6ULL_CLK_ESAI_PRED 232 | 247 | #define IMX6ULL_CLK_EPDC_ACLK 234 |
| 248 | #define IMX6ULL_CLK_ESAI_PODF 233 | 248 | #define IMX6ULL_CLK_EPDC_PIX 235 |
| 249 | #define IMX6ULL_CLK_ESAI_EXTAL 234 | 249 | #define IMX6ULL_CLK_ESAI_SEL 236 |
| 250 | #define IMX6ULL_CLK_ESAI_MEM 235 | 250 | #define IMX6UL_CLK_CKO1_SEL 237 |
| 251 | #define IMX6ULL_CLK_ESAI_IPG 236 | 251 | #define IMX6UL_CLK_CKO1_PODF 238 |
| 252 | #define IMX6ULL_CLK_DCP_CLK 237 | 252 | #define IMX6UL_CLK_CKO1 239 |
| 253 | #define IMX6ULL_CLK_EPDC_PRE_SEL 238 | 253 | #define IMX6UL_CLK_CKO2_SEL 240 |
| 254 | #define IMX6ULL_CLK_EPDC_SEL 239 | 254 | #define IMX6UL_CLK_CKO2_PODF 241 |
| 255 | #define IMX6ULL_CLK_EPDC_PODF 240 | 255 | #define IMX6UL_CLK_CKO2 242 |
| 256 | #define IMX6ULL_CLK_EPDC_ACLK 241 | 256 | #define IMX6UL_CLK_CKO 243 |
| 257 | #define IMX6ULL_CLK_EPDC_PIX 242 | ||
| 258 | #define IMX6ULL_CLK_ESAI_SEL 243 | ||
| 259 | #define IMX6UL_CLK_END 244 | 257 | #define IMX6UL_CLK_END 244 |
| 260 | 258 | ||
| 261 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ | 259 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 4b35a66383f9..e54f40974eb0 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -443,6 +443,9 @@ int acpi_check_resource_conflict(const struct resource *res); | |||
| 443 | int acpi_check_region(resource_size_t start, resource_size_t n, | 443 | int acpi_check_region(resource_size_t start, resource_size_t n, |
| 444 | const char *name); | 444 | const char *name); |
| 445 | 445 | ||
| 446 | acpi_status acpi_release_memory(acpi_handle handle, struct resource *res, | ||
| 447 | u32 level); | ||
| 448 | |||
| 446 | int acpi_resources_are_enforced(void); | 449 | int acpi_resources_are_enforced(void); |
| 447 | 450 | ||
| 448 | #ifdef CONFIG_HIBERNATION | 451 | #ifdef CONFIG_HIBERNATION |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9154570edf29..79226ca8f80f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -1119,8 +1119,8 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q, | |||
| 1119 | if (!q->limits.chunk_sectors) | 1119 | if (!q->limits.chunk_sectors) |
| 1120 | return q->limits.max_sectors; | 1120 | return q->limits.max_sectors; |
| 1121 | 1121 | ||
| 1122 | return q->limits.chunk_sectors - | 1122 | return min(q->limits.max_sectors, (unsigned int)(q->limits.chunk_sectors - |
| 1123 | (offset & (q->limits.chunk_sectors - 1)); | 1123 | (offset & (q->limits.chunk_sectors - 1)))); |
| 1124 | } | 1124 | } |
| 1125 | 1125 | ||
| 1126 | static inline unsigned int blk_rq_get_max_sectors(struct request *rq, | 1126 | static inline unsigned int blk_rq_get_max_sectors(struct request *rq, |
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h index 975fb4cf1bb7..d50c2f0a655a 100644 --- a/include/linux/bpf-cgroup.h +++ b/include/linux/bpf-cgroup.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #ifndef _BPF_CGROUP_H | 2 | #ifndef _BPF_CGROUP_H |
| 3 | #define _BPF_CGROUP_H | 3 | #define _BPF_CGROUP_H |
| 4 | 4 | ||
| 5 | #include <linux/errno.h> | ||
| 5 | #include <linux/jump_label.h> | 6 | #include <linux/jump_label.h> |
| 6 | #include <uapi/linux/bpf.h> | 7 | #include <uapi/linux/bpf.h> |
| 7 | 8 | ||
| @@ -188,12 +189,38 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, | |||
| 188 | \ | 189 | \ |
| 189 | __ret; \ | 190 | __ret; \ |
| 190 | }) | 191 | }) |
| 192 | int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 193 | enum bpf_prog_type ptype, struct bpf_prog *prog); | ||
| 194 | int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 195 | enum bpf_prog_type ptype); | ||
| 196 | int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 197 | union bpf_attr __user *uattr); | ||
| 191 | #else | 198 | #else |
| 192 | 199 | ||
| 200 | struct bpf_prog; | ||
| 193 | struct cgroup_bpf {}; | 201 | struct cgroup_bpf {}; |
| 194 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} | 202 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} |
| 195 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } | 203 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } |
| 196 | 204 | ||
| 205 | static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 206 | enum bpf_prog_type ptype, | ||
| 207 | struct bpf_prog *prog) | ||
| 208 | { | ||
| 209 | return -EINVAL; | ||
| 210 | } | ||
| 211 | |||
| 212 | static inline int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 213 | enum bpf_prog_type ptype) | ||
| 214 | { | ||
| 215 | return -EINVAL; | ||
| 216 | } | ||
| 217 | |||
| 218 | static inline int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 219 | union bpf_attr __user *uattr) | ||
| 220 | { | ||
| 221 | return -EINVAL; | ||
| 222 | } | ||
| 223 | |||
| 197 | #define cgroup_bpf_enabled (0) | 224 | #define cgroup_bpf_enabled (0) |
| 198 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) | 225 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) |
| 199 | #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) | 226 | #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 7df32a3200f7..8827e797ff97 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -696,6 +696,8 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map) | |||
| 696 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); | 696 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); |
| 697 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); | 697 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); |
| 698 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); | 698 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); |
| 699 | int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
| 700 | struct bpf_prog *prog); | ||
| 699 | #else | 701 | #else |
| 700 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) | 702 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) |
| 701 | { | 703 | { |
| @@ -714,6 +716,12 @@ static inline int sock_map_prog(struct bpf_map *map, | |||
| 714 | { | 716 | { |
| 715 | return -EOPNOTSUPP; | 717 | return -EOPNOTSUPP; |
| 716 | } | 718 | } |
| 719 | |||
| 720 | static inline int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
| 721 | struct bpf_prog *prog) | ||
| 722 | { | ||
| 723 | return -EINVAL; | ||
| 724 | } | ||
| 717 | #endif | 725 | #endif |
| 718 | 726 | ||
| 719 | #if defined(CONFIG_XDP_SOCKETS) | 727 | #if defined(CONFIG_XDP_SOCKETS) |
diff --git a/include/linux/bpf_lirc.h b/include/linux/bpf_lirc.h index 5f8a4283092d..9d9ff755ec29 100644 --- a/include/linux/bpf_lirc.h +++ b/include/linux/bpf_lirc.h | |||
| @@ -5,11 +5,12 @@ | |||
| 5 | #include <uapi/linux/bpf.h> | 5 | #include <uapi/linux/bpf.h> |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_BPF_LIRC_MODE2 | 7 | #ifdef CONFIG_BPF_LIRC_MODE2 |
| 8 | int lirc_prog_attach(const union bpf_attr *attr); | 8 | int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); |
| 9 | int lirc_prog_detach(const union bpf_attr *attr); | 9 | int lirc_prog_detach(const union bpf_attr *attr); |
| 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); | 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); |
| 11 | #else | 11 | #else |
| 12 | static inline int lirc_prog_attach(const union bpf_attr *attr) | 12 | static inline int lirc_prog_attach(const union bpf_attr *attr, |
| 13 | struct bpf_prog *prog) | ||
| 13 | { | 14 | { |
| 14 | return -EINVAL; | 15 | return -EINVAL; |
| 15 | } | 16 | } |
diff --git a/include/linux/compat.h b/include/linux/compat.h index b1a5562b3215..c68acc47da57 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -72,6 +72,9 @@ | |||
| 72 | */ | 72 | */ |
| 73 | #ifndef COMPAT_SYSCALL_DEFINEx | 73 | #ifndef COMPAT_SYSCALL_DEFINEx |
| 74 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | 74 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ |
| 75 | __diag_push(); \ | ||
| 76 | __diag_ignore(GCC, 8, "-Wattribute-alias", \ | ||
| 77 | "Type aliasing is used to sanitize syscall arguments");\ | ||
| 75 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ | 78 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ |
| 76 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | 79 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ |
| 77 | __attribute__((alias(__stringify(__se_compat_sys##name)))); \ | 80 | __attribute__((alias(__stringify(__se_compat_sys##name)))); \ |
| @@ -80,8 +83,11 @@ | |||
| 80 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ | 83 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ |
| 81 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ | 84 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ |
| 82 | { \ | 85 | { \ |
| 83 | return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ | 86 | long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ |
| 87 | __MAP(x,__SC_TEST,__VA_ARGS__); \ | ||
| 88 | return ret; \ | ||
| 84 | } \ | 89 | } \ |
| 90 | __diag_pop(); \ | ||
| 85 | static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) | 91 | static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
| 86 | #endif /* COMPAT_SYSCALL_DEFINEx */ | 92 | #endif /* COMPAT_SYSCALL_DEFINEx */ |
| 87 | 93 | ||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index f1a7492a5cc8..573f5a7d42d4 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -66,25 +66,40 @@ | |||
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * Feature detection for gnu_inline (gnu89 extern inline semantics). Either | ||
| 70 | * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics, | ||
| 71 | * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not | ||
| 72 | * defined so the gnu89 semantics are the default. | ||
| 73 | */ | ||
| 74 | #ifdef __GNUC_STDC_INLINE__ | ||
| 75 | # define __gnu_inline __attribute__((gnu_inline)) | ||
| 76 | #else | ||
| 77 | # define __gnu_inline | ||
| 78 | #endif | ||
| 79 | |||
| 80 | /* | ||
| 69 | * Force always-inline if the user requests it so via the .config, | 81 | * Force always-inline if the user requests it so via the .config, |
| 70 | * or if gcc is too old. | 82 | * or if gcc is too old. |
| 71 | * GCC does not warn about unused static inline functions for | 83 | * GCC does not warn about unused static inline functions for |
| 72 | * -Wunused-function. This turns out to avoid the need for complex #ifdef | 84 | * -Wunused-function. This turns out to avoid the need for complex #ifdef |
| 73 | * directives. Suppress the warning in clang as well by using "unused" | 85 | * directives. Suppress the warning in clang as well by using "unused" |
| 74 | * function attribute, which is redundant but not harmful for gcc. | 86 | * function attribute, which is redundant but not harmful for gcc. |
| 87 | * Prefer gnu_inline, so that extern inline functions do not emit an | ||
| 88 | * externally visible function. This makes extern inline behave as per gnu89 | ||
| 89 | * semantics rather than c99. This prevents multiple symbol definition errors | ||
| 90 | * of extern inline functions at link time. | ||
| 91 | * A lot of inline functions can cause havoc with function tracing. | ||
| 75 | */ | 92 | */ |
| 76 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ | 93 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ |
| 77 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) | 94 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) |
| 78 | #define inline inline __attribute__((always_inline,unused)) notrace | 95 | #define inline \ |
| 79 | #define __inline__ __inline__ __attribute__((always_inline,unused)) notrace | 96 | inline __attribute__((always_inline, unused)) notrace __gnu_inline |
| 80 | #define __inline __inline __attribute__((always_inline,unused)) notrace | ||
| 81 | #else | 97 | #else |
| 82 | /* A lot of inline functions can cause havoc with function tracing */ | 98 | #define inline inline __attribute__((unused)) notrace __gnu_inline |
| 83 | #define inline inline __attribute__((unused)) notrace | ||
| 84 | #define __inline__ __inline__ __attribute__((unused)) notrace | ||
| 85 | #define __inline __inline __attribute__((unused)) notrace | ||
| 86 | #endif | 99 | #endif |
| 87 | 100 | ||
| 101 | #define __inline__ inline | ||
| 102 | #define __inline inline | ||
| 88 | #define __always_inline inline __attribute__((always_inline)) | 103 | #define __always_inline inline __attribute__((always_inline)) |
| 89 | #define noinline __attribute__((noinline)) | 104 | #define noinline __attribute__((noinline)) |
| 90 | 105 | ||
| @@ -347,3 +362,28 @@ | |||
| 347 | #if GCC_VERSION >= 50100 | 362 | #if GCC_VERSION >= 50100 |
| 348 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 | 363 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 |
| 349 | #endif | 364 | #endif |
| 365 | |||
| 366 | /* | ||
| 367 | * Turn individual warnings and errors on and off locally, depending | ||
| 368 | * on version. | ||
| 369 | */ | ||
| 370 | #define __diag_GCC(version, severity, s) \ | ||
| 371 | __diag_GCC_ ## version(__diag_GCC_ ## severity s) | ||
| 372 | |||
| 373 | /* Severity used in pragma directives */ | ||
| 374 | #define __diag_GCC_ignore ignored | ||
| 375 | #define __diag_GCC_warn warning | ||
| 376 | #define __diag_GCC_error error | ||
| 377 | |||
| 378 | /* Compilers before gcc-4.6 do not understand "#pragma GCC diagnostic push" */ | ||
| 379 | #if GCC_VERSION >= 40600 | ||
| 380 | #define __diag_str1(s) #s | ||
| 381 | #define __diag_str(s) __diag_str1(s) | ||
| 382 | #define __diag(s) _Pragma(__diag_str(GCC diagnostic s)) | ||
| 383 | #endif | ||
| 384 | |||
| 385 | #if GCC_VERSION >= 80000 | ||
| 386 | #define __diag_GCC_8(s) __diag(s) | ||
| 387 | #else | ||
| 388 | #define __diag_GCC_8(s) | ||
| 389 | #endif | ||
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 6b79a9bba9a7..a8ba6b04152c 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h | |||
| @@ -271,4 +271,22 @@ struct ftrace_likely_data { | |||
| 271 | # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | 271 | # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) |
| 272 | #endif | 272 | #endif |
| 273 | 273 | ||
| 274 | #ifndef __diag | ||
| 275 | #define __diag(string) | ||
| 276 | #endif | ||
| 277 | |||
| 278 | #ifndef __diag_GCC | ||
| 279 | #define __diag_GCC(version, severity, string) | ||
| 280 | #endif | ||
| 281 | |||
| 282 | #define __diag_push() __diag(push) | ||
| 283 | #define __diag_pop() __diag(pop) | ||
| 284 | |||
| 285 | #define __diag_ignore(compiler, version, option, comment) \ | ||
| 286 | __diag_ ## compiler(version, ignore, option) | ||
| 287 | #define __diag_warn(compiler, version, option, comment) \ | ||
| 288 | __diag_ ## compiler(version, warn, option) | ||
| 289 | #define __diag_error(compiler, version, option, comment) \ | ||
| 290 | __diag_ ## compiler(version, error, option) | ||
| 291 | |||
| 274 | #endif /* __LINUX_COMPILER_TYPES_H */ | 292 | #endif /* __LINUX_COMPILER_TYPES_H */ |
diff --git a/include/linux/dax.h b/include/linux/dax.h index 3855e3800f48..deb0f663252f 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
| @@ -135,7 +135,7 @@ void dax_flush(struct dax_device *dax_dev, void *addr, size_t size); | |||
| 135 | 135 | ||
| 136 | ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, | 136 | ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, |
| 137 | const struct iomap_ops *ops); | 137 | const struct iomap_ops *ops); |
| 138 | int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, | 138 | vm_fault_t dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, |
| 139 | pfn_t *pfnp, int *errp, const struct iomap_ops *ops); | 139 | pfn_t *pfnp, int *errp, const struct iomap_ops *ops); |
| 140 | vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf, | 140 | vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf, |
| 141 | enum page_entry_size pe_size, pfn_t pfn); | 141 | enum page_entry_size pe_size, pfn_t pfn); |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 20f2659dd829..c73dd7396886 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -470,9 +470,7 @@ struct sock_fprog_kern { | |||
| 470 | }; | 470 | }; |
| 471 | 471 | ||
| 472 | struct bpf_binary_header { | 472 | struct bpf_binary_header { |
| 473 | u16 pages; | 473 | u32 pages; |
| 474 | u16 locked:1; | ||
| 475 | |||
| 476 | /* Some arches need word alignment for their instructions */ | 474 | /* Some arches need word alignment for their instructions */ |
| 477 | u8 image[] __aligned(4); | 475 | u8 image[] __aligned(4); |
| 478 | }; | 476 | }; |
| @@ -481,7 +479,7 @@ struct bpf_prog { | |||
| 481 | u16 pages; /* Number of allocated pages */ | 479 | u16 pages; /* Number of allocated pages */ |
| 482 | u16 jited:1, /* Is our filter JIT'ed? */ | 480 | u16 jited:1, /* Is our filter JIT'ed? */ |
| 483 | jit_requested:1,/* archs need to JIT the prog */ | 481 | jit_requested:1,/* archs need to JIT the prog */ |
| 484 | locked:1, /* Program image locked? */ | 482 | undo_set_mem:1, /* Passed set_memory_ro() checkpoint */ |
| 485 | gpl_compatible:1, /* Is filter GPL compatible? */ | 483 | gpl_compatible:1, /* Is filter GPL compatible? */ |
| 486 | cb_access:1, /* Is control block accessed? */ | 484 | cb_access:1, /* Is control block accessed? */ |
| 487 | dst_needed:1, /* Do we need dst entry? */ | 485 | dst_needed:1, /* Do we need dst entry? */ |
| @@ -677,46 +675,24 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default) | |||
| 677 | 675 | ||
| 678 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) | 676 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) |
| 679 | { | 677 | { |
| 680 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 678 | fp->undo_set_mem = 1; |
| 681 | fp->locked = 1; | 679 | set_memory_ro((unsigned long)fp, fp->pages); |
| 682 | if (set_memory_ro((unsigned long)fp, fp->pages)) | ||
| 683 | fp->locked = 0; | ||
| 684 | #endif | ||
| 685 | } | 680 | } |
| 686 | 681 | ||
| 687 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) | 682 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) |
| 688 | { | 683 | { |
| 689 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 684 | if (fp->undo_set_mem) |
| 690 | if (fp->locked) { | 685 | set_memory_rw((unsigned long)fp, fp->pages); |
| 691 | WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages)); | ||
| 692 | /* In case set_memory_rw() fails, we want to be the first | ||
| 693 | * to crash here instead of some random place later on. | ||
| 694 | */ | ||
| 695 | fp->locked = 0; | ||
| 696 | } | ||
| 697 | #endif | ||
| 698 | } | 686 | } |
| 699 | 687 | ||
| 700 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) | 688 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) |
| 701 | { | 689 | { |
| 702 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 690 | set_memory_ro((unsigned long)hdr, hdr->pages); |
| 703 | hdr->locked = 1; | ||
| 704 | if (set_memory_ro((unsigned long)hdr, hdr->pages)) | ||
| 705 | hdr->locked = 0; | ||
| 706 | #endif | ||
| 707 | } | 691 | } |
| 708 | 692 | ||
| 709 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) | 693 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) |
| 710 | { | 694 | { |
| 711 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 695 | set_memory_rw((unsigned long)hdr, hdr->pages); |
| 712 | if (hdr->locked) { | ||
| 713 | WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages)); | ||
| 714 | /* In case set_memory_rw() fails, we want to be the first | ||
| 715 | * to crash here instead of some random place later on. | ||
| 716 | */ | ||
| 717 | hdr->locked = 0; | ||
| 718 | } | ||
| 719 | #endif | ||
| 720 | } | 696 | } |
| 721 | 697 | ||
| 722 | static inline struct bpf_binary_header * | 698 | static inline struct bpf_binary_header * |
| @@ -728,22 +704,6 @@ bpf_jit_binary_hdr(const struct bpf_prog *fp) | |||
| 728 | return (void *)addr; | 704 | return (void *)addr; |
| 729 | } | 705 | } |
| 730 | 706 | ||
| 731 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | ||
| 732 | static inline int bpf_prog_check_pages_ro_single(const struct bpf_prog *fp) | ||
| 733 | { | ||
| 734 | if (!fp->locked) | ||
| 735 | return -ENOLCK; | ||
| 736 | if (fp->jited) { | ||
| 737 | const struct bpf_binary_header *hdr = bpf_jit_binary_hdr(fp); | ||
| 738 | |||
| 739 | if (!hdr->locked) | ||
| 740 | return -ENOLCK; | ||
| 741 | } | ||
| 742 | |||
| 743 | return 0; | ||
| 744 | } | ||
| 745 | #endif | ||
| 746 | |||
| 747 | int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); | 707 | int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); |
| 748 | static inline int sk_filter(struct sock *sk, struct sk_buff *skb) | 708 | static inline int sk_filter(struct sock *sk, struct sk_buff *skb) |
| 749 | { | 709 | { |
| @@ -805,8 +765,8 @@ static inline bool bpf_dump_raw_ok(void) | |||
| 805 | struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, | 765 | struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, |
| 806 | const struct bpf_insn *patch, u32 len); | 766 | const struct bpf_insn *patch, u32 len); |
| 807 | 767 | ||
| 808 | static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb, | 768 | static inline int xdp_ok_fwd_dev(const struct net_device *fwd, |
| 809 | struct net_device *fwd) | 769 | unsigned int pktlen) |
| 810 | { | 770 | { |
| 811 | unsigned int len; | 771 | unsigned int len; |
| 812 | 772 | ||
| @@ -814,7 +774,7 @@ static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb, | |||
| 814 | return -ENETDOWN; | 774 | return -ENETDOWN; |
| 815 | 775 | ||
| 816 | len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN; | 776 | len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN; |
| 817 | if (skb->len > len) | 777 | if (pktlen > len) |
| 818 | return -EMSGSIZE; | 778 | return -EMSGSIZE; |
| 819 | 779 | ||
| 820 | return 0; | 780 | return 0; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5c91108846db..805bf22898cf 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1720,8 +1720,6 @@ struct file_operations { | |||
| 1720 | int (*iterate) (struct file *, struct dir_context *); | 1720 | int (*iterate) (struct file *, struct dir_context *); |
| 1721 | int (*iterate_shared) (struct file *, struct dir_context *); | 1721 | int (*iterate_shared) (struct file *, struct dir_context *); |
| 1722 | __poll_t (*poll) (struct file *, struct poll_table_struct *); | 1722 | __poll_t (*poll) (struct file *, struct poll_table_struct *); |
| 1723 | struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t); | ||
| 1724 | __poll_t (*poll_mask) (struct file *, __poll_t); | ||
| 1725 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 1723 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
| 1726 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); | 1724 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); |
| 1727 | int (*mmap) (struct file *, struct vm_area_struct *); | 1725 | int (*mmap) (struct file *, struct vm_area_struct *); |
| @@ -2422,6 +2420,7 @@ extern struct file *filp_open(const char *, int, umode_t); | |||
| 2422 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | 2420 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, |
| 2423 | const char *, int, umode_t); | 2421 | const char *, int, umode_t); |
| 2424 | extern struct file * dentry_open(const struct path *, int, const struct cred *); | 2422 | extern struct file * dentry_open(const struct path *, int, const struct cred *); |
| 2423 | extern struct file *filp_clone_open(struct file *); | ||
| 2425 | extern int filp_close(struct file *, fl_owner_t id); | 2424 | extern int filp_close(struct file *, fl_owner_t id); |
| 2426 | 2425 | ||
| 2427 | extern struct filename *getname_flags(const char __user *, int, int *); | 2426 | extern struct filename *getname_flags(const char __user *, int, int *); |
diff --git a/include/linux/fsl/guts.h b/include/linux/fsl/guts.h index 3efa3b861d44..941b11811f85 100644 --- a/include/linux/fsl/guts.h +++ b/include/linux/fsl/guts.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #define __FSL_GUTS_H__ | 16 | #define __FSL_GUTS_H__ |
| 17 | 17 | ||
| 18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 19 | #include <linux/io.h> | ||
| 19 | 20 | ||
| 20 | /** | 21 | /** |
| 21 | * Global Utility Registers. | 22 | * Global Utility Registers. |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 8154f4920fcb..ebb77674be90 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -223,7 +223,6 @@ extern enum ftrace_tracing_type_t ftrace_tracing_type; | |||
| 223 | */ | 223 | */ |
| 224 | int register_ftrace_function(struct ftrace_ops *ops); | 224 | int register_ftrace_function(struct ftrace_ops *ops); |
| 225 | int unregister_ftrace_function(struct ftrace_ops *ops); | 225 | int unregister_ftrace_function(struct ftrace_ops *ops); |
| 226 | void clear_ftrace_function(void); | ||
| 227 | 226 | ||
| 228 | extern void ftrace_stub(unsigned long a0, unsigned long a1, | 227 | extern void ftrace_stub(unsigned long a0, unsigned long a1, |
| 229 | struct ftrace_ops *op, struct pt_regs *regs); | 228 | struct ftrace_ops *op, struct pt_regs *regs); |
| @@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void) | |||
| 239 | { | 238 | { |
| 240 | return 0; | 239 | return 0; |
| 241 | } | 240 | } |
| 242 | static inline void clear_ftrace_function(void) { } | ||
| 243 | static inline void ftrace_kill(void) { } | 241 | static inline void ftrace_kill(void) { } |
| 244 | static inline void ftrace_free_init_mem(void) { } | 242 | static inline void ftrace_free_init_mem(void) { } |
| 245 | static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } | 243 | static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 41a3d5775394..773bcb1d4044 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -511,6 +511,7 @@ struct hid_output_fifo { | |||
| 511 | #define HID_STAT_ADDED BIT(0) | 511 | #define HID_STAT_ADDED BIT(0) |
| 512 | #define HID_STAT_PARSED BIT(1) | 512 | #define HID_STAT_PARSED BIT(1) |
| 513 | #define HID_STAT_DUP_DETECTED BIT(2) | 513 | #define HID_STAT_DUP_DETECTED BIT(2) |
| 514 | #define HID_STAT_REPROBED BIT(3) | ||
| 514 | 515 | ||
| 515 | struct hid_input { | 516 | struct hid_input { |
| 516 | struct list_head list; | 517 | struct list_head list; |
| @@ -579,7 +580,7 @@ struct hid_device { /* device report descriptor */ | |||
| 579 | bool battery_avoid_query; | 580 | bool battery_avoid_query; |
| 580 | #endif | 581 | #endif |
| 581 | 582 | ||
| 582 | unsigned int status; /* see STAT flags above */ | 583 | unsigned long status; /* see STAT flags above */ |
| 583 | unsigned claimed; /* Claimed by hidinput, hiddev? */ | 584 | unsigned claimed; /* Claimed by hidinput, hiddev? */ |
| 584 | unsigned quirks; /* Various quirks the device can pull on us */ | 585 | unsigned quirks; /* Various quirks the device can pull on us */ |
| 585 | bool io_started; /* If IO has started */ | 586 | bool io_started; /* If IO has started */ |
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 7843b98e1c6e..c20c7e197d07 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
| @@ -105,13 +105,13 @@ static inline bool br_vlan_enabled(const struct net_device *dev) | |||
| 105 | 105 | ||
| 106 | static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid) | 106 | static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid) |
| 107 | { | 107 | { |
| 108 | return -1; | 108 | return -EINVAL; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | static inline int br_vlan_get_info(const struct net_device *dev, u16 vid, | 111 | static inline int br_vlan_get_info(const struct net_device *dev, u16 vid, |
| 112 | struct bridge_vlan_info *p_vinfo) | 112 | struct bridge_vlan_info *p_vinfo) |
| 113 | { | 113 | { |
| 114 | return -1; | 114 | return -EINVAL; |
| 115 | } | 115 | } |
| 116 | #endif | 116 | #endif |
| 117 | 117 | ||
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index f8231854b5d6..119f53941c12 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
| @@ -109,6 +109,8 @@ struct ip_mc_list { | |||
| 109 | extern int ip_check_mc_rcu(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u8 proto); | 109 | extern int ip_check_mc_rcu(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u8 proto); |
| 110 | extern int igmp_rcv(struct sk_buff *); | 110 | extern int igmp_rcv(struct sk_buff *); |
| 111 | extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr); | 111 | extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr); |
| 112 | extern int ip_mc_join_group_ssm(struct sock *sk, struct ip_mreqn *imr, | ||
| 113 | unsigned int mode); | ||
| 112 | extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr); | 114 | extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr); |
| 113 | extern void ip_mc_drop_socket(struct sock *sk); | 115 | extern void ip_mc_drop_socket(struct sock *sk); |
| 114 | extern int ip_mc_source(int add, int omode, struct sock *sk, | 116 | extern int ip_mc_source(int add, int omode, struct sock *sk, |
diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h index 767467d886de..67c75372b691 100644 --- a/include/linux/iio/buffer-dma.h +++ b/include/linux/iio/buffer-dma.h | |||
| @@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n, | |||
| 141 | char __user *user_buffer); | 141 | char __user *user_buffer); |
| 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); | 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); |
| 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); | 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); |
| 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length); | 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length); |
| 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); | 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); |
| 146 | 146 | ||
| 147 | int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, | 147 | int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index d7188de4db96..3f4bf60b0bb5 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
| @@ -100,7 +100,7 @@ static inline bool input_is_mt_axis(int axis) | |||
| 100 | return axis == ABS_MT_SLOT || input_is_mt_value(axis); | 100 | return axis == ABS_MT_SLOT || input_is_mt_value(axis); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void input_mt_report_slot_state(struct input_dev *dev, | 103 | bool input_mt_report_slot_state(struct input_dev *dev, |
| 104 | unsigned int tool_type, bool active); | 104 | unsigned int tool_type, bool active); |
| 105 | 105 | ||
| 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); | 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); |
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 1df940196ab2..ef169d67df92 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
| @@ -121,6 +121,7 @@ | |||
| 121 | #define ecap_srs(e) ((e >> 31) & 0x1) | 121 | #define ecap_srs(e) ((e >> 31) & 0x1) |
| 122 | #define ecap_ers(e) ((e >> 30) & 0x1) | 122 | #define ecap_ers(e) ((e >> 30) & 0x1) |
| 123 | #define ecap_prs(e) ((e >> 29) & 0x1) | 123 | #define ecap_prs(e) ((e >> 29) & 0x1) |
| 124 | #define ecap_broken_pasid(e) ((e >> 28) & 0x1) | ||
| 124 | #define ecap_dis(e) ((e >> 27) & 0x1) | 125 | #define ecap_dis(e) ((e >> 27) & 0x1) |
| 125 | #define ecap_nest(e) ((e >> 26) & 0x1) | 126 | #define ecap_nest(e) ((e >> 26) & 0x1) |
| 126 | #define ecap_mts(e) ((e >> 25) & 0x1) | 127 | #define ecap_mts(e) ((e >> 25) & 0x1) |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 2803264c512f..c1961761311d 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -62,7 +62,6 @@ void *kthread_probe_data(struct task_struct *k); | |||
| 62 | int kthread_park(struct task_struct *k); | 62 | int kthread_park(struct task_struct *k); |
| 63 | void kthread_unpark(struct task_struct *k); | 63 | void kthread_unpark(struct task_struct *k); |
| 64 | void kthread_parkme(void); | 64 | void kthread_parkme(void); |
| 65 | void kthread_park_complete(struct task_struct *k); | ||
| 66 | 65 | ||
| 67 | int kthreadd(void *unused); | 66 | int kthreadd(void *unused); |
| 68 | extern struct task_struct *kthreadd_task; | 67 | extern struct task_struct *kthreadd_task; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 8b8946dd63b9..32f247cb5e9e 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -210,6 +210,7 @@ enum { | |||
| 210 | ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ | 210 | ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ |
| 211 | /* (doesn't imply presence) */ | 211 | /* (doesn't imply presence) */ |
| 212 | ATA_FLAG_SATA = (1 << 1), | 212 | ATA_FLAG_SATA = (1 << 1), |
| 213 | ATA_FLAG_NO_LPM = (1 << 2), /* host not happy with LPM */ | ||
| 213 | ATA_FLAG_NO_LOG_PAGE = (1 << 5), /* do not issue log page read */ | 214 | ATA_FLAG_NO_LOG_PAGE = (1 << 5), /* do not issue log page read */ |
| 214 | ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ | 215 | ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ |
| 215 | ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ | 216 | ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ |
| @@ -1495,6 +1496,29 @@ static inline bool ata_tag_valid(unsigned int tag) | |||
| 1495 | return tag < ATA_MAX_QUEUE || ata_tag_internal(tag); | 1496 | return tag < ATA_MAX_QUEUE || ata_tag_internal(tag); |
| 1496 | } | 1497 | } |
| 1497 | 1498 | ||
| 1499 | #define __ata_qc_for_each(ap, qc, tag, max_tag, fn) \ | ||
| 1500 | for ((tag) = 0; (tag) < (max_tag) && \ | ||
| 1501 | ({ qc = fn((ap), (tag)); 1; }); (tag)++) \ | ||
| 1502 | |||
| 1503 | /* | ||
| 1504 | * Internal use only, iterate commands ignoring error handling and | ||
| 1505 | * status of 'qc'. | ||
| 1506 | */ | ||
| 1507 | #define ata_qc_for_each_raw(ap, qc, tag) \ | ||
| 1508 | __ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE, __ata_qc_from_tag) | ||
| 1509 | |||
| 1510 | /* | ||
| 1511 | * Iterate all potential commands that can be queued | ||
| 1512 | */ | ||
| 1513 | #define ata_qc_for_each(ap, qc, tag) \ | ||
| 1514 | __ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE, ata_qc_from_tag) | ||
| 1515 | |||
| 1516 | /* | ||
| 1517 | * Like ata_qc_for_each, but with the internal tag included | ||
| 1518 | */ | ||
| 1519 | #define ata_qc_for_each_with_internal(ap, qc, tag) \ | ||
| 1520 | __ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE + 1, ata_qc_from_tag) | ||
| 1521 | |||
| 1498 | /* | 1522 | /* |
| 1499 | * device helpers | 1523 | * device helpers |
| 1500 | */ | 1524 | */ |
diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h index 4f5f8c21e283..1eb6f244588d 100644 --- a/include/linux/marvell_phy.h +++ b/include/linux/marvell_phy.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | */ | 27 | */ |
| 28 | #define MARVELL_PHY_ID_88E6390 0x01410f90 | 28 | #define MARVELL_PHY_ID_88E6390 0x01410f90 |
| 29 | 29 | ||
| 30 | #define MARVELL_PHY_FAMILY_ID(id) ((id) >> 4) | ||
| 31 | |||
| 30 | /* struct phy_device dev_flags definitions */ | 32 | /* struct phy_device dev_flags definitions */ |
| 31 | #define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 | 33 | #define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 |
| 32 | #define MARVELL_PHY_M1118_DNS323_LEDS 0x00000002 | 34 | #define MARVELL_PHY_M1118_DNS323_LEDS 0x00000002 |
diff --git a/include/linux/mlx5/eswitch.h b/include/linux/mlx5/eswitch.h index d3c9db492b30..fab5121ffb8f 100644 --- a/include/linux/mlx5/eswitch.h +++ b/include/linux/mlx5/eswitch.h | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/mlx5/driver.h> | 9 | #include <linux/mlx5/driver.h> |
| 10 | 10 | ||
| 11 | #define MLX5_ESWITCH_MANAGER(mdev) MLX5_CAP_GEN(mdev, eswitch_manager) | ||
| 12 | |||
| 11 | enum { | 13 | enum { |
| 12 | SRIOV_NONE, | 14 | SRIOV_NONE, |
| 13 | SRIOV_LEGACY, | 15 | SRIOV_LEGACY, |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 27134c4fcb76..ac281f5ec9b8 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -922,7 +922,7 @@ struct mlx5_ifc_cmd_hca_cap_bits { | |||
| 922 | u8 vnic_env_queue_counters[0x1]; | 922 | u8 vnic_env_queue_counters[0x1]; |
| 923 | u8 ets[0x1]; | 923 | u8 ets[0x1]; |
| 924 | u8 nic_flow_table[0x1]; | 924 | u8 nic_flow_table[0x1]; |
| 925 | u8 eswitch_flow_table[0x1]; | 925 | u8 eswitch_manager[0x1]; |
| 926 | u8 device_memory[0x1]; | 926 | u8 device_memory[0x1]; |
| 927 | u8 mcam_reg[0x1]; | 927 | u8 mcam_reg[0x1]; |
| 928 | u8 pcam_reg[0x1]; | 928 | u8 pcam_reg[0x1]; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a0fbb9ffe380..d3a3842316b8 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -155,7 +155,9 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *, | |||
| 155 | * mmap() functions). | 155 | * mmap() functions). |
| 156 | */ | 156 | */ |
| 157 | 157 | ||
| 158 | extern struct kmem_cache *vm_area_cachep; | 158 | struct vm_area_struct *vm_area_alloc(struct mm_struct *); |
| 159 | struct vm_area_struct *vm_area_dup(struct vm_area_struct *); | ||
| 160 | void vm_area_free(struct vm_area_struct *); | ||
| 159 | 161 | ||
| 160 | #ifndef CONFIG_MMU | 162 | #ifndef CONFIG_MMU |
| 161 | extern struct rb_root nommu_region_tree; | 163 | extern struct rb_root nommu_region_tree; |
| @@ -2132,7 +2134,7 @@ extern int __meminit __early_pfn_to_nid(unsigned long pfn, | |||
| 2132 | struct mminit_pfnnid_cache *state); | 2134 | struct mminit_pfnnid_cache *state); |
| 2133 | #endif | 2135 | #endif |
| 2134 | 2136 | ||
| 2135 | #ifdef CONFIG_HAVE_MEMBLOCK | 2137 | #if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP) |
| 2136 | void zero_resv_unavail(void); | 2138 | void zero_resv_unavail(void); |
| 2137 | #else | 2139 | #else |
| 2138 | static inline void zero_resv_unavail(void) {} | 2140 | static inline void zero_resv_unavail(void) {} |
diff --git a/include/linux/net.h b/include/linux/net.h index 08b6eb964dd6..6554d3ba4396 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -147,7 +147,6 @@ struct proto_ops { | |||
| 147 | int (*getname) (struct socket *sock, | 147 | int (*getname) (struct socket *sock, |
| 148 | struct sockaddr *addr, | 148 | struct sockaddr *addr, |
| 149 | int peer); | 149 | int peer); |
| 150 | __poll_t (*poll_mask) (struct socket *sock, __poll_t events); | ||
| 151 | __poll_t (*poll) (struct file *file, struct socket *sock, | 150 | __poll_t (*poll) (struct file *file, struct socket *sock, |
| 152 | struct poll_table_struct *wait); | 151 | struct poll_table_struct *wait); |
| 153 | int (*ioctl) (struct socket *sock, unsigned int cmd, | 152 | int (*ioctl) (struct socket *sock, unsigned int cmd, |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3ec9850c7936..3d0cc0b5cec2 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2789,11 +2789,31 @@ static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, | |||
| 2789 | if (PTR_ERR(pp) != -EINPROGRESS) | 2789 | if (PTR_ERR(pp) != -EINPROGRESS) |
| 2790 | NAPI_GRO_CB(skb)->flush |= flush; | 2790 | NAPI_GRO_CB(skb)->flush |= flush; |
| 2791 | } | 2791 | } |
| 2792 | static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb, | ||
| 2793 | struct sk_buff **pp, | ||
| 2794 | int flush, | ||
| 2795 | struct gro_remcsum *grc) | ||
| 2796 | { | ||
| 2797 | if (PTR_ERR(pp) != -EINPROGRESS) { | ||
| 2798 | NAPI_GRO_CB(skb)->flush |= flush; | ||
| 2799 | skb_gro_remcsum_cleanup(skb, grc); | ||
| 2800 | skb->remcsum_offload = 0; | ||
| 2801 | } | ||
| 2802 | } | ||
| 2792 | #else | 2803 | #else |
| 2793 | static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) | 2804 | static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) |
| 2794 | { | 2805 | { |
| 2795 | NAPI_GRO_CB(skb)->flush |= flush; | 2806 | NAPI_GRO_CB(skb)->flush |= flush; |
| 2796 | } | 2807 | } |
| 2808 | static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb, | ||
| 2809 | struct sk_buff **pp, | ||
| 2810 | int flush, | ||
| 2811 | struct gro_remcsum *grc) | ||
| 2812 | { | ||
| 2813 | NAPI_GRO_CB(skb)->flush |= flush; | ||
| 2814 | skb_gro_remcsum_cleanup(skb, grc); | ||
| 2815 | skb->remcsum_offload = 0; | ||
| 2816 | } | ||
| 2797 | #endif | 2817 | #endif |
| 2798 | 2818 | ||
| 2799 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 2819 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 340029b2fb38..abd5d5e17aee 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1240,6 +1240,8 @@ int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr, | |||
| 1240 | unsigned long pci_address_to_pio(phys_addr_t addr); | 1240 | unsigned long pci_address_to_pio(phys_addr_t addr); |
| 1241 | phys_addr_t pci_pio_to_address(unsigned long pio); | 1241 | phys_addr_t pci_pio_to_address(unsigned long pio); |
| 1242 | int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr); | 1242 | int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr); |
| 1243 | int devm_pci_remap_iospace(struct device *dev, const struct resource *res, | ||
| 1244 | phys_addr_t phys_addr); | ||
| 1243 | void pci_unmap_iospace(struct resource *res); | 1245 | void pci_unmap_iospace(struct resource *res); |
| 1244 | void __iomem *devm_pci_remap_cfgspace(struct device *dev, | 1246 | void __iomem *devm_pci_remap_cfgspace(struct device *dev, |
| 1245 | resource_size_t offset, | 1247 | resource_size_t offset, |
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 9206a4fef9ac..cb8d84090cfb 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
| @@ -234,7 +234,7 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); | |||
| 234 | int of_genpd_parse_idle_states(struct device_node *dn, | 234 | int of_genpd_parse_idle_states(struct device_node *dn, |
| 235 | struct genpd_power_state **states, int *n); | 235 | struct genpd_power_state **states, int *n); |
| 236 | unsigned int of_genpd_opp_to_performance_state(struct device *dev, | 236 | unsigned int of_genpd_opp_to_performance_state(struct device *dev, |
| 237 | struct device_node *opp_node); | 237 | struct device_node *np); |
| 238 | 238 | ||
| 239 | int genpd_dev_pm_attach(struct device *dev); | 239 | int genpd_dev_pm_attach(struct device *dev); |
| 240 | struct device *genpd_dev_pm_attach_by_id(struct device *dev, | 240 | struct device *genpd_dev_pm_attach_by_id(struct device *dev, |
| @@ -274,9 +274,9 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn, | |||
| 274 | 274 | ||
| 275 | static inline unsigned int | 275 | static inline unsigned int |
| 276 | of_genpd_opp_to_performance_state(struct device *dev, | 276 | of_genpd_opp_to_performance_state(struct device *dev, |
| 277 | struct device_node *opp_node) | 277 | struct device_node *np) |
| 278 | { | 278 | { |
| 279 | return -ENODEV; | 279 | return 0; |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | static inline int genpd_dev_pm_attach(struct device *dev) | 282 | static inline int genpd_dev_pm_attach(struct device *dev) |
diff --git a/include/linux/poll.h b/include/linux/poll.h index fdf86b4cbc71..7e0fdcf905d2 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -74,18 +74,18 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) | |||
| 74 | pt->_key = ~(__poll_t)0; /* all events enabled */ | 74 | pt->_key = ~(__poll_t)0; /* all events enabled */ |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | static inline bool file_has_poll_mask(struct file *file) | 77 | static inline bool file_can_poll(struct file *file) |
| 78 | { | 78 | { |
| 79 | return file->f_op->get_poll_head && file->f_op->poll_mask; | 79 | return file->f_op->poll; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | static inline bool file_can_poll(struct file *file) | 82 | static inline __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt) |
| 83 | { | 83 | { |
| 84 | return file->f_op->poll || file_has_poll_mask(file); | 84 | if (unlikely(!file->f_op->poll)) |
| 85 | return DEFAULT_POLLMASK; | ||
| 86 | return file->f_op->poll(file, pt); | ||
| 85 | } | 87 | } |
| 86 | 88 | ||
| 87 | __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt); | ||
| 88 | |||
| 89 | struct poll_table_entry { | 89 | struct poll_table_entry { |
| 90 | struct file *filp; | 90 | struct file *filp; |
| 91 | __poll_t key; | 91 | __poll_t key; |
diff --git a/include/linux/rmi.h b/include/linux/rmi.h index 64125443f8a6..5ef5c7c412a7 100644 --- a/include/linux/rmi.h +++ b/include/linux/rmi.h | |||
| @@ -354,6 +354,8 @@ struct rmi_driver_data { | |||
| 354 | struct mutex irq_mutex; | 354 | struct mutex irq_mutex; |
| 355 | struct input_dev *input; | 355 | struct input_dev *input; |
| 356 | 356 | ||
| 357 | struct irq_domain *irqdomain; | ||
| 358 | |||
| 357 | u8 pdt_props; | 359 | u8 pdt_props; |
| 358 | 360 | ||
| 359 | u8 num_rx_electrodes; | 361 | u8 num_rx_electrodes; |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 51f52020ad5f..093aa57120b0 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
| @@ -9,9 +9,6 @@ | |||
| 9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
| 10 | 10 | ||
| 11 | struct scatterlist { | 11 | struct scatterlist { |
| 12 | #ifdef CONFIG_DEBUG_SG | ||
| 13 | unsigned long sg_magic; | ||
| 14 | #endif | ||
| 15 | unsigned long page_link; | 12 | unsigned long page_link; |
| 16 | unsigned int offset; | 13 | unsigned int offset; |
| 17 | unsigned int length; | 14 | unsigned int length; |
| @@ -64,7 +61,6 @@ struct sg_table { | |||
| 64 | * | 61 | * |
| 65 | */ | 62 | */ |
| 66 | 63 | ||
| 67 | #define SG_MAGIC 0x87654321 | ||
| 68 | #define SG_CHAIN 0x01UL | 64 | #define SG_CHAIN 0x01UL |
| 69 | #define SG_END 0x02UL | 65 | #define SG_END 0x02UL |
| 70 | 66 | ||
| @@ -98,7 +94,6 @@ static inline void sg_assign_page(struct scatterlist *sg, struct page *page) | |||
| 98 | */ | 94 | */ |
| 99 | BUG_ON((unsigned long) page & (SG_CHAIN | SG_END)); | 95 | BUG_ON((unsigned long) page & (SG_CHAIN | SG_END)); |
| 100 | #ifdef CONFIG_DEBUG_SG | 96 | #ifdef CONFIG_DEBUG_SG |
| 101 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 102 | BUG_ON(sg_is_chain(sg)); | 97 | BUG_ON(sg_is_chain(sg)); |
| 103 | #endif | 98 | #endif |
| 104 | sg->page_link = page_link | (unsigned long) page; | 99 | sg->page_link = page_link | (unsigned long) page; |
| @@ -129,7 +124,6 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page, | |||
| 129 | static inline struct page *sg_page(struct scatterlist *sg) | 124 | static inline struct page *sg_page(struct scatterlist *sg) |
| 130 | { | 125 | { |
| 131 | #ifdef CONFIG_DEBUG_SG | 126 | #ifdef CONFIG_DEBUG_SG |
| 132 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 133 | BUG_ON(sg_is_chain(sg)); | 127 | BUG_ON(sg_is_chain(sg)); |
| 134 | #endif | 128 | #endif |
| 135 | return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END)); | 129 | return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END)); |
| @@ -195,9 +189,6 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, | |||
| 195 | **/ | 189 | **/ |
| 196 | static inline void sg_mark_end(struct scatterlist *sg) | 190 | static inline void sg_mark_end(struct scatterlist *sg) |
| 197 | { | 191 | { |
| 198 | #ifdef CONFIG_DEBUG_SG | ||
| 199 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 200 | #endif | ||
| 201 | /* | 192 | /* |
| 202 | * Set termination bit, clear potential chain bit | 193 | * Set termination bit, clear potential chain bit |
| 203 | */ | 194 | */ |
| @@ -215,9 +206,6 @@ static inline void sg_mark_end(struct scatterlist *sg) | |||
| 215 | **/ | 206 | **/ |
| 216 | static inline void sg_unmark_end(struct scatterlist *sg) | 207 | static inline void sg_unmark_end(struct scatterlist *sg) |
| 217 | { | 208 | { |
| 218 | #ifdef CONFIG_DEBUG_SG | ||
| 219 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 220 | #endif | ||
| 221 | sg->page_link &= ~SG_END; | 209 | sg->page_link &= ~SG_END; |
| 222 | } | 210 | } |
| 223 | 211 | ||
| @@ -260,12 +248,6 @@ static inline void *sg_virt(struct scatterlist *sg) | |||
| 260 | static inline void sg_init_marker(struct scatterlist *sgl, | 248 | static inline void sg_init_marker(struct scatterlist *sgl, |
| 261 | unsigned int nents) | 249 | unsigned int nents) |
| 262 | { | 250 | { |
| 263 | #ifdef CONFIG_DEBUG_SG | ||
| 264 | unsigned int i; | ||
| 265 | |||
| 266 | for (i = 0; i < nents; i++) | ||
| 267 | sgl[i].sg_magic = SG_MAGIC; | ||
| 268 | #endif | ||
| 269 | sg_mark_end(&sgl[nents - 1]); | 251 | sg_mark_end(&sgl[nents - 1]); |
| 270 | } | 252 | } |
| 271 | 253 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9256118bd40c..43731fe51c97 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -118,7 +118,7 @@ struct task_group; | |||
| 118 | * the comment with set_special_state(). | 118 | * the comment with set_special_state(). |
| 119 | */ | 119 | */ |
| 120 | #define is_special_task_state(state) \ | 120 | #define is_special_task_state(state) \ |
| 121 | ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_DEAD)) | 121 | ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_PARKED | TASK_DEAD)) |
| 122 | 122 | ||
| 123 | #define __set_current_state(state_value) \ | 123 | #define __set_current_state(state_value) \ |
| 124 | do { \ | 124 | do { \ |
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h index 5be31eb7b266..108ede99e533 100644 --- a/include/linux/sched/task.h +++ b/include/linux/sched/task.h | |||
| @@ -75,7 +75,7 @@ extern long _do_fork(unsigned long, unsigned long, unsigned long, int __user *, | |||
| 75 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); | 75 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); |
| 76 | struct task_struct *fork_idle(int); | 76 | struct task_struct *fork_idle(int); |
| 77 | extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | 77 | extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); |
| 78 | extern long kernel_wait4(pid_t, int *, int, struct rusage *); | 78 | extern long kernel_wait4(pid_t, int __user *, int, struct rusage *); |
| 79 | 79 | ||
| 80 | extern void free_task(struct task_struct *tsk); | 80 | extern void free_task(struct task_struct *tsk); |
| 81 | 81 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c86885954994..610a201126ee 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -630,6 +630,7 @@ typedef unsigned char *sk_buff_data_t; | |||
| 630 | * @hash: the packet hash | 630 | * @hash: the packet hash |
| 631 | * @queue_mapping: Queue mapping for multiqueue devices | 631 | * @queue_mapping: Queue mapping for multiqueue devices |
| 632 | * @xmit_more: More SKBs are pending for this queue | 632 | * @xmit_more: More SKBs are pending for this queue |
| 633 | * @pfmemalloc: skbuff was allocated from PFMEMALLOC reserves | ||
| 633 | * @ndisc_nodetype: router type (from link layer) | 634 | * @ndisc_nodetype: router type (from link layer) |
| 634 | * @ooo_okay: allow the mapping of a socket to a queue to be changed | 635 | * @ooo_okay: allow the mapping of a socket to a queue to be changed |
| 635 | * @l4_hash: indicate hash is a canonical 4-tuple hash over transport | 636 | * @l4_hash: indicate hash is a canonical 4-tuple hash over transport |
| @@ -735,7 +736,7 @@ struct sk_buff { | |||
| 735 | peeked:1, | 736 | peeked:1, |
| 736 | head_frag:1, | 737 | head_frag:1, |
| 737 | xmit_more:1, | 738 | xmit_more:1, |
| 738 | __unused:1; /* one bit hole */ | 739 | pfmemalloc:1; |
| 739 | 740 | ||
| 740 | /* fields enclosed in headers_start/headers_end are copied | 741 | /* fields enclosed in headers_start/headers_end are copied |
| 741 | * using a single memcpy() in __copy_skb_header() | 742 | * using a single memcpy() in __copy_skb_header() |
| @@ -754,31 +755,30 @@ struct sk_buff { | |||
| 754 | 755 | ||
| 755 | __u8 __pkt_type_offset[0]; | 756 | __u8 __pkt_type_offset[0]; |
| 756 | __u8 pkt_type:3; | 757 | __u8 pkt_type:3; |
| 757 | __u8 pfmemalloc:1; | ||
| 758 | __u8 ignore_df:1; | 758 | __u8 ignore_df:1; |
| 759 | |||
| 760 | __u8 nf_trace:1; | 759 | __u8 nf_trace:1; |
| 761 | __u8 ip_summed:2; | 760 | __u8 ip_summed:2; |
| 762 | __u8 ooo_okay:1; | 761 | __u8 ooo_okay:1; |
| 762 | |||
| 763 | __u8 l4_hash:1; | 763 | __u8 l4_hash:1; |
| 764 | __u8 sw_hash:1; | 764 | __u8 sw_hash:1; |
| 765 | __u8 wifi_acked_valid:1; | 765 | __u8 wifi_acked_valid:1; |
| 766 | __u8 wifi_acked:1; | 766 | __u8 wifi_acked:1; |
| 767 | |||
| 768 | __u8 no_fcs:1; | 767 | __u8 no_fcs:1; |
| 769 | /* Indicates the inner headers are valid in the skbuff. */ | 768 | /* Indicates the inner headers are valid in the skbuff. */ |
| 770 | __u8 encapsulation:1; | 769 | __u8 encapsulation:1; |
| 771 | __u8 encap_hdr_csum:1; | 770 | __u8 encap_hdr_csum:1; |
| 772 | __u8 csum_valid:1; | 771 | __u8 csum_valid:1; |
| 772 | |||
| 773 | __u8 csum_complete_sw:1; | 773 | __u8 csum_complete_sw:1; |
| 774 | __u8 csum_level:2; | 774 | __u8 csum_level:2; |
| 775 | __u8 csum_not_inet:1; | 775 | __u8 csum_not_inet:1; |
| 776 | |||
| 777 | __u8 dst_pending_confirm:1; | 776 | __u8 dst_pending_confirm:1; |
| 778 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 777 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
| 779 | __u8 ndisc_nodetype:2; | 778 | __u8 ndisc_nodetype:2; |
| 780 | #endif | 779 | #endif |
| 781 | __u8 ipvs_property:1; | 780 | __u8 ipvs_property:1; |
| 781 | |||
| 782 | __u8 inner_protocol_type:1; | 782 | __u8 inner_protocol_type:1; |
| 783 | __u8 remcsum_offload:1; | 783 | __u8 remcsum_offload:1; |
| 784 | #ifdef CONFIG_NET_SWITCHDEV | 784 | #ifdef CONFIG_NET_SWITCHDEV |
| @@ -3252,7 +3252,8 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, | |||
| 3252 | int *peeked, int *off, int *err); | 3252 | int *peeked, int *off, int *err); |
| 3253 | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, | 3253 | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, |
| 3254 | int *err); | 3254 | int *err); |
| 3255 | __poll_t datagram_poll_mask(struct socket *sock, __poll_t events); | 3255 | __poll_t datagram_poll(struct file *file, struct socket *sock, |
| 3256 | struct poll_table_struct *wait); | ||
| 3256 | int skb_copy_datagram_iter(const struct sk_buff *from, int offset, | 3257 | int skb_copy_datagram_iter(const struct sk_buff *from, int offset, |
| 3257 | struct iov_iter *to, int size); | 3258 | struct iov_iter *to, int size); |
| 3258 | static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset, | 3259 | static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset, |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 09fa2c6f0e68..3a1a1dbc6f49 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -155,8 +155,12 @@ struct kmem_cache { | |||
| 155 | 155 | ||
| 156 | #ifdef CONFIG_SYSFS | 156 | #ifdef CONFIG_SYSFS |
| 157 | #define SLAB_SUPPORTS_SYSFS | 157 | #define SLAB_SUPPORTS_SYSFS |
| 158 | void sysfs_slab_unlink(struct kmem_cache *); | ||
| 158 | void sysfs_slab_release(struct kmem_cache *); | 159 | void sysfs_slab_release(struct kmem_cache *); |
| 159 | #else | 160 | #else |
| 161 | static inline void sysfs_slab_unlink(struct kmem_cache *s) | ||
| 162 | { | ||
| 163 | } | ||
| 160 | static inline void sysfs_slab_release(struct kmem_cache *s) | 164 | static inline void sysfs_slab_release(struct kmem_cache *s) |
| 161 | { | 165 | { |
| 162 | } | 166 | } |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 73810808cdf2..5c1a0933768e 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #ifndef _LINUX_SYSCALLS_H | 11 | #ifndef _LINUX_SYSCALLS_H |
| 12 | #define _LINUX_SYSCALLS_H | 12 | #define _LINUX_SYSCALLS_H |
| 13 | 13 | ||
| 14 | struct __aio_sigset; | ||
| 14 | struct epoll_event; | 15 | struct epoll_event; |
| 15 | struct iattr; | 16 | struct iattr; |
| 16 | struct inode; | 17 | struct inode; |
| @@ -231,6 +232,9 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) | |||
| 231 | */ | 232 | */ |
| 232 | #ifndef __SYSCALL_DEFINEx | 233 | #ifndef __SYSCALL_DEFINEx |
| 233 | #define __SYSCALL_DEFINEx(x, name, ...) \ | 234 | #define __SYSCALL_DEFINEx(x, name, ...) \ |
| 235 | __diag_push(); \ | ||
| 236 | __diag_ignore(GCC, 8, "-Wattribute-alias", \ | ||
| 237 | "Type aliasing is used to sanitize syscall arguments");\ | ||
| 234 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | 238 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ |
| 235 | __attribute__((alias(__stringify(__se_sys##name)))); \ | 239 | __attribute__((alias(__stringify(__se_sys##name)))); \ |
| 236 | ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ | 240 | ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ |
| @@ -243,6 +247,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) | |||
| 243 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ | 247 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ |
| 244 | return ret; \ | 248 | return ret; \ |
| 245 | } \ | 249 | } \ |
| 250 | __diag_pop(); \ | ||
| 246 | static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) | 251 | static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
| 247 | #endif /* __SYSCALL_DEFINEx */ | 252 | #endif /* __SYSCALL_DEFINEx */ |
| 248 | 253 | ||
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index 6c5f2074e14f..6f8b68cd460f 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
| @@ -75,7 +75,7 @@ struct uio_device { | |||
| 75 | struct fasync_struct *async_queue; | 75 | struct fasync_struct *async_queue; |
| 76 | wait_queue_head_t wait; | 76 | wait_queue_head_t wait; |
| 77 | struct uio_info *info; | 77 | struct uio_info *info; |
| 78 | spinlock_t info_lock; | 78 | struct mutex info_lock; |
| 79 | struct kobject *map_dir; | 79 | struct kobject *map_dir; |
| 80 | struct kobject *portio_dir; | 80 | struct kobject *portio_dir; |
| 81 | }; | 81 | }; |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 53ce8176c313..ec9d6bc65855 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
| @@ -271,7 +271,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, | |||
| 271 | int flags); | 271 | int flags); |
| 272 | int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, | 272 | int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, |
| 273 | size_t len, int flags); | 273 | size_t len, int flags); |
| 274 | __poll_t bt_sock_poll_mask(struct socket *sock, __poll_t events); | 274 | __poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); |
| 275 | int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | 275 | int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
| 276 | int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); | 276 | int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); |
| 277 | int bt_sock_wait_ready(struct sock *sk, unsigned long flags); | 277 | int bt_sock_wait_ready(struct sock *sk, unsigned long flags); |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 59656fc580df..7b9c82de11cc 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
| @@ -66,6 +66,12 @@ static inline bool rt6_need_strict(const struct in6_addr *daddr) | |||
| 66 | (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK); | 66 | (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | static inline bool rt6_qualify_for_ecmp(const struct fib6_info *f6i) | ||
| 70 | { | ||
| 71 | return (f6i->fib6_flags & (RTF_GATEWAY|RTF_ADDRCONF|RTF_DYNAMIC)) == | ||
| 72 | RTF_GATEWAY; | ||
| 73 | } | ||
| 74 | |||
| 69 | void ip6_route_input(struct sk_buff *skb); | 75 | void ip6_route_input(struct sk_buff *skb); |
| 70 | struct dst_entry *ip6_route_input_lookup(struct net *net, | 76 | struct dst_entry *ip6_route_input_lookup(struct net *net, |
| 71 | struct net_device *dev, | 77 | struct net_device *dev, |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 16475c269749..8f73be494503 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -355,14 +355,7 @@ struct ipv6_txoptions *ipv6_dup_options(struct sock *sk, | |||
| 355 | struct ipv6_txoptions *ipv6_renew_options(struct sock *sk, | 355 | struct ipv6_txoptions *ipv6_renew_options(struct sock *sk, |
| 356 | struct ipv6_txoptions *opt, | 356 | struct ipv6_txoptions *opt, |
| 357 | int newtype, | 357 | int newtype, |
| 358 | struct ipv6_opt_hdr __user *newopt, | 358 | struct ipv6_opt_hdr *newopt); |
| 359 | int newoptlen); | ||
| 360 | struct ipv6_txoptions * | ||
| 361 | ipv6_renew_options_kern(struct sock *sk, | ||
| 362 | struct ipv6_txoptions *opt, | ||
| 363 | int newtype, | ||
| 364 | struct ipv6_opt_hdr *newopt, | ||
| 365 | int newoptlen); | ||
| 366 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | 359 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, |
| 367 | struct ipv6_txoptions *opt); | 360 | struct ipv6_txoptions *opt); |
| 368 | 361 | ||
| @@ -830,7 +823,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb, | |||
| 830 | * to minimize possbility that any useful information to an | 823 | * to minimize possbility that any useful information to an |
| 831 | * attacker is leaked. Only lower 20 bits are relevant. | 824 | * attacker is leaked. Only lower 20 bits are relevant. |
| 832 | */ | 825 | */ |
| 833 | rol32(hash, 16); | 826 | hash = rol32(hash, 16); |
| 834 | 827 | ||
| 835 | flowlabel = (__force __be32)hash & IPV6_FLOWLABEL_MASK; | 828 | flowlabel = (__force __be32)hash & IPV6_FLOWLABEL_MASK; |
| 836 | 829 | ||
| @@ -1107,6 +1100,8 @@ void ipv6_sysctl_unregister(void); | |||
| 1107 | 1100 | ||
| 1108 | int ipv6_sock_mc_join(struct sock *sk, int ifindex, | 1101 | int ipv6_sock_mc_join(struct sock *sk, int ifindex, |
| 1109 | const struct in6_addr *addr); | 1102 | const struct in6_addr *addr); |
| 1103 | int ipv6_sock_mc_join_ssm(struct sock *sk, int ifindex, | ||
| 1104 | const struct in6_addr *addr, unsigned int mode); | ||
| 1110 | int ipv6_sock_mc_drop(struct sock *sk, int ifindex, | 1105 | int ipv6_sock_mc_drop(struct sock *sk, int ifindex, |
| 1111 | const struct in6_addr *addr); | 1106 | const struct in6_addr *addr); |
| 1112 | #endif /* _NET_IPV6_H */ | 1107 | #endif /* _NET_IPV6_H */ |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index b0eaeb02d46d..f4c21b5a1242 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
| @@ -153,6 +153,8 @@ struct iucv_sock_list { | |||
| 153 | atomic_t autobind_name; | 153 | atomic_t autobind_name; |
| 154 | }; | 154 | }; |
| 155 | 155 | ||
| 156 | __poll_t iucv_sock_poll(struct file *file, struct socket *sock, | ||
| 157 | poll_table *wait); | ||
| 156 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); | 158 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); |
| 157 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); | 159 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); |
| 158 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); | 160 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 47e35cce3b64..a71264d75d7f 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -128,6 +128,7 @@ struct net { | |||
| 128 | #endif | 128 | #endif |
| 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 130 | struct netns_nf_frag nf_frag; | 130 | struct netns_nf_frag nf_frag; |
| 131 | struct ctl_table_header *nf_frag_frags_hdr; | ||
| 131 | #endif | 132 | #endif |
| 132 | struct sock *nfnl; | 133 | struct sock *nfnl; |
| 133 | struct sock *nfnl_stash; | 134 | struct sock *nfnl_stash; |
diff --git a/include/net/netfilter/nf_tables_core.h b/include/net/netfilter/nf_tables_core.h index e0c0c2558ec4..a05134507e7b 100644 --- a/include/net/netfilter/nf_tables_core.h +++ b/include/net/netfilter/nf_tables_core.h | |||
| @@ -65,4 +65,10 @@ extern const struct nft_expr_ops nft_payload_fast_ops; | |||
| 65 | extern struct static_key_false nft_counters_enabled; | 65 | extern struct static_key_false nft_counters_enabled; |
| 66 | extern struct static_key_false nft_trace_enabled; | 66 | extern struct static_key_false nft_trace_enabled; |
| 67 | 67 | ||
| 68 | extern struct nft_set_type nft_set_rhash_type; | ||
| 69 | extern struct nft_set_type nft_set_hash_type; | ||
| 70 | extern struct nft_set_type nft_set_hash_fast_type; | ||
| 71 | extern struct nft_set_type nft_set_rbtree_type; | ||
| 72 | extern struct nft_set_type nft_set_bitmap_type; | ||
| 73 | |||
| 68 | #endif /* _NET_NF_TABLES_CORE_H */ | 74 | #endif /* _NET_NF_TABLES_CORE_H */ |
diff --git a/include/net/netfilter/nf_tproxy.h b/include/net/netfilter/nf_tproxy.h index 9754a50ecde9..4cc64c8446eb 100644 --- a/include/net/netfilter/nf_tproxy.h +++ b/include/net/netfilter/nf_tproxy.h | |||
| @@ -64,7 +64,7 @@ nf_tproxy_handle_time_wait4(struct net *net, struct sk_buff *skb, | |||
| 64 | * belonging to established connections going through that one. | 64 | * belonging to established connections going through that one. |
| 65 | */ | 65 | */ |
| 66 | struct sock * | 66 | struct sock * |
| 67 | nf_tproxy_get_sock_v4(struct net *net, struct sk_buff *skb, void *hp, | 67 | nf_tproxy_get_sock_v4(struct net *net, struct sk_buff *skb, |
| 68 | const u8 protocol, | 68 | const u8 protocol, |
| 69 | const __be32 saddr, const __be32 daddr, | 69 | const __be32 saddr, const __be32 daddr, |
| 70 | const __be16 sport, const __be16 dport, | 70 | const __be16 sport, const __be16 dport, |
| @@ -103,7 +103,7 @@ nf_tproxy_handle_time_wait6(struct sk_buff *skb, int tproto, int thoff, | |||
| 103 | struct sock *sk); | 103 | struct sock *sk); |
| 104 | 104 | ||
| 105 | struct sock * | 105 | struct sock * |
| 106 | nf_tproxy_get_sock_v6(struct net *net, struct sk_buff *skb, int thoff, void *hp, | 106 | nf_tproxy_get_sock_v6(struct net *net, struct sk_buff *skb, int thoff, |
| 107 | const u8 protocol, | 107 | const u8 protocol, |
| 108 | const struct in6_addr *saddr, const struct in6_addr *daddr, | 108 | const struct in6_addr *saddr, const struct in6_addr *daddr, |
| 109 | const __be16 sport, const __be16 dport, | 109 | const __be16 sport, const __be16 dport, |
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index c978a31b0f84..762ac9931b62 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
| @@ -109,7 +109,6 @@ struct netns_ipv6 { | |||
| 109 | 109 | ||
| 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 111 | struct netns_nf_frag { | 111 | struct netns_nf_frag { |
| 112 | struct netns_sysctl_ipv6 sysctl; | ||
| 113 | struct netns_frags frags; | 112 | struct netns_frags frags; |
| 114 | }; | 113 | }; |
| 115 | #endif | 114 | #endif |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index a3c1a2c47cd4..20b059574e60 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
| @@ -111,6 +111,11 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q, | |||
| 111 | { | 111 | { |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static inline bool tcf_block_shared(struct tcf_block *block) | ||
| 115 | { | ||
| 116 | return false; | ||
| 117 | } | ||
| 118 | |||
| 114 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) | 119 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) |
| 115 | { | 120 | { |
| 116 | return NULL; | 121 | return NULL; |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 30b3e2fe240a..8c2caa370e0f 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
| @@ -109,7 +109,8 @@ int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb); | |||
| 109 | int sctp_inet_listen(struct socket *sock, int backlog); | 109 | int sctp_inet_listen(struct socket *sock, int backlog); |
| 110 | void sctp_write_space(struct sock *sk); | 110 | void sctp_write_space(struct sock *sk); |
| 111 | void sctp_data_ready(struct sock *sk); | 111 | void sctp_data_ready(struct sock *sk); |
| 112 | __poll_t sctp_poll_mask(struct socket *sock, __poll_t events); | 112 | __poll_t sctp_poll(struct file *file, struct socket *sock, |
| 113 | poll_table *wait); | ||
| 113 | void sctp_sock_rfree(struct sk_buff *skb); | 114 | void sctp_sock_rfree(struct sk_buff *skb); |
| 114 | void sctp_copy_sock(struct sock *newsk, struct sock *sk, | 115 | void sctp_copy_sock(struct sock *newsk, struct sock *sk, |
| 115 | struct sctp_association *asoc); | 116 | struct sctp_association *asoc); |
diff --git a/include/net/tc_act/tc_csum.h b/include/net/tc_act/tc_csum.h index 9470fd7e4350..32d2454c0479 100644 --- a/include/net/tc_act/tc_csum.h +++ b/include/net/tc_act/tc_csum.h | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <linux/tc_act/tc_csum.h> | 7 | #include <linux/tc_act/tc_csum.h> |
| 8 | 8 | ||
| 9 | struct tcf_csum_params { | 9 | struct tcf_csum_params { |
| 10 | int action; | ||
| 11 | u32 update_flags; | 10 | u32 update_flags; |
| 12 | struct rcu_head rcu; | 11 | struct rcu_head rcu; |
| 13 | }; | 12 | }; |
diff --git a/include/net/tc_act/tc_tunnel_key.h b/include/net/tc_act/tc_tunnel_key.h index efef0b4b1b2b..46b8c7f1c8d5 100644 --- a/include/net/tc_act/tc_tunnel_key.h +++ b/include/net/tc_act/tc_tunnel_key.h | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | struct tcf_tunnel_key_params { | 18 | struct tcf_tunnel_key_params { |
| 19 | struct rcu_head rcu; | 19 | struct rcu_head rcu; |
| 20 | int tcft_action; | 20 | int tcft_action; |
| 21 | int action; | ||
| 22 | struct metadata_dst *tcft_enc_metadata; | 21 | struct metadata_dst *tcft_enc_metadata; |
| 23 | }; | 22 | }; |
| 24 | 23 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 0448e7c5d2b4..3482d13d655b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -388,7 +388,8 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst); | |||
| 388 | void tcp_close(struct sock *sk, long timeout); | 388 | void tcp_close(struct sock *sk, long timeout); |
| 389 | void tcp_init_sock(struct sock *sk); | 389 | void tcp_init_sock(struct sock *sk); |
| 390 | void tcp_init_transfer(struct sock *sk, int bpf_op); | 390 | void tcp_init_transfer(struct sock *sk, int bpf_op); |
| 391 | __poll_t tcp_poll_mask(struct socket *sock, __poll_t events); | 391 | __poll_t tcp_poll(struct file *file, struct socket *sock, |
| 392 | struct poll_table_struct *wait); | ||
| 392 | int tcp_getsockopt(struct sock *sk, int level, int optname, | 393 | int tcp_getsockopt(struct sock *sk, int level, int optname, |
| 393 | char __user *optval, int __user *optlen); | 394 | char __user *optval, int __user *optlen); |
| 394 | int tcp_setsockopt(struct sock *sk, int level, int optname, | 395 | int tcp_setsockopt(struct sock *sk, int level, int optname, |
| @@ -827,6 +828,10 @@ struct tcp_skb_cb { | |||
| 827 | 828 | ||
| 828 | #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) | 829 | #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) |
| 829 | 830 | ||
| 831 | static inline void bpf_compute_data_end_sk_skb(struct sk_buff *skb) | ||
| 832 | { | ||
| 833 | TCP_SKB_CB(skb)->bpf.data_end = skb->data + skb_headlen(skb); | ||
| 834 | } | ||
| 830 | 835 | ||
| 831 | #if IS_ENABLED(CONFIG_IPV6) | 836 | #if IS_ENABLED(CONFIG_IPV6) |
| 832 | /* This is the variant of inet6_iif() that must be used by TCP, | 837 | /* This is the variant of inet6_iif() that must be used by TCP, |
| @@ -907,8 +912,6 @@ enum tcp_ca_event { | |||
| 907 | CA_EVENT_LOSS, /* loss timeout */ | 912 | CA_EVENT_LOSS, /* loss timeout */ |
| 908 | CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */ | 913 | CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */ |
| 909 | CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */ | 914 | CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */ |
| 910 | CA_EVENT_DELAYED_ACK, /* Delayed ack is sent */ | ||
| 911 | CA_EVENT_NON_DELAYED_ACK, | ||
| 912 | }; | 915 | }; |
| 913 | 916 | ||
| 914 | /* Information about inbound ACK, passed to cong_ops->in_ack_event() */ | 917 | /* Information about inbound ACK, passed to cong_ops->in_ack_event() */ |
diff --git a/include/net/tls.h b/include/net/tls.h index 7f84ea3e217c..70c273777fe9 100644 --- a/include/net/tls.h +++ b/include/net/tls.h | |||
| @@ -109,7 +109,8 @@ struct tls_sw_context_rx { | |||
| 109 | 109 | ||
| 110 | struct strparser strp; | 110 | struct strparser strp; |
| 111 | void (*saved_data_ready)(struct sock *sk); | 111 | void (*saved_data_ready)(struct sock *sk); |
| 112 | __poll_t (*sk_poll_mask)(struct socket *sock, __poll_t events); | 112 | unsigned int (*sk_poll)(struct file *file, struct socket *sock, |
| 113 | struct poll_table_struct *wait); | ||
| 113 | struct sk_buff *recv_pkt; | 114 | struct sk_buff *recv_pkt; |
| 114 | u8 control; | 115 | u8 control; |
| 115 | bool decrypted; | 116 | bool decrypted; |
| @@ -224,7 +225,8 @@ void tls_sw_free_resources_tx(struct sock *sk); | |||
| 224 | void tls_sw_free_resources_rx(struct sock *sk); | 225 | void tls_sw_free_resources_rx(struct sock *sk); |
| 225 | int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, | 226 | int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, |
| 226 | int nonblock, int flags, int *addr_len); | 227 | int nonblock, int flags, int *addr_len); |
| 227 | __poll_t tls_sw_poll_mask(struct socket *sock, __poll_t events); | 228 | unsigned int tls_sw_poll(struct file *file, struct socket *sock, |
| 229 | struct poll_table_struct *wait); | ||
| 228 | ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, | 230 | ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, |
| 229 | struct pipe_inode_info *pipe, | 231 | struct pipe_inode_info *pipe, |
| 230 | size_t len, unsigned int flags); | 232 | size_t len, unsigned int flags); |
diff --git a/include/net/udp.h b/include/net/udp.h index b1ea8b0f5e6a..81afdacd4fff 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
| @@ -285,7 +285,7 @@ int udp_init_sock(struct sock *sk); | |||
| 285 | int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); | 285 | int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
| 286 | int __udp_disconnect(struct sock *sk, int flags); | 286 | int __udp_disconnect(struct sock *sk, int flags); |
| 287 | int udp_disconnect(struct sock *sk, int flags); | 287 | int udp_disconnect(struct sock *sk, int flags); |
| 288 | __poll_t udp_poll_mask(struct socket *sock, __poll_t events); | 288 | __poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait); |
| 289 | struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | 289 | struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, |
| 290 | netdev_features_t features, | 290 | netdev_features_t features, |
| 291 | bool is_ipv6); | 291 | bool is_ipv6); |
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h index 9fe472f2ac95..7161856bcf9c 100644 --- a/include/net/xdp_sock.h +++ b/include/net/xdp_sock.h | |||
| @@ -60,6 +60,10 @@ struct xdp_sock { | |||
| 60 | bool zc; | 60 | bool zc; |
| 61 | /* Protects multiple processes in the control path */ | 61 | /* Protects multiple processes in the control path */ |
| 62 | struct mutex mutex; | 62 | struct mutex mutex; |
| 63 | /* Mutual exclusion of NAPI TX thread and sendmsg error paths | ||
| 64 | * in the SKB destructor callback. | ||
| 65 | */ | ||
| 66 | spinlock_t tx_completion_lock; | ||
| 63 | u64 rx_dropped; | 67 | u64 rx_dropped; |
| 64 | }; | 68 | }; |
| 65 | 69 | ||
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index d00221345c19..d4593a6062ef 100644 --- a/include/uapi/linux/aio_abi.h +++ b/include/uapi/linux/aio_abi.h | |||
| @@ -29,7 +29,6 @@ | |||
| 29 | 29 | ||
| 30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
| 31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
| 32 | #include <linux/signal.h> | ||
| 33 | #include <asm/byteorder.h> | 32 | #include <asm/byteorder.h> |
| 34 | 33 | ||
| 35 | typedef __kernel_ulong_t aio_context_t; | 34 | typedef __kernel_ulong_t aio_context_t; |
| @@ -39,8 +38,10 @@ enum { | |||
| 39 | IOCB_CMD_PWRITE = 1, | 38 | IOCB_CMD_PWRITE = 1, |
| 40 | IOCB_CMD_FSYNC = 2, | 39 | IOCB_CMD_FSYNC = 2, |
| 41 | IOCB_CMD_FDSYNC = 3, | 40 | IOCB_CMD_FDSYNC = 3, |
| 42 | /* 4 was the experimental IOCB_CMD_PREADX */ | 41 | /* These two are experimental. |
| 43 | IOCB_CMD_POLL = 5, | 42 | * IOCB_CMD_PREADX = 4, |
| 43 | * IOCB_CMD_POLL = 5, | ||
| 44 | */ | ||
| 44 | IOCB_CMD_NOOP = 6, | 45 | IOCB_CMD_NOOP = 6, |
| 45 | IOCB_CMD_PREADV = 7, | 46 | IOCB_CMD_PREADV = 7, |
| 46 | IOCB_CMD_PWRITEV = 8, | 47 | IOCB_CMD_PWRITEV = 8, |
| @@ -108,10 +109,5 @@ struct iocb { | |||
| 108 | #undef IFBIG | 109 | #undef IFBIG |
| 109 | #undef IFLITTLE | 110 | #undef IFLITTLE |
| 110 | 111 | ||
| 111 | struct __aio_sigset { | ||
| 112 | const sigset_t __user *sigmask; | ||
| 113 | size_t sigsetsize; | ||
| 114 | }; | ||
| 115 | |||
| 116 | #endif /* __LINUX__AIO_ABI_H */ | 112 | #endif /* __LINUX__AIO_ABI_H */ |
| 117 | 113 | ||
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 59b19b6a40d7..b7db3261c62d 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
| @@ -1857,7 +1857,8 @@ union bpf_attr { | |||
| 1857 | * is resolved), the nexthop address is returned in ipv4_dst | 1857 | * is resolved), the nexthop address is returned in ipv4_dst |
| 1858 | * or ipv6_dst based on family, smac is set to mac address of | 1858 | * or ipv6_dst based on family, smac is set to mac address of |
| 1859 | * egress device, dmac is set to nexthop mac address, rt_metric | 1859 | * egress device, dmac is set to nexthop mac address, rt_metric |
| 1860 | * is set to metric from route (IPv4/IPv6 only). | 1860 | * is set to metric from route (IPv4/IPv6 only), and ifindex |
| 1861 | * is set to the device index of the nexthop from the FIB lookup. | ||
| 1861 | * | 1862 | * |
| 1862 | * *plen* argument is the size of the passed in struct. | 1863 | * *plen* argument is the size of the passed in struct. |
| 1863 | * *flags* argument can be a combination of one or more of the | 1864 | * *flags* argument can be a combination of one or more of the |
| @@ -1873,9 +1874,10 @@ union bpf_attr { | |||
| 1873 | * *ctx* is either **struct xdp_md** for XDP programs or | 1874 | * *ctx* is either **struct xdp_md** for XDP programs or |
| 1874 | * **struct sk_buff** tc cls_act programs. | 1875 | * **struct sk_buff** tc cls_act programs. |
| 1875 | * Return | 1876 | * Return |
| 1876 | * Egress device index on success, 0 if packet needs to continue | 1877 | * * < 0 if any input argument is invalid |
| 1877 | * up the stack for further processing or a negative error in case | 1878 | * * 0 on success (packet is forwarded, nexthop neighbor exists) |
| 1878 | * of failure. | 1879 | * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the |
| 1880 | * * packet is not forwarded or needs assist from full stack | ||
| 1879 | * | 1881 | * |
| 1880 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) | 1882 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) |
| 1881 | * Description | 1883 | * Description |
| @@ -2612,6 +2614,18 @@ struct bpf_raw_tracepoint_args { | |||
| 2612 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) | 2614 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) |
| 2613 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) | 2615 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) |
| 2614 | 2616 | ||
| 2617 | enum { | ||
| 2618 | BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */ | ||
| 2619 | BPF_FIB_LKUP_RET_BLACKHOLE, /* dest is blackholed; can be dropped */ | ||
| 2620 | BPF_FIB_LKUP_RET_UNREACHABLE, /* dest is unreachable; can be dropped */ | ||
| 2621 | BPF_FIB_LKUP_RET_PROHIBIT, /* dest not allowed; can be dropped */ | ||
| 2622 | BPF_FIB_LKUP_RET_NOT_FWDED, /* packet is not forwarded */ | ||
| 2623 | BPF_FIB_LKUP_RET_FWD_DISABLED, /* fwding is not enabled on ingress */ | ||
| 2624 | BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */ | ||
| 2625 | BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */ | ||
| 2626 | BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */ | ||
| 2627 | }; | ||
| 2628 | |||
| 2615 | struct bpf_fib_lookup { | 2629 | struct bpf_fib_lookup { |
| 2616 | /* input: network family for lookup (AF_INET, AF_INET6) | 2630 | /* input: network family for lookup (AF_INET, AF_INET6) |
| 2617 | * output: network family of egress nexthop | 2631 | * output: network family of egress nexthop |
| @@ -2625,7 +2639,11 @@ struct bpf_fib_lookup { | |||
| 2625 | 2639 | ||
| 2626 | /* total length of packet from network header - used for MTU check */ | 2640 | /* total length of packet from network header - used for MTU check */ |
| 2627 | __u16 tot_len; | 2641 | __u16 tot_len; |
| 2628 | __u32 ifindex; /* L3 device index for lookup */ | 2642 | |
| 2643 | /* input: L3 device index for lookup | ||
| 2644 | * output: device index from FIB lookup | ||
| 2645 | */ | ||
| 2646 | __u32 ifindex; | ||
| 2629 | 2647 | ||
| 2630 | union { | 2648 | union { |
| 2631 | /* inputs to lookup */ | 2649 | /* inputs to lookup */ |
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 4ca65b56084f..7363f18e65a5 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
| @@ -226,7 +226,7 @@ enum tunable_id { | |||
| 226 | ETHTOOL_TX_COPYBREAK, | 226 | ETHTOOL_TX_COPYBREAK, |
| 227 | ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */ | 227 | ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */ |
| 228 | /* | 228 | /* |
| 229 | * Add your fresh new tubale attribute above and remember to update | 229 | * Add your fresh new tunable attribute above and remember to update |
| 230 | * tunable_strings[] in net/core/ethtool.c | 230 | * tunable_strings[] in net/core/ethtool.c |
| 231 | */ | 231 | */ |
| 232 | __ETHTOOL_TUNABLE_COUNT, | 232 | __ETHTOOL_TUNABLE_COUNT, |
diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h index d620fa43756c..9a402fdb60e9 100644 --- a/include/uapi/linux/rseq.h +++ b/include/uapi/linux/rseq.h | |||
| @@ -10,13 +10,8 @@ | |||
| 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #ifdef __KERNEL__ | 13 | #include <linux/types.h> |
| 14 | # include <linux/types.h> | 14 | #include <asm/byteorder.h> |
| 15 | #else | ||
| 16 | # include <stdint.h> | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <linux/types_32_64.h> | ||
| 20 | 15 | ||
| 21 | enum rseq_cpu_id_state { | 16 | enum rseq_cpu_id_state { |
| 22 | RSEQ_CPU_ID_UNINITIALIZED = -1, | 17 | RSEQ_CPU_ID_UNINITIALIZED = -1, |
| @@ -52,10 +47,10 @@ struct rseq_cs { | |||
| 52 | __u32 version; | 47 | __u32 version; |
| 53 | /* enum rseq_cs_flags */ | 48 | /* enum rseq_cs_flags */ |
| 54 | __u32 flags; | 49 | __u32 flags; |
| 55 | LINUX_FIELD_u32_u64(start_ip); | 50 | __u64 start_ip; |
| 56 | /* Offset from start_ip. */ | 51 | /* Offset from start_ip. */ |
| 57 | LINUX_FIELD_u32_u64(post_commit_offset); | 52 | __u64 post_commit_offset; |
| 58 | LINUX_FIELD_u32_u64(abort_ip); | 53 | __u64 abort_ip; |
| 59 | } __attribute__((aligned(4 * sizeof(__u64)))); | 54 | } __attribute__((aligned(4 * sizeof(__u64)))); |
| 60 | 55 | ||
| 61 | /* | 56 | /* |
| @@ -67,28 +62,30 @@ struct rseq_cs { | |||
| 67 | struct rseq { | 62 | struct rseq { |
| 68 | /* | 63 | /* |
| 69 | * Restartable sequences cpu_id_start field. Updated by the | 64 | * Restartable sequences cpu_id_start field. Updated by the |
| 70 | * kernel, and read by user-space with single-copy atomicity | 65 | * kernel. Read by user-space with single-copy atomicity |
| 71 | * semantics. Aligned on 32-bit. Always contains a value in the | 66 | * semantics. This field should only be read by the thread which |
| 72 | * range of possible CPUs, although the value may not be the | 67 | * registered this data structure. Aligned on 32-bit. Always |
| 73 | * actual current CPU (e.g. if rseq is not initialized). This | 68 | * contains a value in the range of possible CPUs, although the |
| 74 | * CPU number value should always be compared against the value | 69 | * value may not be the actual current CPU (e.g. if rseq is not |
| 75 | * of the cpu_id field before performing a rseq commit or | 70 | * initialized). This CPU number value should always be compared |
| 76 | * returning a value read from a data structure indexed using | 71 | * against the value of the cpu_id field before performing a rseq |
| 77 | * the cpu_id_start value. | 72 | * commit or returning a value read from a data structure indexed |
| 73 | * using the cpu_id_start value. | ||
| 78 | */ | 74 | */ |
| 79 | __u32 cpu_id_start; | 75 | __u32 cpu_id_start; |
| 80 | /* | 76 | /* |
| 81 | * Restartable sequences cpu_id field. Updated by the kernel, | 77 | * Restartable sequences cpu_id field. Updated by the kernel. |
| 82 | * and read by user-space with single-copy atomicity semantics. | 78 | * Read by user-space with single-copy atomicity semantics. This |
| 83 | * Aligned on 32-bit. Values RSEQ_CPU_ID_UNINITIALIZED and | 79 | * field should only be read by the thread which registered this |
| 84 | * RSEQ_CPU_ID_REGISTRATION_FAILED have a special semantic: the | 80 | * data structure. Aligned on 32-bit. Values |
| 85 | * former means "rseq uninitialized", and latter means "rseq | 81 | * RSEQ_CPU_ID_UNINITIALIZED and RSEQ_CPU_ID_REGISTRATION_FAILED |
| 86 | * initialization failed". This value is meant to be read within | 82 | * have a special semantic: the former means "rseq uninitialized", |
| 87 | * rseq critical sections and compared with the cpu_id_start | 83 | * and latter means "rseq initialization failed". This value is |
| 88 | * value previously read, before performing the commit instruction, | 84 | * meant to be read within rseq critical sections and compared |
| 89 | * or read and compared with the cpu_id_start value before returning | 85 | * with the cpu_id_start value previously read, before performing |
| 90 | * a value loaded from a data structure indexed using the | 86 | * the commit instruction, or read and compared with the |
| 91 | * cpu_id_start value. | 87 | * cpu_id_start value before returning a value loaded from a data |
| 88 | * structure indexed using the cpu_id_start value. | ||
| 92 | */ | 89 | */ |
| 93 | __u32 cpu_id; | 90 | __u32 cpu_id; |
| 94 | /* | 91 | /* |
| @@ -105,27 +102,44 @@ struct rseq { | |||
| 105 | * targeted by the rseq_cs. Also needs to be set to NULL by user-space | 102 | * targeted by the rseq_cs. Also needs to be set to NULL by user-space |
| 106 | * before reclaiming memory that contains the targeted struct rseq_cs. | 103 | * before reclaiming memory that contains the targeted struct rseq_cs. |
| 107 | * | 104 | * |
| 108 | * Read and set by the kernel with single-copy atomicity semantics. | 105 | * Read and set by the kernel. Set by user-space with single-copy |
| 109 | * Set by user-space with single-copy atomicity semantics. Aligned | 106 | * atomicity semantics. This field should only be updated by the |
| 110 | * on 64-bit. | 107 | * thread which registered this data structure. Aligned on 64-bit. |
| 111 | */ | 108 | */ |
| 112 | LINUX_FIELD_u32_u64(rseq_cs); | 109 | union { |
| 110 | __u64 ptr64; | ||
| 111 | #ifdef __LP64__ | ||
| 112 | __u64 ptr; | ||
| 113 | #else | ||
| 114 | struct { | ||
| 115 | #if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || defined(__BIG_ENDIAN) | ||
| 116 | __u32 padding; /* Initialized to zero. */ | ||
| 117 | __u32 ptr32; | ||
| 118 | #else /* LITTLE */ | ||
| 119 | __u32 ptr32; | ||
| 120 | __u32 padding; /* Initialized to zero. */ | ||
| 121 | #endif /* ENDIAN */ | ||
| 122 | } ptr; | ||
| 123 | #endif | ||
| 124 | } rseq_cs; | ||
| 125 | |||
| 113 | /* | 126 | /* |
| 114 | * - RSEQ_DISABLE flag: | 127 | * Restartable sequences flags field. |
| 128 | * | ||
| 129 | * This field should only be updated by the thread which | ||
| 130 | * registered this data structure. Read by the kernel. | ||
| 131 | * Mainly used for single-stepping through rseq critical sections | ||
| 132 | * with debuggers. | ||
| 115 | * | 133 | * |
| 116 | * Fallback fast-track flag for single-stepping. | ||
| 117 | * Set by user-space if lack of progress is detected. | ||
| 118 | * Cleared by user-space after rseq finish. | ||
| 119 | * Read by the kernel. | ||
| 120 | * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT | 134 | * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT |
| 121 | * Inhibit instruction sequence block restart and event | 135 | * Inhibit instruction sequence block restart on preemption |
| 122 | * counter increment on preemption for this thread. | 136 | * for this thread. |
| 123 | * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL | 137 | * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL |
| 124 | * Inhibit instruction sequence block restart and event | 138 | * Inhibit instruction sequence block restart on signal |
| 125 | * counter increment on signal delivery for this thread. | 139 | * delivery for this thread. |
| 126 | * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE | 140 | * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE |
| 127 | * Inhibit instruction sequence block restart and event | 141 | * Inhibit instruction sequence block restart on migration for |
| 128 | * counter increment on migration for this thread. | 142 | * this thread. |
| 129 | */ | 143 | */ |
| 130 | __u32 flags; | 144 | __u32 flags; |
| 131 | } __attribute__((aligned(4 * sizeof(__u64)))); | 145 | } __attribute__((aligned(4 * sizeof(__u64)))); |
diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h index 6e299349b158..b7b57967d90f 100644 --- a/include/uapi/linux/target_core_user.h +++ b/include/uapi/linux/target_core_user.h | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #define TCMU_MAILBOX_VERSION 2 | 44 | #define TCMU_MAILBOX_VERSION 2 |
| 45 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ | 45 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ |
| 46 | #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ | 46 | #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ |
| 47 | #define TCMU_MAILBOX_FLAG_CAP_READ_LEN (1 << 1) /* Read data length */ | ||
| 47 | 48 | ||
| 48 | struct tcmu_mailbox { | 49 | struct tcmu_mailbox { |
| 49 | __u16 version; | 50 | __u16 version; |
| @@ -71,6 +72,7 @@ struct tcmu_cmd_entry_hdr { | |||
| 71 | __u16 cmd_id; | 72 | __u16 cmd_id; |
| 72 | __u8 kflags; | 73 | __u8 kflags; |
| 73 | #define TCMU_UFLAG_UNKNOWN_OP 0x1 | 74 | #define TCMU_UFLAG_UNKNOWN_OP 0x1 |
| 75 | #define TCMU_UFLAG_READ_LEN 0x2 | ||
| 74 | __u8 uflags; | 76 | __u8 uflags; |
| 75 | 77 | ||
| 76 | } __packed; | 78 | } __packed; |
| @@ -119,7 +121,7 @@ struct tcmu_cmd_entry { | |||
| 119 | __u8 scsi_status; | 121 | __u8 scsi_status; |
| 120 | __u8 __pad1; | 122 | __u8 __pad1; |
| 121 | __u16 __pad2; | 123 | __u16 __pad2; |
| 122 | __u32 __pad3; | 124 | __u32 read_len; |
| 123 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; | 125 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; |
| 124 | } rsp; | 126 | } rsp; |
| 125 | }; | 127 | }; |
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index 29eb659aa77a..e3f6ed8a7064 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h | |||
| @@ -127,6 +127,10 @@ enum { | |||
| 127 | 127 | ||
| 128 | #define TCP_CM_INQ TCP_INQ | 128 | #define TCP_CM_INQ TCP_INQ |
| 129 | 129 | ||
| 130 | #define TCP_REPAIR_ON 1 | ||
| 131 | #define TCP_REPAIR_OFF 0 | ||
| 132 | #define TCP_REPAIR_OFF_NO_WP -1 /* Turn off without window probes */ | ||
| 133 | |||
| 130 | struct tcp_repair_opt { | 134 | struct tcp_repair_opt { |
| 131 | __u32 opt_code; | 135 | __u32 opt_code; |
| 132 | __u32 opt_val; | 136 | __u32 opt_val; |
diff --git a/include/uapi/linux/types_32_64.h b/include/uapi/linux/types_32_64.h deleted file mode 100644 index 0a87ace34a57..000000000000 --- a/include/uapi/linux/types_32_64.h +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPI_LINUX_TYPES_32_64_H | ||
| 3 | #define _UAPI_LINUX_TYPES_32_64_H | ||
| 4 | |||
| 5 | /* | ||
| 6 | * linux/types_32_64.h | ||
| 7 | * | ||
| 8 | * Integer type declaration for pointers across 32-bit and 64-bit systems. | ||
| 9 | * | ||
| 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifdef __KERNEL__ | ||
| 14 | # include <linux/types.h> | ||
| 15 | #else | ||
| 16 | # include <stdint.h> | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <asm/byteorder.h> | ||
| 20 | |||
| 21 | #ifdef __BYTE_ORDER | ||
| 22 | # if (__BYTE_ORDER == __BIG_ENDIAN) | ||
| 23 | # define LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 24 | # else | ||
| 25 | # define LINUX_BYTE_ORDER_LITTLE_ENDIAN | ||
| 26 | # endif | ||
| 27 | #else | ||
| 28 | # ifdef __BIG_ENDIAN | ||
| 29 | # define LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 30 | # else | ||
| 31 | # define LINUX_BYTE_ORDER_LITTLE_ENDIAN | ||
| 32 | # endif | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifdef __LP64__ | ||
| 36 | # define LINUX_FIELD_u32_u64(field) __u64 field | ||
| 37 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) field = (intptr_t)v | ||
| 38 | #else | ||
| 39 | # ifdef LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 40 | # define LINUX_FIELD_u32_u64(field) __u32 field ## _padding, field | ||
| 41 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \ | ||
| 42 | field ## _padding = 0, field = (intptr_t)v | ||
| 43 | # else | ||
| 44 | # define LINUX_FIELD_u32_u64(field) __u32 field, field ## _padding | ||
| 45 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \ | ||
| 46 | field = (intptr_t)v, field ## _padding = 0 | ||
| 47 | # endif | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #endif /* _UAPI_LINUX_TYPES_32_64_H */ | ||
