History

Merge drm/drm-next into drm-misc-next

Picking up v5.0 + missed misc-fixes from last release

Sean Paul committed 7 years ago

Commit cd7d3a12 parents 6b5c029 4b057e7545 files · +8028 −4060Browse files

Showing the changes to include/linux (7 of 545 files). Show all

Unified · Split

7 files
  1. include/linux/key-type.h +6 −16
  2. include/linux/netdev_features.h +22 −2
  3. include/linux/netdevice.h +1 −1
  4. include/linux/phy.h +8 −0
  5. include/linux/sched.h +0 −6
  6. include/linux/skbuff.h +7 −1
  7. include/linux/virtio_net.h +19 −0
include/linux/key-type.h+6−16
@@ -20,15 +20,6 @@ · 19 unmodified lines
2020 struct kernel_pkey_query;
2121 struct kernel_pkey_params;
2222
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−
3223 /*
3324 * Pre-parsed payload, used by key add, update and instantiate.
3425 *
@@ -50,8 +41,7 @@ struct key_preparsed_payload { · 15 unmodified lines
5041 time64_t expiry; /* Expiry time of key */
5142 } __randomize_layout;
5243
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);
5545
5646 /*
5747 * Preparsed matching criterion.
@@ -181,20 +171,20 @@ extern int key_instantiate_and_link(struct key *key, · 123 unmodified lines
181171 const void *data,
182172 size_t datalen,
183173 struct key *keyring,
184− struct key *instkey);
174+ struct key *authkey);
185175 extern int key_reject_and_link(struct key *key,
186176 unsigned timeout,
187177 unsigned error,
188178 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);
191181
192182 static inline int key_negate_and_link(struct key *key,
193183 unsigned timeout,
194184 struct key *keyring,
195− struct key *instkey)
185+ struct key *authkey)
196186 {
197− return key_reject_and_link(key, timeout, ENOKEY, keyring, instkey);
187+ return key_reject_and_link(key, timeout, ENOKEY, keyring, authkey);
198188 }
199189
200190 extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep);
include/linux/netdev_features.h+22−2
@@ -11,6 +11,8 @@ · 10 unmodified lines
1111 #define _LINUX_NETDEV_FEATURES_H
1212
1313 #include <linux/types.h>
14+#include <linux/bitops.h>
15+#include <asm/byteorder.h>
1416
1517 typedef u64 netdev_features_t;
1618
@@ -154,8 +156,26 @@ enum { · 137 unmodified lines
154156 #define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX)
155157 #define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX)
156158
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))
159179
160180 /* Features valid for ethtool to change */
161181 /* = all defined minus driver/device-class-related */
include/linux/netdevice.h+1−1
@@ -3861,7 +3861,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) · 3860 unmodified lines
38613861 if (debug_value == 0) /* no output */
38623862 return 0;
38633863 /* set low N bits */
3864− return (1 << debug_value) - 1;
3864+ return (1U << debug_value) - 1;
38653865 }
38663866
38673867 static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu)
include/linux/phy.h+8−0
@@ -992,6 +992,14 @@ static inline int genphy_no_soft_reset(struct phy_device *phydev) · 991 unmodified lines
992992 {
993993 return 0;
994994 }
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+}
9951003 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad,
9961004 u16 regnum);
9971005 int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum,
include/linux/sched.h+0−6
@@ -739,12 +739,6 @@ struct task_struct { · 738 unmodified lines
739739 unsigned use_memdelay:1;
740740 #endif
741741
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−
748742 unsigned long atomic_flags; /* Flags requiring atomic access. */
749743
750744 struct restart_block restart_block;
include/linux/skbuff.h+7−1
@@ -2434,7 +2434,7 @@ static inline void skb_probe_transport_header(struct sk_buff *skb, · 2433 unmodified lines
24342434
24352435 if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0))
24362436 skb_set_transport_header(skb, keys.control.thoff);
2437− else
2437+ else if (offset_hint >= 0)
24382438 skb_set_transport_header(skb, offset_hint);
24392439 }
24402440
@@ -4212,6 +4212,12 @@ static inline bool skb_is_gso_sctp(const struct sk_buff *skb) · 1771 unmodified lines
42124212 return skb_shinfo(skb)->gso_type & SKB_GSO_SCTP;
42134213 }
42144214
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+
42154221 static inline void skb_gso_reset(struct sk_buff *skb)
42164222 {
42174223 skb_shinfo(skb)->gso_size = 0;
include/linux/virtio_net.h+19−0
@@ -57,6 +57,25 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 56 unmodified lines
5757
5858 if (!skb_partial_csum_set(skb, start, off))
5959 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+ }
6079 }
6180
6281 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t