[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] caml-stubdom: fix "red zone" bug



At 17:16 +0100 on 27 Oct (1288199782), Ian Jackson wrote:
> Patrick Colp writes ("[Xen-devel] [PATCH] caml-stubdom: fix "red zone" bug"):
> > According to the AMD64 ABI, the 128-byte area below %rsp is reserved
> > for scratch space and should not be used by signal, interrupt, or
> > exception handlers. However, Mini-OS does not adhere to this
> > interface. 
> 
> How unpleasant.
> 
> > This patch fixes this issue by passing the -mno-red-zone flag to the
> > ocaml configure script in the stubdom Makefile.
> 
> Perhaps it would be better to make Mini-OS adhere to the specified
> interface?

Hmm.  We would need to have more heavyweight kernel/user separation to
make sure that interrupt delivery &c always happens on safe stacks.  At
the moment, all of Mini-OS runs in kernel mode, on one stack.  It might
be possible to use a different stack change for interrupts and
exceptions only without having a full user/kernel split though, as long
as all the interrupt handlers are compiled with -mno-red-zone...

It's really just part of the confusion of running "application" code in
what's realy a kernel.  The Linux kernel and Xen are both compiled with
-mno-red-zone, to avoid this kind of issue.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.