[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] kexec: Clearing registers just before jumping into purgatory
On Fri, Oct 11, 2013 at 03:15:38PM -0700, ebiederm@xxxxxxxxxxxx wrote: > Daniel Kiper <daniel.kiper@xxxxxxxxxx> writes: > > > On Fri, Oct 11, 2013 at 03:08:43AM -0700, ebiederm@xxxxxxxxxxxx wrote: > >> Daniel Kiper <daniel.kiper@xxxxxxxxxx> writes: [...] > > What is your opinion in that case? > > I can see documenting the registers other than the stack pointer > as undefined. (A stack pointer is needed to implement PIC code). > > For the implementation I recommend setting these registers to known > values. The issue is that your implementation will not change much and > if you don't set the registers to known values someone may develop a > dependency on what you happen to have those registers set to. > > It is easier to force a fixed value into a register that isn't hard to > maintain into your registers than to discover when you make a change > that there is some odd client that depends on some value that just > happened to be in your register, and that your necessary change is now > made 10x harder by a client you can't afford to break that depends on a > bug in the previous implementation. > > So yes I strongly recommend setting the registers to a 0 in this case. Thank you for this explanation. I think that it is worth to add relevant comment to arch/x86/kernel/relocate_kernel_*.S and purgatory entry. I will try to prepare something when we work out nice thing for Xen. Daniel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |