lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 28 Oct 2018 19:05:39 +0800
From:   Gao Xiang <hsiangkao@....com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Fengguang Wu <fengguang.wu@...el.com>
Subject: Re: [PATCH] mm: simplify get_next_ra_size

Hi Matthew,

On 2018/10/28 18:23, Matthew Wilcox wrote:
> On Sun, Oct 28, 2018 at 02:13:26PM +0800, Gao Xiang wrote:
>> It's a trivial simplification for get_next_ra_size and
>> clear enough for humans to understand.
>>
>> It also fixes potential overflow if ra->size(< ra_pages) is too large.
>>
>> Cc: Fengguang Wu <fengguang.wu@...el.com>
>> Signed-off-by: Gao Xiang <hsiangkao@....com>
> 
> Reviewed-by: Matthew Wilcox <willy@...radead.org>
> 
> I also considered what would happen with underflow (passing a 'max'
> less than 16, or less than 2) and it would seem to do the right thing
> in that case.

Yeah, thanks for the review ;)

I also made a simple tester to test this in order to ensure its correctness
and the result shows the same behavior except for the overflowed case.

Thanks,
Gao Xiang

> 

Powered by blists - more mailing lists