1 |
commit: 12c85964bf5a1b1c0aab230b94c2371004a4b360 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 26 09:11:53 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 26 09:11:53 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-patchset.git/commit/?id=12c85964 |
7 |
|
8 |
grsecurity-3.1-4.2.4-201510251836 |
9 |
|
10 |
4.2.4/0000_README | 2 +- |
11 |
...> 4420_grsecurity-3.1-4.2.4-201510251836.patch} | 193 ++++++++++++++++----- |
12 |
2 files changed, 153 insertions(+), 42 deletions(-) |
13 |
|
14 |
diff --git a/4.2.4/0000_README b/4.2.4/0000_README |
15 |
index ddc5a83..83460c6 100644 |
16 |
--- a/4.2.4/0000_README |
17 |
+++ b/4.2.4/0000_README |
18 |
@@ -6,7 +6,7 @@ Patch: 1003_linux-4.2.4.patch |
19 |
From: http://www.kernel.org |
20 |
Desc: Linux 4.2.4 |
21 |
|
22 |
-Patch: 4420_grsecurity-3.1-4.2.4-201510240907.patch |
23 |
+Patch: 4420_grsecurity-3.1-4.2.4-201510251836.patch |
24 |
From: http://www.grsecurity.net |
25 |
Desc: hardened-sources base patch from upstream grsecurity |
26 |
|
27 |
|
28 |
diff --git a/4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch b/4.2.4/4420_grsecurity-3.1-4.2.4-201510251836.patch |
29 |
similarity index 99% |
30 |
rename from 4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch |
31 |
rename to 4.2.4/4420_grsecurity-3.1-4.2.4-201510251836.patch |
32 |
index c6e64ba..394cd9b 100644 |
33 |
--- a/4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch |
34 |
+++ b/4.2.4/4420_grsecurity-3.1-4.2.4-201510251836.patch |
35 |
@@ -19232,7 +19232,7 @@ index 1c7eefe..d0e4702 100644 |
36 |
}; |
37 |
|
38 |
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h |
39 |
-index 3c3550c..995858d 100644 |
40 |
+index 3c3550c..33cb41a 100644 |
41 |
--- a/arch/x86/include/asm/fpu/internal.h |
42 |
+++ b/arch/x86/include/asm/fpu/internal.h |
43 |
@@ -97,8 +97,11 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu); |
44 |
@@ -19348,6 +19348,24 @@ index 3c3550c..995858d 100644 |
45 |
} |
46 |
|
47 |
__copy_kernel_to_fpregs(fpstate); |
48 |
+@@ -611,7 +623,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu) |
49 |
+ if (fpu.preload) { |
50 |
+ new_fpu->counter++; |
51 |
+ __fpregs_activate(new_fpu); |
52 |
+- prefetch(&new_fpu->state); |
53 |
++ prefetch(new_fpu->state); |
54 |
+ } else { |
55 |
+ __fpregs_deactivate_hw(); |
56 |
+ } |
57 |
+@@ -623,7 +635,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu) |
58 |
+ if (fpu_want_lazy_restore(new_fpu, cpu)) |
59 |
+ fpu.preload = 0; |
60 |
+ else |
61 |
+- prefetch(&new_fpu->state); |
62 |
++ prefetch(new_fpu->state); |
63 |
+ fpregs_activate(new_fpu); |
64 |
+ } |
65 |
+ } |
66 |
@@ -643,7 +655,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu) |
67 |
static inline void switch_fpu_finish(struct fpu *new_fpu, fpu_switch_t fpu_switch) |
68 |
{ |
69 |
@@ -24998,7 +25016,7 @@ index ce95676..af5c012 100644 |
70 |
unlock_done: |
71 |
mutex_unlock(&espfix_init_mutex); |
72 |
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c |
73 |
-index d25097c..84b0d51 100644 |
74 |
+index d25097c..e2df353 100644 |
75 |
--- a/arch/x86/kernel/fpu/core.c |
76 |
+++ b/arch/x86/kernel/fpu/core.c |
77 |
@@ -127,7 +127,7 @@ void __kernel_fpu_end(void) |
78 |
@@ -25019,6 +25037,15 @@ index d25097c..84b0d51 100644 |
79 |
|
80 |
/* |
81 |
* Save current FPU registers directly into the child |
82 |
+@@ -258,7 +258,7 @@ static void fpu_copy(struct fpu *dst_fpu, struct fpu *src_fpu) |
83 |
+ */ |
84 |
+ preempt_disable(); |
85 |
+ if (!copy_fpregs_to_fpstate(dst_fpu)) { |
86 |
+- memcpy(&src_fpu->state, &dst_fpu->state, xstate_size); |
87 |
++ memcpy(src_fpu->state, dst_fpu->state, xstate_size); |
88 |
+ fpregs_deactivate(src_fpu); |
89 |
+ } |
90 |
+ preempt_enable(); |
91 |
@@ -285,7 +285,7 @@ void fpu__activate_curr(struct fpu *fpu) |
92 |
WARN_ON_FPU(fpu != ¤t->thread.fpu); |
93 |
|
94 |
@@ -25087,7 +25114,7 @@ index d25097c..84b0d51 100644 |
95 |
return MXCSR_DEFAULT; |
96 |
} |
97 |
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c |
98 |
-index d14e9ac..8ca141b 100644 |
99 |
+index d14e9ac..fab0813 100644 |
100 |
--- a/arch/x86/kernel/fpu/init.c |
101 |
+++ b/arch/x86/kernel/fpu/init.c |
102 |
@@ -42,7 +42,7 @@ static void fpu__init_cpu_generic(void) |
103 |
@@ -25099,7 +25126,7 @@ index d14e9ac..8ca141b 100644 |
104 |
else |
105 |
#endif |
106 |
asm volatile ("fninit"); |
107 |
-@@ -147,12 +147,14 @@ EXPORT_SYMBOL_GPL(xstate_size); |
108 |
+@@ -147,37 +147,21 @@ EXPORT_SYMBOL_GPL(xstate_size); |
109 |
#define CHECK_MEMBER_AT_END_OF(TYPE, MEMBER) \ |
110 |
BUILD_BUG_ON(sizeof(TYPE) != offsetofend(TYPE, MEMBER)) |
111 |
|
112 |
@@ -25111,12 +25138,19 @@ index d14e9ac..8ca141b 100644 |
113 |
static void __init fpu__init_task_struct_size(void) |
114 |
{ |
115 |
- int task_size = sizeof(struct task_struct); |
116 |
-+ size_t task_size = sizeof(struct task_struct); |
117 |
- |
118 |
- /* |
119 |
- * Subtract off the static size of the register state. |
120 |
-@@ -168,16 +170,12 @@ static void __init fpu__init_task_struct_size(void) |
121 |
- |
122 |
+- |
123 |
+- /* |
124 |
+- * Subtract off the static size of the register state. |
125 |
+- * It potentially has a bunch of padding. |
126 |
+- */ |
127 |
+- task_size -= sizeof(((struct task_struct *)0)->thread.fpu.state); |
128 |
+- |
129 |
+- /* |
130 |
+- * Add back the dynamically-calculated register state |
131 |
+- * size. |
132 |
+- */ |
133 |
+- task_size += xstate_size; |
134 |
+- |
135 |
/* |
136 |
* We dynamically size 'struct fpu', so we require that |
137 |
- * it be at the end of 'thread_struct' and that |
138 |
@@ -96808,7 +96842,7 @@ index a76c917..63b52db 100644 |
139 |
asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t); |
140 |
/* |
141 |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h |
142 |
-index dfaa7b3..58cebfb 100644 |
143 |
+index dfaa7b3..115dcfc 100644 |
144 |
--- a/include/linux/compiler-gcc.h |
145 |
+++ b/include/linux/compiler-gcc.h |
146 |
@@ -116,8 +116,8 @@ |
147 |
@@ -96861,6 +96895,18 @@ index dfaa7b3..58cebfb 100644 |
148 |
/* |
149 |
* Mark a position in code as unreachable. This can be used to |
150 |
* suppress control flow warnings after asm blocks that transfer |
151 |
+@@ -237,6 +266,11 @@ |
152 |
+ #define KASAN_ABI_VERSION 3 |
153 |
+ #endif |
154 |
+ |
155 |
++#if GCC_VERSION >= 50000 |
156 |
++// Disable for now as size_overflow doesn't support it |
157 |
++// #define CC_HAVE_BUILTIN_OVERFLOW |
158 |
++#endif |
159 |
++ |
160 |
+ #endif /* gcc version >= 40000 specific checks */ |
161 |
+ |
162 |
+ #if !defined(__noclone) |
163 |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h |
164 |
index e08a6ae..2e5e776 100644 |
165 |
--- a/include/linux/compiler.h |
166 |
@@ -100500,6 +100546,30 @@ index b2a0f15..4d7da32 100644 |
167 |
|
168 |
/** create a directory */ |
169 |
struct dentry *oprofilefs_mkdir(struct dentry *parent, char const *name); |
170 |
+diff --git a/include/linux/overflow-arith.h b/include/linux/overflow-arith.h |
171 |
+new file mode 100644 |
172 |
+index 0000000..e12ccf8 |
173 |
+--- /dev/null |
174 |
++++ b/include/linux/overflow-arith.h |
175 |
+@@ -0,0 +1,18 @@ |
176 |
++#pragma once |
177 |
++ |
178 |
++#include <linux/kernel.h> |
179 |
++ |
180 |
++#ifdef CC_HAVE_BUILTIN_OVERFLOW |
181 |
++ |
182 |
++#define overflow_usub __builtin_usub_overflow |
183 |
++ |
184 |
++#else |
185 |
++ |
186 |
++static inline bool overflow_usub(unsigned int a, unsigned int b, |
187 |
++ unsigned int *res) |
188 |
++{ |
189 |
++ *res = a - b; |
190 |
++ return *res > a ? true : false; |
191 |
++} |
192 |
++ |
193 |
++#endif |
194 |
diff --git a/include/linux/padata.h b/include/linux/padata.h |
195 |
index 4386946..f50c615 100644 |
196 |
--- a/include/linux/padata.h |
197 |
@@ -101619,7 +101689,7 @@ index ab1e039..ad4229e 100644 |
198 |
|
199 |
static inline void disallow_signal(int sig) |
200 |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h |
201 |
-index 9b88536..6a15c44 100644 |
202 |
+index 9b88536..db7cc7f 100644 |
203 |
--- a/include/linux/skbuff.h |
204 |
+++ b/include/linux/skbuff.h |
205 |
@@ -784,7 +784,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags, |
206 |
@@ -101631,6 +101701,15 @@ index 9b88536..6a15c44 100644 |
207 |
gfp_t priority) |
208 |
{ |
209 |
return __alloc_skb(size, priority, 0, NUMA_NO_NODE); |
210 |
+@@ -1964,7 +1964,7 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb) |
211 |
+ return skb->csum_start - skb_headroom(skb); |
212 |
+ } |
213 |
+ |
214 |
+-static inline int skb_transport_offset(const struct sk_buff *skb) |
215 |
++static inline int __intentional_overflow(0) skb_transport_offset(const struct sk_buff *skb) |
216 |
+ { |
217 |
+ return skb_transport_header(skb) - skb->data; |
218 |
+ } |
219 |
@@ -1979,7 +1979,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb) |
220 |
return skb->inner_transport_header - skb->inner_network_header; |
221 |
} |
222 |
@@ -120550,6 +120629,30 @@ index 69f4f68..1f97524 100644 |
223 |
.kind = "ip6gretap", |
224 |
.maxtype = IFLA_GRE_MAX, |
225 |
.policy = ip6gre_policy, |
226 |
+diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c |
227 |
+index d5f7716..b4b3821 100644 |
228 |
+--- a/net/ipv6/ip6_output.c |
229 |
++++ b/net/ipv6/ip6_output.c |
230 |
+@@ -28,6 +28,7 @@ |
231 |
+ |
232 |
+ #include <linux/errno.h> |
233 |
+ #include <linux/kernel.h> |
234 |
++#include <linux/overflow-arith.h> |
235 |
+ #include <linux/string.h> |
236 |
+ #include <linux/socket.h> |
237 |
+ #include <linux/net.h> |
238 |
+@@ -581,7 +582,10 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb, |
239 |
+ if (np->frag_size) |
240 |
+ mtu = np->frag_size; |
241 |
+ } |
242 |
+- mtu -= hlen + sizeof(struct frag_hdr); |
243 |
++ |
244 |
++ if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) || |
245 |
++ mtu <= 7) |
246 |
++ goto fail_toobig; |
247 |
+ |
248 |
+ frag_id = ipv6_select_ident(net, &ipv6_hdr(skb)->daddr, |
249 |
+ &ipv6_hdr(skb)->saddr); |
250 |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c |
251 |
index 2e67b66..b816b34 100644 |
252 |
--- a/net/ipv6/ip6_tunnel.c |
253 |
@@ -124953,7 +125056,7 @@ index 88dbf23..d1b4291 100755 |
254 |
mkdir -p "$destdir" |
255 |
(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -) |
256 |
diff --git a/scripts/package/mkspec b/scripts/package/mkspec |
257 |
-index d9ab94b..66414bc 100755 |
258 |
+index d9ab94b..827332f 100755 |
259 |
--- a/scripts/package/mkspec |
260 |
+++ b/scripts/package/mkspec |
261 |
@@ -122,30 +122,41 @@ echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}" |
262 |
@@ -125019,8 +125122,8 @@ index d9ab94b..66414bc 100755 |
263 |
echo "/usr/src/kernels/$KERNELRELEASE" |
264 |
-echo "/lib/modules/$KERNELRELEASE/build" |
265 |
-echo "/lib/modules/$KERNELRELEASE/source" |
266 |
-+echo "%attr (500, root, root) /usr/src/kernels/$KERNELRELEASE/scripts/mod/recordmcount" |
267 |
-+echo "%attr (500, root, root) /usr/src/kernels/$KERNELRELEASE/scripts/mod/basic/fixdep" |
268 |
++echo "%attr (500, root, root) /usr/src/kernels/$KERNELRELEASE/scripts/recordmcount" |
269 |
++echo "%attr (500, root, root) /usr/src/kernels/$KERNELRELEASE/scripts/basic/fixdep" |
270 |
+echo "%attr (500, root, root) /usr/src/kernels/$KERNELRELEASE/scripts/mod/modpost" |
271 |
echo "" |
272 |
fi |
273 |
@@ -131733,10 +131836,10 @@ index 0000000..4c7f7c6 |
274 |
+targets += size_overflow_hash.h size_overflow_hash_aux.h disable_size_overflow_hash.h |
275 |
diff --git a/tools/gcc/size_overflow_plugin/disable_size_overflow_hash.data b/tools/gcc/size_overflow_plugin/disable_size_overflow_hash.data |
276 |
new file mode 100644 |
277 |
-index 0000000..a9f4b69 |
278 |
+index 0000000..776e6ad |
279 |
--- /dev/null |
280 |
+++ b/tools/gcc/size_overflow_plugin/disable_size_overflow_hash.data |
281 |
-@@ -0,0 +1,12401 @@ |
282 |
+@@ -0,0 +1,12411 @@ |
283 |
+disable_so_interrupt_pnode_gru_message_queue_desc_4 interrupt_pnode gru_message_queue_desc 0 4 NULL |
284 |
+disable_so_bch_btree_insert_fndecl_12 bch_btree_insert fndecl 0 12 NULL |
285 |
+disable_so_macvlan_sync_address_fndecl_22 macvlan_sync_address fndecl 0 22 NULL nohasharray |
286 |
@@ -144138,6 +144241,16 @@ index 0000000..a9f4b69 |
287 |
+enable_so_value_acpi_object_integer_44755 value acpi_object_integer 0 44755 NULL |
288 |
+enable_so_idx_ieee80211_tx_rate_64646 idx ieee80211_tx_rate 0 64646 NULL |
289 |
+enable_so_rs_get_adjacent_rate_fndecl_28334 rs_get_adjacent_rate fndecl 0-2 28334 NULL |
290 |
++enable_so_index_rs_rate_53 index rs_rate 0 53 NULL |
291 |
++enable_so_l1_xfs_bmbt_rec_host_22094 l1 xfs_bmbt_rec_host 0 22094 NULL |
292 |
++enable_so_l0_xfs_bmbt_rec_host_34805 l0 xfs_bmbt_rec_host 0 34805 NULL |
293 |
++enable_so_max_scsi_cmds_megasas_instance_35835 max_scsi_cmds megasas_instance 0 35835 NULL |
294 |
++enable_so_throttlequeuedepth_megasas_instance_42316 throttlequeuedepth megasas_instance 0 42316 NULL |
295 |
++enable_so_max_fw_cmds_megasas_instance_53309 max_fw_cmds megasas_instance 0 53309 NULL |
296 |
++enable_so_max_num_sge_megasas_instance_55755 max_num_sge megasas_instance 0 55755 NULL |
297 |
++enable_so_max_sectors_per_req_megasas_instance_56408 max_sectors_per_req megasas_instance 0 56408 NULL |
298 |
++enable_so_max_mfi_cmds_megasas_instance_19731 max_mfi_cmds megasas_instance 0 19731 NULL |
299 |
++enable_so_read_fw_status_reg_megasas_instance_template_13572 read_fw_status_reg megasas_instance_template 0 13572 NULL |
300 |
diff --git a/tools/gcc/size_overflow_plugin/generate_size_overflow_hash.sh b/tools/gcc/size_overflow_plugin/generate_size_overflow_hash.sh |
301 |
new file mode 100644 |
302 |
index 0000000..be9724d |
303 |
@@ -144671,10 +144784,10 @@ index 0000000..37e2e91 |
304 |
+#endif |
305 |
diff --git a/tools/gcc/size_overflow_plugin/intentional_overflow.c b/tools/gcc/size_overflow_plugin/intentional_overflow.c |
306 |
new file mode 100644 |
307 |
-index 0000000..3f67add |
308 |
+index 0000000..f888be6 |
309 |
--- /dev/null |
310 |
+++ b/tools/gcc/size_overflow_plugin/intentional_overflow.c |
311 |
-@@ -0,0 +1,941 @@ |
312 |
+@@ -0,0 +1,944 @@ |
313 |
+/* |
314 |
+ * Copyright 2011-2015 by Emese Revfy <re.emese@×××××.com> |
315 |
+ * Licensed under the GPL v2, or (at your option) v3 |
316 |
@@ -144911,6 +145024,9 @@ index 0000000..3f67add |
317 |
+ } |
318 |
+ case FIELD_DECL: |
319 |
+ case VAR_DECL: |
320 |
++ // !!! temporarily ignore bitfield types |
321 |
++ if (DECL_BIT_FIELD_TYPE(node)) |
322 |
++ return MARK_YES; |
323 |
+ if (is_end_intentional_intentional_attr(node)) |
324 |
+ return MARK_END_INTENTIONAL; |
325 |
+ if (is_turn_off_intentional_attr(node)) |
326 |
@@ -146289,10 +146405,10 @@ index 0000000..ab2d25a |
327 |
+} |
328 |
diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data b/tools/gcc/size_overflow_plugin/size_overflow_hash.data |
329 |
new file mode 100644 |
330 |
-index 0000000..efb5acd |
331 |
+index 0000000..70b78f9 |
332 |
--- /dev/null |
333 |
+++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data |
334 |
-@@ -0,0 +1,20756 @@ |
335 |
+@@ -0,0 +1,20746 @@ |
336 |
+enable_so_recv_ctrl_pipe_us_data_0 recv_ctrl_pipe us_data 0 0 NULL |
337 |
+enable_so___earlyonly_bootmem_alloc_fndecl_3 __earlyonly_bootmem_alloc fndecl 2-3-4 3 NULL |
338 |
+enable_so_size_ttm_mem_reg_8 size ttm_mem_reg 0 8 NULL |
339 |
@@ -146313,7 +146429,6 @@ index 0000000..efb5acd |
340 |
+enable_so_total_drm_buf_35 total drm_buf 0 35 NULL |
341 |
+enable_so_sis5595_device_add_fndecl_39 sis5595_device_add fndecl 1 39 NULL |
342 |
+enable_so_mc_vram_size_amdgpu_mc_45 mc_vram_size amdgpu_mc 0 45 NULL |
343 |
-+enable_so_index_rs_rate_53 index rs_rate 0 53 NULL |
344 |
+enable_so_iwl_dbgfs_nvm_read_fndecl_54 iwl_dbgfs_nvm_read fndecl 3 54 NULL |
345 |
+enable_so_pattern_len_tcf_em_text_57 pattern_len tcf_em_text 0 57 NULL nohasharray |
346 |
+enable_so_p54_init_common_fndecl_57 p54_init_common fndecl 1 57 &enable_so_pattern_len_tcf_em_text_57 |
347 |
@@ -150548,7 +150663,6 @@ index 0000000..efb5acd |
348 |
+enable_so_buf_len_vp702x_device_state_13562 buf_len vp702x_device_state 0 13562 NULL |
349 |
+enable_so_capture_periodsize_rme96_13564 capture_periodsize rme96 0 13564 NULL |
350 |
+enable_so_edt_ft5x06_ts_readwrite_fndecl_13570 edt_ft5x06_ts_readwrite fndecl 2-4-0 13570 NULL |
351 |
-+enable_so_read_fw_status_reg_megasas_instance_template_13572 read_fw_status_reg megasas_instance_template 0 13572 NULL |
352 |
+enable_so_amdtp_stream_get_max_payload_fndecl_13574 amdtp_stream_get_max_payload fndecl 0 13574 NULL |
353 |
+enable_so_irq_alloc_generic_chip_fndecl_13577 irq_alloc_generic_chip fndecl 2 13577 NULL |
354 |
+enable_so_fd_do_prot_fill_fndecl_13583 fd_do_prot_fill fndecl 5-3 13583 NULL |
355 |
@@ -152475,7 +152589,6 @@ index 0000000..efb5acd |
356 |
+enable_so_LastFreeEUN_NFTLrecord_19717 LastFreeEUN NFTLrecord 0 19717 NULL |
357 |
+enable_so_slots_end_qxl_rom_19718 slots_end qxl_rom 0 19718 NULL |
358 |
+enable_so_fat32_info_sector_fat_bios_param_block_19727 fat32_info_sector fat_bios_param_block 0 19727 NULL |
359 |
-+enable_so_max_mfi_cmds_megasas_instance_19731 max_mfi_cmds megasas_instance 0 19731 NULL |
360 |
+enable_so_max_active_conns_bnx2i_hba_19740 max_active_conns bnx2i_hba 0 19740 NULL |
361 |
+enable_so_bytesperline_v4l2_pix_format_19741 bytesperline v4l2_pix_format 0 19741 NULL |
362 |
+enable_so_writelen_iuu_private_19742 writelen iuu_private 0 19742 NULL |
363 |
@@ -153222,8 +153335,7 @@ index 0000000..efb5acd |
364 |
+enable_so_absent_pages_in_range_fndecl_22083 absent_pages_in_range fndecl 0-1-2 22083 NULL nohasharray |
365 |
+enable_so_rx_ring_size_mlx4_en_port_profile_22083 rx_ring_size mlx4_en_port_profile 0 22083 &enable_so_absent_pages_in_range_fndecl_22083 nohasharray |
366 |
+enable_so_cmm_write_fndecl_22083 cmm_write fndecl 3 22083 &enable_so_rx_ring_size_mlx4_en_port_profile_22083 |
367 |
-+enable_so_mgt_response_to_str_fndecl_22094 mgt_response_to_str fndecl 0 22094 NULL nohasharray |
368 |
-+enable_so_l1_xfs_bmbt_rec_host_22094 l1 xfs_bmbt_rec_host 0 22094 &enable_so_mgt_response_to_str_fndecl_22094 |
369 |
++enable_so_mgt_response_to_str_fndecl_22094 mgt_response_to_str fndecl 0 22094 NULL |
370 |
+enable_so_size_drm_i915_gem_pread_22096 size drm_i915_gem_pread 0 22096 NULL nohasharray |
371 |
+enable_so_len_setup_data_node_22096 len setup_data_node 0 22096 &enable_so_size_drm_i915_gem_pread_22096 nohasharray |
372 |
+enable_so_frame_seq_number_osst_tape_22096 frame_seq_number osst_tape 0 22096 &enable_so_len_setup_data_node_22096 |
373 |
@@ -157298,7 +157410,6 @@ index 0000000..efb5acd |
374 |
+enable_so_addrlen_svc_deferred_req_34794 addrlen svc_deferred_req 0 34794 &enable_so_sizeimage_soc_camera_device_34794 |
375 |
+enable_so_rq_count_st_card_info_34798 rq_count st_card_info 0 34798 NULL |
376 |
+enable_so_nfs_write_end_fndecl_34801 nfs_write_end fndecl 3-5 34801 NULL |
377 |
-+enable_so_l0_xfs_bmbt_rec_host_34805 l0 xfs_bmbt_rec_host 0 34805 NULL |
378 |
+enable_so_num_q_vectors_ixgbe_adapter_34808 num_q_vectors ixgbe_adapter 0 34808 NULL |
379 |
+enable_so_page_size_flash_info_34810 page_size flash_info 0 34810 NULL |
380 |
+enable_so_blk_cnt_os_dat_entry_s_34817 blk_cnt os_dat_entry_s 0 34817 NULL |
381 |
@@ -157677,7 +157788,6 @@ index 0000000..efb5acd |
382 |
+enable_so_num_pmkids_ndis_80211_capability_35831 num_pmkids ndis_80211_capability 0 35831 &enable_so_twl_load_sgl_fndecl_35831 |
383 |
+enable_so_srq_size_srpt_device_35833 srq_size srpt_device 0 35833 NULL |
384 |
+enable_so_request_sz_MPT3SAS_ADAPTER_35834 request_sz MPT3SAS_ADAPTER 0 35834 NULL |
385 |
-+enable_so_max_scsi_cmds_megasas_instance_35835 max_scsi_cmds megasas_instance 0 35835 NULL |
386 |
+enable_so_paging32_get_level1_sp_gpa_fndecl_35837 paging32_get_level1_sp_gpa fndecl 0 35837 NULL |
387 |
+enable_so_size_mvneta_tx_queue_35842 size mvneta_tx_queue 0 35842 NULL |
388 |
+enable_so_clk_core_enable_fndecl_35844 clk_core_enable fndecl 0 35844 NULL |
389 |
@@ -159715,7 +159825,6 @@ index 0000000..efb5acd |
390 |
+enable_so_iwch_reg_user_mr_fndecl_42308 iwch_reg_user_mr fndecl 2-3 42308 &enable_so_dcache_dir_lseek_fndecl_42308 |
391 |
+enable_so_deh_offset_reiserfs_de_head_42314 deh_offset reiserfs_de_head 0 42314 NULL nohasharray |
392 |
+enable_so_rproc_alloc_fndecl_42314 rproc_alloc fndecl 5 42314 &enable_so_deh_offset_reiserfs_de_head_42314 |
393 |
-+enable_so_throttlequeuedepth_megasas_instance_42316 throttlequeuedepth megasas_instance 0 42316 NULL |
394 |
+enable_so_kvm_write_guest_page_fndecl_42320 kvm_write_guest_page fndecl 2-5 42320 NULL nohasharray |
395 |
+enable_so_pg_test_nfs_pageio_ops_42320 pg_test nfs_pageio_ops 0 42320 &enable_so_kvm_write_guest_page_fndecl_42320 nohasharray |
396 |
+enable_so_dbg_leb_write_fndecl_42320 dbg_leb_write fndecl 5-4 42320 &enable_so_pg_test_nfs_pageio_ops_42320 |
397 |
@@ -163218,7 +163327,6 @@ index 0000000..efb5acd |
398 |
+enable_so_fuse_ioctl_common_fndecl_53305 fuse_ioctl_common fndecl 2 53305 NULL |
399 |
+enable_so_dma_size_cx23885_audio_dev_53307 dma_size cx23885_audio_dev 0 53307 NULL nohasharray |
400 |
+enable_so_gtt_start_radeon_mc_53307 gtt_start radeon_mc 0 53307 &enable_so_dma_size_cx23885_audio_dev_53307 |
401 |
-+enable_so_max_fw_cmds_megasas_instance_53309 max_fw_cmds megasas_instance 0 53309 NULL |
402 |
+enable_so_isoc_in_usbatm_driver_53310 isoc_in usbatm_driver 0 53310 NULL nohasharray |
403 |
+enable_so___gfs2_free_blocks_fndecl_53310 __gfs2_free_blocks fndecl 2 53310 &enable_so_isoc_in_usbatm_driver_53310 |
404 |
+enable_so___sync_dirty_buffer_fndecl_53315 __sync_dirty_buffer fndecl 0 53315 NULL |
405 |
@@ -163992,7 +164100,6 @@ index 0000000..efb5acd |
406 |
+enable_so_max_eq_mlx4_func_55747 max_eq mlx4_func 0 55747 NULL |
407 |
+enable_so_nilfs_mdt_set_entry_size_fndecl_55751 nilfs_mdt_set_entry_size fndecl 2-3 55751 NULL nohasharray |
408 |
+enable_so_pad_len_ubifs_pad_node_55751 pad_len ubifs_pad_node 0 55751 &enable_so_nilfs_mdt_set_entry_size_fndecl_55751 |
409 |
-+enable_so_max_num_sge_megasas_instance_55755 max_num_sge megasas_instance 0 55755 NULL |
410 |
+enable_so_nilfs_cpfile_read_fndecl_55758 nilfs_cpfile_read fndecl 2 55758 NULL |
411 |
+enable_so_vga_switcheroo_debugfs_write_fndecl_55763 vga_switcheroo_debugfs_write fndecl 3 55763 NULL |
412 |
+enable_so_offset_xfs_bmalloca_55767 offset xfs_bmalloca 0 55767 NULL |
413 |
@@ -164186,8 +164293,7 @@ index 0000000..efb5acd |
414 |
+enable_so_ieee80211_fragment_fndecl_56395 ieee80211_fragment fndecl 4-3 56395 NULL |
415 |
+enable_so_lost_out_tcp_sock_56397 lost_out tcp_sock 0 56397 NULL |
416 |
+enable_so_buf_count_drm_device_dma_56399 buf_count drm_device_dma 0 56399 NULL |
417 |
-+enable_so_ccw_clear_fndecl_56408 ccw_clear fndecl 3-5-6-4 56408 NULL nohasharray |
418 |
-+enable_so_max_sectors_per_req_megasas_instance_56408 max_sectors_per_req megasas_instance 0 56408 &enable_so_ccw_clear_fndecl_56408 |
419 |
++enable_so_ccw_clear_fndecl_56408 ccw_clear fndecl 3-5-6-4 56408 NULL |
420 |
+enable_so_f2fs_llseek_fndecl_56409 f2fs_llseek fndecl 2 56409 NULL |
421 |
+enable_so_ieee80211_auth_challenge_fndecl_56418 ieee80211_auth_challenge fndecl 3 56418 NULL |
422 |
+enable_so_notify_change_fndecl_56420 notify_change fndecl 0 56420 NULL |
423 |
@@ -168891,7 +168997,7 @@ index 0000000..6075e8f |
424 |
+ |
425 |
diff --git a/tools/gcc/size_overflow_plugin/size_overflow_plugin.c b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c |
426 |
new file mode 100644 |
427 |
-index 0000000..2fef709 |
428 |
+index 0000000..9beb012 |
429 |
--- /dev/null |
430 |
+++ b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c |
431 |
@@ -0,0 +1,318 @@ |
432 |
@@ -168926,7 +169032,7 @@ index 0000000..2fef709 |
433 |
+tree size_overflow_type_TI; |
434 |
+ |
435 |
+static struct plugin_info size_overflow_plugin_info = { |
436 |
-+ .version = "20151021", |
437 |
++ .version = "20151025", |
438 |
+ .help = "no-size-overflow\tturn off size overflow checking\n", |
439 |
+}; |
440 |
+ |
441 |
@@ -169573,10 +169679,10 @@ index 0000000..317cd6c |
442 |
+ |
443 |
diff --git a/tools/gcc/size_overflow_plugin/size_overflow_transform.c b/tools/gcc/size_overflow_plugin/size_overflow_transform.c |
444 |
new file mode 100644 |
445 |
-index 0000000..0395a48 |
446 |
+index 0000000..78e16db |
447 |
--- /dev/null |
448 |
+++ b/tools/gcc/size_overflow_plugin/size_overflow_transform.c |
449 |
-@@ -0,0 +1,739 @@ |
450 |
+@@ -0,0 +1,746 @@ |
451 |
+/* |
452 |
+ * Copyright 2011-2015 by Emese Revfy <re.emese@×××××.com> |
453 |
+ * Licensed under the GPL v2, or (at your option) v3 |
454 |
@@ -169762,6 +169868,9 @@ index 0000000..0395a48 |
455 |
+ |
456 |
+ if (skip_types(orig_node)) |
457 |
+ return head; |
458 |
++ // !!! temporarily ignore bitfield types |
459 |
++ if (DECL_BIT_FIELD_TYPE(orig_node)) |
460 |
++ return head; |
461 |
+ |
462 |
+ // find a defining marked caller argument or struct field for arg |
463 |
+ if (check_intentional_size_overflow_asm_and_attribute(orig_node) != MARK_NO) |
464 |
@@ -170117,6 +170226,10 @@ index 0000000..0395a48 |
465 |
+ if (DECL_NAME(decl) == NULL_TREE) |
466 |
+ return head; |
467 |
+ |
468 |
++ // !!! temporarily ignore bitfield types |
469 |
++ if (DECL_BIT_FIELD_TYPE(decl)) |
470 |
++ return head; |
471 |
++ |
472 |
+ next_node = get_interesting_function_next_node(decl, 0); |
473 |
+ if (!next_node) |
474 |
+ return head; |
475 |
@@ -170318,10 +170431,10 @@ index 0000000..0395a48 |
476 |
+} |
477 |
diff --git a/tools/gcc/size_overflow_plugin/size_overflow_transform_core.c b/tools/gcc/size_overflow_plugin/size_overflow_transform_core.c |
478 |
new file mode 100644 |
479 |
-index 0000000..4ac2d6e |
480 |
+index 0000000..460c047 |
481 |
--- /dev/null |
482 |
+++ b/tools/gcc/size_overflow_plugin/size_overflow_transform_core.c |
483 |
-@@ -0,0 +1,1010 @@ |
484 |
+@@ -0,0 +1,1008 @@ |
485 |
+/* |
486 |
+ * Copyright 2011-2015 by Emese Revfy <re.emese@×××××.com> |
487 |
+ * Licensed under the GPL v2, or (at your option) v3 |
488 |
@@ -170362,8 +170475,6 @@ index 0000000..4ac2d6e |
489 |
+ |
490 |
+ switch (TYPE_MODE(type)) { |
491 |
+ case QImode: |
492 |
-+ new_type = size_overflow_type_HI; |
493 |
-+ break; |
494 |
+ case HImode: |
495 |
+ new_type = size_overflow_type_SI; |
496 |
+ break; |