History

Merge tag 'noinstr-lds-2020-05-19' into core/rcu

Get the noinstr section and annotation markers to base the RCU parts on.

Thomas Gleixner committed 6 years ago

Commit 1ed09482 parents 68f0f26 6553896886 files · +9233 −4559Browse files

Showing the changes to include/linux (30 of 886 files). Show all

Unified · Split

30 files
  1. include/linux/amba/bus.h +1 −0
  2. include/linux/backing-dev-defs.h +1 −1
  3. include/linux/backing-dev.h +1 −8
  4. include/linux/compiler.h +53 −0
  5. include/linux/compiler_types.h +4 −0
  6. include/linux/debugfs.h +4 −8
  7. include/linux/dma-buf.h +1 −2
  8. include/linux/dmaengine.h +6 −6
  9. include/linux/fs.h +1 −1
  10. include/linux/iio/iio.h +1 −1
  11. include/linux/kvm_host.h +1 −1
  12. include/linux/lsm_hook_defs.h +1 −1
  13. include/linux/mhi.h +10 −6
  14. include/linux/nfs_xdr.h +2 −0
  15. include/linux/platform_data/cros_ec_sensorhub.h +1 −0
  16. include/linux/platform_device.h +1 −0
  17. include/linux/pnp.h +9 −20
  18. include/linux/stmmac.h +2 −0
  19. include/linux/sunrpc/clnt.h +12 −1
  20. include/linux/sunrpc/svc_rdma.h +1 −0
  21. include/linux/tcp.h +0 −51
  22. include/linux/tracepoint.h +1 −21
  23. include/linux/tty.h +1 −1
  24. include/linux/vdpa.h +1 −1
  25. include/linux/vermagic.h +5 −3
  26. include/linux/virtio.h +0 −1
  27. include/linux/virtio_net.h +24 −2
  28. include/linux/virtio_vsock.h +1 −0
  29. include/linux/vmalloc.h +1 −1
  30. include/linux/vringh.h +6 −0
include/linux/amba/bus.h+1−0
@@ -65,6 +65,7 @@ struct amba_device { · 64 unmodified lines
65 struct device dev;65 struct device dev;
66 struct resource res;66 struct resource res;
67 struct clk *pclk;67 struct clk *pclk;
68 struct device_dma_parameters dma_parms;
68 unsigned int periphid;69 unsigned int periphid;
69 unsigned int cid;70 unsigned int cid;
70 struct amba_cs_uci_id uci;71 struct amba_cs_uci_id uci;
include/linux/backing-dev-defs.h+1−1
@@ -54,7 +54,6 @@ enum wb_reason { · 53 unmodified lines
54 WB_REASON_SYNC,54 WB_REASON_SYNC,
55 WB_REASON_PERIODIC,55 WB_REASON_PERIODIC,
56 WB_REASON_LAPTOP_TIMER,56 WB_REASON_LAPTOP_TIMER,
57 WB_REASON_FREE_MORE_MEM,
58 WB_REASON_FS_FREE_SPACE,57 WB_REASON_FS_FREE_SPACE,
59 /*58 /*
60 * There is no bdi forker thread any more and works are done59 * There is no bdi forker thread any more and works are done
@@ -220,6 +219,7 @@ struct backing_dev_info { · 159 unmodified lines
220 wait_queue_head_t wb_waitq;219 wait_queue_head_t wb_waitq;
221 220
222 struct device *dev;221 struct device *dev;
222 char dev_name[64];
223 struct device *owner;223 struct device *owner;
224 224
225 struct timer_list laptop_mode_wb_timer;225 struct timer_list laptop_mode_wb_timer;
include/linux/backing-dev.h+1−8
@@ -505,13 +505,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) · 504 unmodified lines
505 (1 << WB_async_congested));505 (1 << WB_async_congested));
506}506}
507 507
508extern const char *bdi_unknown_name;508const char *bdi_dev_name(struct backing_dev_info *bdi);
509
510static inline const char *bdi_dev_name(struct backing_dev_info *bdi)
511{
512 if (!bdi || !bdi->dev)
513 return bdi_unknown_name;
514 return dev_name(bdi->dev);
515}
516 509
517#endif /* _LINUX_BACKING_DEV_H */510#endif /* _LINUX_BACKING_DEV_H */
include/linux/compiler.h+53−0
@@ -120,12 +120,65 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 119 unmodified lines
120/* Annotate a C jump table to allow objtool to follow the code flow */120/* Annotate a C jump table to allow objtool to follow the code flow */
121#define __annotate_jump_table __section(.rodata..c_jump_table)121#define __annotate_jump_table __section(.rodata..c_jump_table)
122 122
123#ifdef CONFIG_DEBUG_ENTRY
124/* Begin/end of an instrumentation safe region */
125#define instrumentation_begin() ({ \
126 asm volatile("%c0:\n\t" \
127 ".pushsection .discard.instr_begin\n\t" \
128 ".long %c0b - .\n\t" \
129 ".popsection\n\t" : : "i" (__COUNTER__)); \
130})
131
132/*
133 * Because instrumentation_{begin,end}() can nest, objtool validation considers
134 * _begin() a +1 and _end() a -1 and computes a sum over the instructions.
135 * When the value is greater than 0, we consider instrumentation allowed.
136 *
137 * There is a problem with code like:
138 *
139 * noinstr void foo()
140 * {
141 * instrumentation_begin();
142 * ...
143 * if (cond) {
144 * instrumentation_begin();
145 * ...
146 * instrumentation_end();
147 * }
148 * bar();
149 * instrumentation_end();
150 * }
151 *
152 * If instrumentation_end() would be an empty label, like all the other
153 * annotations, the inner _end(), which is at the end of a conditional block,
154 * would land on the instruction after the block.
155 *
156 * If we then consider the sum of the !cond path, we'll see that the call to
157 * bar() is with a 0-value, even though, we meant it to happen with a positive
158 * value.
159 *
160 * To avoid this, have _end() be a NOP instruction, this ensures it will be
161 * part of the condition block and does not escape.
162 */
163#define instrumentation_end() ({ \
164 asm volatile("%c0: nop\n\t" \
165 ".pushsection .discard.instr_end\n\t" \
166 ".long %c0b - .\n\t" \
167 ".popsection\n\t" : : "i" (__COUNTER__)); \
168})
169#endif /* CONFIG_DEBUG_ENTRY */
170
123#else171#else
124#define annotate_reachable()172#define annotate_reachable()
125#define annotate_unreachable()173#define annotate_unreachable()
126#define __annotate_jump_table174#define __annotate_jump_table
127#endif175#endif
128 176
177#ifndef instrumentation_begin
178#define instrumentation_begin() do { } while(0)
179#define instrumentation_end() do { } while(0)
180#endif
181
129#ifndef ASM_UNREACHABLE182#ifndef ASM_UNREACHABLE
130# define ASM_UNREACHABLE183# define ASM_UNREACHABLE
131#endif184#endif
include/linux/compiler_types.h+4−0
@@ -118,6 +118,10 @@ struct ftrace_likely_data { · 117 unmodified lines
118#define notrace __attribute__((__no_instrument_function__))118#define notrace __attribute__((__no_instrument_function__))
119#endif119#endif
120 120
121/* Section for code which can't be instrumented at all */
122#define noinstr \
123 noinline notrace __attribute((__section__(".noinstr.text")))
124
121/*125/*
122 * it doesn't make sense on ARM (currently the only user of __naked)126 * it doesn't make sense on ARM (currently the only user of __naked)
123 * to trace naked functions because then mcount is called without127 * to trace naked functions because then mcount is called without
include/linux/debugfs.h+4−8
@@ -103,8 +103,8 @@ void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, · 102 unmodified lines
103 u8 *value);103 u8 *value);
104void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent,104void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent,
105 u16 *value);105 u16 *value);
106struct dentry *debugfs_create_u32(const char *name, umode_t mode,106void debugfs_create_u32(const char *name, umode_t mode, struct dentry *parent,
107 struct dentry *parent, u32 *value);107 u32 *value);
108void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent,108void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent,
109 u64 *value);109 u64 *value);
110struct dentry *debugfs_create_ulong(const char *name, umode_t mode,110struct dentry *debugfs_create_ulong(const char *name, umode_t mode,
@@ -250,12 +250,8 @@ static inline void debugfs_create_u8(const char *name, umode_t mode, · 139 unmodified lines
250static inline void debugfs_create_u16(const char *name, umode_t mode,250static inline void debugfs_create_u16(const char *name, umode_t mode,
251 struct dentry *parent, u16 *value) { }251 struct dentry *parent, u16 *value) { }
252 252
253static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode,253static inline void debugfs_create_u32(const char *name, umode_t mode,
254 struct dentry *parent,254 struct dentry *parent, u32 *value) { }
255 u32 *value)
256{
257 return ERR_PTR(-ENODEV);
258}
259 255
260static inline void debugfs_create_u64(const char *name, umode_t mode,256static inline void debugfs_create_u64(const char *name, umode_t mode,
261 struct dentry *parent, u64 *value) { }257 struct dentry *parent, u64 *value) { }
include/linux/dma-buf.h+1−2
@@ -329,13 +329,12 @@ struct dma_buf { · 328 unmodified lines
329 329
330/**330/**
331 * struct dma_buf_attach_ops - importer operations for an attachment331 * struct dma_buf_attach_ops - importer operations for an attachment
332 * @move_notify: [optional] notification that the DMA-buf is moving
333 *332 *
334 * Attachment operations implemented by the importer.333 * Attachment operations implemented by the importer.
335 */334 */
336struct dma_buf_attach_ops {335struct dma_buf_attach_ops {
337 /**336 /**
338 * @move_notify337 * @move_notify: [optional] notification that the DMA-buf is moving
339 *338 *
340 * If this callback is provided the framework can avoid pinning the339 * If this callback is provided the framework can avoid pinning the
341 * backing store while mappings exists.340 * backing store while mappings exists.
include/linux/dmaengine.h+6−6
@@ -83,9 +83,9 @@ enum dma_transfer_direction { · 82 unmodified lines
83/**83/**
84 * Interleaved Transfer Request84 * Interleaved Transfer Request
85 * ----------------------------85 * ----------------------------
86 * A chunk is collection of contiguous bytes to be transfered.86 * A chunk is collection of contiguous bytes to be transferred.
87 * The gap(in bytes) between two chunks is called inter-chunk-gap(ICG).87 * The gap(in bytes) between two chunks is called inter-chunk-gap(ICG).
88 * ICGs may or maynot change between chunks.88 * ICGs may or may not change between chunks.
89 * A FRAME is the smallest series of contiguous {chunk,icg} pairs,89 * A FRAME is the smallest series of contiguous {chunk,icg} pairs,
90 * that when repeated an integral number of times, specifies the transfer.90 * that when repeated an integral number of times, specifies the transfer.
91 * A transfer template is specification of a Frame, the number of times91 * A transfer template is specification of a Frame, the number of times
@@ -341,13 +341,11 @@ struct dma_chan { · 249 unmodified lines
341 * @chan: driver channel device341 * @chan: driver channel device
342 * @device: sysfs device342 * @device: sysfs device
343 * @dev_id: parent dma_device dev_id343 * @dev_id: parent dma_device dev_id
344 * @idr_ref: reference count to gate release of dma_device dev_id
345 */344 */
346struct dma_chan_dev {345struct dma_chan_dev {
347 struct dma_chan *chan;346 struct dma_chan *chan;
348 struct device device;347 struct device device;
349 int dev_id;348 int dev_id;
350 atomic_t *idr_ref;
351};349};
352 350
353/**351/**
@@ -835,6 +833,8 @@ struct dma_device { · 481 unmodified lines
835 int dev_id;833 int dev_id;
836 struct device *dev;834 struct device *dev;
837 struct module *owner;835 struct module *owner;
836 struct ida chan_ida;
837 struct mutex chan_mutex; /* to protect chan_ida */
838 838
839 u32 src_addr_widths;839 u32 src_addr_widths;
840 u32 dst_addr_widths;840 u32 dst_addr_widths;
@@ -1069,7 +1069,7 @@ static inline int dmaengine_terminate_all(struct dma_chan *chan) · 228 unmodified lines
1069 * dmaengine_synchronize() needs to be called before it is safe to free1069 * dmaengine_synchronize() needs to be called before it is safe to free
1070 * any memory that is accessed by previously submitted descriptors or before1070 * any memory that is accessed by previously submitted descriptors or before
1071 * freeing any resources accessed from within the completion callback of any1071 * freeing any resources accessed from within the completion callback of any
1072 * perviously submitted descriptors.1072 * previously submitted descriptors.
1073 *1073 *
1074 * This function can be called from atomic context as well as from within a1074 * This function can be called from atomic context as well as from within a
1075 * complete callback of a descriptor submitted on the same channel.1075 * complete callback of a descriptor submitted on the same channel.
@@ -1091,7 +1091,7 @@ static inline int dmaengine_terminate_async(struct dma_chan *chan) · 15 unmodified lines
1091 *1091 *
1092 * Synchronizes to the DMA channel termination to the current context. When this1092 * Synchronizes to the DMA channel termination to the current context. When this
1093 * function returns it is guaranteed that all transfers for previously issued1093 * function returns it is guaranteed that all transfers for previously issued
1094 * descriptors have stopped and and it is safe to free the memory assoicated1094 * descriptors have stopped and it is safe to free the memory associated
1095 * with them. Furthermore it is guaranteed that all complete callback functions1095 * with them. Furthermore it is guaranteed that all complete callback functions
1096 * for a previously submitted descriptor have finished running and it is safe to1096 * for a previously submitted descriptor have finished running and it is safe to
1097 * free resources accessed from within the complete callbacks.1097 * free resources accessed from within the complete callbacks.
include/linux/fs.h+1−1
@@ -983,7 +983,7 @@ struct file_handle { · 982 unmodified lines
983 __u32 handle_bytes;983 __u32 handle_bytes;
984 int handle_type;984 int handle_type;
985 /* file identifier */985 /* file identifier */
986 unsigned char f_handle[0];986 unsigned char f_handle[];
987};987};
988 988
989static inline struct file *get_file(struct file *f)989static inline struct file *get_file(struct file *f)
include/linux/iio/iio.h+1−1
@@ -600,7 +600,7 @@ void iio_device_unregister(struct iio_dev *indio_dev); · 599 unmodified lines
600 * 0 on success, negative error number on failure.600 * 0 on success, negative error number on failure.
601 */601 */
602#define devm_iio_device_register(dev, indio_dev) \602#define devm_iio_device_register(dev, indio_dev) \
603 __devm_iio_device_register((dev), (indio_dev), THIS_MODULE);603 __devm_iio_device_register((dev), (indio_dev), THIS_MODULE)
604int __devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev,604int __devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev,
605 struct module *this_mod);605 struct module *this_mod);
606void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev);606void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev);
include/linux/kvm_host.h+1−1
@@ -1048,7 +1048,7 @@ search_memslots(struct kvm_memslots *slots, gfn_t gfn) · 1047 unmodified lines
1048 start = slot + 1;1048 start = slot + 1;
1049 }1049 }
1050 1050
1051 if (gfn >= memslots[start].base_gfn &&1051 if (start < slots->used_slots && gfn >= memslots[start].base_gfn &&
1052 gfn < memslots[start].base_gfn + memslots[start].npages) {1052 gfn < memslots[start].base_gfn + memslots[start].npages) {
1053 atomic_set(&slots->lru_slot, start);1053 atomic_set(&slots->lru_slot, start);
1054 return &memslots[start];1054 return &memslots[start];
include/linux/lsm_hook_defs.h+1−1
@@ -55,7 +55,7 @@ LSM_HOOK(void, LSM_RET_VOID, bprm_committing_creds, struct linux_binprm *bprm) · 54 unmodified lines
55LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm)55LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm)
56LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc,56LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc,
57 struct fs_context *src_sc)57 struct fs_context *src_sc)
58LSM_HOOK(int, 0, fs_context_parse_param, struct fs_context *fc,58LSM_HOOK(int, -ENOPARAM, fs_context_parse_param, struct fs_context *fc,
59 struct fs_parameter *param)59 struct fs_parameter *param)
60LSM_HOOK(int, 0, sb_alloc_security, struct super_block *sb)60LSM_HOOK(int, 0, sb_alloc_security, struct super_block *sb)
61LSM_HOOK(void, LSM_RET_VOID, sb_free_security, struct super_block *sb)61LSM_HOOK(void, LSM_RET_VOID, sb_free_security, struct super_block *sb)
include/linux/mhi.h+10−6
@@ -53,9 +53,9 @@ enum mhi_callback { · 52 unmodified lines
53 * @MHI_CHAIN: Linked transfer53 * @MHI_CHAIN: Linked transfer
54 */54 */
55enum mhi_flags {55enum mhi_flags {
56 MHI_EOB,56 MHI_EOB = BIT(0),
57 MHI_EOT,57 MHI_EOT = BIT(1),
58 MHI_CHAIN,58 MHI_CHAIN = BIT(2),
59};59};
60 60
61/**61/**
@@ -335,14 +335,15 @@ struct mhi_controller_config { · 273 unmodified lines
335 * @syserr_worker: System error worker335 * @syserr_worker: System error worker
336 * @state_event: State change event336 * @state_event: State change event
337 * @status_cb: CB function to notify power states of the device (required)337 * @status_cb: CB function to notify power states of the device (required)
338 * @link_status: CB function to query link status of the device (required)
339 * @wake_get: CB function to assert device wake (optional)338 * @wake_get: CB function to assert device wake (optional)
340 * @wake_put: CB function to de-assert device wake (optional)339 * @wake_put: CB function to de-assert device wake (optional)
341 * @wake_toggle: CB function to assert and de-assert device wake (optional)340 * @wake_toggle: CB function to assert and de-assert device wake (optional)
342 * @runtime_get: CB function to controller runtime resume (required)341 * @runtime_get: CB function to controller runtime resume (required)
343 * @runtimet_put: CB function to decrement pm usage (required)342 * @runtime_put: CB function to decrement pm usage (required)
344 * @map_single: CB function to create TRE buffer343 * @map_single: CB function to create TRE buffer
345 * @unmap_single: CB function to destroy TRE buffer344 * @unmap_single: CB function to destroy TRE buffer
345 * @read_reg: Read a MHI register via the physical link (required)
346 * @write_reg: Write a MHI register via the physical link (required)
346 * @buffer_len: Bounce buffer length347 * @buffer_len: Bounce buffer length
347 * @bounce_buf: Use of bounce buffer348 * @bounce_buf: Use of bounce buffer
348 * @fbc_download: MHI host needs to do complete image transfer (optional)349 * @fbc_download: MHI host needs to do complete image transfer (optional)
@@ -417,7 +418,6 @@ struct mhi_controller { · 68 unmodified lines
417 418
418 void (*status_cb)(struct mhi_controller *mhi_cntrl,419 void (*status_cb)(struct mhi_controller *mhi_cntrl,
419 enum mhi_callback cb);420 enum mhi_callback cb);
420 int (*link_status)(struct mhi_controller *mhi_cntrl);
421 void (*wake_get)(struct mhi_controller *mhi_cntrl, bool override);421 void (*wake_get)(struct mhi_controller *mhi_cntrl, bool override);
422 void (*wake_put)(struct mhi_controller *mhi_cntrl, bool override);422 void (*wake_put)(struct mhi_controller *mhi_cntrl, bool override);
423 void (*wake_toggle)(struct mhi_controller *mhi_cntrl);423 void (*wake_toggle)(struct mhi_controller *mhi_cntrl);
@@ -427,6 +427,10 @@ struct mhi_controller { · 3 unmodified lines
427 struct mhi_buf_info *buf);427 struct mhi_buf_info *buf);
428 void (*unmap_single)(struct mhi_controller *mhi_cntrl,428 void (*unmap_single)(struct mhi_controller *mhi_cntrl,
429 struct mhi_buf_info *buf);429 struct mhi_buf_info *buf);
430 int (*read_reg)(struct mhi_controller *mhi_cntrl, void __iomem *addr,
431 u32 *out);
432 void (*write_reg)(struct mhi_controller *mhi_cntrl, void __iomem *addr,
433 u32 val);
430 434
431 size_t buffer_len;435 size_t buffer_len;
432 bool bounce_buf;436 bool bounce_buf;
include/linux/nfs_xdr.h+2−0
@@ -1317,11 +1317,13 @@ struct nfs41_impl_id { · 1316 unmodified lines
1317 struct nfstime4 date;1317 struct nfstime4 date;
1318};1318};
1319 1319
1320#define MAX_BIND_CONN_TO_SESSION_RETRIES 3
1320struct nfs41_bind_conn_to_session_args {1321struct nfs41_bind_conn_to_session_args {
1321 struct nfs_client *client;1322 struct nfs_client *client;
1322 struct nfs4_sessionid sessionid;1323 struct nfs4_sessionid sessionid;
1323 u32 dir;1324 u32 dir;
1324 bool use_conn_in_rdma_mode;1325 bool use_conn_in_rdma_mode;
1326 int retries;
1325};1327};
1326 1328
1327struct nfs41_bind_conn_to_session_res {1329struct nfs41_bind_conn_to_session_res {
include/linux/platform_data/cros_ec_sensorhub.h+1−0
@@ -185,6 +185,7 @@ int cros_ec_sensorhub_register_push_data(struct cros_ec_sensorhub *sensorhub, · 184 unmodified lines
185void cros_ec_sensorhub_unregister_push_data(struct cros_ec_sensorhub *sensorhub,185void cros_ec_sensorhub_unregister_push_data(struct cros_ec_sensorhub *sensorhub,
186 u8 sensor_num);186 u8 sensor_num);
187 187
188int cros_ec_sensorhub_ring_allocate(struct cros_ec_sensorhub *sensorhub);
188int cros_ec_sensorhub_ring_add(struct cros_ec_sensorhub *sensorhub);189int cros_ec_sensorhub_ring_add(struct cros_ec_sensorhub *sensorhub);
189void cros_ec_sensorhub_ring_remove(void *arg);190void cros_ec_sensorhub_ring_remove(void *arg);
190int cros_ec_sensorhub_ring_fifo_enable(struct cros_ec_sensorhub *sensorhub,191int cros_ec_sensorhub_ring_fifo_enable(struct cros_ec_sensorhub *sensorhub,
include/linux/platform_device.h+1−0
@@ -25,6 +25,7 @@ struct platform_device { · 24 unmodified lines
25 bool id_auto;25 bool id_auto;
26 struct device dev;26 struct device dev;
27 u64 platform_dma_mask;27 u64 platform_dma_mask;
28 struct device_dma_parameters dma_parms;
28 u32 num_resources;29 u32 num_resources;
29 struct resource *resource;30 struct resource *resource;
30 31
include/linux/pnp.h+9−20
@@ -220,10 +220,8 @@ struct pnp_card { · 219 unmodified lines
220#define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list)220#define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list)
221#define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list)221#define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list)
222#define to_pnp_card(n) container_of(n, struct pnp_card, dev)222#define to_pnp_card(n) container_of(n, struct pnp_card, dev)
223#define pnp_for_each_card(card) \223#define pnp_for_each_card(card) \
224 for((card) = global_to_pnp_card(pnp_cards.next); \224 list_for_each_entry(card, &pnp_cards, global_list)
225 (card) != global_to_pnp_card(&pnp_cards); \
226 (card) = global_to_pnp_card((card)->global_list.next))
227 225
228struct pnp_card_link {226struct pnp_card_link {
229 struct pnp_card *card;227 struct pnp_card *card;
@@ -276,14 +274,9 @@ struct pnp_dev { · 46 unmodified lines
276#define card_to_pnp_dev(n) list_entry(n, struct pnp_dev, card_list)274#define card_to_pnp_dev(n) list_entry(n, struct pnp_dev, card_list)
277#define protocol_to_pnp_dev(n) list_entry(n, struct pnp_dev, protocol_list)275#define protocol_to_pnp_dev(n) list_entry(n, struct pnp_dev, protocol_list)
278#define to_pnp_dev(n) container_of(n, struct pnp_dev, dev)276#define to_pnp_dev(n) container_of(n, struct pnp_dev, dev)
279#define pnp_for_each_dev(dev) \277#define pnp_for_each_dev(dev) list_for_each_entry(dev, &pnp_global, global_list)
280 for((dev) = global_to_pnp_dev(pnp_global.next); \278#define card_for_each_dev(card, dev) \
281 (dev) != global_to_pnp_dev(&pnp_global); \279 list_for_each_entry(dev, &(card)->devices, card_list)
282 (dev) = global_to_pnp_dev((dev)->global_list.next))
283#define card_for_each_dev(card,dev) \
284 for((dev) = card_to_pnp_dev((card)->devices.next); \
285 (dev) != card_to_pnp_dev(&(card)->devices); \
286 (dev) = card_to_pnp_dev((dev)->card_list.next))
287#define pnp_dev_name(dev) (dev)->name280#define pnp_dev_name(dev) (dev)->name
288 281
289static inline void *pnp_get_drvdata(struct pnp_dev *pdev)282static inline void *pnp_get_drvdata(struct pnp_dev *pdev)
@@ -437,14 +430,10 @@ struct pnp_protocol { · 147 unmodified lines
437};430};
438 431
439#define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list)432#define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list)
440#define protocol_for_each_card(protocol,card) \433#define protocol_for_each_card(protocol, card) \
441 for((card) = protocol_to_pnp_card((protocol)->cards.next); \434 list_for_each_entry(card, &(protocol)->cards, protocol_list)
442 (card) != protocol_to_pnp_card(&(protocol)->cards); \435#define protocol_for_each_dev(protocol, dev) \
443 (card) = protocol_to_pnp_card((card)->protocol_list.next))436 list_for_each_entry(dev, &(protocol)->devices, protocol_list)
444#define protocol_for_each_dev(protocol,dev) \
445 for((dev) = protocol_to_pnp_dev((protocol)->devices.next); \
446 (dev) != protocol_to_pnp_dev(&(protocol)->devices); \
447 (dev) = protocol_to_pnp_dev((dev)->protocol_list.next))
448 437
449extern struct bus_type pnp_bus_type;438extern struct bus_type pnp_bus_type;
450 439
include/linux/stmmac.h+2−0
@@ -177,6 +177,8 @@ struct plat_stmmacenet_data { · 176 unmodified lines
177 struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES];177 struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES];
178 struct stmmac_txq_cfg tx_queues_cfg[MTL_MAX_TX_QUEUES];178 struct stmmac_txq_cfg tx_queues_cfg[MTL_MAX_TX_QUEUES];
179 void (*fix_mac_speed)(void *priv, unsigned int speed);179 void (*fix_mac_speed)(void *priv, unsigned int speed);
180 int (*serdes_powerup)(struct net_device *ndev, void *priv);
181 void (*serdes_powerdown)(struct net_device *ndev, void *priv);
180 int (*init)(struct platform_device *pdev, void *priv);182 int (*init)(struct platform_device *pdev, void *priv);
181 void (*exit)(struct platform_device *pdev, void *priv);183 void (*exit)(struct platform_device *pdev, void *priv);
182 struct mac_device_info *(*setup)(void *priv);184 struct mac_device_info *(*setup)(void *priv);
include/linux/sunrpc/clnt.h+12−1
@@ -71,7 +71,13 @@ struct rpc_clnt { · 70 unmodified lines
71#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)71#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
72 struct dentry *cl_debugfs; /* debugfs directory */72 struct dentry *cl_debugfs; /* debugfs directory */
73#endif73#endif
74 struct rpc_xprt_iter cl_xpi;74 /* cl_work is only needed after cl_xpi is no longer used,
75 * and that are of similar size
76 */
77 union {
78 struct rpc_xprt_iter cl_xpi;
79 struct work_struct cl_work;
80 };
75 const struct cred *cl_cred;81 const struct cred *cl_cred;
76};82};
77 83
@@ -236,4 +242,9 @@ static inline int rpc_reply_expected(struct rpc_task *task) · 158 unmodified lines
236 (task->tk_msg.rpc_proc->p_decode != NULL);242 (task->tk_msg.rpc_proc->p_decode != NULL);
237}243}
238 244
245static inline void rpc_task_close_connection(struct rpc_task *task)
246{
247 if (task->tk_xprt)
248 xprt_force_disconnect(task->tk_xprt);
249}
239#endif /* _LINUX_SUNRPC_CLNT_H */250#endif /* _LINUX_SUNRPC_CLNT_H */
include/linux/sunrpc/svc_rdma.h+1−0
@@ -170,6 +170,7 @@ extern bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma); · 169 unmodified lines
170extern void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma,170extern void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma,
171 struct svc_rdma_recv_ctxt *ctxt);171 struct svc_rdma_recv_ctxt *ctxt);
172extern void svc_rdma_flush_recv_queues(struct svcxprt_rdma *rdma);172extern void svc_rdma_flush_recv_queues(struct svcxprt_rdma *rdma);
173extern void svc_rdma_release_rqst(struct svc_rqst *rqstp);
173extern int svc_rdma_recvfrom(struct svc_rqst *);174extern int svc_rdma_recvfrom(struct svc_rqst *);
174 175
175/* svc_rdma_rw.c */176/* svc_rdma_rw.c */
include/linux/tcp.h+0−51
@@ -78,47 +78,6 @@ struct tcp_sack_block { · 77 unmodified lines
78#define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */78#define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */
79#define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/79#define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/
80 80
81#if IS_ENABLED(CONFIG_MPTCP)
82struct mptcp_options_received {
83 u64 sndr_key;
84 u64 rcvr_key;
85 u64 data_ack;
86 u64 data_seq;
87 u32 subflow_seq;
88 u16 data_len;
89 u16 mp_capable : 1,
90 mp_join : 1,
91 dss : 1,
92 add_addr : 1,
93 rm_addr : 1,
94 family : 4,
95 echo : 1,
96 backup : 1;
97 u32 token;
98 u32 nonce;
99 u64 thmac;
100 u8 hmac[20];
101 u8 join_id;
102 u8 use_map:1,
103 dsn64:1,
104 data_fin:1,
105 use_ack:1,
106 ack64:1,
107 mpc_map:1,
108 __unused:2;
109 u8 addr_id;
110 u8 rm_id;
111 union {
112 struct in_addr addr;
113#if IS_ENABLED(CONFIG_MPTCP_IPV6)
114 struct in6_addr addr6;
115#endif
116 };
117 u64 ahmac;
118 u16 port;
119};
120#endif
121
122struct tcp_options_received {81struct tcp_options_received {
123/* PAWS/RTTM data */82/* PAWS/RTTM data */
124 int ts_recent_stamp;/* Time we stored ts_recent (for aging) */83 int ts_recent_stamp;/* Time we stored ts_recent (for aging) */
@@ -136,9 +95,6 @@ struct tcp_options_received { · 11 unmodified lines
136 u8 num_sacks; /* Number of SACK blocks */95 u8 num_sacks; /* Number of SACK blocks */
137 u16 user_mss; /* mss requested by user in ioctl */96 u16 user_mss; /* mss requested by user in ioctl */
138 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */97 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
139#if IS_ENABLED(CONFIG_MPTCP)
140 struct mptcp_options_received mptcp;
141#endif
142};98};
143 99
144static inline void tcp_clear_options(struct tcp_options_received *rx_opt)100static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
@@ -148,13 +104,6 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt) · 3 unmodified lines
148#if IS_ENABLED(CONFIG_SMC)104#if IS_ENABLED(CONFIG_SMC)
149 rx_opt->smc_ok = 0;105 rx_opt->smc_ok = 0;
150#endif106#endif
151#if IS_ENABLED(CONFIG_MPTCP)
152 rx_opt->mptcp.mp_capable = 0;
153 rx_opt->mptcp.mp_join = 0;
154 rx_opt->mptcp.add_addr = 0;
155 rx_opt->mptcp.rm_addr = 0;
156 rx_opt->mptcp.dss = 0;
157#endif
158}107}
159 108
160/* This is the max number of SACKS that we'll generate and process. It's safe109/* This is the max number of SACKS that we'll generate and process. It's safe
include/linux/tracepoint.h+1−21
@@ -156,8 +156,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) · 155 unmodified lines
156 * Note, the proto and args passed in includes "__data" as the first parameter.156 * Note, the proto and args passed in includes "__data" as the first parameter.
157 * The reason for this is to handle the "void" prototype. If a tracepoint157 * The reason for this is to handle the "void" prototype. If a tracepoint
158 * has a "void" prototype, then it is invalid to declare a function158 * has a "void" prototype, then it is invalid to declare a function
159 * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just159 * as "(void *, void)".
160 * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto".
161 */160 */
162#define __DO_TRACE(tp, proto, args, cond, rcuidle) \161#define __DO_TRACE(tp, proto, args, cond, rcuidle) \
163 do { \162 do { \
@@ -373,25 +372,6 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) · 209 unmodified lines
373# define __tracepoint_string372# define __tracepoint_string
374#endif373#endif
375 374
376/*
377 * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype
378 * (void). "void" is a special value in a function prototype and can
379 * not be combined with other arguments. Since the DECLARE_TRACE()
380 * macro adds a data element at the beginning of the prototype,
381 * we need a way to differentiate "(void *data, proto)" from
382 * "(void *data, void)". The second prototype is invalid.
383 *
384 * DECLARE_TRACE_NOARGS() passes "void" as the tracepoint prototype
385 * and "void *__data" as the callback prototype.
386 *
387 * DECLARE_TRACE() passes "proto" as the tracepoint protoype and
388 * "void *__data, proto" as the callback prototype.
389 */
390#define DECLARE_TRACE_NOARGS(name) \
391 __DECLARE_TRACE(name, void, , \
392 cpu_online(raw_smp_processor_id()), \
393 void *__data, __data)
394
395#define DECLARE_TRACE(name, proto, args) \375#define DECLARE_TRACE(name, proto, args) \
396 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \376 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
397 cpu_online(raw_smp_processor_id()), \377 cpu_online(raw_smp_processor_id()), \
include/linux/tty.h+1−1
@@ -66,7 +66,7 @@ struct tty_buffer { · 65 unmodified lines
66 int read;66 int read;
67 int flags;67 int flags;
68 /* Data points here */68 /* Data points here */
69 unsigned long data[0];69 unsigned long data[];
70};70};
71 71
72/* Values for .flags field of tty_buffer */72/* Values for .flags field of tty_buffer */
include/linux/vdpa.h+1−1
@@ -164,7 +164,7 @@ struct vdpa_config_ops { · 163 unmodified lines
164 u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx);164 u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx);
165 165
166 /* Device ops */166 /* Device ops */
167 u16 (*get_vq_align)(struct vdpa_device *vdev);167 u32 (*get_vq_align)(struct vdpa_device *vdev);
168 u64 (*get_features)(struct vdpa_device *vdev);168 u64 (*get_features)(struct vdpa_device *vdev);
169 int (*set_features)(struct vdpa_device *vdev, u64 features);169 int (*set_features)(struct vdpa_device *vdev, u64 features);
170 void (*set_config_cb)(struct vdpa_device *vdev,170 void (*set_config_cb)(struct vdpa_device *vdev,
include/linux/vermagic.h+5−3
@@ -1,5 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_VERMAGIC_H
3#define _LINUX_VERMAGIC_H
4
2#include <generated/utsrelease.h>5#include <generated/utsrelease.h>
6#include <asm/vermagic.h>
3 7
4/* Simply sanity version stamp for modules. */8/* Simply sanity version stamp for modules. */
5#ifdef CONFIG_SMP9#ifdef CONFIG_SMP
@@ -24,9 +28,6 @@ · 18 unmodified lines
24#else28#else
25#define MODULE_VERMAGIC_MODVERSIONS ""29#define MODULE_VERMAGIC_MODVERSIONS ""
26#endif30#endif
27#ifndef MODULE_ARCH_VERMAGIC
28#define MODULE_ARCH_VERMAGIC ""
29#endif
30#ifdef RANDSTRUCT_PLUGIN31#ifdef RANDSTRUCT_PLUGIN
31#include <generated/randomize_layout_hash.h>32#include <generated/randomize_layout_hash.h>
32#define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED33#define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED
@@ -41,3 +42,4 @@ · 8 unmodified lines
41 MODULE_ARCH_VERMAGIC \42 MODULE_ARCH_VERMAGIC \
42 MODULE_RANDSTRUCT_PLUGIN43 MODULE_RANDSTRUCT_PLUGIN
43 44
45#endif /* _LINUX_VERMAGIC_H */
include/linux/virtio.h+0−1
@@ -9,7 +9,6 @@ · 8 unmodified lines
9#include <linux/device.h>9#include <linux/device.h>
10#include <linux/mod_devicetable.h>10#include <linux/mod_devicetable.h>
11#include <linux/gfp.h>11#include <linux/gfp.h>
12#include <linux/vringh.h>
13 12
14/**13/**
15 * virtqueue - a queue to register buffers for sending or receiving.14 * virtqueue - a queue to register buffers for sending or receiving.
include/linux/virtio_net.h+24−2
@@ -3,6 +3,8 @@ · 2 unmodified lines
3#define _LINUX_VIRTIO_NET_H3#define _LINUX_VIRTIO_NET_H
4 4
5#include <linux/if_vlan.h>5#include <linux/if_vlan.h>
6#include <uapi/linux/tcp.h>
7#include <uapi/linux/udp.h>
6#include <uapi/linux/virtio_net.h>8#include <uapi/linux/virtio_net.h>
7 9
8static inline int virtio_net_hdr_set_proto(struct sk_buff *skb,10static inline int virtio_net_hdr_set_proto(struct sk_buff *skb,
@@ -28,17 +30,25 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 19 unmodified lines
28 bool little_endian)30 bool little_endian)
29{31{
30 unsigned int gso_type = 0;32 unsigned int gso_type = 0;
33 unsigned int thlen = 0;
34 unsigned int ip_proto;
31 35
32 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {36 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
33 switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {37 switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
34 case VIRTIO_NET_HDR_GSO_TCPV4:38 case VIRTIO_NET_HDR_GSO_TCPV4:
35 gso_type = SKB_GSO_TCPV4;39 gso_type = SKB_GSO_TCPV4;
40 ip_proto = IPPROTO_TCP;
41 thlen = sizeof(struct tcphdr);
36 break;42 break;
37 case VIRTIO_NET_HDR_GSO_TCPV6:43 case VIRTIO_NET_HDR_GSO_TCPV6:
38 gso_type = SKB_GSO_TCPV6;44 gso_type = SKB_GSO_TCPV6;
45 ip_proto = IPPROTO_TCP;
46 thlen = sizeof(struct tcphdr);
39 break;47 break;
40 case VIRTIO_NET_HDR_GSO_UDP:48 case VIRTIO_NET_HDR_GSO_UDP:
41 gso_type = SKB_GSO_UDP;49 gso_type = SKB_GSO_UDP;
50 ip_proto = IPPROTO_UDP;
51 thlen = sizeof(struct udphdr);
42 break;52 break;
43 default:53 default:
44 return -EINVAL;54 return -EINVAL;
@@ -57,16 +67,22 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 12 unmodified lines
57 67
58 if (!skb_partial_csum_set(skb, start, off))68 if (!skb_partial_csum_set(skb, start, off))
59 return -EINVAL;69 return -EINVAL;
70
71 if (skb_transport_offset(skb) + thlen > skb_headlen(skb))
72 return -EINVAL;
60 } else {73 } else {
61 /* gso packets without NEEDS_CSUM do not set transport_offset.74 /* gso packets without NEEDS_CSUM do not set transport_offset.
62 * probe and drop if does not match one of the above types.75 * probe and drop if does not match one of the above types.
63 */76 */
64 if (gso_type && skb->network_header) {77 if (gso_type && skb->network_header) {
78 struct flow_keys_basic keys;
79
65 if (!skb->protocol)80 if (!skb->protocol)
66 virtio_net_hdr_set_proto(skb, hdr);81 virtio_net_hdr_set_proto(skb, hdr);
67retry:82retry:
68 skb_probe_transport_header(skb);83 if (!skb_flow_dissect_flow_keys_basic(NULL, skb, &keys,
69 if (!skb_transport_header_was_set(skb)) {84 NULL, 0, 0, 0,
85 0)) {
70 /* UFO does not specify ipv4 or 6: try both */86 /* UFO does not specify ipv4 or 6: try both */
71 if (gso_type & SKB_GSO_UDP &&87 if (gso_type & SKB_GSO_UDP &&
72 skb->protocol == htons(ETH_P_IP)) {88 skb->protocol == htons(ETH_P_IP)) {
@@ -75,6 +91,12 @@ retry: · 2 unmodified lines
75 }91 }
76 return -EINVAL;92 return -EINVAL;
77 }93 }
94
95 if (keys.control.thoff + thlen > skb_headlen(skb) ||
96 keys.basic.ip_proto != ip_proto)
97 return -EINVAL;
98
99 skb_set_transport_header(skb, keys.control.thoff);
78 }100 }
79 }101 }
80 102
include/linux/virtio_vsock.h+1−0
@@ -48,6 +48,7 @@ struct virtio_vsock_pkt { · 47 unmodified lines
48 u32 len;48 u32 len;
49 u32 off;49 u32 off;
50 bool reply;50 bool reply;
51 bool tap_delivered;
51};52};
52 53
53struct virtio_vsock_pkt_info {54struct virtio_vsock_pkt_info {
include/linux/vmalloc.h+1−1
@@ -137,7 +137,7 @@ extern void vunmap(const void *addr); · 136 unmodified lines
137 137
138extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,138extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,
139 unsigned long uaddr, void *kaddr,139 unsigned long uaddr, void *kaddr,
140 unsigned long size);140 unsigned long pgoff, unsigned long size);
141 141
142extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,142extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
143 unsigned long pgoff);143 unsigned long pgoff);
include/linux/vringh.h+6−0
@@ -14,8 +14,10 @@ · 13 unmodified lines
14#include <linux/virtio_byteorder.h>14#include <linux/virtio_byteorder.h>
15#include <linux/uio.h>15#include <linux/uio.h>
16#include <linux/slab.h>16#include <linux/slab.h>
17#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
17#include <linux/dma-direction.h>18#include <linux/dma-direction.h>
18#include <linux/vhost_iotlb.h>19#include <linux/vhost_iotlb.h>
20#endif
19#include <asm/barrier.h>21#include <asm/barrier.h>
20 22
21/* virtio_ring with information needed for host access. */23/* virtio_ring with information needed for host access. */
@@ -254,6 +256,8 @@ static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val) · 232 unmodified lines
254 return __cpu_to_virtio64(vringh_is_little_endian(vrh), val);256 return __cpu_to_virtio64(vringh_is_little_endian(vrh), val);
255}257}
256 258
259#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
260
257void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb);261void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb);
258 262
259int vringh_init_iotlb(struct vringh *vrh, u64 features,263int vringh_init_iotlb(struct vringh *vrh, u64 features,
@@ -284,4 +288,6 @@ void vringh_notify_disable_iotlb(struct vringh *vrh); · 24 unmodified lines
284 288
285int vringh_need_notify_iotlb(struct vringh *vrh);289int vringh_need_notify_iotlb(struct vringh *vrh);
286 290
291#endif /* CONFIG_VHOST_IOTLB */
292
287#endif /* _LINUX_VRINGH_H */293#endif /* _LINUX_VRINGH_H */