[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: _chk_fail and _chk canaries for minios and newlib
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1238495771 -3600 # Node ID 6ad2b1ded12f886103fb71edde7dfbedf3c4c841 # Parent b7a11dff84c06fdbb021b9719060b9cadba4d02c minios: _chk_fail and _chk canaries for minios and newlib Add __stack_chk_fail to mini-os and __sprintf_chk __fprintf_chk to newlib, to cope with ocaml runtimes compiled with -fstack-protector. From: "George S. Coker, II" <gscoker@xxxxxxxxxxxxxx> Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- extras/mini-os/lib/stack_chk_fail.c | 8 ++++++++ stubdom/Makefile | 1 + 2 files changed, 9 insertions(+) diff -r b7a11dff84c0 -r 6ad2b1ded12f extras/mini-os/lib/stack_chk_fail.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/mini-os/lib/stack_chk_fail.c Tue Mar 31 11:36:11 2009 +0100 @@ -0,0 +1,8 @@ +#include <kernel.h> +#include <console.h> + +void __stack_chk_fail(void) +{ + printk("stack smashing detected\n"); + do_exit(); +} diff -r b7a11dff84c0 -r 6ad2b1ded12f stubdom/Makefile --- a/stubdom/Makefile Tue Mar 31 11:33:56 2009 +0100 +++ b/stubdom/Makefile Tue Mar 31 11:36:11 2009 +0100 @@ -91,6 +91,7 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLI newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz tar xzf $< patch -d $@ -p0 < newlib.patch + patch -d $@ -p0 < newlib-chk.patch touch $@ NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |