Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] i6300esb: Fix signed integer overflow

2015-03-24 Thread Paolo Bonzini
On 24/03/2015 01:22, David Gibson wrote: > On Mon, Mar 23, 2015 at 10:54:39AM +0100, BALATON Zoltan wrote: >> On Mon, 23 Mar 2015, David Gibson wrote: >>> If the guest programs a sufficiently large timeout value an >>> integer overflow can occur in i6300esb_restart_timer(). e.g. >>> if the maxim

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] i6300esb: Fix signed integer overflow

2015-03-23 Thread David Gibson
On Mon, Mar 23, 2015 at 10:54:39AM +0100, BALATON Zoltan wrote: > On Mon, 23 Mar 2015, David Gibson wrote: > >If the guest programs a sufficiently large timeout value an integer > >overflow can occur in i6300esb_restart_timer(). e.g. if the maximum > >possible timer preload value of 0xf is pro

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] i6300esb: Fix signed integer overflow

2015-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2015, David Gibson wrote: If the guest programs a sufficiently large timeout value an integer overflow can occur in i6300esb_restart_timer(). e.g. if the maximum possible timer preload value of 0xf is programmed then we end up with the calculation: timeout = get_ticks_per_sec