logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

4.14.341-openela.patch (15992B)


  1. SPDX-FileCopyrightText: 1991-2024 kernel.org contributors
  2. SPDX-FileCopyrightText: 2023-2024 Open Enterprise Linux Association <kernel-lts@openela.org>
  3. SPDX-License-Identifier: GPL-2.0-only
  4. Patch kernel headers up to 4.14.341-openela
  5. diff --git include/crypto/if_alg.h include/crypto/if_alg.h
  6. index 2ea6a95ca825..f803dc8c45ad 100644
  7. --- linux-4.14.336/include/crypto/if_alg.h
  8. +++ linux-4.14.336/include/crypto/if_alg.h
  9. @@ -146,6 +146,7 @@ struct af_alg_async_req {
  10. * @enc: Cryptographic operation to be performed when
  11. * recvmsg is invoked.
  12. * @len: Length of memory allocated for this data structure.
  13. + * @inflight: Non-zero when AIO requests are in flight.
  14. */
  15. struct af_alg_ctx {
  16. struct list_head tsgl_list;
  17. @@ -163,6 +164,8 @@ struct af_alg_ctx {
  18. bool enc;
  19. unsigned int len;
  20. +
  21. + unsigned int inflight;
  22. };
  23. int af_alg_register_type(const struct af_alg_type *type);
  24. diff --git include/drm/drm_bridge.h include/drm/drm_bridge.h
  25. index 6522d4cbc9d9..bfbd38c0b609 100644
  26. --- linux-4.14.336/include/drm/drm_bridge.h
  27. +++ linux-4.14.336/include/drm/drm_bridge.h
  28. @@ -161,7 +161,7 @@ struct drm_bridge_funcs {
  29. * or &drm_encoder_helper_funcs.dpms hook.
  30. *
  31. * The bridge must assume that the display pipe (i.e. clocks and timing
  32. - * singals) feeding it is no longer running when this callback is
  33. + * signals) feeding it is no longer running when this callback is
  34. * called.
  35. *
  36. * The post_disable callback is optional.
  37. diff --git include/drm/drm_mipi_dsi.h include/drm/drm_mipi_dsi.h
  38. index 689f615471ab..a059f1d968b7 100644
  39. --- linux-4.14.336/include/drm/drm_mipi_dsi.h
  40. +++ linux-4.14.336/include/drm/drm_mipi_dsi.h
  41. @@ -163,6 +163,7 @@ struct mipi_dsi_device_info {
  42. * struct mipi_dsi_device - DSI peripheral device
  43. * @host: DSI host for this peripheral
  44. * @dev: driver model device node for this peripheral
  45. + * @attached: the DSI device has been successfully attached
  46. * @name: DSI peripheral chip type
  47. * @channel: virtual channel assigned to the peripheral
  48. * @format: pixel format for video mode
  49. @@ -172,6 +173,7 @@ struct mipi_dsi_device_info {
  50. struct mipi_dsi_device {
  51. struct mipi_dsi_host *host;
  52. struct device dev;
  53. + bool attached;
  54. char name[DSI_DEV_NAME_SIZE];
  55. unsigned int channel;
  56. diff --git include/linux/bpf.h include/linux/bpf.h
  57. index 3aa05ea79ba1..0d7a61df056b 100644
  58. --- linux-4.14.336/include/linux/bpf.h
  59. +++ linux-4.14.336/include/linux/bpf.h
  60. @@ -38,7 +38,11 @@ struct bpf_map_ops {
  61. /* funcs called by prog_array and perf_event_array map */
  62. void *(*map_fd_get_ptr)(struct bpf_map *map, struct file *map_file,
  63. int fd);
  64. - void (*map_fd_put_ptr)(void *ptr);
  65. + /* If need_defer is true, the implementation should guarantee that
  66. + * the to-be-put element is still alive before the bpf program, which
  67. + * may manipulate it, exists.
  68. + */
  69. + void (*map_fd_put_ptr)(struct bpf_map *map, void *ptr, bool need_defer);
  70. u32 (*map_gen_lookup)(struct bpf_map *map, struct bpf_insn *insn_buf);
  71. u32 (*map_fd_sys_lookup_elem)(void *ptr);
  72. };
  73. diff --git include/linux/device.h include/linux/device.h
  74. index 65e06a066b67..27b70b810463 100644
  75. --- linux-4.14.336/include/linux/device.h
  76. +++ linux-4.14.336/include/linux/device.h
  77. @@ -1474,6 +1474,9 @@ do { \
  78. WARN_ONCE(condition, "%s %s: " format, \
  79. dev_driver_string(dev), dev_name(dev), ## arg)
  80. +extern __printf(3, 4)
  81. +int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
  82. +
  83. /* Create alias, so I can be autoloaded. */
  84. #define MODULE_ALIAS_CHARDEV(major,minor) \
  85. MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
  86. diff --git include/linux/dmaengine.h include/linux/dmaengine.h
  87. index 8089e28539f1..d5a7d320e05c 100644
  88. --- linux-4.14.336/include/linux/dmaengine.h
  89. +++ linux-4.14.336/include/linux/dmaengine.h
  90. @@ -816,7 +816,8 @@ static inline int dmaengine_slave_config(struct dma_chan *chan,
  91. static inline bool is_slave_direction(enum dma_transfer_direction direction)
  92. {
  93. - return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM);
  94. + return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM) ||
  95. + (direction == DMA_DEV_TO_DEV);
  96. }
  97. static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
  98. diff --git include/linux/fs.h include/linux/fs.h
  99. index ff0a992846a3..bd6072556269 100644
  100. --- linux-4.14.336/include/linux/fs.h
  101. +++ linux-4.14.336/include/linux/fs.h
  102. @@ -296,6 +296,8 @@ enum rw_hint {
  103. #define IOCB_SYNC (1 << 5)
  104. #define IOCB_WRITE (1 << 6)
  105. #define IOCB_NOWAIT (1 << 7)
  106. +/* kiocb is a read or write operation submitted by fs/aio.c. */
  107. +#define IOCB_AIO_RW (1 << 23)
  108. struct kiocb {
  109. struct file *ki_filp;
  110. diff --git include/linux/lsm_hooks.h include/linux/lsm_hooks.h
  111. index 569debc49f3d..28ff40daccff 100644
  112. --- linux-4.14.336/include/linux/lsm_hooks.h
  113. +++ linux-4.14.336/include/linux/lsm_hooks.h
  114. @@ -466,6 +466,12 @@
  115. * simple integer value. When @arg represents a user space pointer, it
  116. * should never be used by the security module.
  117. * Return 0 if permission is granted.
  118. + * @file_ioctl_compat:
  119. + * @file contains the file structure.
  120. + * @cmd contains the operation to perform.
  121. + * @arg contains the operational arguments.
  122. + * Check permission for a compat ioctl operation on @file.
  123. + * Return 0 if permission is granted.
  124. * @mmap_addr :
  125. * Check permissions for a mmap operation at @addr.
  126. * @addr contains virtual address that will be used for the operation.
  127. @@ -1486,6 +1492,8 @@ union security_list_options {
  128. void (*file_free_security)(struct file *file);
  129. int (*file_ioctl)(struct file *file, unsigned int cmd,
  130. unsigned long arg);
  131. + int (*file_ioctl_compat)(struct file *file, unsigned int cmd,
  132. + unsigned long arg);
  133. int (*mmap_addr)(unsigned long addr);
  134. int (*mmap_file)(struct file *file, unsigned long reqprot,
  135. unsigned long prot, unsigned long flags);
  136. @@ -1764,6 +1772,7 @@ struct security_hook_heads {
  137. struct list_head file_alloc_security;
  138. struct list_head file_free_security;
  139. struct list_head file_ioctl;
  140. + struct list_head file_ioctl_compat;
  141. struct list_head mmap_addr;
  142. struct list_head mmap_file;
  143. struct list_head file_mprotect;
  144. diff --git include/linux/pci_ids.h include/linux/pci_ids.h
  145. index 83f576d45d78..c977e636a1dd 100644
  146. --- linux-4.14.336/include/linux/pci_ids.h
  147. +++ linux-4.14.336/include/linux/pci_ids.h
  148. @@ -2953,6 +2953,7 @@
  149. #define PCI_DEVICE_ID_INTEL_82443GX_0 0x71a0
  150. #define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2
  151. #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
  152. +#define PCI_DEVICE_ID_INTEL_HDA_ARL 0x7728
  153. #define PCI_DEVICE_ID_INTEL_SCH_LPC 0x8119
  154. #define PCI_DEVICE_ID_INTEL_SCH_IDE 0x811a
  155. #define PCI_DEVICE_ID_INTEL_E6XX_CU 0x8183
  156. diff --git include/linux/security.h include/linux/security.h
  157. index 1c8968a267c2..cf77cd971795 100644
  158. --- linux-4.14.336/include/linux/security.h
  159. +++ linux-4.14.336/include/linux/security.h
  160. @@ -306,6 +306,8 @@ int security_file_permission(struct file *file, int mask);
  161. int security_file_alloc(struct file *file);
  162. void security_file_free(struct file *file);
  163. int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
  164. +int security_file_ioctl_compat(struct file *file, unsigned int cmd,
  165. + unsigned long arg);
  166. int security_mmap_file(struct file *file, unsigned long prot,
  167. unsigned long flags);
  168. int security_mmap_addr(unsigned long addr);
  169. @@ -827,6 +829,13 @@ static inline int security_file_ioctl(struct file *file, unsigned int cmd,
  170. return 0;
  171. }
  172. +static inline int security_file_ioctl_compat(struct file *file,
  173. + unsigned int cmd,
  174. + unsigned long arg)
  175. +{
  176. + return 0;
  177. +}
  178. +
  179. static inline int security_mmap_file(struct file *file, unsigned long prot,
  180. unsigned long flags)
  181. {
  182. diff --git include/linux/spi/spi.h include/linux/spi/spi.h
  183. index a8f6606dd498..5c7741ca3b99 100644
  184. --- linux-4.14.336/include/linux/spi/spi.h
  185. +++ linux-4.14.336/include/linux/spi/spi.h
  186. @@ -153,6 +153,7 @@ struct spi_device {
  187. #define SPI_MODE_1 (0|SPI_CPHA)
  188. #define SPI_MODE_2 (SPI_CPOL|0)
  189. #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA)
  190. +#define SPI_MODE_X_MASK (SPI_CPOL|SPI_CPHA)
  191. #define SPI_CS_HIGH 0x04 /* chipselect active high? */
  192. #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */
  193. #define SPI_3WIRE 0x10 /* SI/SO signals shared */
  194. diff --git include/linux/units.h include/linux/units.h
  195. new file mode 100644
  196. index 000000000000..a0af6d2ef4e5
  197. --- /dev/null
  198. +++ linux-4.14.336/include/linux/units.h
  199. @@ -0,0 +1,92 @@
  200. +/* SPDX-License-Identifier: GPL-2.0 */
  201. +#ifndef _LINUX_UNITS_H
  202. +#define _LINUX_UNITS_H
  203. +
  204. +#include <linux/kernel.h>
  205. +
  206. +#define HZ_PER_KHZ 1000UL
  207. +#define KHZ_PER_MHZ 1000UL
  208. +#define HZ_PER_MHZ 1000000UL
  209. +
  210. +#define MILLIWATT_PER_WATT 1000UL
  211. +#define MICROWATT_PER_MILLIWATT 1000UL
  212. +#define MICROWATT_PER_WATT 1000000UL
  213. +
  214. +#define ABSOLUTE_ZERO_MILLICELSIUS -273150
  215. +
  216. +static inline long milli_kelvin_to_millicelsius(long t)
  217. +{
  218. + return t + ABSOLUTE_ZERO_MILLICELSIUS;
  219. +}
  220. +
  221. +static inline long millicelsius_to_milli_kelvin(long t)
  222. +{
  223. + return t - ABSOLUTE_ZERO_MILLICELSIUS;
  224. +}
  225. +
  226. +#define MILLIDEGREE_PER_DEGREE 1000
  227. +#define MILLIDEGREE_PER_DECIDEGREE 100
  228. +
  229. +static inline long kelvin_to_millicelsius(long t)
  230. +{
  231. + return milli_kelvin_to_millicelsius(t * MILLIDEGREE_PER_DEGREE);
  232. +}
  233. +
  234. +static inline long millicelsius_to_kelvin(long t)
  235. +{
  236. + t = millicelsius_to_milli_kelvin(t);
  237. +
  238. + return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DEGREE);
  239. +}
  240. +
  241. +static inline long deci_kelvin_to_celsius(long t)
  242. +{
  243. + t = milli_kelvin_to_millicelsius(t * MILLIDEGREE_PER_DECIDEGREE);
  244. +
  245. + return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DEGREE);
  246. +}
  247. +
  248. +static inline long celsius_to_deci_kelvin(long t)
  249. +{
  250. + t = millicelsius_to_milli_kelvin(t * MILLIDEGREE_PER_DEGREE);
  251. +
  252. + return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DECIDEGREE);
  253. +}
  254. +
  255. +/**
  256. + * deci_kelvin_to_millicelsius_with_offset - convert Kelvin to Celsius
  257. + * @t: temperature value in decidegrees Kelvin
  258. + * @offset: difference between Kelvin and Celsius in millidegrees
  259. + *
  260. + * Return: temperature value in millidegrees Celsius
  261. + */
  262. +static inline long deci_kelvin_to_millicelsius_with_offset(long t, long offset)
  263. +{
  264. + return t * MILLIDEGREE_PER_DECIDEGREE - offset;
  265. +}
  266. +
  267. +static inline long deci_kelvin_to_millicelsius(long t)
  268. +{
  269. + return milli_kelvin_to_millicelsius(t * MILLIDEGREE_PER_DECIDEGREE);
  270. +}
  271. +
  272. +static inline long millicelsius_to_deci_kelvin(long t)
  273. +{
  274. + t = millicelsius_to_milli_kelvin(t);
  275. +
  276. + return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DECIDEGREE);
  277. +}
  278. +
  279. +static inline long kelvin_to_celsius(long t)
  280. +{
  281. + return t + DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS,
  282. + MILLIDEGREE_PER_DEGREE);
  283. +}
  284. +
  285. +static inline long celsius_to_kelvin(long t)
  286. +{
  287. + return t - DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS,
  288. + MILLIDEGREE_PER_DEGREE);
  289. +}
  290. +
  291. +#endif /* _LINUX_UNITS_H */
  292. diff --git include/net/af_unix.h include/net/af_unix.h
  293. index 7ec1cdb66be8..e514508bdc92 100644
  294. --- linux-4.14.336/include/net/af_unix.h
  295. +++ linux-4.14.336/include/net/af_unix.h
  296. @@ -43,12 +43,6 @@ struct unix_skb_parms {
  297. #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
  298. -#define unix_state_lock(s) spin_lock(&unix_sk(s)->lock)
  299. -#define unix_state_unlock(s) spin_unlock(&unix_sk(s)->lock)
  300. -#define unix_state_lock_nested(s) \
  301. - spin_lock_nested(&unix_sk(s)->lock, \
  302. - SINGLE_DEPTH_NESTING)
  303. -
  304. /* The AF_UNIX socket */
  305. struct unix_sock {
  306. /* WARNING: sk has to be the first member */
  307. @@ -72,6 +66,20 @@ static inline struct unix_sock *unix_sk(const struct sock *sk)
  308. return (struct unix_sock *)sk;
  309. }
  310. +#define unix_state_lock(s) spin_lock(&unix_sk(s)->lock)
  311. +#define unix_state_unlock(s) spin_unlock(&unix_sk(s)->lock)
  312. +enum unix_socket_lock_class {
  313. + U_LOCK_NORMAL,
  314. + U_LOCK_SECOND, /* for double locking, see unix_state_double_lock(). */
  315. + U_LOCK_DIAG, /* used while dumping icons, see sk_diag_dump_icons(). */
  316. +};
  317. +
  318. +static inline void unix_state_lock_nested(struct sock *sk,
  319. + enum unix_socket_lock_class subclass)
  320. +{
  321. + spin_lock_nested(&unix_sk(sk)->lock, subclass);
  322. +}
  323. +
  324. #define peer_wait peer_wq.wait
  325. long unix_inq_len(struct sock *sk);
  326. diff --git include/net/bluetooth/hci_core.h include/net/bluetooth/hci_core.h
  327. index 8f899ad4a754..bac3d79139b2 100644
  328. --- linux-4.14.336/include/net/bluetooth/hci_core.h
  329. +++ linux-4.14.336/include/net/bluetooth/hci_core.h
  330. @@ -647,7 +647,6 @@ void hci_inquiry_cache_flush(struct hci_dev *hdev);
  331. /* ----- linux-4.14.336/HCI Connections ----- */
  332. enum {
  333. HCI_CONN_AUTH_PEND,
  334. - HCI_CONN_REAUTH_PEND,
  335. HCI_CONN_ENCRYPT_PEND,
  336. HCI_CONN_RSWITCH_PEND,
  337. HCI_CONN_MODE_CHANGE_PEND,
  338. diff --git include/net/dst_ops.h include/net/dst_ops.h
  339. index 443863c7b8da..632086b2f644 100644
  340. --- linux-4.14.336/include/net/dst_ops.h
  341. +++ linux-4.14.336/include/net/dst_ops.h
  342. @@ -16,7 +16,7 @@ struct dst_ops {
  343. unsigned short family;
  344. unsigned int gc_thresh;
  345. - int (*gc)(struct dst_ops *ops);
  346. + void (*gc)(struct dst_ops *ops);
  347. struct dst_entry * (*check)(struct dst_entry *, __u32 cookie);
  348. unsigned int (*default_advmss)(const struct dst_entry *);
  349. unsigned int (*mtu)(const struct dst_entry *);
  350. @@ -53,9 +53,11 @@ static inline int dst_entries_get_slow(struct dst_ops *dst)
  351. return percpu_counter_sum_positive(&dst->pcpuc_entries);
  352. }
  353. +#define DST_PERCPU_COUNTER_BATCH 32
  354. static inline void dst_entries_add(struct dst_ops *dst, int val)
  355. {
  356. - percpu_counter_add(&dst->pcpuc_entries, val);
  357. + percpu_counter_add_batch(&dst->pcpuc_entries, val,
  358. + DST_PERCPU_COUNTER_BATCH);
  359. }
  360. static inline int dst_entries_init(struct dst_ops *dst)
  361. diff --git include/net/llc_pdu.h include/net/llc_pdu.h
  362. index 49aa79c7b278..581cd37aa98b 100644
  363. --- linux-4.14.336/include/net/llc_pdu.h
  364. +++ linux-4.14.336/include/net/llc_pdu.h
  365. @@ -262,8 +262,7 @@ static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type,
  366. */
  367. static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
  368. {
  369. - if (skb->protocol == htons(ETH_P_802_2))
  370. - memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN);
  371. + memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN);
  372. }
  373. /**
  374. @@ -275,8 +274,7 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
  375. */
  376. static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da)
  377. {
  378. - if (skb->protocol == htons(ETH_P_802_2))
  379. - memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN);
  380. + memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN);
  381. }
  382. /**
  383. diff --git include/net/netns/ipv6.h include/net/netns/ipv6.h
  384. index c004d051c2d3..290ca18589ee 100644
  385. --- linux-4.14.336/include/net/netns/ipv6.h
  386. +++ linux-4.14.336/include/net/netns/ipv6.h
  387. @@ -64,8 +64,8 @@ struct netns_ipv6 {
  388. struct dst_ops ip6_dst_ops;
  389. rwlock_t fib6_walker_lock;
  390. spinlock_t fib6_gc_lock;
  391. - unsigned int ip6_rt_gc_expire;
  392. - unsigned long ip6_rt_last_gc;
  393. + atomic_t ip6_rt_gc_expire;
  394. + unsigned long ip6_rt_last_gc;
  395. #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  396. bool fib6_has_custom_rules;
  397. struct rt6_info *ip6_prohibit_entry;
  398. diff --git include/uapi/linux/btrfs.h include/uapi/linux/btrfs.h
  399. index 86d2a52b4665..ee7a34c237a5 100644
  400. --- linux-4.14.336/include/uapi/linux/btrfs.h
  401. +++ linux-4.14.336/include/uapi/linux/btrfs.h
  402. @@ -522,6 +522,9 @@ struct btrfs_ioctl_clone_range_args {
  403. */
  404. #define BTRFS_DEFRAG_RANGE_COMPRESS 1
  405. #define BTRFS_DEFRAG_RANGE_START_IO 2
  406. +#define BTRFS_DEFRAG_RANGE_FLAGS_SUPP (BTRFS_DEFRAG_RANGE_COMPRESS | \
  407. + BTRFS_DEFRAG_RANGE_START_IO)
  408. +
  409. struct btrfs_ioctl_defrag_range_args {
  410. /* start of the defrag operation */
  411. __u64 start;
  412. diff --git include/uapi/linux/netfilter/nf_tables.h include/uapi/linux/netfilter/nf_tables.h
  413. index c7bb18ea4962..835e9f345f35 100644
  414. --- linux-4.14.336/include/uapi/linux/netfilter/nf_tables.h
  415. +++ linux-4.14.336/include/uapi/linux/netfilter/nf_tables.h
  416. @@ -229,9 +229,11 @@ enum nft_rule_attributes {
  417. /**
  418. * enum nft_rule_compat_flags - nf_tables rule compat flags
  419. *
  420. + * @NFT_RULE_COMPAT_F_UNUSED: unused
  421. * @NFT_RULE_COMPAT_F_INV: invert the check result
  422. */
  423. enum nft_rule_compat_flags {
  424. + NFT_RULE_COMPAT_F_UNUSED = (1 << 0),
  425. NFT_RULE_COMPAT_F_INV = (1 << 1),
  426. NFT_RULE_COMPAT_F_MASK = NFT_RULE_COMPAT_F_INV,
  427. };