Re: [Qemu-devel] [PATCH v3 02/22] memory-device: handle integer overflows properly

2018-09-20 Thread David Gibson
On Thu, Sep 20, 2018 at 12:32:23PM +0200, David Hildenbrand wrote: > Although unlikely in practice, we could have integer overflows on some > calculations based on addresses and sizes, leading to error checks not > triggering. > > Let's properly handle this whenever we do an addition. Make > addre

[Qemu-devel] [PATCH v3 02/22] memory-device: handle integer overflows properly

2018-09-20 Thread David Hildenbrand
Although unlikely in practice, we could have integer overflows on some calculations based on addresses and sizes, leading to error checks not triggering. Let's properly handle this whenever we do an addition. Make address_space_end point at the real end, instead of end + 1, so we don't have to han