1 |
commit: 522c40275ae0a217e0c6ca0507d8e22e000f53ef |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 30 13:01:16 2015 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 30 13:01:16 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=522c4027 |
7 |
|
8 |
Linux patch 3.10.82 |
9 |
|
10 |
0000_README | 4 + |
11 |
1081_linux-3.10.82.patch | 263 +++++++++++++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 267 insertions(+) |
13 |
|
14 |
diff --git a/0000_README b/0000_README |
15 |
index 574c6c0..5e45831 100644 |
16 |
--- a/0000_README |
17 |
+++ b/0000_README |
18 |
@@ -366,6 +366,10 @@ Patch: 1080_linux-3.10.81.patch |
19 |
From: http://www.kernel.org |
20 |
Desc: Linux 3.10.81 |
21 |
|
22 |
+Patch: 1081_linux-3.10.82.patch |
23 |
+From: http://www.kernel.org |
24 |
+Desc: Linux 3.10.82 |
25 |
+ |
26 |
Patch: 1500_XATTR_USER_PREFIX.patch |
27 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
28 |
Desc: Support for namespace user.pax.* on tmpfs. |
29 |
|
30 |
diff --git a/1081_linux-3.10.82.patch b/1081_linux-3.10.82.patch |
31 |
new file mode 100644 |
32 |
index 0000000..b14a1fe |
33 |
--- /dev/null |
34 |
+++ b/1081_linux-3.10.82.patch |
35 |
@@ -0,0 +1,263 @@ |
36 |
+diff --git a/Makefile b/Makefile |
37 |
+index 6d19e37d36d5..5e3e665a10b7 100644 |
38 |
+--- a/Makefile |
39 |
++++ b/Makefile |
40 |
+@@ -1,6 +1,6 @@ |
41 |
+ VERSION = 3 |
42 |
+ PATCHLEVEL = 10 |
43 |
+-SUBLEVEL = 81 |
44 |
++SUBLEVEL = 82 |
45 |
+ EXTRAVERSION = |
46 |
+ NAME = TOSSUG Baby Fish |
47 |
+ |
48 |
+diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c |
49 |
+index d1939a9539c0..04aefffb4dd9 100644 |
50 |
+--- a/drivers/crypto/caam/caamrng.c |
51 |
++++ b/drivers/crypto/caam/caamrng.c |
52 |
+@@ -56,7 +56,7 @@ |
53 |
+ |
54 |
+ /* Buffer, its dma address and lock */ |
55 |
+ struct buf_data { |
56 |
+- u8 buf[RN_BUF_SIZE]; |
57 |
++ u8 buf[RN_BUF_SIZE] ____cacheline_aligned; |
58 |
+ dma_addr_t addr; |
59 |
+ struct completion filled; |
60 |
+ u32 hw_desc[DESC_JOB_O_LEN]; |
61 |
+diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c |
62 |
+index f6341e8622ee..7bd2acce9f81 100644 |
63 |
+--- a/drivers/gpu/drm/mgag200/mgag200_mode.c |
64 |
++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c |
65 |
+@@ -1487,6 +1487,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector, |
66 |
+ return MODE_BANDWIDTH; |
67 |
+ } |
68 |
+ |
69 |
++ if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 || |
70 |
++ (mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) { |
71 |
++ return MODE_H_ILLEGAL; |
72 |
++ } |
73 |
++ |
74 |
+ if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 || |
75 |
+ mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 || |
76 |
+ mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 || |
77 |
+diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c |
78 |
+index 572579f87de4..90861416b9e9 100644 |
79 |
+--- a/drivers/scsi/lpfc/lpfc_sli.c |
80 |
++++ b/drivers/scsi/lpfc/lpfc_sli.c |
81 |
+@@ -263,6 +263,16 @@ lpfc_sli4_eq_get(struct lpfc_queue *q) |
82 |
+ return NULL; |
83 |
+ |
84 |
+ q->hba_index = idx; |
85 |
++ |
86 |
++ /* |
87 |
++ * insert barrier for instruction interlock : data from the hardware |
88 |
++ * must have the valid bit checked before it can be copied and acted |
89 |
++ * upon. Given what was seen in lpfc_sli4_cq_get() of speculative |
90 |
++ * instructions allowing action on content before valid bit checked, |
91 |
++ * add barrier here as well. May not be needed as "content" is a |
92 |
++ * single 32-bit entity here (vs multi word structure for cq's). |
93 |
++ */ |
94 |
++ mb(); |
95 |
+ return eqe; |
96 |
+ } |
97 |
+ |
98 |
+@@ -368,6 +378,17 @@ lpfc_sli4_cq_get(struct lpfc_queue *q) |
99 |
+ |
100 |
+ cqe = q->qe[q->hba_index].cqe; |
101 |
+ q->hba_index = idx; |
102 |
++ |
103 |
++ /* |
104 |
++ * insert barrier for instruction interlock : data from the hardware |
105 |
++ * must have the valid bit checked before it can be copied and acted |
106 |
++ * upon. Speculative instructions were allowing a bcopy at the start |
107 |
++ * of lpfc_sli4_fp_handle_wcqe(), which is called immediately |
108 |
++ * after our return, to copy data before the valid bit check above |
109 |
++ * was done. As such, some of the copied data was stale. The barrier |
110 |
++ * ensures the check is before any data is copied. |
111 |
++ */ |
112 |
++ mb(); |
113 |
+ return cqe; |
114 |
+ } |
115 |
+ |
116 |
+diff --git a/fs/pipe.c b/fs/pipe.c |
117 |
+index 0e0752ef2715..3e7ab278bb0c 100644 |
118 |
+--- a/fs/pipe.c |
119 |
++++ b/fs/pipe.c |
120 |
+@@ -117,25 +117,27 @@ void pipe_wait(struct pipe_inode_info *pipe) |
121 |
+ } |
122 |
+ |
123 |
+ static int |
124 |
+-pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len, |
125 |
+- int atomic) |
126 |
++pipe_iov_copy_from_user(void *addr, int *offset, struct iovec *iov, |
127 |
++ size_t *remaining, int atomic) |
128 |
+ { |
129 |
+ unsigned long copy; |
130 |
+ |
131 |
+- while (len > 0) { |
132 |
++ while (*remaining > 0) { |
133 |
+ while (!iov->iov_len) |
134 |
+ iov++; |
135 |
+- copy = min_t(unsigned long, len, iov->iov_len); |
136 |
++ copy = min_t(unsigned long, *remaining, iov->iov_len); |
137 |
+ |
138 |
+ if (atomic) { |
139 |
+- if (__copy_from_user_inatomic(to, iov->iov_base, copy)) |
140 |
++ if (__copy_from_user_inatomic(addr + *offset, |
141 |
++ iov->iov_base, copy)) |
142 |
+ return -EFAULT; |
143 |
+ } else { |
144 |
+- if (copy_from_user(to, iov->iov_base, copy)) |
145 |
++ if (copy_from_user(addr + *offset, |
146 |
++ iov->iov_base, copy)) |
147 |
+ return -EFAULT; |
148 |
+ } |
149 |
+- to += copy; |
150 |
+- len -= copy; |
151 |
++ *offset += copy; |
152 |
++ *remaining -= copy; |
153 |
+ iov->iov_base += copy; |
154 |
+ iov->iov_len -= copy; |
155 |
+ } |
156 |
+@@ -143,25 +145,27 @@ pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len, |
157 |
+ } |
158 |
+ |
159 |
+ static int |
160 |
+-pipe_iov_copy_to_user(struct iovec *iov, const void *from, unsigned long len, |
161 |
+- int atomic) |
162 |
++pipe_iov_copy_to_user(struct iovec *iov, void *addr, int *offset, |
163 |
++ size_t *remaining, int atomic) |
164 |
+ { |
165 |
+ unsigned long copy; |
166 |
+ |
167 |
+- while (len > 0) { |
168 |
++ while (*remaining > 0) { |
169 |
+ while (!iov->iov_len) |
170 |
+ iov++; |
171 |
+- copy = min_t(unsigned long, len, iov->iov_len); |
172 |
++ copy = min_t(unsigned long, *remaining, iov->iov_len); |
173 |
+ |
174 |
+ if (atomic) { |
175 |
+- if (__copy_to_user_inatomic(iov->iov_base, from, copy)) |
176 |
++ if (__copy_to_user_inatomic(iov->iov_base, |
177 |
++ addr + *offset, copy)) |
178 |
+ return -EFAULT; |
179 |
+ } else { |
180 |
+- if (copy_to_user(iov->iov_base, from, copy)) |
181 |
++ if (copy_to_user(iov->iov_base, |
182 |
++ addr + *offset, copy)) |
183 |
+ return -EFAULT; |
184 |
+ } |
185 |
+- from += copy; |
186 |
+- len -= copy; |
187 |
++ *offset += copy; |
188 |
++ *remaining -= copy; |
189 |
+ iov->iov_base += copy; |
190 |
+ iov->iov_len -= copy; |
191 |
+ } |
192 |
+@@ -395,7 +399,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov, |
193 |
+ struct pipe_buffer *buf = pipe->bufs + curbuf; |
194 |
+ const struct pipe_buf_operations *ops = buf->ops; |
195 |
+ void *addr; |
196 |
+- size_t chars = buf->len; |
197 |
++ size_t chars = buf->len, remaining; |
198 |
+ int error, atomic; |
199 |
+ |
200 |
+ if (chars > total_len) |
201 |
+@@ -409,9 +413,11 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov, |
202 |
+ } |
203 |
+ |
204 |
+ atomic = !iov_fault_in_pages_write(iov, chars); |
205 |
++ remaining = chars; |
206 |
+ redo: |
207 |
+ addr = ops->map(pipe, buf, atomic); |
208 |
+- error = pipe_iov_copy_to_user(iov, addr + buf->offset, chars, atomic); |
209 |
++ error = pipe_iov_copy_to_user(iov, addr, &buf->offset, |
210 |
++ &remaining, atomic); |
211 |
+ ops->unmap(pipe, buf, addr); |
212 |
+ if (unlikely(error)) { |
213 |
+ /* |
214 |
+@@ -426,7 +432,6 @@ redo: |
215 |
+ break; |
216 |
+ } |
217 |
+ ret += chars; |
218 |
+- buf->offset += chars; |
219 |
+ buf->len -= chars; |
220 |
+ |
221 |
+ /* Was it a packet buffer? Clean up and exit */ |
222 |
+@@ -531,6 +536,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov, |
223 |
+ if (ops->can_merge && offset + chars <= PAGE_SIZE) { |
224 |
+ int error, atomic = 1; |
225 |
+ void *addr; |
226 |
++ size_t remaining = chars; |
227 |
+ |
228 |
+ error = ops->confirm(pipe, buf); |
229 |
+ if (error) |
230 |
+@@ -539,8 +545,8 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov, |
231 |
+ iov_fault_in_pages_read(iov, chars); |
232 |
+ redo1: |
233 |
+ addr = ops->map(pipe, buf, atomic); |
234 |
+- error = pipe_iov_copy_from_user(offset + addr, iov, |
235 |
+- chars, atomic); |
236 |
++ error = pipe_iov_copy_from_user(addr, &offset, iov, |
237 |
++ &remaining, atomic); |
238 |
+ ops->unmap(pipe, buf, addr); |
239 |
+ ret = error; |
240 |
+ do_wakeup = 1; |
241 |
+@@ -575,6 +581,8 @@ redo1: |
242 |
+ struct page *page = pipe->tmp_page; |
243 |
+ char *src; |
244 |
+ int error, atomic = 1; |
245 |
++ int offset = 0; |
246 |
++ size_t remaining; |
247 |
+ |
248 |
+ if (!page) { |
249 |
+ page = alloc_page(GFP_HIGHUSER); |
250 |
+@@ -595,14 +603,15 @@ redo1: |
251 |
+ chars = total_len; |
252 |
+ |
253 |
+ iov_fault_in_pages_read(iov, chars); |
254 |
++ remaining = chars; |
255 |
+ redo2: |
256 |
+ if (atomic) |
257 |
+ src = kmap_atomic(page); |
258 |
+ else |
259 |
+ src = kmap(page); |
260 |
+ |
261 |
+- error = pipe_iov_copy_from_user(src, iov, chars, |
262 |
+- atomic); |
263 |
++ error = pipe_iov_copy_from_user(src, &offset, iov, |
264 |
++ &remaining, atomic); |
265 |
+ if (atomic) |
266 |
+ kunmap_atomic(src); |
267 |
+ else |
268 |
+diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c |
269 |
+index 0a1edc694d67..fe3e086d38e9 100644 |
270 |
+--- a/kernel/trace/trace_events_filter.c |
271 |
++++ b/kernel/trace/trace_events_filter.c |
272 |
+@@ -1328,19 +1328,24 @@ static int check_preds(struct filter_parse_state *ps) |
273 |
+ { |
274 |
+ int n_normal_preds = 0, n_logical_preds = 0; |
275 |
+ struct postfix_elt *elt; |
276 |
++ int cnt = 0; |
277 |
+ |
278 |
+ list_for_each_entry(elt, &ps->postfix, list) { |
279 |
+- if (elt->op == OP_NONE) |
280 |
++ if (elt->op == OP_NONE) { |
281 |
++ cnt++; |
282 |
+ continue; |
283 |
++ } |
284 |
+ |
285 |
++ cnt--; |
286 |
+ if (elt->op == OP_AND || elt->op == OP_OR) { |
287 |
+ n_logical_preds++; |
288 |
+ continue; |
289 |
+ } |
290 |
+ n_normal_preds++; |
291 |
++ WARN_ON_ONCE(cnt < 0); |
292 |
+ } |
293 |
+ |
294 |
+- if (!n_normal_preds || n_logical_preds >= n_normal_preds) { |
295 |
++ if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) { |
296 |
+ parse_error(ps, FILT_ERR_INVALID_FILTER, 0); |
297 |
+ return -EINVAL; |
298 |
+ } |