Skip to content

Commit cead61a

Browse files
Paolo 'Blaisorblade' GiarrussoLinus Torvalds
authored andcommitted
[PATCH] uml: export symbols added by GCC hardened
GCC hardened introduces additional symbol refererences (for the canary and friends), also in modules - add weak export_symbols for them. We already tested that the weak declaration creates no problem on both GCC's providing the function definition and on GCC's which don't provide it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]> Acked-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 7b12b91 commit cead61a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/um/os-Linux/user_syms.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ EXPORT_SYMBOL_PROTO(getuid);
9696
EXPORT_SYMBOL_PROTO(fsync);
9797
EXPORT_SYMBOL_PROTO(fdatasync);
9898

99+
/* Export symbols used by GCC for the stack protector. */
100+
extern void __stack_smash_handler(void *) __attribute__((weak));
101+
EXPORT_SYMBOL(__stack_smash_handler);
102+
103+
extern long __guard __attribute__((weak));
104+
EXPORT_SYMBOL(__guard);
105+
99106
/*
100107
* Overrides for Emacs so that we follow Linus's tabbing style.
101108
* Emacs will notice this stuff at the end of the file and automatically

0 commit comments

Comments
 (0)