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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 1 May 2017 21:32:14 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Baoquan He <bhe@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Kees Cook <keescook@...omium.org>,
        Thomas Garnier <thgarnie@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yasuaki Ishimatsu <yasu.isimatu@...il.com>,
        Jinbum Park <jinb.park7@...il.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Yinghai Lu <yinghai@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Dave Young <dyoung@...hat.com>
Subject: Re: [PATCH v2] x86/mm: Fix incorrect for loop count calculation in
 sync_global_pgds


* Baoquan He <bhe@...hat.com> wrote:

>  arch/x86/mm/init_64.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 15173d3..dfa9edb 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -96,7 +96,9 @@ void sync_global_pgds(unsigned long start, unsigned long end)
>  {
>  	unsigned long address;
>  
> -	for (address = start; address <= end; address += PGDIR_SIZE) {
> +	for (address = start; address <= end;
> +	     address = ALIGN(address + 1, PGDIR_SIZE)) {
> +
>  		const pgd_t *pgd_ref = pgd_offset_k(address);
>  		struct page *page;

This patch does not apply cleanly to tip:master.

You can avoid the col80 problems by renaming 'address' to the canonical 'addr' 
name, the loop will become:

	for (addr = start; addr <= end; addr = ALIGN(addr + 1, PGDIR_SIZE)) {

... which fits into 80 cols.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ