Re: [libvirt] [PATCH 2/2] qemu: domain: Prevent overflows in memory alignment code

2016-01-05 Thread Guido Günther
Hi, On Mon, Jan 04, 2016 at 09:39:20AM +0100, Peter Krempa wrote: > On Sun, Jan 03, 2016 at 18:26:56 +0100, Guido Günther wrote: > > Hi, > > On Tue, Dec 01, 2015 at 03:11:05PM +0100, Peter Krempa wrote: > > > Since libvirt for dubious historical reasons stores memory size as > > > kibibytes, it's

Re: [libvirt] [PATCH 2/2] qemu: domain: Prevent overflows in memory alignment code

2016-01-04 Thread Peter Krempa
On Sun, Jan 03, 2016 at 18:26:56 +0100, Guido Günther wrote: > Hi, > On Tue, Dec 01, 2015 at 03:11:05PM +0100, Peter Krempa wrote: > > Since libvirt for dubious historical reasons stores memory size as > > kibibytes, it's possible that the alignments done in the qemu code > > overflow the the

Re: [libvirt] [PATCH 2/2] qemu: domain: Prevent overflows in memory alignment code

2016-01-03 Thread Guido Günther
Hi, On Tue, Dec 01, 2015 at 03:11:05PM +0100, Peter Krempa wrote: > Since libvirt for dubious historical reasons stores memory size as > kibibytes, it's possible that the alignments done in the qemu code > overflow the the maximum representable size in bytes. The XML parser > code handles them in

[libvirt] [PATCH 2/2] qemu: domain: Prevent overflows in memory alignment code

2015-12-01 Thread Peter Krempa
Since libvirt for dubious historical reasons stores memory size as kibibytes, it's possible that the alignments done in the qemu code overflow the the maximum representable size in bytes. The XML parser code handles them in bytes in some stages. Prevent this by doing overflow checks when alinging