Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.14 commit in: /
Date: Fri, 31 Jul 2020 17:56:29
Message-Id: 1596218171.3cb8990c8709a9dbf325aa48a490cb8acbcfc3d5.mpagano@gentoo
1 commit: 3cb8990c8709a9dbf325aa48a490cb8acbcfc3d5
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 31 17:56:11 2020 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 31 17:56:11 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3cb8990c
7
8 Linux patch 4.14.191
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1190_linux-4.14.191.patch | 385 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 389 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index d75f6b6..a0f0dc8 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -803,6 +803,10 @@ Patch: 1189_linux-4.14.190.patch
21 From: https://www.kernel.org
22 Desc: Linux 4.14.190
23
24 +Patch: 1190_linux-4.14.191.patch
25 +From: https://www.kernel.org
26 +Desc: Linux 4.14.191
27 +
28 Patch: 1500_XATTR_USER_PREFIX.patch
29 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
30 Desc: Support for namespace user.pax.* on tmpfs.
31
32 diff --git a/1190_linux-4.14.191.patch b/1190_linux-4.14.191.patch
33 new file mode 100644
34 index 0000000..a324207
35 --- /dev/null
36 +++ b/1190_linux-4.14.191.patch
37 @@ -0,0 +1,385 @@
38 +diff --git a/Makefile b/Makefile
39 +index 4e5f6615fd98..e31c1ce12895 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 4
45 + PATCHLEVEL = 14
46 +-SUBLEVEL = 190
47 ++SUBLEVEL = 191
48 + EXTRAVERSION =
49 + NAME = Petit Gorille
50 +
51 +diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
52 +index 36ce3511c733..7d0c83b47259 100644
53 +--- a/drivers/base/regmap/regmap-debugfs.c
54 ++++ b/drivers/base/regmap/regmap-debugfs.c
55 +@@ -204,6 +204,9 @@ static ssize_t regmap_read_debugfs(struct regmap *map, unsigned int from,
56 + if (*ppos < 0 || !count)
57 + return -EINVAL;
58 +
59 ++ if (count > (PAGE_SIZE << (MAX_ORDER - 1)))
60 ++ count = PAGE_SIZE << (MAX_ORDER - 1);
61 ++
62 + buf = kmalloc(count, GFP_KERNEL);
63 + if (!buf)
64 + return -ENOMEM;
65 +@@ -352,6 +355,9 @@ static ssize_t regmap_reg_ranges_read_file(struct file *file,
66 + if (*ppos < 0 || !count)
67 + return -EINVAL;
68 +
69 ++ if (count > (PAGE_SIZE << (MAX_ORDER - 1)))
70 ++ count = PAGE_SIZE << (MAX_ORDER - 1);
71 ++
72 + buf = kmalloc(count, GFP_KERNEL);
73 + if (!buf)
74 + return -ENOMEM;
75 +diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
76 +index 3eaefecd4448..229cab00c4b0 100644
77 +--- a/drivers/net/wan/x25_asy.c
78 ++++ b/drivers/net/wan/x25_asy.c
79 +@@ -183,7 +183,7 @@ static inline void x25_asy_unlock(struct x25_asy *sl)
80 + netif_wake_queue(sl->dev);
81 + }
82 +
83 +-/* Send one completely decapsulated IP datagram to the IP layer. */
84 ++/* Send an LAPB frame to the LAPB module to process. */
85 +
86 + static void x25_asy_bump(struct x25_asy *sl)
87 + {
88 +@@ -195,13 +195,12 @@ static void x25_asy_bump(struct x25_asy *sl)
89 + count = sl->rcount;
90 + dev->stats.rx_bytes += count;
91 +
92 +- skb = dev_alloc_skb(count+1);
93 ++ skb = dev_alloc_skb(count);
94 + if (skb == NULL) {
95 + netdev_warn(sl->dev, "memory squeeze, dropping packet\n");
96 + dev->stats.rx_dropped++;
97 + return;
98 + }
99 +- skb_push(skb, 1); /* LAPB internal control */
100 + skb_put_data(skb, sl->rbuff, count);
101 + skb->protocol = x25_type_trans(skb, sl->dev);
102 + err = lapb_data_received(skb->dev, skb);
103 +@@ -209,7 +208,6 @@ static void x25_asy_bump(struct x25_asy *sl)
104 + kfree_skb(skb);
105 + printk(KERN_DEBUG "x25_asy: data received err - %d\n", err);
106 + } else {
107 +- netif_rx(skb);
108 + dev->stats.rx_packets++;
109 + }
110 + }
111 +@@ -355,12 +353,21 @@ static netdev_tx_t x25_asy_xmit(struct sk_buff *skb,
112 + */
113 +
114 + /*
115 +- * Called when I frame data arrives. We did the work above - throw it
116 +- * at the net layer.
117 ++ * Called when I frame data arrive. We add a pseudo header for upper
118 ++ * layers and pass it to upper layers.
119 + */
120 +
121 + static int x25_asy_data_indication(struct net_device *dev, struct sk_buff *skb)
122 + {
123 ++ if (skb_cow(skb, 1)) {
124 ++ kfree_skb(skb);
125 ++ return NET_RX_DROP;
126 ++ }
127 ++ skb_push(skb, 1);
128 ++ skb->data[0] = X25_IFACE_DATA;
129 ++
130 ++ skb->protocol = x25_type_trans(skb, dev);
131 ++
132 + return netif_rx(skb);
133 + }
134 +
135 +@@ -656,7 +663,7 @@ static void x25_asy_unesc(struct x25_asy *sl, unsigned char s)
136 + switch (s) {
137 + case X25_END:
138 + if (!test_and_clear_bit(SLF_ERROR, &sl->flags) &&
139 +- sl->rcount > 2)
140 ++ sl->rcount >= 2)
141 + x25_asy_bump(sl);
142 + clear_bit(SLF_ESCAPE, &sl->flags);
143 + sl->rcount = 0;
144 +diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
145 +index 84245d210182..2b07dadc5916 100644
146 +--- a/fs/xfs/libxfs/xfs_bmap.c
147 ++++ b/fs/xfs/libxfs/xfs_bmap.c
148 +@@ -761,12 +761,16 @@ xfs_bmap_extents_to_btree(
149 + *logflagsp = 0;
150 + if ((error = xfs_alloc_vextent(&args))) {
151 + xfs_iroot_realloc(ip, -1, whichfork);
152 ++ ASSERT(ifp->if_broot == NULL);
153 ++ XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_EXTENTS);
154 + xfs_btree_del_cursor(cur, XFS_BTREE_ERROR);
155 + return error;
156 + }
157 +
158 + if (WARN_ON_ONCE(args.fsbno == NULLFSBLOCK)) {
159 + xfs_iroot_realloc(ip, -1, whichfork);
160 ++ ASSERT(ifp->if_broot == NULL);
161 ++ XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_EXTENTS);
162 + xfs_btree_del_cursor(cur, XFS_BTREE_ERROR);
163 + return -ENOSPC;
164 + }
165 +diff --git a/include/linux/tcp.h b/include/linux/tcp.h
166 +index 60aea230dc6a..61eb40fef759 100644
167 +--- a/include/linux/tcp.h
168 ++++ b/include/linux/tcp.h
169 +@@ -209,6 +209,8 @@ struct tcp_sock {
170 + u8 reord; /* reordering detected */
171 + } rack;
172 + u16 advmss; /* Advertised MSS */
173 ++ u8 tlp_retrans:1, /* TLP is a retransmission */
174 ++ unused_1:7;
175 + u32 chrono_start; /* Start time in jiffies of a TCP chrono */
176 + u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */
177 + u8 chrono_type:2, /* current chronograph type */
178 +@@ -229,7 +231,7 @@ struct tcp_sock {
179 + syn_data_acked:1,/* data in SYN is acked by SYN-ACK */
180 + save_syn:1, /* Save headers of SYN packet */
181 + is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */
182 +- u32 tlp_high_seq; /* snd_nxt at the time of TLP retransmit. */
183 ++ u32 tlp_high_seq; /* snd_nxt at the time of TLP */
184 +
185 + /* RTT measurement */
186 + u64 tcp_mstamp; /* most recent packet received/sent */
187 +diff --git a/mm/page_owner.c b/mm/page_owner.c
188 +index 6ac05a6ff2d1..4753b317ef7b 100644
189 +--- a/mm/page_owner.c
190 ++++ b/mm/page_owner.c
191 +@@ -617,7 +617,6 @@ static void init_early_allocated_pages(void)
192 + {
193 + pg_data_t *pgdat;
194 +
195 +- drain_all_pages(NULL);
196 + for_each_online_pgdat(pgdat)
197 + init_zones_in_node(pgdat);
198 + }
199 +diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
200 +index 89d074ce10fc..6915eebc7a4a 100644
201 +--- a/net/ax25/af_ax25.c
202 ++++ b/net/ax25/af_ax25.c
203 +@@ -1191,7 +1191,10 @@ static int __must_check ax25_connect(struct socket *sock,
204 + if (addr_len > sizeof(struct sockaddr_ax25) &&
205 + fsa->fsa_ax25.sax25_ndigis != 0) {
206 + /* Valid number of digipeaters ? */
207 +- if (fsa->fsa_ax25.sax25_ndigis < 1 || fsa->fsa_ax25.sax25_ndigis > AX25_MAX_DIGIS) {
208 ++ if (fsa->fsa_ax25.sax25_ndigis < 1 ||
209 ++ fsa->fsa_ax25.sax25_ndigis > AX25_MAX_DIGIS ||
210 ++ addr_len < sizeof(struct sockaddr_ax25) +
211 ++ sizeof(ax25_address) * fsa->fsa_ax25.sax25_ndigis) {
212 + err = -EINVAL;
213 + goto out_release;
214 + }
215 +@@ -1511,7 +1514,10 @@ static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
216 + struct full_sockaddr_ax25 *fsa = (struct full_sockaddr_ax25 *)usax;
217 +
218 + /* Valid number of digipeaters ? */
219 +- if (usax->sax25_ndigis < 1 || usax->sax25_ndigis > AX25_MAX_DIGIS) {
220 ++ if (usax->sax25_ndigis < 1 ||
221 ++ usax->sax25_ndigis > AX25_MAX_DIGIS ||
222 ++ addr_len < sizeof(struct sockaddr_ax25) +
223 ++ sizeof(ax25_address) * usax->sax25_ndigis) {
224 + err = -EINVAL;
225 + goto out;
226 + }
227 +diff --git a/net/core/dev.c b/net/core/dev.c
228 +index 1ee177485fd0..7ec549e481e3 100644
229 +--- a/net/core/dev.c
230 ++++ b/net/core/dev.c
231 +@@ -4626,7 +4626,7 @@ static void flush_backlog(struct work_struct *work)
232 + skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
233 + if (skb->dev->reg_state == NETREG_UNREGISTERING) {
234 + __skb_unlink(skb, &sd->input_pkt_queue);
235 +- kfree_skb(skb);
236 ++ dev_kfree_skb_irq(skb);
237 + input_queue_head_incr(sd);
238 + }
239 + }
240 +diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
241 +index baf771d2d088..9d012255cedc 100644
242 +--- a/net/core/net-sysfs.c
243 ++++ b/net/core/net-sysfs.c
244 +@@ -1028,7 +1028,7 @@ static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf)
245 + trans_timeout = queue->trans_timeout;
246 + spin_unlock_irq(&queue->_xmit_lock);
247 +
248 +- return sprintf(buf, "%lu", trans_timeout);
249 ++ return sprintf(buf, fmt_ulong, trans_timeout);
250 + }
251 +
252 + static unsigned int get_netdev_queue_index(struct netdev_queue *queue)
253 +diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
254 +index cb15338cfda4..0168c700a201 100644
255 +--- a/net/core/rtnetlink.c
256 ++++ b/net/core/rtnetlink.c
257 +@@ -2733,7 +2733,8 @@ replay:
258 + */
259 + if (err < 0) {
260 + /* If device is not registered at all, free it now */
261 +- if (dev->reg_state == NETREG_UNINITIALIZED)
262 ++ if (dev->reg_state == NETREG_UNINITIALIZED ||
263 ++ dev->reg_state == NETREG_UNREGISTERED)
264 + free_netdev(dev);
265 + goto out;
266 + }
267 +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
268 +index a2c26c2b3a94..83d03340417a 100644
269 +--- a/net/ipv4/tcp_input.c
270 ++++ b/net/ipv4/tcp_input.c
271 +@@ -3516,10 +3516,8 @@ static void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq)
272 + }
273 + }
274 +
275 +-/* This routine deals with acks during a TLP episode.
276 +- * We mark the end of a TLP episode on receiving TLP dupack or when
277 +- * ack is after tlp_high_seq.
278 +- * Ref: loss detection algorithm in draft-dukkipati-tcpm-tcp-loss-probe.
279 ++/* This routine deals with acks during a TLP episode and ends an episode by
280 ++ * resetting tlp_high_seq. Ref: TLP algorithm in draft-ietf-tcpm-rack
281 + */
282 + static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
283 + {
284 +@@ -3528,7 +3526,10 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
285 + if (before(ack, tp->tlp_high_seq))
286 + return;
287 +
288 +- if (flag & FLAG_DSACKING_ACK) {
289 ++ if (!tp->tlp_retrans) {
290 ++ /* TLP of new data has been acknowledged */
291 ++ tp->tlp_high_seq = 0;
292 ++ } else if (flag & FLAG_DSACKING_ACK) {
293 + /* This DSACK means original and TLP probe arrived; no loss */
294 + tp->tlp_high_seq = 0;
295 + } else if (after(ack, tp->tlp_high_seq)) {
296 +diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
297 +index 8fc14ad0726a..355ebae883c1 100644
298 +--- a/net/ipv4/tcp_output.c
299 ++++ b/net/ipv4/tcp_output.c
300 +@@ -2500,6 +2500,11 @@ void tcp_send_loss_probe(struct sock *sk)
301 + int pcount;
302 + int mss = tcp_current_mss(sk);
303 +
304 ++ /* At most one outstanding TLP */
305 ++ if (tp->tlp_high_seq)
306 ++ goto rearm_timer;
307 ++
308 ++ tp->tlp_retrans = 0;
309 + skb = tcp_send_head(sk);
310 + if (skb) {
311 + if (tcp_snd_wnd_test(tp, skb, mss)) {
312 +@@ -2522,10 +2527,6 @@ void tcp_send_loss_probe(struct sock *sk)
313 + return;
314 + }
315 +
316 +- /* At most one outstanding TLP retransmission. */
317 +- if (tp->tlp_high_seq)
318 +- goto rearm_timer;
319 +-
320 + if (skb_still_in_host_queue(sk, skb))
321 + goto rearm_timer;
322 +
323 +@@ -2546,10 +2547,12 @@ void tcp_send_loss_probe(struct sock *sk)
324 + if (__tcp_retransmit_skb(sk, skb, 1))
325 + goto rearm_timer;
326 +
327 ++ tp->tlp_retrans = 1;
328 ++
329 ++probe_sent:
330 + /* Record snd_nxt for loss detection. */
331 + tp->tlp_high_seq = tp->snd_nxt;
332 +
333 +-probe_sent:
334 + NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPLOSSPROBES);
335 + /* Reset s.t. tcp_rearm_rto will restart timer from now */
336 + inet_csk(sk)->icsk_pending = 0;
337 +diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
338 +index e33258d69246..f335dd4c84e2 100644
339 +--- a/net/ipv4/udp.c
340 ++++ b/net/ipv4/udp.c
341 +@@ -1894,7 +1894,7 @@ static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
342 + /*
343 + * UDP-Lite specific tests, ignored on UDP sockets
344 + */
345 +- if ((is_udplite & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
346 ++ if ((up->pcflag & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
347 +
348 + /*
349 + * MIB statistics other than incrementing the error count are
350 +diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
351 +index e07cc2cfc1a6..802457c0a121 100644
352 +--- a/net/ipv6/ip6_gre.c
353 ++++ b/net/ipv6/ip6_gre.c
354 +@@ -1169,15 +1169,16 @@ static void ip6gre_destroy_tunnels(struct net *net, struct list_head *head)
355 + static int __net_init ip6gre_init_net(struct net *net)
356 + {
357 + struct ip6gre_net *ign = net_generic(net, ip6gre_net_id);
358 ++ struct net_device *ndev;
359 + int err;
360 +
361 +- ign->fb_tunnel_dev = alloc_netdev(sizeof(struct ip6_tnl), "ip6gre0",
362 +- NET_NAME_UNKNOWN,
363 +- ip6gre_tunnel_setup);
364 +- if (!ign->fb_tunnel_dev) {
365 ++ ndev = alloc_netdev(sizeof(struct ip6_tnl), "ip6gre0",
366 ++ NET_NAME_UNKNOWN, ip6gre_tunnel_setup);
367 ++ if (!ndev) {
368 + err = -ENOMEM;
369 + goto err_alloc_dev;
370 + }
371 ++ ign->fb_tunnel_dev = ndev;
372 + dev_net_set(ign->fb_tunnel_dev, net);
373 + /* FB netdevice is special: we have one, and only one per netns.
374 + * Allowing to move it to another netns is clearly unsafe.
375 +@@ -1197,7 +1198,7 @@ static int __net_init ip6gre_init_net(struct net *net)
376 + return 0;
377 +
378 + err_reg_dev:
379 +- free_netdev(ign->fb_tunnel_dev);
380 ++ free_netdev(ndev);
381 + err_alloc_dev:
382 + return err;
383 + }
384 +diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
385 +index a2ba7356fa65..38ad3fac8c37 100644
386 +--- a/net/ipv6/udp.c
387 ++++ b/net/ipv6/udp.c
388 +@@ -629,7 +629,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
389 + /*
390 + * UDP-Lite specific tests, ignored on UDP sockets (see net/ipv4/udp.c).
391 + */
392 +- if ((is_udplite & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
393 ++ if ((up->pcflag & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) {
394 +
395 + if (up->pcrlen == 0) { /* full coverage was set */
396 + net_dbg_ratelimited("UDPLITE6: partial coverage %d while full coverage %d requested\n",
397 +diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
398 +index b74cde2fd214..e82e91fe6178 100644
399 +--- a/net/rxrpc/recvmsg.c
400 ++++ b/net/rxrpc/recvmsg.c
401 +@@ -445,7 +445,7 @@ try_again:
402 + list_empty(&rx->recvmsg_q) &&
403 + rx->sk.sk_state != RXRPC_SERVER_LISTENING) {
404 + release_sock(&rx->sk);
405 +- return -ENODATA;
406 ++ return -EAGAIN;
407 + }
408 +
409 + if (list_empty(&rx->recvmsg_q)) {
410 +diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
411 +index a980b49d7a4f..f4386ad975cf 100644
412 +--- a/net/rxrpc/sendmsg.c
413 ++++ b/net/rxrpc/sendmsg.c
414 +@@ -222,7 +222,7 @@ static int rxrpc_send_data(struct rxrpc_sock *rx,
415 + /* this should be in poll */
416 + sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk);
417 +
418 +- if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN))
419 ++ if (sk->sk_shutdown & SEND_SHUTDOWN)
420 + return -EPIPE;
421 +
422 + more = msg->msg_flags & MSG_MORE;