Re: [PATCH v2] kasan: avoid overflowing quarantine size on low memory systems

2016-08-11 Thread Andrey Ryabinin
On 08/11/2016 04:42 PM, Alexander Potapenko wrote: > On Thu, Aug 11, 2016 at 12:50 AM, Andrew Morton > wrote: >> On Tue, 2 Aug 2016 12:27:00 +0200 Alexander Potapenko >> wrote: >> >>> If the total amount of memory assigned to quarantine is less than the >>> amount of memory assigned to per-cp

Re: [PATCH v2] kasan: avoid overflowing quarantine size on low memory systems

2016-08-11 Thread Alexander Potapenko
On Thu, Aug 11, 2016 at 12:50 AM, Andrew Morton wrote: > On Tue, 2 Aug 2016 12:27:00 +0200 Alexander Potapenko > wrote: > >> If the total amount of memory assigned to quarantine is less than the >> amount of memory assigned to per-cpu quarantines, |new_quarantine_size| >> may overflow. Instead,

Re: [PATCH v2] kasan: avoid overflowing quarantine size on low memory systems

2016-08-10 Thread Andrew Morton
On Tue, 2 Aug 2016 12:27:00 +0200 Alexander Potapenko wrote: > If the total amount of memory assigned to quarantine is less than the > amount of memory assigned to per-cpu quarantines, |new_quarantine_size| > may overflow. Instead, set it to zero. > > ... > > --- a/mm/kasan/quarantine.c > +++

Re: [PATCH v2] kasan: avoid overflowing quarantine size on low memory systems

2016-08-02 Thread Andrey Ryabinin
On 08/02/2016 01:27 PM, Alexander Potapenko wrote: > If the total amount of memory assigned to quarantine is less than the > amount of memory assigned to per-cpu quarantines, |new_quarantine_size| > may overflow. Instead, set it to zero. > > Reported-by: Dmitry Vyukov > Fixes: 55834c59098d ("mm: