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]
Message-ID: <alpine.DEB.2.20.1612142304110.5283@nanos>
Date:   Wed, 14 Dec 2016 23:07:52 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
cc:     Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
        x86@...nel.org, Andy Lutomirski <luto@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/mm: drop unused argument sync_global_pgds()

On Mon, 12 Dec 2016, Kirill A. Shutemov wrote:

> There's no users that wants sync_global_pgd(.remove=1) sinc af2cf278ef4f
> ("x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()").
> 
> Let's drop 'remove'.

The argument is named 'removed' ....

>  /*
> - * When memory was added/removed make sure all the processes MM have
> + * When memory was added make sure all the processes MM have
>   * suitable PGD entries in the local PGD level page.
>   */
> -void sync_global_pgds(unsigned long start, unsigned long end, int removed)
> +void sync_global_pgds(unsigned long start, unsigned long end)
>  {
>  	unsigned long address;
>  
> @@ -100,14 +100,6 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
>  		const pgd_t *pgd_ref = pgd_offset_k(address);
>  		struct page *page;
>  
> -		/*
> -		 * When it is called after memory hot remove, pgd_none()
> -		 * returns true. In this case (removed == 1), we must clear
> -		 * the PGD entries in the local PGD level page.
> -		 */
> -		if (pgd_none(*pgd_ref) && !removed)
> -			continue;
> -

Errm. This continues, when pgd_none(*pgd_ref) is true AND removed is false,
i.e. that is NOT the removed == true case which you are aiming to drop.

> +                        if (pgd_none(*pgd))
> +                            set_pgd(pgd, *pgd_ref);

This is whitespace damaged in several ways.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ