kernel: provide __stack_chk_fail (fixes build)
authorKosyrev Serge <skosyrev@ptsecurity.com>
Tue, 20 Dec 2016 19:48:10 +0000 (22:48 +0300)
committerKosyrev Serge <skosyrev@ptsecurity.com>
Tue, 20 Dec 2016 19:48:58 +0000 (22:48 +0300)
Signed-off-by: Kosyrev Serge <skosyrev@ptsecurity.com>

kernel/arch/x86/misc.c

index 65bef64..a447567 100644 (file)
@@ -127,3 +127,13 @@ lvaddr_t kernel_trace_buf = 0;
 
 struct trace_application kernel_trace_boot_applications[TRACE_MAX_BOOT_APPLICATIONS];
 int kernel_trace_num_boot_applications = 0;
+
+/**
+ * Stack protection handler
+ */
+void __stack_chk_fail(void); // Existence implied by (certainly configured) GCC.
+
+void __stack_chk_fail (void)
+{
+    panic("finally reached __stack_chk_fail()");
+}