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  linux-hardening  linux-cve-announce  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]
Message-ID: <5b0d183d-a251-6ee5-7f5c-d58c9b90cd80@huawei.com>
Date:   Mon, 20 Nov 2017 17:46:30 +0800
From:   Yisheng Xie <xieyisheng1@...wei.com>
To:     Catalin Marinas <catalin.marinas@....com>
CC:     <akpm@...ux-foundation.org>, <mhocko@...nel.org>,
        <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kmemcheck: add scheduling point to kmemleak_scan

Hi Catalin,

On 2017/11/18 2:27, Catalin Marinas wrote:
> Please fix the subject as the tool is called "kmemleak" rather than
> "kmemcheck".

Yeah, this really is a terrible typo.

> 
> On Fri, Nov 17, 2017 at 03:03:56PM +0800, Yisheng Xie wrote:
>> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
>> index e4738d5..e9f2e86 100644
>> --- a/mm/kmemleak.c
>> +++ b/mm/kmemleak.c
>> @@ -1523,6 +1523,8 @@ static void kmemleak_scan(void)
>>  			if (page_count(page) == 0)
>>  				continue;
>>  			scan_block(page, page + 1, NULL);
>> +			if (!(pfn % 1024))
>> +				cond_resched();
> 
> For consistency with the other places where we call cond_resched() in
> kmemleak, I would use MAX_SCAN_SIZE. Something like
> 
> 			if (!(pfn % (MAX_SCAN_SIZE / sizeof(page))))
> 				cont_resched();

Yes, this will keep it consistency with the other places.

I will take both of these suggestion in next version.

Thanks
Yisheng Xie
> 
> Thanks.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ