1 --- linux-2.6.33/scripts/mod/modpost.c~ 2010-02-24 19:52:17.000000000 +0100
2 +++ linux-2.6.33/scripts/mod/modpost.c 2010-03-07 14:26:47.242168558 +0100
7 -#include "../../include/generated/autoconf.h"
8 +// PLD architectures don't use CONFIG_SYMBOL_PREFIX
9 +//#include "../../include/generated/autoconf.h"
10 #include "../../include/linux/license.h"
12 /* Some toolchains use a `_' prefix for all user symbols. */
14 --- linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh~ 2011-07-22 04:17:23.000000000 +0200
15 +++ linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh 2011-08-25 21:26:04.799150642 +0200
17 $cc -print-file-name=lib${lib}.${ext} | grep -q /
20 + for libt in tinfow tinfo ; do
21 + $cc -print-file-name=lib${libt}.${ext} | grep -q /
22 + if [ $? -eq 0 ]; then
29 commit 80d172431696482d9acd8d2c4ea78fed8956e2a1
30 Author: valdis.kletnieks@vt.edu <valdis.kletnieks@vt.edu>
31 Date: Sun Feb 4 12:01:43 2018 -0500
33 gcc-plugins: Add include required by GCC release 8
35 GCC requires another #include to get the gcc-plugins to build cleanly.
37 Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
38 Signed-off-by: Kees Cook <keescook@chromium.org>
40 diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
41 index ffd1dfaa1cc1..f46750053377 100644
42 --- a/scripts/gcc-plugins/gcc-common.h
43 +++ b/scripts/gcc-plugins/gcc-common.h
46 #include "ipa-utils.h"
48 +#if BUILDING_GCC_VERSION >= 8000
49 +#include "stringpool.h"
52 #if BUILDING_GCC_VERSION >= 4009
55 diff -ur linux-4.14/scripts/gcc-plugins/latent_entropy_plugin.c linux-4.17/scripts/gcc-plugins/latent_entropy_plugin.c
56 --- linux-4.14/scripts/gcc-plugins/latent_entropy_plugin.c 2017-11-12 19:46:13.000000000 +0100
57 +++ linux-4.17/scripts/gcc-plugins/latent_entropy_plugin.c 2018-06-03 23:15:21.000000000 +0200
62 -static struct attribute_spec latent_entropy_attr = {
63 - .name = "latent_entropy",
66 - .decl_required = true,
67 - .type_required = false,
68 - .function_type_required = false,
69 - .handler = handle_latent_entropy_attribute,
70 -#if BUILDING_GCC_VERSION >= 4007
71 - .affects_type_identity = false
74 +static struct attribute_spec latent_entropy_attr = { };
76 static void register_attributes(void *event_data __unused, void *data __unused)
78 + latent_entropy_attr.name = "latent_entropy";
79 + latent_entropy_attr.decl_required = true;
80 + latent_entropy_attr.handler = handle_latent_entropy_attribute;
82 register_attribute(&latent_entropy_attr);
85 diff -ur linux-4.14/scripts/gcc-plugins/randomize_layout_plugin.c linux-4.17/scripts/gcc-plugins/randomize_layout_plugin.c
86 --- linux-4.14/scripts/gcc-plugins/randomize_layout_plugin.c 2017-11-12 19:46:13.000000000 +0100
87 +++ linux-4.17/scripts/gcc-plugins/randomize_layout_plugin.c 2018-06-03 23:15:21.000000000 +0200
89 { "net/unix/af_unix.c", "unix_skb_parms", "char" },
90 /* big_key payload.data struct splashing */
91 { "security/keys/big_key.c", "path", "void *" },
92 - /* walk struct security_hook_heads as an array of struct list_head */
93 - { "security/security.c", "list_head", "security_hook_heads" },
94 + /* walk struct security_hook_heads as an array of struct hlist_head */
95 + { "security/security.c", "hlist_head", "security_hook_heads" },
103 -static struct attribute_spec randomize_layout_attr = {
104 - .name = "randomize_layout",
108 - .decl_required = false,
109 - // need type declaration
110 - .type_required = true,
111 - .function_type_required = false,
112 - .handler = handle_randomize_layout_attr,
113 -#if BUILDING_GCC_VERSION >= 4007
114 - .affects_type_identity = true
117 +static struct attribute_spec randomize_layout_attr = { };
118 +static struct attribute_spec no_randomize_layout_attr = { };
119 +static struct attribute_spec randomize_considered_attr = { };
120 +static struct attribute_spec randomize_performed_attr = { };
122 -static struct attribute_spec no_randomize_layout_attr = {
123 - .name = "no_randomize_layout",
127 - .decl_required = false,
128 - // need type declaration
129 - .type_required = true,
130 - .function_type_required = false,
131 - .handler = handle_randomize_layout_attr,
132 +static void register_attributes(void *event_data, void *data)
134 + randomize_layout_attr.name = "randomize_layout";
135 + randomize_layout_attr.type_required = true;
136 + randomize_layout_attr.handler = handle_randomize_layout_attr;
137 #if BUILDING_GCC_VERSION >= 4007
138 - .affects_type_identity = true
139 + randomize_layout_attr.affects_type_identity = true;
143 -static struct attribute_spec randomize_considered_attr = {
144 - .name = "randomize_considered",
148 - .decl_required = false,
149 - // need type declaration
150 - .type_required = true,
151 - .function_type_required = false,
152 - .handler = handle_randomize_considered_attr,
153 + no_randomize_layout_attr.name = "no_randomize_layout";
154 + no_randomize_layout_attr.type_required = true;
155 + no_randomize_layout_attr.handler = handle_randomize_layout_attr;
156 #if BUILDING_GCC_VERSION >= 4007
157 - .affects_type_identity = false
158 + no_randomize_layout_attr.affects_type_identity = true;
162 -static struct attribute_spec randomize_performed_attr = {
163 - .name = "randomize_performed",
167 - .decl_required = false,
168 - // need type declaration
169 - .type_required = true,
170 - .function_type_required = false,
171 - .handler = handle_randomize_performed_attr,
172 -#if BUILDING_GCC_VERSION >= 4007
173 - .affects_type_identity = false
176 + randomize_considered_attr.name = "randomize_considered";
177 + randomize_considered_attr.type_required = true;
178 + randomize_considered_attr.handler = handle_randomize_considered_attr;
180 + randomize_performed_attr.name = "randomize_performed";
181 + randomize_performed_attr.type_required = true;
182 + randomize_performed_attr.handler = handle_randomize_performed_attr;
184 -static void register_attributes(void *event_data, void *data)
186 register_attribute(&randomize_layout_attr);
187 register_attribute(&no_randomize_layout_attr);
188 register_attribute(&randomize_considered_attr);
189 diff -ur linux-4.14/scripts/gcc-plugins/structleak_plugin.c linux-4.17/scripts/gcc-plugins/structleak_plugin.c
190 --- linux-4.14/scripts/gcc-plugins/structleak_plugin.c 2017-11-12 19:46:13.000000000 +0100
191 +++ linux-4.17/scripts/gcc-plugins/structleak_plugin.c 2018-06-03 23:15:21.000000000 +0200
196 -static struct attribute_spec user_attr = {
200 - .decl_required = false,
201 - .type_required = false,
202 - .function_type_required = false,
203 - .handler = handle_user_attribute,
204 -#if BUILDING_GCC_VERSION >= 4007
205 - .affects_type_identity = true
208 +static struct attribute_spec user_attr = { };
210 static void register_attributes(void *event_data, void *data)
212 + user_attr.name = "user";
213 + user_attr.handler = handle_user_attribute;
214 +#if BUILDING_GCC_VERSION >= 4007
215 + user_attr.affects_type_identity = true;
218 register_attribute(&user_attr);