kernel: really inline canary randomize code to top level caller

When kernel changes canary to randomize it for stack protection, kernel
has to change it from top level of call stack as ret to upper call stack
will be caught and considered as stack smashing due to changed canary.

Since gcc doesn't guarantee inline specifier declared function always to be
inlined, changing canary with function isn't good idea.
Randomizes the canary without function from kmain().  This is safe since
kmain() never returns.

Change-Id: I727b452d7f1179c6aae0845a11f5c9ce236cc473
diff --git a/include/debug.h b/include/debug.h
index ae7119e..bcf73c5 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -74,12 +74,7 @@
 /*
 * Initialize the stack protector canary value.
 */
-static inline void __stack_chk_guard_setup()
-{
-	void *canary;
-	canary = get_canary();
-	__stack_chk_guard =  canary;
-}
+#define __stack_chk_guard_setup() do { __stack_chk_guard = get_canary(); } while(0)
 
 void __attribute__ ((noreturn))
 	__stack_chk_fail (void);