From: "Jan Beulich" Subject: Re: [xen-devel] [Patch 2/4] x86/stack: Adjust boundary conditions for printed stacks. Date: Mon, 12 Aug 2013 09:46:24 +0100 Message-ID: <5208BD0002000078000EB0A2@nat28.tlf.novell.com> References: <1376078158-13739-1-git-send-email-andrew.cooper3@citrix.com> <1376078158-13739-3-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1V8oT9-0008Ns-K3 for xen-devel@lists.xenproject.org; Mon, 12 Aug 2013 09:31:19 +0000 In-Reply-To: <1376078158-13739-3-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 09.08.13 at 21:55, Andrew Cooper wrote: > --- a/xen/include/asm-x86/current.h > +++ b/xen/include/asm-x86/current.h > @@ -50,6 +50,15 @@ static inline struct cpu_info *get_cpu_info(void) > #define get_stack_bottom() \ > ((unsigned long)&get_cpu_info()->guest_cpu_user_regs.es) > > +/* > + * Get the bottom-of-stack, as useful for printing stack traces. This is an > + * equivalent place on the stack as guest_cpu_user_regs(), but works on an > + * arbitrary stack pointer rather than the current stack. > + */ > +#define get_printable_stack_bottom(sp) \ > + ((sp & (~(STACK_SIZE-1))) + \ > + (STACK_SIZE - sizeof(struct cpu_info) - 2*sizeof(unsigned long))) Iirc in the prior RFC version of these patches you were convinced that the adjustment by 2 stack slots was wrong (and that was the primary reason why you had asked for comments). Now you're keeping it, without making clear what made you change your opinion. Jan