File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,9 @@ const unsigned char * const x86_nops[ASM_NOP_MAX+1] =
129
129
130
130
#ifdef CONFIG_MITIGATION_ITS
131
131
132
+ #ifdef CONFIG_MODULES
132
133
static struct module * its_mod ;
134
+ #endif
133
135
static void * its_page ;
134
136
static unsigned int its_offset ;
135
137
@@ -150,6 +152,7 @@ static void *its_init_thunk(void *thunk, int reg)
150
152
return thunk ;
151
153
}
152
154
155
+ #ifdef CONFIG_MODULES
153
156
void its_init_mod (struct module * mod )
154
157
{
155
158
if (!cpu_feature_enabled (X86_FEATURE_INDIRECT_THUNK_ITS ))
@@ -188,6 +191,7 @@ void its_free_mod(struct module *mod)
188
191
}
189
192
kfree (mod -> its_page_array );
190
193
}
194
+ #endif /* CONFIG_MODULES */
191
195
192
196
static void * its_alloc (void )
193
197
{
@@ -196,6 +200,7 @@ static void *its_alloc(void)
196
200
if (!page )
197
201
return NULL ;
198
202
203
+ #ifdef CONFIG_MODULES
199
204
if (its_mod ) {
200
205
void * tmp = krealloc (its_mod -> its_page_array ,
201
206
(its_mod -> its_num_pages + 1 ) * sizeof (void * ),
@@ -206,6 +211,7 @@ static void *its_alloc(void)
206
211
its_mod -> its_page_array = tmp ;
207
212
its_mod -> its_page_array [its_mod -> its_num_pages ++ ] = page ;
208
213
}
214
+ #endif /* CONFIG_MODULES */
209
215
210
216
return no_free_ptr (page );
211
217
}
You can’t perform that action at this time.
0 commit comments