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

Re: [Xen-devel] [xen-devel] [Patch 2/4] x86/stack: Adjust boundary conditions for printed stacks.



>>> On 09.08.13 at 21:55, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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