Picking up v5.0 + missed misc-fixes from last release
Showing the changes to include/linux (7 of 545 files). Show all
Unified · Split
| @@ -20,15 +20,6 @@ · 19 unmodified lines | |||
| 20 | struct kernel_pkey_query; | 20 | struct kernel_pkey_query; |
| 21 | struct kernel_pkey_params; | 21 | struct kernel_pkey_params; |
| 22 | 22 | ||
| 23 | /* | ||
| 24 | * key under-construction record | ||
| 25 | * - passed to the request_key actor if supplied | ||
| 26 | */ | ||
| 27 | struct key_construction { | ||
| 28 | struct key *key; /* key being constructed */ | ||
| 29 | struct key *authkey;/* authorisation for key being constructed */ | ||
| 30 | }; | ||
| 31 | |||
| 32 | /* | 23 | /* |
| 33 | * Pre-parsed payload, used by key add, update and instantiate. | 24 | * Pre-parsed payload, used by key add, update and instantiate. |
| 34 | * | 25 | * |
| @@ -50,8 +41,7 @@ struct key_preparsed_payload { · 15 unmodified lines | |||
| 50 | time64_t expiry; /* Expiry time of key */ | 41 | time64_t expiry; /* Expiry time of key */ |
| 51 | } __randomize_layout; | 42 | } __randomize_layout; |
| 52 | 43 | ||
| 53 | typedef int (*request_key_actor_t)(struct key_construction *key, | 44 | typedef int (*request_key_actor_t)(struct key *auth_key, void *aux); |
| 54 | const char *op, void *aux); | ||
| 55 | 45 | ||
| 56 | /* | 46 | /* |
| 57 | * Preparsed matching criterion. | 47 | * Preparsed matching criterion. |
| @@ -181,20 +171,20 @@ extern int key_instantiate_and_link(struct key *key, · 123 unmodified lines | |||
| 181 | const void *data, | 171 | const void *data, |
| 182 | size_t datalen, | 172 | size_t datalen, |
| 183 | struct key *keyring, | 173 | struct key *keyring, |
| 184 | struct key *instkey); | 174 | struct key *authkey); |
| 185 | extern int key_reject_and_link(struct key *key, | 175 | extern int key_reject_and_link(struct key *key, |
| 186 | unsigned timeout, | 176 | unsigned timeout, |
| 187 | unsigned error, | 177 | unsigned error, |
| 188 | struct key *keyring, | 178 | struct key *keyring, |
| 189 | struct key *instkey); | 179 | struct key *authkey); |
| 190 | extern void complete_request_key(struct key_construction *cons, int error); | 180 | extern void complete_request_key(struct key *authkey, int error); |
| 191 | 181 | ||
| 192 | static inline int key_negate_and_link(struct key *key, | 182 | static inline int key_negate_and_link(struct key *key, |
| 193 | unsigned timeout, | 183 | unsigned timeout, |
| 194 | struct key *keyring, | 184 | struct key *keyring, |
| 195 | struct key *instkey) | 185 | struct key *authkey) |
| 196 | { | 186 | { |
| 197 | return key_reject_and_link(key, timeout, ENOKEY, keyring, instkey); | 187 | return key_reject_and_link(key, timeout, ENOKEY, keyring, authkey); |
| 198 | } | 188 | } |
| 199 | 189 | ||
| 200 | extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep); | 190 | extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep); |
| @@ -11,6 +11,8 @@ · 10 unmodified lines | |||
| 11 | #define _LINUX_NETDEV_FEATURES_H | 11 | #define _LINUX_NETDEV_FEATURES_H |
| 12 | 12 | ||
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | #include <linux/bitops.h> | ||
| 15 | #include <asm/byteorder.h> | ||
| 14 | 16 | ||
| 15 | typedef u64 netdev_features_t; | 17 | typedef u64 netdev_features_t; |
| 16 | 18 | ||
| @@ -154,8 +156,26 @@ enum { · 137 unmodified lines | |||
| 154 | #define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX) | 156 | #define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX) |
| 155 | #define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX) | 157 | #define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX) |
| 156 | 158 | ||
| 157 | #define for_each_netdev_feature(mask_addr, bit) \ | 159 | /* Finds the next feature with the highest number of the range of start till 0. |
| 158 | for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) | 160 | */ |
| 161 | static inline int find_next_netdev_feature(u64 feature, unsigned long start) | ||
| 162 | { | ||
| 163 | /* like BITMAP_LAST_WORD_MASK() for u64 | ||
| 164 | * this sets the most significant 64 - start to 0. | ||
| 165 | */ | ||
| 166 | feature &= ~0ULL >> (-start & ((sizeof(feature) * 8) - 1)); | ||
| 167 | |||
| 168 | return fls64(feature) - 1; | ||
| 169 | } | ||
| 170 | |||
| 171 | /* This goes for the MSB to the LSB through the set feature bits, | ||
| 172 | * mask_addr should be a u64 and bit an int | ||
| 173 | */ | ||
| 174 | #define for_each_netdev_feature(mask_addr, bit) \ | ||
| 175 | for ((bit) = find_next_netdev_feature((mask_addr), \ | ||
| 176 | NETDEV_FEATURE_COUNT); \ | ||
| 177 | (bit) >= 0; \ | ||
| 178 | (bit) = find_next_netdev_feature((mask_addr), (bit) - 1)) | ||
| 159 | 179 | ||
| 160 | /* Features valid for ethtool to change */ | 180 | /* Features valid for ethtool to change */ |
| 161 | /* = all defined minus driver/device-class-related */ | 181 | /* = all defined minus driver/device-class-related */ |
| @@ -3861,7 +3861,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) · 3860 unmodified lines | |||
| 3861 | if (debug_value == 0) /* no output */ | 3861 | if (debug_value == 0) /* no output */ |
| 3862 | return 0; | 3862 | return 0; |
| 3863 | /* set low N bits */ | 3863 | /* set low N bits */ |
| 3864 | return (1 << debug_value) - 1; | 3864 | return (1U << debug_value) - 1; |
| 3865 | } | 3865 | } |
| 3866 | 3866 | ||
| 3867 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) | 3867 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) |
| @@ -992,6 +992,14 @@ static inline int genphy_no_soft_reset(struct phy_device *phydev) · 991 unmodified lines | |||
| 992 | { | 992 | { |
| 993 | return 0; | 993 | return 0; |
| 994 | } | 994 | } |
| 995 | static inline int genphy_no_ack_interrupt(struct phy_device *phydev) | ||
| 996 | { | ||
| 997 | return 0; | ||
| 998 | } | ||
| 999 | static inline int genphy_no_config_intr(struct phy_device *phydev) | ||
| 1000 | { | ||
| 1001 | return 0; | ||
| 1002 | } | ||
| 995 | int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, | 1003 | int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, |
| 996 | u16 regnum); | 1004 | u16 regnum); |
| 997 | int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum, | 1005 | int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum, |
| @@ -739,12 +739,6 @@ struct task_struct { · 738 unmodified lines | |||
| 739 | unsigned use_memdelay:1; | 739 | unsigned use_memdelay:1; |
| 740 | #endif | 740 | #endif |
| 741 | 741 | ||
| 742 | /* | ||
| 743 | * May usercopy functions fault on kernel addresses? | ||
| 744 | * This is not just a single bit because this can potentially nest. | ||
| 745 | */ | ||
| 746 | unsigned int kernel_uaccess_faults_ok; | ||
| 747 | |||
| 748 | unsigned long atomic_flags; /* Flags requiring atomic access. */ | 742 | unsigned long atomic_flags; /* Flags requiring atomic access. */ |
| 749 | 743 | ||
| 750 | struct restart_block restart_block; | 744 | struct restart_block restart_block; |
| @@ -2434,7 +2434,7 @@ static inline void skb_probe_transport_header(struct sk_buff *skb, · 2433 unmodified lines | |||
| 2434 | 2434 | ||
| 2435 | if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0)) | 2435 | if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0)) |
| 2436 | skb_set_transport_header(skb, keys.control.thoff); | 2436 | skb_set_transport_header(skb, keys.control.thoff); |
| 2437 | else | 2437 | else if (offset_hint >= 0) |
| 2438 | skb_set_transport_header(skb, offset_hint); | 2438 | skb_set_transport_header(skb, offset_hint); |
| 2439 | } | 2439 | } |
| 2440 | 2440 | ||
| @@ -4212,6 +4212,12 @@ static inline bool skb_is_gso_sctp(const struct sk_buff *skb) · 1771 unmodified lines | |||
| 4212 | return skb_shinfo(skb)->gso_type & SKB_GSO_SCTP; | 4212 | return skb_shinfo(skb)->gso_type & SKB_GSO_SCTP; |
| 4213 | } | 4213 | } |
| 4214 | 4214 | ||
| 4215 | static inline bool skb_is_gso_tcp(const struct sk_buff *skb) | ||
| 4216 | { | ||
| 4217 | return skb_is_gso(skb) && | ||
| 4218 | skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6); | ||
| 4219 | } | ||
| 4220 | |||
| 4215 | static inline void skb_gso_reset(struct sk_buff *skb) | 4221 | static inline void skb_gso_reset(struct sk_buff *skb) |
| 4216 | { | 4222 | { |
| 4217 | skb_shinfo(skb)->gso_size = 0; | 4223 | skb_shinfo(skb)->gso_size = 0; |
| @@ -57,6 +57,25 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 56 unmodified lines | |||
| 57 | 57 | ||
| 58 | if (!skb_partial_csum_set(skb, start, off)) | 58 | if (!skb_partial_csum_set(skb, start, off)) |
| 59 | return -EINVAL; | 59 | return -EINVAL; |
| 60 | } else { | ||
| 61 | /* gso packets without NEEDS_CSUM do not set transport_offset. | ||
| 62 | * probe and drop if does not match one of the above types. | ||
| 63 | */ | ||
| 64 | if (gso_type && skb->network_header) { | ||
| 65 | if (!skb->protocol) | ||
| 66 | virtio_net_hdr_set_proto(skb, hdr); | ||
| 67 | retry: | ||
| 68 | skb_probe_transport_header(skb, -1); | ||
| 69 | if (!skb_transport_header_was_set(skb)) { | ||
| 70 | /* UFO does not specify ipv4 or 6: try both */ | ||
| 71 | if (gso_type & SKB_GSO_UDP && | ||
| 72 | skb->protocol == htons(ETH_P_IP)) { | ||
| 73 | skb->protocol = htons(ETH_P_IPV6); | ||
| 74 | goto retry; | ||
| 75 | } | ||
| 76 | return -EINVAL; | ||
| 77 | } | ||
| 78 | } | ||
| 60 | } | 79 | } |
| 61 | 80 | ||
| 62 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { | 81 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { |