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]
Date:   Mon, 7 Oct 2019 17:48:52 +0200
From:   Joerg Roedel <jroedel@...e.de>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     Joerg Roedel <joro@...tes.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        hpa@...or.com, x86@...nel.org, rjw@...ysocki.net, lenb@...nel.org,
        james.morse@....com, tony.luck@...el.com,
        linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH] x86/mm: Split vmalloc_sync_all()

Hi Dave,

thanks for your review!

On Mon, Oct 07, 2019 at 08:30:51AM -0700, Dave Hansen wrote:
> On 10/7/19 8:16 AM, Joerg Roedel wrote:
> > @@ -318,7 +328,7 @@ static void dump_pagetable(unsigned long address)
> >  
> >  #else /* CONFIG_X86_64: */
> >  
> > -void vmalloc_sync_all(void)
> > +void vmalloc_sync_mappings(void)
> >  {
> >  	sync_global_pgds(VMALLOC_START & PGDIR_MASK, VMALLOC_END);
> >  }
> 
> FWIW, I generally detest the use of __weak. :)

Yeah, I don't like it either, but in this case it is probably better
than empty stubs in all architectures besides x86 :)

> In this case, it ends up letting us gloss over the fact that we have a
> 32/64-bit asymmetry.  It would probably be nice to actually have a
> 64-bit implementation that comes along with a nice comment.  Maybe this
> in vmalloc_sync_mappings():
> 
> 	/*
> 	 * 64-bit mappings might allocate new p4d/pud pages
> 	 * that need to be propagated to all tasks' PGDs.
> 	 */
> 
> which would pair nicely with:
> 
> void vmalloc_sync_unmappings(void)
> {
> 	/*
> 	 * Unmappings never allocate or free p4d/pud pages.
> 	 * No work is required here.
> 	 */
> }

Yes, that makes, I will add these comments in V2.

Thanks,

	Joerg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ