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: <a40d8c9e5c0c3c412d347a24a7c66010@codeaurora.org>
Date:   Mon, 12 Nov 2018 11:57:17 +0530
From:   Arun KS <arunks@...eaurora.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     keescook@...omium.org, khlebnikov@...dex-team.ru,
        minchan@...nel.org, getarunks@...il.com,
        gregkh@...uxfoundation.org, akpm@...ux-foundation.org,
        mhocko@...nel.org, vbabka@...e.cz, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, vatsa@...eaurora.org
Subject: Re: [PATCH v4 1/4] mm: reference totalram_pages and managed_pages
 once per function

Hello Matthew,

Thanks for reviewing.
On 2018-11-12 11:43, Matthew Wilcox wrote:
> On Mon, Nov 12, 2018 at 11:37:46AM +0530, Arun KS wrote:
>> +++ b/arch/um/kernel/mem.c
>> @@ -51,8 +51,7 @@ void __init mem_init(void)
>> 
>>  	/* this will put all low memory onto the freelists */
>>  	memblock_free_all();
>> -	max_low_pfn = totalram_pages;
>> -	max_pfn = totalram_pages;
>> +	max_pfn = max_low_pfn = totalram_pages;
> 
> We don't normally do "a = b = c".  How about:
> 
>  	max_low_pfn = totalram_pages;
> -	max_pfn = totalram_pages;
> +	max_pfn = max_low_pfn;

Point taken. Will fix it.

> 
>> +++ b/arch/x86/kernel/cpu/microcode/core.c
>> @@ -434,9 +434,10 @@ static ssize_t microcode_write(struct file *file, 
>> const char __user *buf,
>>  			       size_t len, loff_t *ppos)
>>  {
>>  	ssize_t ret = -EINVAL;
>> +	unsigned long totalram_pgs = totalram_pages;
> 
> Can't we use a better variable name here?  Even nr_pages would look
> better to me.

Looks better.

Regards,
Arun

> 
>> +++ b/drivers/hv/hv_balloon.c
>> +	unsigned long totalram_pgs = totalram_pages;
> 
> Ditto
> 
>> +++ b/fs/file_table.c
>> +	unsigned long totalram_pgs = totalram_pages;
> 
> ... throughout, I guess.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ