File tree Expand file tree Collapse file tree 3 files changed +12
-31
lines changed Expand file tree Collapse file tree 3 files changed +12
-31
lines changed Original file line number Diff line number Diff line change @@ -227,47 +227,40 @@ int map_vdso_once(const struct vdso_image *image, unsigned long addr)
227
227
return map_vdso (image , addr );
228
228
}
229
229
230
- #if defined(CONFIG_X86_32 ) || defined(CONFIG_IA32_EMULATION )
231
230
static int load_vdso32 (void )
232
231
{
233
232
if (vdso32_enabled != 1 ) /* Other values all mean "disabled" */
234
233
return 0 ;
235
234
236
235
return map_vdso (& vdso_image_32 , 0 );
237
236
}
238
- #endif
239
237
240
- #ifdef CONFIG_X86_64
241
238
int arch_setup_additional_pages (struct linux_binprm * bprm , int uses_interp )
242
239
{
243
- if (!vdso64_enabled )
244
- return 0 ;
240
+ if (IS_ENABLED (CONFIG_X86_64 )) {
241
+ if (!vdso64_enabled )
242
+ return 0 ;
243
+
244
+ return map_vdso (& vdso_image_64 , 0 );
245
+ }
245
246
246
- return map_vdso ( & vdso_image_64 , 0 );
247
+ return load_vdso32 ( );
247
248
}
248
249
249
250
#ifdef CONFIG_COMPAT
250
251
int compat_arch_setup_additional_pages (struct linux_binprm * bprm ,
251
252
int uses_interp , bool x32 )
252
253
{
253
- #ifdef CONFIG_X86_X32_ABI
254
- if (x32 ) {
254
+ if (IS_ENABLED (CONFIG_X86_X32_ABI ) && x32 ) {
255
255
if (!vdso64_enabled )
256
256
return 0 ;
257
257
return map_vdso (& vdso_image_x32 , 0 );
258
258
}
259
- #endif
260
- #ifdef CONFIG_IA32_EMULATION
261
- return load_vdso32 ();
262
- #else
259
+
260
+ if ( IS_ENABLED ( CONFIG_IA32_EMULATION ))
261
+ return load_vdso32 ();
262
+
263
263
return 0 ;
264
- #endif
265
- }
266
- #endif
267
- #else
268
- int arch_setup_additional_pages (struct linux_binprm * bprm , int uses_interp )
269
- {
270
- return load_vdso32 ();
271
264
}
272
265
#endif
273
266
Original file line number Diff line number Diff line change @@ -76,12 +76,8 @@ typedef struct user_i387_struct elf_fpregset_t;
76
76
77
77
#include <asm/vdso.h>
78
78
79
- #ifdef CONFIG_X86_64
80
79
extern unsigned int vdso64_enabled ;
81
- #endif
82
- #if defined(CONFIG_X86_32 ) || defined(CONFIG_IA32_EMULATION )
83
80
extern unsigned int vdso32_enabled ;
84
- #endif
85
81
86
82
/*
87
83
* This is used to ensure we don't load something for the wrong architecture.
Original file line number Diff line number Diff line change @@ -27,17 +27,9 @@ struct vdso_image {
27
27
long sym_vdso32_rt_sigreturn_landing_pad ;
28
28
};
29
29
30
- #ifdef CONFIG_X86_64
31
30
extern const struct vdso_image vdso_image_64 ;
32
- #endif
33
-
34
- #ifdef CONFIG_X86_X32_ABI
35
31
extern const struct vdso_image vdso_image_x32 ;
36
- #endif
37
-
38
- #if defined CONFIG_X86_32 || defined CONFIG_COMPAT
39
32
extern const struct vdso_image vdso_image_32 ;
40
- #endif
41
33
42
34
extern int __init init_vdso_image (const struct vdso_image * image );
43
35
You can’t perform that action at this time.
0 commit comments