Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.4 commit in: /
Date: Wed, 05 Jan 2022 12:57:55
Message-Id: 1641387458.d4b0288021f24da65fd15c65111ed1cffb3d8a98.mpagano@gentoo
1 commit: d4b0288021f24da65fd15c65111ed1cffb3d8a98
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 5 12:57:38 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 5 12:57:38 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d4b02880
7
8 Linux patch 4.4.298
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1297_linux-4.4.298.patch | 233 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 237 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 2053f8cf..4f49f59c 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -1231,6 +1231,10 @@ Patch: 1296_linux-4.4.297.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.4.297
23
24 +Patch: 1297_linux-4.4.298.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.4.298
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/1297_linux-4.4.298.patch b/1297_linux-4.4.298.patch
33 new file mode 100644
34 index 00000000..1e17ee7b
35 --- /dev/null
36 +++ b/1297_linux-4.4.298.patch
37 @@ -0,0 +1,233 @@
38 +diff --git a/Makefile b/Makefile
39 +index 6bc764fb1b971..f35474e260f1c 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,6 +1,6 @@
43 + VERSION = 4
44 + PATCHLEVEL = 4
45 +-SUBLEVEL = 297
46 ++SUBLEVEL = 298
47 + EXTRAVERSION =
48 + NAME = Blurry Fish Butt
49 +
50 +diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c
51 +index f4445a4e8d6a5..cfa1be4ad8689 100644
52 +--- a/drivers/input/joystick/spaceball.c
53 ++++ b/drivers/input/joystick/spaceball.c
54 +@@ -35,6 +35,7 @@
55 + #include <linux/module.h>
56 + #include <linux/input.h>
57 + #include <linux/serio.h>
58 ++#include <asm/unaligned.h>
59 +
60 + #define DRIVER_DESC "SpaceTec SpaceBall 2003/3003/4000 FLX driver"
61 +
62 +@@ -91,9 +92,15 @@ static void spaceball_process_packet(struct spaceball* spaceball)
63 +
64 + case 'D': /* Ball data */
65 + if (spaceball->idx != 15) return;
66 +- for (i = 0; i < 6; i++)
67 ++ /*
68 ++ * Skip first three bytes; read six axes worth of data.
69 ++ * Axis values are signed 16-bit big-endian.
70 ++ */
71 ++ data += 3;
72 ++ for (i = 0; i < ARRAY_SIZE(spaceball_axes); i++) {
73 + input_report_abs(dev, spaceball_axes[i],
74 +- (__s16)((data[2 * i + 3] << 8) | data[2 * i + 2]));
75 ++ (__s16)get_unaligned_be16(&data[i * 2]));
76 ++ }
77 + break;
78 +
79 + case 'K': /* Button data */
80 +diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
81 +index ef234c9b2f2f5..11773838a34d4 100644
82 +--- a/drivers/input/mouse/appletouch.c
83 ++++ b/drivers/input/mouse/appletouch.c
84 +@@ -929,6 +929,8 @@ static int atp_probe(struct usb_interface *iface,
85 + set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
86 + set_bit(BTN_LEFT, input_dev->keybit);
87 +
88 ++ INIT_WORK(&dev->work, atp_reinit);
89 ++
90 + error = input_register_device(dev->input);
91 + if (error)
92 + goto err_free_buffer;
93 +@@ -936,8 +938,6 @@ static int atp_probe(struct usb_interface *iface,
94 + /* save our data pointer in this interface device */
95 + usb_set_intfdata(iface, dev);
96 +
97 +- INIT_WORK(&dev->work, atp_reinit);
98 +-
99 + return 0;
100 +
101 + err_free_buffer:
102 +diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
103 +index 976efeb3f2ba3..a0f10ccdca3e4 100644
104 +--- a/drivers/platform/x86/apple-gmux.c
105 ++++ b/drivers/platform/x86/apple-gmux.c
106 +@@ -461,7 +461,7 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
107 + }
108 +
109 + gmux_data->iostart = res->start;
110 +- gmux_data->iolen = res->end - res->start;
111 ++ gmux_data->iolen = resource_size(res);
112 +
113 + if (gmux_data->iolen < GMUX_MIN_IO_LEN) {
114 + pr_err("gmux I/O region too small (%lu < %u)\n",
115 +diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
116 +index d25cf084afe74..b0fd017abebd6 100644
117 +--- a/drivers/scsi/vmw_pvscsi.c
118 ++++ b/drivers/scsi/vmw_pvscsi.c
119 +@@ -562,9 +562,12 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
120 + * Commands like INQUIRY may transfer less data than
121 + * requested by the initiator via bufflen. Set residual
122 + * count to make upper layer aware of the actual amount
123 +- * of data returned.
124 ++ * of data returned. There are cases when controller
125 ++ * returns zero dataLen with non zero data - do not set
126 ++ * residual count in that case.
127 + */
128 +- scsi_set_resid(cmd, scsi_bufflen(cmd) - e->dataLen);
129 ++ if (e->dataLen && (e->dataLen < scsi_bufflen(cmd)))
130 ++ scsi_set_resid(cmd, scsi_bufflen(cmd) - e->dataLen);
131 + cmd->result = (DID_OK << 16);
132 + break;
133 +
134 +diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
135 +index c045d4176a9c4..390e592358e63 100644
136 +--- a/drivers/usb/gadget/function/f_fs.c
137 ++++ b/drivers/usb/gadget/function/f_fs.c
138 +@@ -1476,11 +1476,15 @@ static void ffs_data_clear(struct ffs_data *ffs)
139 +
140 + BUG_ON(ffs->gadget);
141 +
142 +- if (ffs->epfiles)
143 ++ if (ffs->epfiles) {
144 + ffs_epfiles_destroy(ffs->epfiles, ffs->eps_count);
145 ++ ffs->epfiles = NULL;
146 ++ }
147 +
148 +- if (ffs->ffs_eventfd)
149 ++ if (ffs->ffs_eventfd) {
150 + eventfd_ctx_put(ffs->ffs_eventfd);
151 ++ ffs->ffs_eventfd = NULL;
152 ++ }
153 +
154 + kfree(ffs->raw_descs_data);
155 + kfree(ffs->raw_strings);
156 +@@ -1493,7 +1497,6 @@ static void ffs_data_reset(struct ffs_data *ffs)
157 +
158 + ffs_data_clear(ffs);
159 +
160 +- ffs->epfiles = NULL;
161 + ffs->raw_descs_data = NULL;
162 + ffs->raw_descs = NULL;
163 + ffs->raw_strings = NULL;
164 +diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
165 +index fd7925f20a6ad..2fb202da44b80 100644
166 +--- a/drivers/usb/host/xhci-pci.c
167 ++++ b/drivers/usb/host/xhci-pci.c
168 +@@ -91,7 +91,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
169 + /* Look for vendor-specific quirks */
170 + if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
171 + (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK ||
172 +- pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1100 ||
173 + pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1400)) {
174 + if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK &&
175 + pdev->revision == 0x0) {
176 +@@ -126,6 +125,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
177 + pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1009)
178 + xhci->quirks |= XHCI_BROKEN_STREAMS;
179 +
180 ++ if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
181 ++ pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1100)
182 ++ xhci->quirks |= XHCI_TRUST_TX_LENGTH;
183 ++
184 + if (pdev->vendor == PCI_VENDOR_ID_NEC)
185 + xhci->quirks |= XHCI_NEC_HOST;
186 +
187 +diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
188 +index 399f39ff8048d..1b6d54a328bad 100644
189 +--- a/include/uapi/linux/nfc.h
190 ++++ b/include/uapi/linux/nfc.h
191 +@@ -261,7 +261,7 @@ enum nfc_sdp_attr {
192 + #define NFC_SE_ENABLED 0x1
193 +
194 + struct sockaddr_nfc {
195 +- sa_family_t sa_family;
196 ++ __kernel_sa_family_t sa_family;
197 + __u32 dev_idx;
198 + __u32 target_idx;
199 + __u32 nfc_protocol;
200 +@@ -269,14 +269,14 @@ struct sockaddr_nfc {
201 +
202 + #define NFC_LLCP_MAX_SERVICE_NAME 63
203 + struct sockaddr_nfc_llcp {
204 +- sa_family_t sa_family;
205 ++ __kernel_sa_family_t sa_family;
206 + __u32 dev_idx;
207 + __u32 target_idx;
208 + __u32 nfc_protocol;
209 + __u8 dsap; /* Destination SAP, if known */
210 + __u8 ssap; /* Source SAP to be bound to */
211 + char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
212 +- size_t service_name_len;
213 ++ __kernel_size_t service_name_len;
214 + };
215 +
216 + /* NFC socket protocols */
217 +diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
218 +index b12721ecb0b68..48d2ae83e268c 100644
219 +--- a/net/ipv4/af_inet.c
220 ++++ b/net/ipv4/af_inet.c
221 +@@ -1770,6 +1770,10 @@ static int __init inet_init(void)
222 +
223 + tcp_v4_init();
224 +
225 ++ /* Initialise per-cpu ipv4 mibs */
226 ++ if (init_ipv4_mibs())
227 ++ panic("%s: Cannot init ipv4 mibs\n", __func__);
228 ++
229 + /* Setup TCP slab cache for open requests. */
230 + tcp_init();
231 +
232 +@@ -1798,12 +1802,6 @@ static int __init inet_init(void)
233 +
234 + if (init_inet_pernet_ops())
235 + pr_crit("%s: Cannot init ipv4 inet pernet ops\n", __func__);
236 +- /*
237 +- * Initialise per-cpu ipv4 mibs
238 +- */
239 +-
240 +- if (init_ipv4_mibs())
241 +- pr_crit("%s: Cannot init ipv4 mibs\n", __func__);
242 +
243 + ipv4_proc_init();
244 +
245 +diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
246 +index b690b294fc36b..e1de4423abce9 100755
247 +--- a/scripts/recordmcount.pl
248 ++++ b/scripts/recordmcount.pl
249 +@@ -248,7 +248,7 @@ if ($arch eq "x86_64") {
250 +
251 + } elsif ($arch eq "s390" && $bits == 64) {
252 + if ($cc =~ /-DCC_USING_HOTPATCH/) {
253 +- $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*(bcrl\\s*0,|jgnop\\s*)[0-9a-f]+ <([^\+]*)>\$";
254 ++ $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*(brcl\\s*0,|jgnop\\s*)[0-9a-f]+ <([^\+]*)>\$";
255 + $mcount_adjust = 0;
256 + } else {
257 + $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$";
258 +diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
259 +index 44f4495e3fbd9..55d253c6ab2fb 100644
260 +--- a/security/selinux/hooks.c
261 ++++ b/security/selinux/hooks.c
262 +@@ -4974,7 +4974,7 @@ static unsigned int selinux_ip_postroute_compat(struct sk_buff *skb,
263 + struct common_audit_data ad;
264 + struct lsm_network_audit net = {0,};
265 + char *addrp;
266 +- u8 proto;
267 ++ u8 proto = 0;
268 +
269 + if (sk == NULL)
270 + return NF_ACCEPT;