>>> On 19.11.15 at 18:34, <andrew.coop...@citrix.com> wrote:
> @@ -394,9 +401,8 @@ void show_stack_overflow(unsigned int cpu, const struct 
> cpu_user_regs *regs)
>             (void *)esp_top, (void *)esp_bottom, (void *)esp,
>             (void *)per_cpu(init_tss, cpu).esp0);
>  
> -    /* Trigger overflow trace if %esp is within 512 bytes of the guard page. 
> */
> -    if ( ((unsigned long)(esp - esp_top) > 512) &&
> -         ((unsigned long)(esp_top - esp) > 512) )
> +    /* Trigger overflow trace if %esp is anywhere within the guard page. */
> +    if ( (esp & PAGE_MASK) != (esp_top - PAGE_SIZE) )

Is this correct? I'd suspect this to be wrong when esp is in the
lower of the two primary stack pages.

Jan


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

Reply via email to