Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-28 Thread Laurent Vivier
Le 02/05/2020 à 18:12, Jonathan Marler a écrit : > Fixes: https://bugs.launchpad.net/bugs/1876373 > > This code path in mmap occurs when a page size is decreased with mremap. > When a section of pages is shrunk, qemu calls mmap_reserve on the pages that > were released. However, it has the

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-28 Thread Laurent Vivier
Le 02/05/2020 à 18:12, Jonathan Marler a écrit : > Fixes: https://bugs.launchpad.net/bugs/1876373 > > This code path in mmap occurs when a page size is decreased with mremap. > When a section of pages is shrunk, qemu calls mmap_reserve on the pages that > were released. However, it has the

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-19 Thread Philippe Mathieu-Daudé
Hi Jonathan. On 5/19/20 10:11 AM, Stefano Garzarella wrote: Hi Jonathan, thanks for the patch! CCing Riku and Laurent. On Mon, May 18, 2020 at 12:13:41PM -0600, Jonathan Marler wrote: Been a few more days. Not sure how often I should be pinging. If this is too much to ping every few days

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-19 Thread Stefano Garzarella
Hi Jonathan, thanks for the patch! CCing Riku and Laurent. On Mon, May 18, 2020 at 12:13:41PM -0600, Jonathan Marler wrote: > Been a few more days. Not sure how often I should be pinging. If this is > too much to ping every few days let me know. Is not too much, but next time is better to CC

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-18 Thread Jonathan Marler
Been a few more days. Not sure how often I should be pinging. If this is too much to ping every few days let me know. On Fri, May 15, 2020 at 7:36 AM Jonathan Marler wrote: > Been a couple weeks, checking to see if anyone has looked at this. > > On Sat, May 2, 2020 at 5:43 PM Jonathan Marler

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-15 Thread Jonathan Marler
Been a couple weeks, checking to see if anyone has looked at this. On Sat, May 2, 2020 at 5:43 PM Jonathan Marler wrote: > FYI, I applied this patch to the qemu build that zig uses to run > non-native tests ( > https://github.com/ziglang/qemu-static/blob/master/patch/mremap-underflow.diff > ) >

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-02 Thread Jonathan Marler
FYI, I applied this patch to the qemu build that zig uses to run non-native tests ( https://github.com/ziglang/qemu-static/blob/master/patch/mremap-underflow.diff ) After applying it, my new code that calls mremap now passes, whereas before the fix I was getting a segfault. On Sat, May 2, 2020

[PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-02 Thread Jonathan Marler
Fixes: https://bugs.launchpad.net/bugs/1876373 This code path in mmap occurs when a page size is decreased with mremap. When a section of pages is shrunk, qemu calls mmap_reserve on the pages that were released. However, it has the diff operation reversed, subtracting the larger old_size

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-02 Thread Jonathan Marler
Yes the first patch was incorrect. The second patch should be the correct one. Thanks for the guidance. I have created a new patch with a "Fixes: ..." and a description of the fix, and have sent that patch to qemu-devel@nongnu.org On Sat, May 2, 2020 at 2:38 AM Laurent Vivier wrote: > Hi, >

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-02 Thread Laurent Vivier
Hi, does this patch replace your previous one? Please add more details in the description, as you did in the launchpad bug. You can also add: Fixes: https://bugs.launchpad.net/bugs/1876373 You must also send the patch to qemu-devel@nongnu.org Thanks, Laurent Le 02/05/2020 à 09:49, Jonathan