diff options
| author | Jason Gunthorpe <jgg@mellanox.com> | 2018-08-16 15:08:18 -0400 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-08-16 15:12:00 -0400 |
| commit | 89982f7ccee2fcd8fea7936b81eec6defbf0f131 (patch) | |
| tree | fc553c8d008d24595ad7de0ea0f3b56f656da27c /include | |
| parent | a1ceeca679dccc492235f0f629d9e9f7b3d51ca8 (diff) | |
| parent | 94710cac0ef4ee177a63b5227664b38c95bbf703 (diff) | |
Merge tag 'v4.18' into rdma.git for-next
Resolve merge conflicts from the -rc cycle against the rdma.git tree:
Conflicts:
drivers/infiniband/core/uverbs_cmd.c
- New ifs added to ib_uverbs_ex_create_flow in -rc and for-next
- Merge removal of file->ucontext in for-next with new code in -rc
drivers/infiniband/core/uverbs_main.c
- for-next removed code from ib_uverbs_write() that was modified
in for-rc
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include')
96 files changed, 574 insertions, 300 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 40a916efd7c0..1194a4c78d55 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
| @@ -309,7 +309,7 @@ static inline void acpi_processor_ppc_exit(void) | |||
| 309 | { | 309 | { |
| 310 | return; | 310 | return; |
| 311 | } | 311 | } |
| 312 | static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr, | 312 | static inline void acpi_processor_ppc_has_changed(struct acpi_processor *pr, |
| 313 | int event_flag) | 313 | int event_flag) |
| 314 | { | 314 | { |
| 315 | static unsigned int printout = 1; | 315 | static unsigned int printout = 1; |
| @@ -320,7 +320,6 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr, | |||
| 320 | "Consider compiling CPUfreq support into your kernel.\n"); | 320 | "Consider compiling CPUfreq support into your kernel.\n"); |
| 321 | printout = 0; | 321 | printout = 0; |
| 322 | } | 322 | } |
| 323 | return 0; | ||
| 324 | } | 323 | } |
| 325 | static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) | 324 | static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) |
| 326 | { | 325 | { |
diff --git a/include/asm-generic/qspinlock_types.h b/include/asm-generic/qspinlock_types.h index 0763f065b975..d10f1e7d6ba8 100644 --- a/include/asm-generic/qspinlock_types.h +++ b/include/asm-generic/qspinlock_types.h | |||
| @@ -63,7 +63,7 @@ typedef struct qspinlock { | |||
| 63 | /* | 63 | /* |
| 64 | * Initializier | 64 | * Initializier |
| 65 | */ | 65 | */ |
| 66 | #define __ARCH_SPIN_LOCK_UNLOCKED { .val = ATOMIC_INIT(0) } | 66 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } |
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * Bitfields in the atomic value: | 69 | * Bitfields in the atomic value: |
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/atmdev.h b/include/linux/atmdev.h index 0c27515d2cf6..8124815eb121 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -214,6 +214,7 @@ struct atmphy_ops { | |||
| 214 | struct atm_skb_data { | 214 | struct atm_skb_data { |
| 215 | struct atm_vcc *vcc; /* ATM VCC */ | 215 | struct atm_vcc *vcc; /* ATM VCC */ |
| 216 | unsigned long atm_options; /* ATM layer options */ | 216 | unsigned long atm_options; /* ATM layer options */ |
| 217 | unsigned int acct_truesize; /* truesize accounted to vcc */ | ||
| 217 | }; | 218 | }; |
| 218 | 219 | ||
| 219 | #define VCC_HTABLE_SIZE 32 | 220 | #define VCC_HTABLE_SIZE 32 |
| @@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk); | |||
| 241 | 242 | ||
| 242 | void atm_dev_release_vccs(struct atm_dev *dev); | 243 | void atm_dev_release_vccs(struct atm_dev *dev); |
| 243 | 244 | ||
| 245 | static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb) | ||
| 246 | { | ||
| 247 | /* | ||
| 248 | * Because ATM skbs may not belong to a sock (and we don't | ||
| 249 | * necessarily want to), skb->truesize may be adjusted, | ||
| 250 | * escaping the hack in pskb_expand_head() which avoids | ||
| 251 | * doing so for some cases. So stash the value of truesize | ||
| 252 | * at the time we accounted it, and atm_pop_raw() can use | ||
| 253 | * that value later, in case it changes. | ||
| 254 | */ | ||
| 255 | refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); | ||
| 256 | ATM_SKB(skb)->acct_truesize = skb->truesize; | ||
| 257 | ATM_SKB(skb)->atm_options = vcc->atm_options; | ||
| 258 | } | ||
| 244 | 259 | ||
| 245 | static inline void atm_force_charge(struct atm_vcc *vcc,int truesize) | 260 | static inline void atm_force_charge(struct atm_vcc *vcc,int truesize) |
| 246 | { | 261 | { |
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index 0bd432a4d7bd..24251762c20c 100644 --- a/include/linux/backing-dev-defs.h +++ b/include/linux/backing-dev-defs.h | |||
| @@ -22,7 +22,6 @@ struct dentry; | |||
| 22 | */ | 22 | */ |
| 23 | enum wb_state { | 23 | enum wb_state { |
| 24 | WB_registered, /* bdi_register() was done */ | 24 | WB_registered, /* bdi_register() was done */ |
| 25 | WB_shutting_down, /* wb_shutdown() in progress */ | ||
| 26 | WB_writeback_running, /* Writeback is in progress */ | 25 | WB_writeback_running, /* Writeback is in progress */ |
| 27 | WB_has_dirty_io, /* Dirty inodes on ->b_{dirty|io|more_io} */ | 26 | WB_has_dirty_io, /* Dirty inodes on ->b_{dirty|io|more_io} */ |
| 28 | WB_start_all, /* nr_pages == 0 (all) work pending */ | 27 | WB_start_all, /* nr_pages == 0 (all) work pending */ |
| @@ -189,6 +188,7 @@ struct backing_dev_info { | |||
| 189 | #ifdef CONFIG_CGROUP_WRITEBACK | 188 | #ifdef CONFIG_CGROUP_WRITEBACK |
| 190 | struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */ | 189 | struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */ |
| 191 | struct rb_root cgwb_congested_tree; /* their congested states */ | 190 | struct rb_root cgwb_congested_tree; /* their congested states */ |
| 191 | struct mutex cgwb_release_mutex; /* protect shutdown of wb structs */ | ||
| 192 | #else | 192 | #else |
| 193 | struct bdi_writeback_congested *wb_congested; | 193 | struct bdi_writeback_congested *wb_congested; |
| 194 | #endif | 194 | #endif |
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index e3147eb74222..ca3f2c2edd85 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
| @@ -287,6 +287,20 @@ void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues); | |||
| 287 | 287 | ||
| 288 | void blk_mq_quiesce_queue_nowait(struct request_queue *q); | 288 | void blk_mq_quiesce_queue_nowait(struct request_queue *q); |
| 289 | 289 | ||
| 290 | /** | ||
| 291 | * blk_mq_mark_complete() - Set request state to complete | ||
| 292 | * @rq: request to set to complete state | ||
| 293 | * | ||
| 294 | * Returns true if request state was successfully set to complete. If | ||
| 295 | * successful, the caller is responsibile for seeing this request is ended, as | ||
| 296 | * blk_mq_complete_request will not work again. | ||
| 297 | */ | ||
| 298 | static inline bool blk_mq_mark_complete(struct request *rq) | ||
| 299 | { | ||
| 300 | return cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) == | ||
| 301 | MQ_RQ_IN_FLIGHT; | ||
| 302 | } | ||
| 303 | |||
| 290 | /* | 304 | /* |
| 291 | * Driver command data is immediately after the request. So subtract request | 305 | * Driver command data is immediately after the request. So subtract request |
| 292 | * size to get back to the original request, add request size to get the PDU. | 306 | * size to get back to the original request, add request size to get the PDU. |
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 995c3b1e59bf..8827e797ff97 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -488,12 +488,15 @@ void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth); | |||
| 488 | 488 | ||
| 489 | /* Map specifics */ | 489 | /* Map specifics */ |
| 490 | struct xdp_buff; | 490 | struct xdp_buff; |
| 491 | struct sk_buff; | ||
| 491 | 492 | ||
| 492 | struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key); | 493 | struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key); |
| 493 | void __dev_map_insert_ctx(struct bpf_map *map, u32 index); | 494 | void __dev_map_insert_ctx(struct bpf_map *map, u32 index); |
| 494 | void __dev_map_flush(struct bpf_map *map); | 495 | void __dev_map_flush(struct bpf_map *map); |
| 495 | int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, | 496 | int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, |
| 496 | struct net_device *dev_rx); | 497 | struct net_device *dev_rx); |
| 498 | int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, struct sk_buff *skb, | ||
| 499 | struct bpf_prog *xdp_prog); | ||
| 497 | 500 | ||
| 498 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key); | 501 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key); |
| 499 | void __cpu_map_insert_ctx(struct bpf_map *map, u32 index); | 502 | void __cpu_map_insert_ctx(struct bpf_map *map, u32 index); |
| @@ -586,6 +589,15 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, | |||
| 586 | return 0; | 589 | return 0; |
| 587 | } | 590 | } |
| 588 | 591 | ||
| 592 | struct sk_buff; | ||
| 593 | |||
| 594 | static inline int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, | ||
| 595 | struct sk_buff *skb, | ||
| 596 | struct bpf_prog *xdp_prog) | ||
| 597 | { | ||
| 598 | return 0; | ||
| 599 | } | ||
| 600 | |||
| 589 | static inline | 601 | static inline |
| 590 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) | 602 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) |
| 591 | { | 603 | { |
| @@ -684,6 +696,8 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map) | |||
| 684 | 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); |
| 685 | 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); |
| 686 | 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); | ||
| 687 | #else | 701 | #else |
| 688 | 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) |
| 689 | { | 703 | { |
| @@ -702,6 +716,12 @@ static inline int sock_map_prog(struct bpf_map *map, | |||
| 702 | { | 716 | { |
| 703 | return -EOPNOTSUPP; | 717 | return -EOPNOTSUPP; |
| 704 | } | 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 | } | ||
| 705 | #endif | 725 | #endif |
| 706 | 726 | ||
| 707 | #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/bpfilter.h b/include/linux/bpfilter.h index 687b1760bb9f..f02cee0225d4 100644 --- a/include/linux/bpfilter.h +++ b/include/linux/bpfilter.h | |||
| @@ -5,10 +5,10 @@ | |||
| 5 | #include <uapi/linux/bpfilter.h> | 5 | #include <uapi/linux/bpfilter.h> |
| 6 | 6 | ||
| 7 | struct sock; | 7 | struct sock; |
| 8 | int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char *optval, | 8 | int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval, |
| 9 | unsigned int optlen); | 9 | unsigned int optlen); |
| 10 | int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char *optval, | 10 | int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval, |
| 11 | int *optlen); | 11 | int __user *optlen); |
| 12 | extern int (*bpfilter_process_sockopt)(struct sock *sk, int optname, | 12 | extern int (*bpfilter_process_sockopt)(struct sock *sk, int optname, |
| 13 | char __user *optval, | 13 | char __user *optval, |
| 14 | unsigned int optlen, bool is_set); | 14 | unsigned int optlen, bool is_set); |
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/cpu.h b/include/linux/cpu.h index a97a63eef59f..3233fbe23594 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -30,7 +30,7 @@ struct cpu { | |||
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | extern void boot_cpu_init(void); | 32 | extern void boot_cpu_init(void); |
| 33 | extern void boot_cpu_state_init(void); | 33 | extern void boot_cpu_hotplug_init(void); |
| 34 | extern void cpu_init(void); | 34 | extern void cpu_init(void); |
| 35 | extern void trap_init(void); | 35 | extern void trap_init(void); |
| 36 | 36 | ||
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/delayacct.h b/include/linux/delayacct.h index e6c0448ebcc7..31c865d1842e 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
| @@ -124,7 +124,7 @@ static inline void delayacct_blkio_start(void) | |||
| 124 | 124 | ||
| 125 | static inline void delayacct_blkio_end(struct task_struct *p) | 125 | static inline void delayacct_blkio_end(struct task_struct *p) |
| 126 | { | 126 | { |
| 127 | if (current->delays) | 127 | if (p->delays) |
| 128 | __delayacct_blkio_end(p); | 128 | __delayacct_blkio_end(p); |
| 129 | delayacct_clear_flag(DELAYACCT_PF_BLKIO); | 129 | delayacct_clear_flag(DELAYACCT_PF_BLKIO); |
| 130 | } | 130 | } |
diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h index b67bf6ac907d..3c5a4cb3eb95 100644 --- a/include/linux/dma-contiguous.h +++ b/include/linux/dma-contiguous.h | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | * CMA should not be used by the device drivers directly. It is | 48 | * CMA should not be used by the device drivers directly. It is |
| 49 | * only a helper framework for dma-mapping subsystem. | 49 | * only a helper framework for dma-mapping subsystem. |
| 50 | * | 50 | * |
| 51 | * For more information, see kernel-docs in drivers/base/dma-contiguous.c | 51 | * For more information, see kernel-docs in kernel/dma/contiguous.c |
| 52 | */ | 52 | */ |
| 53 | 53 | ||
| 54 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index 7094718b653b..ffcc7724ca21 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/fcntl.h> | 12 | #include <linux/fcntl.h> |
| 13 | #include <linux/wait.h> | 13 | #include <linux/wait.h> |
| 14 | #include <linux/err.h> | ||
| 14 | 15 | ||
| 15 | /* | 16 | /* |
| 16 | * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining | 17 | * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 45fc0f5000d8..c73dd7396886 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/cryptohash.h> | 19 | #include <linux/cryptohash.h> |
| 20 | #include <linux/set_memory.h> | 20 | #include <linux/set_memory.h> |
| 21 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
| 22 | #include <linux/if_vlan.h> | ||
| 22 | 23 | ||
| 23 | #include <net/sch_generic.h> | 24 | #include <net/sch_generic.h> |
| 24 | 25 | ||
| @@ -469,15 +470,16 @@ struct sock_fprog_kern { | |||
| 469 | }; | 470 | }; |
| 470 | 471 | ||
| 471 | struct bpf_binary_header { | 472 | struct bpf_binary_header { |
| 472 | unsigned int pages; | 473 | u32 pages; |
| 473 | u8 image[]; | 474 | /* Some arches need word alignment for their instructions */ |
| 475 | u8 image[] __aligned(4); | ||
| 474 | }; | 476 | }; |
| 475 | 477 | ||
| 476 | struct bpf_prog { | 478 | struct bpf_prog { |
| 477 | u16 pages; /* Number of allocated pages */ | 479 | u16 pages; /* Number of allocated pages */ |
| 478 | u16 jited:1, /* Is our filter JIT'ed? */ | 480 | u16 jited:1, /* Is our filter JIT'ed? */ |
| 479 | jit_requested:1,/* archs need to JIT the prog */ | 481 | jit_requested:1,/* archs need to JIT the prog */ |
| 480 | locked:1, /* Program image locked? */ | 482 | undo_set_mem:1, /* Passed set_memory_ro() checkpoint */ |
| 481 | gpl_compatible:1, /* Is filter GPL compatible? */ | 483 | gpl_compatible:1, /* Is filter GPL compatible? */ |
| 482 | cb_access:1, /* Is control block accessed? */ | 484 | cb_access:1, /* Is control block accessed? */ |
| 483 | dst_needed:1, /* Do we need dst entry? */ | 485 | dst_needed:1, /* Do we need dst entry? */ |
| @@ -671,50 +673,27 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default) | |||
| 671 | 673 | ||
| 672 | #define bpf_classic_proglen(fprog) (fprog->len * sizeof(fprog->filter[0])) | 674 | #define bpf_classic_proglen(fprog) (fprog->len * sizeof(fprog->filter[0])) |
| 673 | 675 | ||
| 674 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | ||
| 675 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) | ||
| 676 | { | ||
| 677 | fp->locked = 1; | ||
| 678 | WARN_ON_ONCE(set_memory_ro((unsigned long)fp, fp->pages)); | ||
| 679 | } | ||
| 680 | |||
| 681 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) | ||
| 682 | { | ||
| 683 | if (fp->locked) { | ||
| 684 | WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages)); | ||
| 685 | /* In case set_memory_rw() fails, we want to be the first | ||
| 686 | * to crash here instead of some random place later on. | ||
| 687 | */ | ||
| 688 | fp->locked = 0; | ||
| 689 | } | ||
| 690 | } | ||
| 691 | |||
| 692 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) | ||
| 693 | { | ||
| 694 | WARN_ON_ONCE(set_memory_ro((unsigned long)hdr, hdr->pages)); | ||
| 695 | } | ||
| 696 | |||
| 697 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) | ||
| 698 | { | ||
| 699 | WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages)); | ||
| 700 | } | ||
| 701 | #else | ||
| 702 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) | 676 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) |
| 703 | { | 677 | { |
| 678 | fp->undo_set_mem = 1; | ||
| 679 | set_memory_ro((unsigned long)fp, fp->pages); | ||
| 704 | } | 680 | } |
| 705 | 681 | ||
| 706 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) | 682 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) |
| 707 | { | 683 | { |
| 684 | if (fp->undo_set_mem) | ||
| 685 | set_memory_rw((unsigned long)fp, fp->pages); | ||
| 708 | } | 686 | } |
| 709 | 687 | ||
| 710 | 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) |
| 711 | { | 689 | { |
| 690 | set_memory_ro((unsigned long)hdr, hdr->pages); | ||
| 712 | } | 691 | } |
| 713 | 692 | ||
| 714 | 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) |
| 715 | { | 694 | { |
| 695 | set_memory_rw((unsigned long)hdr, hdr->pages); | ||
| 716 | } | 696 | } |
| 717 | #endif /* CONFIG_ARCH_HAS_SET_MEMORY */ | ||
| 718 | 697 | ||
| 719 | static inline struct bpf_binary_header * | 698 | static inline struct bpf_binary_header * |
| 720 | bpf_jit_binary_hdr(const struct bpf_prog *fp) | 699 | bpf_jit_binary_hdr(const struct bpf_prog *fp) |
| @@ -786,6 +765,21 @@ static inline bool bpf_dump_raw_ok(void) | |||
| 786 | 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, |
| 787 | const struct bpf_insn *patch, u32 len); | 766 | const struct bpf_insn *patch, u32 len); |
| 788 | 767 | ||
| 768 | static inline int xdp_ok_fwd_dev(const struct net_device *fwd, | ||
| 769 | unsigned int pktlen) | ||
| 770 | { | ||
| 771 | unsigned int len; | ||
| 772 | |||
| 773 | if (unlikely(!(fwd->flags & IFF_UP))) | ||
| 774 | return -ENETDOWN; | ||
| 775 | |||
| 776 | len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN; | ||
| 777 | if (pktlen > len) | ||
| 778 | return -EMSGSIZE; | ||
| 779 | |||
| 780 | return 0; | ||
| 781 | } | ||
| 782 | |||
| 789 | /* The pair of xdp_do_redirect and xdp_do_flush_map MUST be called in the | 783 | /* The pair of xdp_do_redirect and xdp_do_flush_map MUST be called in the |
| 790 | * same cpu context. Further for best results no more than a single map | 784 | * same cpu context. Further for best results no more than a single map |
| 791 | * for the do_redirect/do_flush pair should be used. This limitation is | 785 | * for the do_redirect/do_flush pair should be used. This limitation is |
| @@ -961,6 +955,9 @@ static inline void bpf_prog_kallsyms_del(struct bpf_prog *fp) | |||
| 961 | } | 955 | } |
| 962 | #endif /* CONFIG_BPF_JIT */ | 956 | #endif /* CONFIG_BPF_JIT */ |
| 963 | 957 | ||
| 958 | void bpf_prog_kallsyms_del_subprogs(struct bpf_prog *fp); | ||
| 959 | void bpf_prog_kallsyms_del_all(struct bpf_prog *fp); | ||
| 960 | |||
| 964 | #define BPF_ANC BIT(15) | 961 | #define BPF_ANC BIT(15) |
| 965 | 962 | ||
| 966 | static inline bool bpf_needs_clear_a(const struct sock_filter *first) | 963 | static inline bool bpf_needs_clear_a(const struct sock_filter *first) |
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/irq.h b/include/linux/irq.h index 4bd2f34947f4..201de12a9957 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -503,6 +503,7 @@ struct irq_chip { | |||
| 503 | * IRQCHIP_SKIP_SET_WAKE: Skip chip.irq_set_wake(), for this irq chip | 503 | * IRQCHIP_SKIP_SET_WAKE: Skip chip.irq_set_wake(), for this irq chip |
| 504 | * IRQCHIP_ONESHOT_SAFE: One shot does not require mask/unmask | 504 | * IRQCHIP_ONESHOT_SAFE: One shot does not require mask/unmask |
| 505 | * IRQCHIP_EOI_THREADED: Chip requires eoi() on unmask in threaded mode | 505 | * IRQCHIP_EOI_THREADED: Chip requires eoi() on unmask in threaded mode |
| 506 | * IRQCHIP_SUPPORTS_LEVEL_MSI Chip can provide two doorbells for Level MSIs | ||
| 506 | */ | 507 | */ |
| 507 | enum { | 508 | enum { |
| 508 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 509 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 25b33b664537..dd1e40ddac7d 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -145,11 +145,6 @@ static inline void *irq_desc_get_handler_data(struct irq_desc *desc) | |||
| 145 | return desc->irq_common_data.handler_data; | 145 | return desc->irq_common_data.handler_data; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) | ||
| 149 | { | ||
| 150 | return desc->irq_common_data.msi_desc; | ||
| 151 | } | ||
| 152 | |||
| 153 | /* | 148 | /* |
| 154 | * Architectures call this to let the generic IRQ layer | 149 | * Architectures call this to let the generic IRQ layer |
| 155 | * handle an interrupt. | 150 | * handle an interrupt. |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d23123238534..941dc0a5a877 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -666,7 +666,7 @@ do { \ | |||
| 666 | * your code. (Extra memory is used for special buffers that are | 666 | * your code. (Extra memory is used for special buffers that are |
| 667 | * allocated when trace_printk() is used.) | 667 | * allocated when trace_printk() is used.) |
| 668 | * | 668 | * |
| 669 | * A little optization trick is done here. If there's only one | 669 | * A little optimization trick is done here. If there's only one |
| 670 | * argument, there's no need to scan the string for printf formats. | 670 | * argument, there's no need to scan the string for printf formats. |
| 671 | * The trace_puts() will suffice. But how can we take advantage of | 671 | * The trace_puts() will suffice. But how can we take advantage of |
| 672 | * using trace_puts() when trace_printk() has only one argument? | 672 | * using trace_puts() when trace_printk() has only one argument? |
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/memory.h b/include/linux/memory.h index 31ca3e28b0eb..a6ddefc60517 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -38,6 +38,7 @@ struct memory_block { | |||
| 38 | 38 | ||
| 39 | int arch_get_memory_phys_device(unsigned long start_pfn); | 39 | int arch_get_memory_phys_device(unsigned long start_pfn); |
| 40 | unsigned long memory_block_size_bytes(void); | 40 | unsigned long memory_block_size_bytes(void); |
| 41 | int set_memory_block_size_order(unsigned int order); | ||
| 41 | 42 | ||
| 42 | /* These states are exposed to userspace as text strings in sysfs */ | 43 | /* These states are exposed to userspace as text strings in sysfs */ |
| 43 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 44 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 96498ff6beb6..3723f6d4e2b7 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h | |||
| @@ -363,6 +363,7 @@ struct mlx5_frag_buf_ctrl { | |||
| 363 | struct mlx5_frag_buf frag_buf; | 363 | struct mlx5_frag_buf frag_buf; |
| 364 | u32 sz_m1; | 364 | u32 sz_m1; |
| 365 | u32 frag_sz_m1; | 365 | u32 frag_sz_m1; |
| 366 | u32 strides_offset; | ||
| 366 | u8 log_sz; | 367 | u8 log_sz; |
| 367 | u8 log_stride; | 368 | u8 log_stride; |
| 368 | u8 log_frag_strides; | 369 | u8 log_frag_strides; |
| @@ -988,14 +989,22 @@ static inline u32 mlx5_base_mkey(const u32 key) | |||
| 988 | return key & 0xffffff00u; | 989 | return key & 0xffffff00u; |
| 989 | } | 990 | } |
| 990 | 991 | ||
| 991 | static inline void mlx5_fill_fbc(u8 log_stride, u8 log_sz, | 992 | static inline void mlx5_fill_fbc_offset(u8 log_stride, u8 log_sz, |
| 992 | struct mlx5_frag_buf_ctrl *fbc) | 993 | u32 strides_offset, |
| 994 | struct mlx5_frag_buf_ctrl *fbc) | ||
| 993 | { | 995 | { |
| 994 | fbc->log_stride = log_stride; | 996 | fbc->log_stride = log_stride; |
| 995 | fbc->log_sz = log_sz; | 997 | fbc->log_sz = log_sz; |
| 996 | fbc->sz_m1 = (1 << fbc->log_sz) - 1; | 998 | fbc->sz_m1 = (1 << fbc->log_sz) - 1; |
| 997 | fbc->log_frag_strides = PAGE_SHIFT - fbc->log_stride; | 999 | fbc->log_frag_strides = PAGE_SHIFT - fbc->log_stride; |
| 998 | fbc->frag_sz_m1 = (1 << fbc->log_frag_strides) - 1; | 1000 | fbc->frag_sz_m1 = (1 << fbc->log_frag_strides) - 1; |
| 1001 | fbc->strides_offset = strides_offset; | ||
| 1002 | } | ||
| 1003 | |||
| 1004 | static inline void mlx5_fill_fbc(u8 log_stride, u8 log_sz, | ||
| 1005 | struct mlx5_frag_buf_ctrl *fbc) | ||
| 1006 | { | ||
| 1007 | mlx5_fill_fbc_offset(log_stride, log_sz, 0, fbc); | ||
| 999 | } | 1008 | } |
| 1000 | 1009 | ||
| 1001 | static inline void mlx5_core_init_cq_frag_buf(struct mlx5_frag_buf_ctrl *fbc, | 1010 | static inline void mlx5_core_init_cq_frag_buf(struct mlx5_frag_buf_ctrl *fbc, |
| @@ -1009,7 +1018,10 @@ static inline void mlx5_core_init_cq_frag_buf(struct mlx5_frag_buf_ctrl *fbc, | |||
| 1009 | static inline void *mlx5_frag_buf_get_wqe(struct mlx5_frag_buf_ctrl *fbc, | 1018 | static inline void *mlx5_frag_buf_get_wqe(struct mlx5_frag_buf_ctrl *fbc, |
| 1010 | u32 ix) | 1019 | u32 ix) |
| 1011 | { | 1020 | { |
| 1012 | unsigned int frag = (ix >> fbc->log_frag_strides); | 1021 | unsigned int frag; |
| 1022 | |||
| 1023 | ix += fbc->strides_offset; | ||
| 1024 | frag = ix >> fbc->log_frag_strides; | ||
| 1013 | 1025 | ||
| 1014 | return fbc->frag_buf.frags[frag].buf + | 1026 | return fbc->frag_buf.frags[frag].buf + |
| 1015 | ((fbc->frag_sz_m1 & ix) << fbc->log_stride); | 1027 | ((fbc->frag_sz_m1 & ix) << fbc->log_stride); |
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 5e04e2053fd7..c2a5b480b156 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -942,7 +942,7 @@ struct mlx5_ifc_cmd_hca_cap_bits { | |||
| 942 | u8 vnic_env_queue_counters[0x1]; | 942 | u8 vnic_env_queue_counters[0x1]; |
| 943 | u8 ets[0x1]; | 943 | u8 ets[0x1]; |
| 944 | u8 nic_flow_table[0x1]; | 944 | u8 nic_flow_table[0x1]; |
| 945 | u8 eswitch_flow_table[0x1]; | 945 | u8 eswitch_manager[0x1]; |
| 946 | u8 device_memory[0x1]; | 946 | u8 device_memory[0x1]; |
| 947 | u8 mcam_reg[0x1]; | 947 | u8 mcam_reg[0x1]; |
| 948 | u8 pcam_reg[0x1]; | 948 | u8 pcam_reg[0x1]; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a0fbb9ffe380..68a5121694ef 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; |
| @@ -450,6 +452,23 @@ struct vm_operations_struct { | |||
| 450 | unsigned long addr); | 452 | unsigned long addr); |
| 451 | }; | 453 | }; |
| 452 | 454 | ||
| 455 | static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm) | ||
| 456 | { | ||
| 457 | static const struct vm_operations_struct dummy_vm_ops = {}; | ||
| 458 | |||
| 459 | vma->vm_mm = mm; | ||
| 460 | vma->vm_ops = &dummy_vm_ops; | ||
| 461 | INIT_LIST_HEAD(&vma->anon_vma_chain); | ||
| 462 | } | ||
| 463 | |||
| 464 | static inline void vma_set_anonymous(struct vm_area_struct *vma) | ||
| 465 | { | ||
| 466 | vma->vm_ops = NULL; | ||
| 467 | } | ||
| 468 | |||
| 469 | /* flush_tlb_range() takes a vma, not a mm, and can care about flags */ | ||
| 470 | #define TLB_FLUSH_VMA(mm,flags) { .vm_mm = (mm), .vm_flags = (flags) } | ||
| 471 | |||
| 453 | struct mmu_gather; | 472 | struct mmu_gather; |
| 454 | struct inode; | 473 | struct inode; |
| 455 | 474 | ||
| @@ -2132,7 +2151,7 @@ extern int __meminit __early_pfn_to_nid(unsigned long pfn, | |||
| 2132 | struct mminit_pfnnid_cache *state); | 2151 | struct mminit_pfnnid_cache *state); |
| 2133 | #endif | 2152 | #endif |
| 2134 | 2153 | ||
| 2135 | #ifdef CONFIG_HAVE_MEMBLOCK | 2154 | #if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP) |
| 2136 | void zero_resv_unavail(void); | 2155 | void zero_resv_unavail(void); |
| 2137 | #else | 2156 | #else |
| 2138 | static inline void zero_resv_unavail(void) {} | 2157 | static inline void zero_resv_unavail(void) {} |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 2014bd19f28e..96a71a648eed 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -501,6 +501,7 @@ enum dmi_field { | |||
| 501 | DMI_PRODUCT_VERSION, | 501 | DMI_PRODUCT_VERSION, |
| 502 | DMI_PRODUCT_SERIAL, | 502 | DMI_PRODUCT_SERIAL, |
| 503 | DMI_PRODUCT_UUID, | 503 | DMI_PRODUCT_UUID, |
| 504 | DMI_PRODUCT_SKU, | ||
| 504 | DMI_PRODUCT_FAMILY, | 505 | DMI_PRODUCT_FAMILY, |
| 505 | DMI_BOARD_VENDOR, | 506 | DMI_BOARD_VENDOR, |
| 506 | DMI_BOARD_NAME, | 507 | DMI_BOARD_NAME, |
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/nfs_xdr.h b/include/linux/nfs_xdr.h index 9dee3c23895d..712eed156d09 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -1438,6 +1438,8 @@ enum { | |||
| 1438 | NFS_IOHDR_EOF, | 1438 | NFS_IOHDR_EOF, |
| 1439 | NFS_IOHDR_REDO, | 1439 | NFS_IOHDR_REDO, |
| 1440 | NFS_IOHDR_STAT, | 1440 | NFS_IOHDR_STAT, |
| 1441 | NFS_IOHDR_RESEND_PNFS, | ||
| 1442 | NFS_IOHDR_RESEND_MDS, | ||
| 1441 | }; | 1443 | }; |
| 1442 | 1444 | ||
| 1443 | struct nfs_io_completion; | 1445 | struct nfs_io_completion; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 340029b2fb38..c133ccfa002e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -368,7 +368,6 @@ struct pci_dev { | |||
| 368 | unsigned int transparent:1; /* Subtractive decode bridge */ | 368 | unsigned int transparent:1; /* Subtractive decode bridge */ |
| 369 | unsigned int multifunction:1; /* Multi-function device */ | 369 | unsigned int multifunction:1; /* Multi-function device */ |
| 370 | 370 | ||
| 371 | unsigned int is_added:1; | ||
| 372 | unsigned int is_busmaster:1; /* Is busmaster */ | 371 | unsigned int is_busmaster:1; /* Is busmaster */ |
| 373 | unsigned int no_msi:1; /* May not use MSI */ | 372 | unsigned int no_msi:1; /* May not use MSI */ |
| 374 | unsigned int no_64bit_msi:1; /* May only use 32-bit MSIs */ | 373 | unsigned int no_64bit_msi:1; /* May only use 32-bit MSIs */ |
| @@ -1240,6 +1239,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); | 1239 | unsigned long pci_address_to_pio(phys_addr_t addr); |
| 1241 | phys_addr_t pci_pio_to_address(unsigned long pio); | 1240 | phys_addr_t pci_pio_to_address(unsigned long pio); |
| 1242 | int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr); | 1241 | int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr); |
| 1242 | int devm_pci_remap_iospace(struct device *dev, const struct resource *res, | ||
| 1243 | phys_addr_t phys_addr); | ||
| 1243 | void pci_unmap_iospace(struct resource *res); | 1244 | void pci_unmap_iospace(struct resource *res); |
| 1244 | void __iomem *devm_pci_remap_cfgspace(struct device *dev, | 1245 | void __iomem *devm_pci_remap_cfgspace(struct device *dev, |
| 1245 | resource_size_t offset, | 1246 | resource_size_t offset, |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 1fa12887ec02..87f6db437e4a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -1130,6 +1130,7 @@ extern void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct | |||
| 1130 | extern struct perf_callchain_entry * | 1130 | extern struct perf_callchain_entry * |
| 1131 | get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user, | 1131 | get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user, |
| 1132 | u32 max_stack, bool crosstask, bool add_mark); | 1132 | u32 max_stack, bool crosstask, bool add_mark); |
| 1133 | extern struct perf_callchain_entry *perf_callchain(struct perf_event *event, struct pt_regs *regs); | ||
| 1133 | extern int get_callchain_buffers(int max_stack); | 1134 | extern int get_callchain_buffers(int max_stack); |
| 1134 | extern void put_callchain_buffers(void); | 1135 | extern void put_callchain_buffers(void); |
| 1135 | 1136 | ||
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/refcount.h b/include/linux/refcount.h index 4193c41e383a..a685da2c4522 100644 --- a/include/linux/refcount.h +++ b/include/linux/refcount.h | |||
| @@ -98,5 +98,7 @@ extern __must_check bool refcount_dec_if_one(refcount_t *r); | |||
| 98 | extern __must_check bool refcount_dec_not_one(refcount_t *r); | 98 | extern __must_check bool refcount_dec_not_one(refcount_t *r); |
| 99 | extern __must_check bool refcount_dec_and_mutex_lock(refcount_t *r, struct mutex *lock); | 99 | extern __must_check bool refcount_dec_and_mutex_lock(refcount_t *r, struct mutex *lock); |
| 100 | extern __must_check bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock); | 100 | extern __must_check bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock); |
| 101 | 101 | extern __must_check bool refcount_dec_and_lock_irqsave(refcount_t *r, | |
| 102 | spinlock_t *lock, | ||
| 103 | unsigned long *flags); | ||
| 102 | #endif /* _LINUX_REFCOUNT_H */ | 104 | #endif /* _LINUX_REFCOUNT_H */ |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index b72ebdff0b77..003d09ab308d 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
| @@ -165,6 +165,7 @@ void ring_buffer_record_enable(struct ring_buffer *buffer); | |||
| 165 | void ring_buffer_record_off(struct ring_buffer *buffer); | 165 | void ring_buffer_record_off(struct ring_buffer *buffer); |
| 166 | void ring_buffer_record_on(struct ring_buffer *buffer); | 166 | void ring_buffer_record_on(struct ring_buffer *buffer); |
| 167 | int ring_buffer_record_is_on(struct ring_buffer *buffer); | 167 | int ring_buffer_record_is_on(struct ring_buffer *buffer); |
| 168 | int ring_buffer_record_is_set_on(struct ring_buffer *buffer); | ||
| 168 | void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu); | 169 | void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu); |
| 169 | void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu); | 170 | void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu); |
| 170 | 171 | ||
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/rtmutex.h b/include/linux/rtmutex.h index 1b92a28dd672..6fd615a0eea9 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h | |||
| @@ -106,7 +106,14 @@ static inline int rt_mutex_is_locked(struct rt_mutex *lock) | |||
| 106 | extern void __rt_mutex_init(struct rt_mutex *lock, const char *name, struct lock_class_key *key); | 106 | extern void __rt_mutex_init(struct rt_mutex *lock, const char *name, struct lock_class_key *key); |
| 107 | extern void rt_mutex_destroy(struct rt_mutex *lock); | 107 | extern void rt_mutex_destroy(struct rt_mutex *lock); |
| 108 | 108 | ||
| 109 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 110 | extern void rt_mutex_lock_nested(struct rt_mutex *lock, unsigned int subclass); | ||
| 111 | #define rt_mutex_lock(lock) rt_mutex_lock_nested(lock, 0) | ||
| 112 | #else | ||
| 109 | extern void rt_mutex_lock(struct rt_mutex *lock); | 113 | extern void rt_mutex_lock(struct rt_mutex *lock); |
| 114 | #define rt_mutex_lock_nested(lock, subclass) rt_mutex_lock(lock) | ||
| 115 | #endif | ||
| 116 | |||
| 110 | extern int rt_mutex_lock_interruptible(struct rt_mutex *lock); | 117 | extern int rt_mutex_lock_interruptible(struct rt_mutex *lock); |
| 111 | extern int rt_mutex_timed_lock(struct rt_mutex *lock, | 118 | extern int rt_mutex_timed_lock(struct rt_mutex *lock, |
| 112 | struct hrtimer_sleeper *timeout); | 119 | struct hrtimer_sleeper *timeout); |
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 87bf02d93a27..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 { \ |
| @@ -1799,20 +1799,22 @@ static inline void rseq_set_notify_resume(struct task_struct *t) | |||
| 1799 | set_tsk_thread_flag(t, TIF_NOTIFY_RESUME); | 1799 | set_tsk_thread_flag(t, TIF_NOTIFY_RESUME); |
| 1800 | } | 1800 | } |
| 1801 | 1801 | ||
| 1802 | void __rseq_handle_notify_resume(struct pt_regs *regs); | 1802 | void __rseq_handle_notify_resume(struct ksignal *sig, struct pt_regs *regs); |
| 1803 | 1803 | ||
| 1804 | static inline void rseq_handle_notify_resume(struct pt_regs *regs) | 1804 | static inline void rseq_handle_notify_resume(struct ksignal *ksig, |
| 1805 | struct pt_regs *regs) | ||
| 1805 | { | 1806 | { |
| 1806 | if (current->rseq) | 1807 | if (current->rseq) |
| 1807 | __rseq_handle_notify_resume(regs); | 1808 | __rseq_handle_notify_resume(ksig, regs); |
| 1808 | } | 1809 | } |
| 1809 | 1810 | ||
| 1810 | static inline void rseq_signal_deliver(struct pt_regs *regs) | 1811 | static inline void rseq_signal_deliver(struct ksignal *ksig, |
| 1812 | struct pt_regs *regs) | ||
| 1811 | { | 1813 | { |
| 1812 | preempt_disable(); | 1814 | preempt_disable(); |
| 1813 | __set_bit(RSEQ_EVENT_SIGNAL_BIT, ¤t->rseq_event_mask); | 1815 | __set_bit(RSEQ_EVENT_SIGNAL_BIT, ¤t->rseq_event_mask); |
| 1814 | preempt_enable(); | 1816 | preempt_enable(); |
| 1815 | rseq_handle_notify_resume(regs); | 1817 | rseq_handle_notify_resume(ksig, regs); |
| 1816 | } | 1818 | } |
| 1817 | 1819 | ||
| 1818 | /* rseq_preempt() requires preemption to be disabled. */ | 1820 | /* rseq_preempt() requires preemption to be disabled. */ |
| @@ -1831,9 +1833,7 @@ static inline void rseq_migrate(struct task_struct *t) | |||
| 1831 | 1833 | ||
| 1832 | /* | 1834 | /* |
| 1833 | * If parent process has a registered restartable sequences area, the | 1835 | * If parent process has a registered restartable sequences area, the |
| 1834 | * child inherits. Only applies when forking a process, not a thread. In | 1836 | * child inherits. Only applies when forking a process, not a thread. |
| 1835 | * case a parent fork() in the middle of a restartable sequence, set the | ||
| 1836 | * resume notifier to force the child to retry. | ||
| 1837 | */ | 1837 | */ |
| 1838 | static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) | 1838 | static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) |
| 1839 | { | 1839 | { |
| @@ -1847,7 +1847,6 @@ static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) | |||
| 1847 | t->rseq_len = current->rseq_len; | 1847 | t->rseq_len = current->rseq_len; |
| 1848 | t->rseq_sig = current->rseq_sig; | 1848 | t->rseq_sig = current->rseq_sig; |
| 1849 | t->rseq_event_mask = current->rseq_event_mask; | 1849 | t->rseq_event_mask = current->rseq_event_mask; |
| 1850 | rseq_preempt(t); | ||
| 1851 | } | 1850 | } |
| 1852 | } | 1851 | } |
| 1853 | 1852 | ||
| @@ -1864,10 +1863,12 @@ static inline void rseq_execve(struct task_struct *t) | |||
| 1864 | static inline void rseq_set_notify_resume(struct task_struct *t) | 1863 | static inline void rseq_set_notify_resume(struct task_struct *t) |
| 1865 | { | 1864 | { |
| 1866 | } | 1865 | } |
| 1867 | static inline void rseq_handle_notify_resume(struct pt_regs *regs) | 1866 | static inline void rseq_handle_notify_resume(struct ksignal *ksig, |
| 1867 | struct pt_regs *regs) | ||
| 1868 | { | 1868 | { |
| 1869 | } | 1869 | } |
| 1870 | static inline void rseq_signal_deliver(struct pt_regs *regs) | 1870 | static inline void rseq_signal_deliver(struct ksignal *ksig, |
| 1871 | struct pt_regs *regs) | ||
| 1871 | { | 1872 | { |
| 1872 | } | 1873 | } |
| 1873 | static inline void rseq_preempt(struct task_struct *t) | 1874 | static inline void rseq_preempt(struct task_struct *t) |
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/spinlock.h b/include/linux/spinlock.h index 1e8a46435838..fd57888d4942 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -427,6 +427,11 @@ extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); | |||
| 427 | #define atomic_dec_and_lock(atomic, lock) \ | 427 | #define atomic_dec_and_lock(atomic, lock) \ |
| 428 | __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) | 428 | __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) |
| 429 | 429 | ||
| 430 | extern int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock, | ||
| 431 | unsigned long *flags); | ||
| 432 | #define atomic_dec_and_lock_irqsave(atomic, lock, flags) \ | ||
| 433 | __cond_lock(lock, _atomic_dec_and_lock_irqsave(atomic, lock, &(flags))) | ||
| 434 | |||
| 430 | int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask, | 435 | int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask, |
| 431 | size_t max_size, unsigned int cpu_mult, | 436 | size_t max_size, unsigned int cpu_mult, |
| 432 | gfp_t gfp); | 437 | gfp_t gfp); |
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/af_vsock.h b/include/net/af_vsock.h index 9324ac2d9ff2..43913ae79f64 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h | |||
| @@ -64,7 +64,8 @@ struct vsock_sock { | |||
| 64 | struct list_head pending_links; | 64 | struct list_head pending_links; |
| 65 | struct list_head accept_queue; | 65 | struct list_head accept_queue; |
| 66 | bool rejected; | 66 | bool rejected; |
| 67 | struct delayed_work dwork; | 67 | struct delayed_work connect_work; |
| 68 | struct delayed_work pending_work; | ||
| 68 | struct delayed_work close_work; | 69 | struct delayed_work close_work; |
| 69 | bool close_work_scheduled; | 70 | bool close_work_scheduled; |
| 70 | u32 peer_shutdown; | 71 | u32 peer_shutdown; |
| @@ -77,7 +78,6 @@ struct vsock_sock { | |||
| 77 | 78 | ||
| 78 | s64 vsock_stream_has_data(struct vsock_sock *vsk); | 79 | s64 vsock_stream_has_data(struct vsock_sock *vsk); |
| 79 | s64 vsock_stream_has_space(struct vsock_sock *vsk); | 80 | s64 vsock_stream_has_space(struct vsock_sock *vsk); |
| 80 | void vsock_pending_work(struct work_struct *work); | ||
| 81 | struct sock *__vsock_create(struct net *net, | 81 | struct sock *__vsock_create(struct net *net, |
| 82 | struct socket *sock, | 82 | struct socket *sock, |
| 83 | struct sock *parent, | 83 | struct sock *parent, |
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/cfg80211.h b/include/net/cfg80211.h index 5fbfe61f41c6..1beb3ead0385 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -5835,10 +5835,11 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, | |||
| 5835 | /** | 5835 | /** |
| 5836 | * cfg80211_rx_control_port - notification about a received control port frame | 5836 | * cfg80211_rx_control_port - notification about a received control port frame |
| 5837 | * @dev: The device the frame matched to | 5837 | * @dev: The device the frame matched to |
| 5838 | * @buf: control port frame | 5838 | * @skb: The skbuf with the control port frame. It is assumed that the skbuf |
| 5839 | * @len: length of the frame data | 5839 | * is 802.3 formatted (with 802.3 header). The skb can be non-linear. |
| 5840 | * @addr: The peer from which the frame was received | 5840 | * This function does not take ownership of the skb, so the caller is |
| 5841 | * @proto: frame protocol, typically PAE or Pre-authentication | 5841 | * responsible for any cleanup. The caller must also ensure that |
| 5842 | * skb->protocol is set appropriately. | ||
| 5842 | * @unencrypted: Whether the frame was received unencrypted | 5843 | * @unencrypted: Whether the frame was received unencrypted |
| 5843 | * | 5844 | * |
| 5844 | * This function is used to inform userspace about a received control port | 5845 | * This function is used to inform userspace about a received control port |
| @@ -5851,8 +5852,7 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, | |||
| 5851 | * Return: %true if the frame was passed to userspace | 5852 | * Return: %true if the frame was passed to userspace |
| 5852 | */ | 5853 | */ |
| 5853 | bool cfg80211_rx_control_port(struct net_device *dev, | 5854 | bool cfg80211_rx_control_port(struct net_device *dev, |
| 5854 | const u8 *buf, size_t len, | 5855 | struct sk_buff *skb, bool unencrypted); |
| 5855 | const u8 *addr, u16 proto, bool unencrypted); | ||
| 5856 | 5856 | ||
| 5857 | /** | 5857 | /** |
| 5858 | * cfg80211_cqm_rssi_notify - connection quality monitoring rssi event | 5858 | * cfg80211_cqm_rssi_notify - connection quality monitoring rssi event |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 5cba71d2dc44..3d4930528db0 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
| @@ -170,6 +170,7 @@ struct fib6_info { | |||
| 170 | unused:3; | 170 | unused:3; |
| 171 | 171 | ||
| 172 | struct fib6_nh fib6_nh; | 172 | struct fib6_nh fib6_nh; |
| 173 | struct rcu_head rcu; | ||
| 173 | }; | 174 | }; |
| 174 | 175 | ||
| 175 | struct rt6_info { | 176 | struct rt6_info { |
| @@ -273,17 +274,22 @@ static inline void ip6_rt_put(struct rt6_info *rt) | |||
| 273 | } | 274 | } |
| 274 | 275 | ||
| 275 | struct fib6_info *fib6_info_alloc(gfp_t gfp_flags); | 276 | struct fib6_info *fib6_info_alloc(gfp_t gfp_flags); |
| 276 | void fib6_info_destroy(struct fib6_info *f6i); | 277 | void fib6_info_destroy_rcu(struct rcu_head *head); |
| 277 | 278 | ||
| 278 | static inline void fib6_info_hold(struct fib6_info *f6i) | 279 | static inline void fib6_info_hold(struct fib6_info *f6i) |
| 279 | { | 280 | { |
| 280 | atomic_inc(&f6i->fib6_ref); | 281 | atomic_inc(&f6i->fib6_ref); |
| 281 | } | 282 | } |
| 282 | 283 | ||
| 284 | static inline bool fib6_info_hold_safe(struct fib6_info *f6i) | ||
| 285 | { | ||
| 286 | return atomic_inc_not_zero(&f6i->fib6_ref); | ||
| 287 | } | ||
| 288 | |||
| 283 | static inline void fib6_info_release(struct fib6_info *f6i) | 289 | static inline void fib6_info_release(struct fib6_info *f6i) |
| 284 | { | 290 | { |
| 285 | if (f6i && atomic_dec_and_test(&f6i->fib6_ref)) | 291 | if (f6i && atomic_dec_and_test(&f6i->fib6_ref)) |
| 286 | fib6_info_destroy(f6i); | 292 | call_rcu(&f6i->rcu, fib6_info_destroy_rcu); |
| 287 | } | 293 | } |
| 288 | 294 | ||
| 289 | enum fib6_walk_state { | 295 | enum fib6_walk_state { |
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/llc.h b/include/net/llc.h index dc35f25eb679..890a87318014 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
| @@ -116,6 +116,11 @@ static inline void llc_sap_hold(struct llc_sap *sap) | |||
| 116 | refcount_inc(&sap->refcnt); | 116 | refcount_inc(&sap->refcnt); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | static inline bool llc_sap_hold_safe(struct llc_sap *sap) | ||
| 120 | { | ||
| 121 | return refcount_inc_not_zero(&sap->refcnt); | ||
| 122 | } | ||
| 123 | |||
| 119 | void llc_sap_close(struct llc_sap *sap); | 124 | void llc_sap_close(struct llc_sap *sap); |
| 120 | 125 | ||
| 121 | static inline void llc_sap_put(struct llc_sap *sap) | 126 | static inline void llc_sap_put(struct llc_sap *sap) |
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.h b/include/net/netfilter/nf_tables.h index 08c005ce56e9..dc417ef0a0c5 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
| @@ -150,6 +150,7 @@ static inline void nft_data_debug(const struct nft_data *data) | |||
| 150 | * @portid: netlink portID of the original message | 150 | * @portid: netlink portID of the original message |
| 151 | * @seq: netlink sequence number | 151 | * @seq: netlink sequence number |
| 152 | * @family: protocol family | 152 | * @family: protocol family |
| 153 | * @level: depth of the chains | ||
| 153 | * @report: notify via unicast netlink message | 154 | * @report: notify via unicast netlink message |
| 154 | */ | 155 | */ |
| 155 | struct nft_ctx { | 156 | struct nft_ctx { |
| @@ -160,6 +161,7 @@ struct nft_ctx { | |||
| 160 | u32 portid; | 161 | u32 portid; |
| 161 | u32 seq; | 162 | u32 seq; |
| 162 | u8 family; | 163 | u8 family; |
| 164 | u8 level; | ||
| 163 | bool report; | 165 | bool report; |
| 164 | }; | 166 | }; |
| 165 | 167 | ||
| @@ -865,7 +867,6 @@ enum nft_chain_flags { | |||
| 865 | * @table: table that this chain belongs to | 867 | * @table: table that this chain belongs to |
| 866 | * @handle: chain handle | 868 | * @handle: chain handle |
| 867 | * @use: number of jump references to this chain | 869 | * @use: number of jump references to this chain |
| 868 | * @level: length of longest path to this chain | ||
| 869 | * @flags: bitmask of enum nft_chain_flags | 870 | * @flags: bitmask of enum nft_chain_flags |
| 870 | * @name: name of the chain | 871 | * @name: name of the chain |
| 871 | */ | 872 | */ |
| @@ -878,7 +879,6 @@ struct nft_chain { | |||
| 878 | struct nft_table *table; | 879 | struct nft_table *table; |
| 879 | u64 handle; | 880 | u64 handle; |
| 880 | u32 use; | 881 | u32 use; |
| 881 | u16 level; | ||
| 882 | u8 flags:6, | 882 | u8 flags:6, |
| 883 | genmask:2; | 883 | genmask:2; |
| 884 | char *name; | 884 | char *name; |
| @@ -1124,7 +1124,6 @@ struct nft_flowtable { | |||
| 1124 | u32 genmask:2, | 1124 | u32 genmask:2, |
| 1125 | use:30; | 1125 | use:30; |
| 1126 | u64 handle; | 1126 | u64 handle; |
| 1127 | char *dev_name[NFT_FLOWTABLE_DEVICE_MAX]; | ||
| 1128 | /* runtime data below here */ | 1127 | /* runtime data below here */ |
| 1129 | struct nf_hook_ops *ops ____cacheline_aligned; | 1128 | struct nf_hook_ops *ops ____cacheline_aligned; |
| 1130 | struct nf_flowtable data; | 1129 | struct nf_flowtable data; |
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..cd3ecda9386a 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -342,6 +342,7 @@ ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos, | |||
| 342 | struct pipe_inode_info *pipe, size_t len, | 342 | struct pipe_inode_info *pipe, size_t len, |
| 343 | unsigned int flags); | 343 | unsigned int flags); |
| 344 | 344 | ||
| 345 | void tcp_enter_quickack_mode(struct sock *sk, unsigned int max_quickacks); | ||
| 345 | static inline void tcp_dec_quickack_mode(struct sock *sk, | 346 | static inline void tcp_dec_quickack_mode(struct sock *sk, |
| 346 | const unsigned int pkts) | 347 | const unsigned int pkts) |
| 347 | { | 348 | { |
| @@ -388,7 +389,8 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst); | |||
| 388 | void tcp_close(struct sock *sk, long timeout); | 389 | void tcp_close(struct sock *sk, long timeout); |
| 389 | void tcp_init_sock(struct sock *sk); | 390 | void tcp_init_sock(struct sock *sk); |
| 390 | void tcp_init_transfer(struct sock *sk, int bpf_op); | 391 | void tcp_init_transfer(struct sock *sk, int bpf_op); |
| 391 | __poll_t tcp_poll_mask(struct socket *sock, __poll_t events); | 392 | __poll_t tcp_poll(struct file *file, struct socket *sock, |
| 393 | struct poll_table_struct *wait); | ||
| 392 | int tcp_getsockopt(struct sock *sk, int level, int optname, | 394 | int tcp_getsockopt(struct sock *sk, int level, int optname, |
| 393 | char __user *optval, int __user *optlen); | 395 | char __user *optval, int __user *optlen); |
| 394 | int tcp_setsockopt(struct sock *sk, int level, int optname, | 396 | int tcp_setsockopt(struct sock *sk, int level, int optname, |
| @@ -538,6 +540,7 @@ void tcp_send_fin(struct sock *sk); | |||
| 538 | void tcp_send_active_reset(struct sock *sk, gfp_t priority); | 540 | void tcp_send_active_reset(struct sock *sk, gfp_t priority); |
| 539 | int tcp_send_synack(struct sock *); | 541 | int tcp_send_synack(struct sock *); |
| 540 | void tcp_push_one(struct sock *, unsigned int mss_now); | 542 | void tcp_push_one(struct sock *, unsigned int mss_now); |
| 543 | void __tcp_send_ack(struct sock *sk, u32 rcv_nxt); | ||
| 541 | void tcp_send_ack(struct sock *sk); | 544 | void tcp_send_ack(struct sock *sk); |
| 542 | void tcp_send_delayed_ack(struct sock *sk); | 545 | void tcp_send_delayed_ack(struct sock *sk); |
| 543 | void tcp_send_loss_probe(struct sock *sk); | 546 | void tcp_send_loss_probe(struct sock *sk); |
| @@ -827,6 +830,10 @@ struct tcp_skb_cb { | |||
| 827 | 830 | ||
| 828 | #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) | 831 | #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) |
| 829 | 832 | ||
| 833 | static inline void bpf_compute_data_end_sk_skb(struct sk_buff *skb) | ||
| 834 | { | ||
| 835 | TCP_SKB_CB(skb)->bpf.data_end = skb->data + skb_headlen(skb); | ||
| 836 | } | ||
| 830 | 837 | ||
| 831 | #if IS_ENABLED(CONFIG_IPV6) | 838 | #if IS_ENABLED(CONFIG_IPV6) |
| 832 | /* This is the variant of inet6_iif() that must be used by TCP, | 839 | /* This is the variant of inet6_iif() that must be used by TCP, |
| @@ -834,6 +841,11 @@ struct tcp_skb_cb { | |||
| 834 | */ | 841 | */ |
| 835 | static inline int tcp_v6_iif(const struct sk_buff *skb) | 842 | static inline int tcp_v6_iif(const struct sk_buff *skb) |
| 836 | { | 843 | { |
| 844 | return TCP_SKB_CB(skb)->header.h6.iif; | ||
| 845 | } | ||
| 846 | |||
| 847 | static inline int tcp_v6_iif_l3_slave(const struct sk_buff *skb) | ||
| 848 | { | ||
| 837 | bool l3_slave = ipv6_l3mdev_skb(TCP_SKB_CB(skb)->header.h6.flags); | 849 | bool l3_slave = ipv6_l3mdev_skb(TCP_SKB_CB(skb)->header.h6.flags); |
| 838 | 850 | ||
| 839 | return l3_slave ? skb->skb_iif : TCP_SKB_CB(skb)->header.h6.iif; | 851 | return l3_slave ? skb->skb_iif : TCP_SKB_CB(skb)->header.h6.iif; |
| @@ -907,8 +919,6 @@ enum tcp_ca_event { | |||
| 907 | CA_EVENT_LOSS, /* loss timeout */ | 919 | CA_EVENT_LOSS, /* loss timeout */ |
| 908 | CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */ | 920 | CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */ |
| 909 | CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */ | 921 | 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 | }; | 922 | }; |
| 913 | 923 | ||
| 914 | /* Information about inbound ACK, passed to cong_ops->in_ack_event() */ | 924 | /* 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/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 5d404c20b49f..e950c2a68f06 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -3435,11 +3435,14 @@ int ib_process_cq_direct(struct ib_cq *cq, int budget); | |||
| 3435 | * | 3435 | * |
| 3436 | * Users can examine the cq structure to determine the actual CQ size. | 3436 | * Users can examine the cq structure to determine the actual CQ size. |
| 3437 | */ | 3437 | */ |
| 3438 | struct ib_cq *ib_create_cq(struct ib_device *device, | 3438 | struct ib_cq *__ib_create_cq(struct ib_device *device, |
| 3439 | ib_comp_handler comp_handler, | 3439 | ib_comp_handler comp_handler, |
| 3440 | void (*event_handler)(struct ib_event *, void *), | 3440 | void (*event_handler)(struct ib_event *, void *), |
| 3441 | void *cq_context, | 3441 | void *cq_context, |
| 3442 | const struct ib_cq_init_attr *cq_attr); | 3442 | const struct ib_cq_init_attr *cq_attr, |
| 3443 | const char *caller); | ||
| 3444 | #define ib_create_cq(device, cmp_hndlr, evt_hndlr, cq_ctxt, cq_attr) \ | ||
| 3445 | __ib_create_cq((device), (cmp_hndlr), (evt_hndlr), (cq_ctxt), (cq_attr), KBUILD_MODNAME) | ||
| 3443 | 3446 | ||
| 3444 | /** | 3447 | /** |
| 3445 | * ib_resize_cq - Modifies the capacity of the CQ. | 3448 | * ib_resize_cq - Modifies the capacity of the CQ. |
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/btf.h b/include/uapi/linux/btf.h index 0b5ddbe135a4..972265f32871 100644 --- a/include/uapi/linux/btf.h +++ b/include/uapi/linux/btf.h | |||
| @@ -76,7 +76,7 @@ struct btf_type { | |||
| 76 | */ | 76 | */ |
| 77 | #define BTF_INT_ENCODING(VAL) (((VAL) & 0x0f000000) >> 24) | 77 | #define BTF_INT_ENCODING(VAL) (((VAL) & 0x0f000000) >> 24) |
| 78 | #define BTF_INT_OFFSET(VAL) (((VAL & 0x00ff0000)) >> 16) | 78 | #define BTF_INT_OFFSET(VAL) (((VAL & 0x00ff0000)) >> 16) |
| 79 | #define BTF_INT_BITS(VAL) ((VAL) & 0x0000ffff) | 79 | #define BTF_INT_BITS(VAL) ((VAL) & 0x000000ff) |
| 80 | 80 | ||
| 81 | /* Attributes stored in the BTF_INT_ENCODING */ | 81 | /* Attributes stored in the BTF_INT_ENCODING */ |
| 82 | #define BTF_INT_SIGNED (1 << 0) | 82 | #define BTF_INT_SIGNED (1 << 0) |
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/nbd.h b/include/uapi/linux/nbd.h index 85a3fb65e40a..20d6cc91435d 100644 --- a/include/uapi/linux/nbd.h +++ b/include/uapi/linux/nbd.h | |||
| @@ -53,6 +53,9 @@ enum { | |||
| 53 | /* These are client behavior specific flags. */ | 53 | /* These are client behavior specific flags. */ |
| 54 | #define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on | 54 | #define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on |
| 55 | disconnect. */ | 55 | disconnect. */ |
| 56 | #define NBD_CFLAG_DISCONNECT_ON_CLOSE (1 << 1) /* disconnect the nbd device on | ||
| 57 | * close by last opener. | ||
| 58 | */ | ||
| 56 | 59 | ||
| 57 | /* userspace doesn't need the nbd_device structure */ | 60 | /* userspace doesn't need the nbd_device structure */ |
| 58 | 61 | ||
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index b8e288a1f740..eeb787b1c53c 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -143,6 +143,8 @@ enum perf_event_sample_format { | |||
| 143 | PERF_SAMPLE_PHYS_ADDR = 1U << 19, | 143 | PERF_SAMPLE_PHYS_ADDR = 1U << 19, |
| 144 | 144 | ||
| 145 | PERF_SAMPLE_MAX = 1U << 20, /* non-ABI */ | 145 | PERF_SAMPLE_MAX = 1U << 20, /* non-ABI */ |
| 146 | |||
| 147 | __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, | ||
| 146 | }; | 148 | }; |
| 147 | 149 | ||
| 148 | /* | 150 | /* |
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 */ | ||
diff --git a/include/xen/xen.h b/include/xen/xen.h index 9d4340c907d1..1e1d9bd0bd37 100644 --- a/include/xen/xen.h +++ b/include/xen/xen.h | |||
| @@ -25,12 +25,16 @@ extern bool xen_pvh; | |||
| 25 | #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) | 25 | #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) |
| 26 | #define xen_pvh_domain() (xen_pvh) | 26 | #define xen_pvh_domain() (xen_pvh) |
| 27 | 27 | ||
| 28 | #include <linux/types.h> | ||
| 29 | |||
| 30 | extern uint32_t xen_start_flags; | ||
| 31 | |||
| 28 | #ifdef CONFIG_XEN_DOM0 | 32 | #ifdef CONFIG_XEN_DOM0 |
| 29 | #include <xen/interface/xen.h> | 33 | #include <xen/interface/xen.h> |
| 30 | #include <asm/xen/hypervisor.h> | 34 | #include <asm/xen/hypervisor.h> |
| 31 | 35 | ||
| 32 | #define xen_initial_domain() (xen_domain() && \ | 36 | #define xen_initial_domain() (xen_domain() && \ |
| 33 | xen_start_info && xen_start_info->flags & SIF_INITDOMAIN) | 37 | (xen_start_flags & SIF_INITDOMAIN)) |
| 34 | #else /* !CONFIG_XEN_DOM0 */ | 38 | #else /* !CONFIG_XEN_DOM0 */ |
| 35 | #define xen_initial_domain() (0) | 39 | #define xen_initial_domain() (0) |
| 36 | #endif /* CONFIG_XEN_DOM0 */ | 40 | #endif /* CONFIG_XEN_DOM0 */ |
