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

Re: [Xen-devel] pv-grub will cause page fault if build with flag -fstack-protector

On Tue, 2013-04-16 at 10:34 +0100, Chunyan Liu wrote:

> We asked for Jan's opinion whether we can remove the flag or there
> isn't a problem with stubdom overwriting something on the stack . Jan
> viewed it as a mistake use of flag:
> > I generally view it as a mistake enforce certain kinds of
> (intrusive) flags onto builds of code that may assume to have full
> control of everything (e.g. kernel like, which stubdom clearly is).
> I wonder if there is other opinion?

I agree with Jan.

>  If it is a flag use problem, then we can simply remove the flag from
> rpm build.

Please do so, you may want to only do it for the stubdom bits of the
build though.

If you can figure out a way to override this in stubdom/* regardless of
the flags set by the user (or RPM) at the toplevel (e.g. by inserting
-fno-stack-protector in the right place) then that might be a patch we
could consider for upstream.

> I checked the objdump of problem pv-grub, the page fault place is in
> xc_interface_open_common, the detail line is a line inserted by
> -fstack-protector (see 0x404bb in following):

If you wanted to get really advanced you could implement stack protector
support for mini-os. I've no idea how hard that would be though.


Xen-devel mailing list



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