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 | 20 | struct kernel_pkey_query; |
| 21 | 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 | 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 | 41 | time64_t expiry; /* Expiry time of key */ |
| 51 | 42 | } __randomize_layout; |
| 52 | 43 | |
| 53 | −typedef int (*request_key_actor_t)(struct key_construction *key, | |
| 54 | − const char *op, void *aux); | |
| 44 | +typedef int (*request_key_actor_t)(struct key *auth_key, void *aux); | |
| 55 | 45 | |
| 56 | 46 | /* |
| 57 | 47 | * Preparsed matching criterion. |
| @@ -181,20 +171,20 @@ extern int key_instantiate_and_link(struct key *key, · 123 unmodified lines | ||
| 181 | 171 | const void *data, |
| 182 | 172 | size_t datalen, |
| 183 | 173 | struct key *keyring, |
| 184 | − struct key *instkey); | |
| 174 | + struct key *authkey); | |
| 185 | 175 | extern int key_reject_and_link(struct key *key, |
| 186 | 176 | unsigned timeout, |
| 187 | 177 | unsigned error, |
| 188 | 178 | struct key *keyring, |
| 189 | − struct key *instkey); | |
| 190 | −extern void complete_request_key(struct key_construction *cons, int error); | |
| 179 | + struct key *authkey); | |
| 180 | +extern void complete_request_key(struct key *authkey, int error); | |
| 191 | 181 | |
| 192 | 182 | static inline int key_negate_and_link(struct key *key, |
| 193 | 183 | unsigned timeout, |
| 194 | 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 | 190 | extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep); |
| @@ -11,6 +11,8 @@ · 10 unmodified lines | ||
| 11 | 11 | #define _LINUX_NETDEV_FEATURES_H |
| 12 | 12 | |
| 13 | 13 | #include <linux/types.h> |
| 14 | +#include <linux/bitops.h> | |
| 15 | +#include <asm/byteorder.h> | |
| 14 | 16 | |
| 15 | 17 | typedef u64 netdev_features_t; |
| 16 | 18 | |
| @@ -154,8 +156,26 @@ enum { · 137 unmodified lines | ||
| 154 | 156 | #define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX) |
| 155 | 157 | #define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX) |
| 156 | 158 | |
| 157 | −#define for_each_netdev_feature(mask_addr, bit) \ | |
| 158 | − for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) | |
| 159 | +/* Finds the next feature with the highest number of the range of start till 0. | |
| 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 | 180 | /* Features valid for ethtool to change */ |
| 161 | 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 | 3861 | if (debug_value == 0) /* no output */ |
| 3862 | 3862 | return 0; |
| 3863 | 3863 | /* set low N bits */ |
| 3864 | − return (1 << debug_value) - 1; | |
| 3864 | + return (1U << debug_value) - 1; | |
| 3865 | 3865 | } |
| 3866 | 3866 | |
| 3867 | 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 | 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 | 1003 | int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, |
| 996 | 1004 | u16 regnum); |
| 997 | 1005 | int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum, |
| @@ -739,12 +739,6 @@ struct task_struct { · 738 unmodified lines | ||
| 739 | 739 | unsigned use_memdelay:1; |
| 740 | 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 | 742 | unsigned long atomic_flags; /* Flags requiring atomic access. */ |
| 749 | 743 | |
| 750 | 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 | 2435 | if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0)) |
| 2436 | 2436 | skb_set_transport_header(skb, keys.control.thoff); |
| 2437 | − else | |
| 2437 | + else if (offset_hint >= 0) | |
| 2438 | 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 | 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 | 4221 | static inline void skb_gso_reset(struct sk_buff *skb) |
| 4216 | 4222 | { |
| 4217 | 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 | 58 | if (!skb_partial_csum_set(skb, start, off)) |
| 59 | 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 | 81 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { |