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

Re: [Xen-devel] [PATCH] x86/irq: Fix undefined behaviour in irq_move_cleanup_interrupt()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 6 Jun 2019 16:31:02 +0200
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=SoftFail smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Thu, 06 Jun 2019 14:31:17 +0000
  • Ironport-sdr: wcsXepiTu6N7fN+7G9EKDSHBvm1GolLzkMFa/67EboRx/gUgubAqxr8huELYHwnsdYtAF1AL6Q op9f+Q+LzW9opZt4QkGVBPKJE7s87zPJS4fiheHCYgOO7MpVsKe4cpQxTI4WOypQdlViR2H3Gc anUf0Svfo4vWqHTTrdOD5IHKO6SgEoGjxvf0AIj4yAv+NQbvcaNgZophgI890hp+OpMHGke1Qr j3ky8fKxXOCaigy7GNNmt7TDOIhTFzARydxM0BmX2jff8QNVfiW8k6PnK6N18QFvEX8baphfYV mg8=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Jun 06, 2019 at 03:26:29PM +0100, Andrew Cooper wrote:
> UBSAN reports:
> 
>   (XEN) 
> ================================================================================
>   (XEN) UBSAN: Undefined behaviour in irq.c:682:22
>   (XEN) left shift of 1 by 31 places cannot be represented in type 'int'
>   (XEN) ----[ Xen-4.13-unstable  x86_64  debug=y   Not tainted ]----
>   (XEN) CPU:    16
>   (XEN) RIP:    e008:[<ffff82d0802a54ce>] ubsan.c#ubsan_epilogue+0xa/0xc2
>   <snip>
>   (XEN) Xen call trace:
>   (XEN)    [<ffff82d0802a54ce>] ubsan.c#ubsan_epilogue+0xa/0xc2
>   (XEN)    [<ffff82d0802a6009>] __ubsan_handle_shift_out_of_bounds+0x15d/0x16c
>   (XEN)    [<ffff82d08031ae77>] irq_move_cleanup_interrupt+0x25c/0x4a0
>   (XEN)    [<ffff82d08031b585>] do_IRQ+0x19d/0x104c
>   (XEN)    [<ffff82d08050c8ba>] common_interrupt+0x10a/0x120
>   (XEN)    [<ffff82d0803b13a6>] cpu_idle.c#acpi_idle_do_entry+0x1de/0x24b
>   (XEN)    [<ffff82d0803b1d83>] cpu_idle.c#acpi_processor_idle+0x5c8/0x94e
>   (XEN)    [<ffff82d0802fa8d6>] domain.c#idle_loop+0xee/0x101
>   (XEN)
>   (XEN) 
> ================================================================================
> 
> Switch to an unsigned shift, and correct the surrounding style.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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