[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] caml-stubdom: fix "red zone" bug
On Wed, 2010-10-27 at 17:16 +0100, 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 ? But I guess your patch is good in the meantime. Red-zoning is really only intended to apply for userspace, and the kernel must take pains to make it so, for example when injecting signals etc. A kernel (or anything which runs only in ring 0) generally cannot use red-zoning on itself because there is no stack switch when taking an exception/interrupt/etc from ring 0 and so the hardware has already trashed the red-zone before the software would get to do any fixup/obeying etc. Xen compiles itself with -mno-red-zone for exactly this reason. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |