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

Re: [Xen-devel] [PATCH] linux-2.6.18/x86-64: fix HYPERVISOR_iret unwind annotation


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxx>
  • Date: Mon, 04 Mar 2013 09:44:04 +0000
  • Delivery-date: Mon, 04 Mar 2013 09:44:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac4YvM6i2/zqSLzheE6N+A8V959Kdw==
  • Thread-topic: [Xen-devel] [PATCH] linux-2.6.18/x86-64: fix HYPERVISOR_iret unwind annotation

On 04/03/2013 08:59, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> Minimally for %rax this needs to reflect that the value is no longer
> saved: Since the whole hypercall page is covered by a single FDE,
> subsequent entries would otherwise retain the state of %rax being saved
> on the stack, yet the offset it's being saved at is out of bounds for
> the "normal" hypercall stubs.
> 
> Breaking up the single FDE into per stub ones would increase the size
> of the resulting .eh_frame section, which is already quite big for this
> simple a piece of code.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- a/arch/x86_64/kernel/head-xen.S
> +++ b/arch/x86_64/kernel/head-xen.S
> @@ -98,6 +98,9 @@ NEXT_PAGE(hypercall_page)
> .skip 2 /* syscall */
> .if i == __HYPERVISOR_iret
> CFI_ADJUST_CFA_OFFSET -3*8
> + CFI_SAME_VALUE rax
> + CFI_SAME_VALUE r11
> + CFI_SAME_VALUE rcx
> .else
> .skip 2 /* pop %r11 */
> CFI_ADJUST_CFA_OFFSET -8
> --- a/include/asm-x86_64/dwarf2.h
> +++ b/include/asm-x86_64/dwarf2.h
> @@ -28,6 +28,7 @@
>  #define CFI_REMEMBER_STATE .cfi_remember_state
>  #define CFI_RESTORE_STATE .cfi_restore_state
>  #define CFI_UNDEFINED .cfi_undefined
> +#define CFI_SAME_VALUE .cfi_same_value
>  
>  #else
>  
> @@ -45,6 +46,7 @@
>  #define CFI_REMEMBER_STATE #
>  #define CFI_RESTORE_STATE #
>  #define CFI_UNDEFINED #
> +#define CFI_SAME_VALUE  #
>  
>  #endif
>  
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
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®.