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: <1415041782.10958.26.camel@misato.fc.hp.com>
Date:	Mon, 03 Nov 2014 12:09:42 -0700
From:	Toshi Kani <toshi.kani@...com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	hpa@...or.com, mingo@...hat.com, akpm@...ux-foundation.org,
	arnd@...db.de, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	jgross@...e.com, stefan.bader@...onical.com, luto@...capital.net,
	hmh@....eng.br, yigal@...xistor.com, konrad.wilk@...cle.com
Subject: Re: [PATCH v4 5/7] x86, mm, pat: Refactor !pat_enabled handling

On Mon, 2014-11-03 at 20:01 +0100, Thomas Gleixner wrote:
> On Mon, 27 Oct 2014, Toshi Kani wrote:
> > diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
> > index ee58a0b..96aa8bf 100644
> > --- a/arch/x86/mm/iomap_32.c
> > +++ b/arch/x86/mm/iomap_32.c
> > @@ -70,29 +70,23 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
> >  	return (void *)vaddr;
> >  }
> >  
> > -/*
> > - * Map 'pfn' using protections 'prot'
> > - */
> > -#define __PAGE_KERNEL_WC	(__PAGE_KERNEL | \
> > -				 cachemode2protval(_PAGE_CACHE_MODE_WC))
> > -
> >  void __iomem *
> >  iomap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
> >  {
> >  	/*
> > -	 * For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS.
> > -	 * PAGE_KERNEL_WC maps to PWT, which translates to uncached if the
> > -	 * MTRR is UC or WC.  UC_MINUS gets the real intention, of the
> > -	 * user, which is "WC if the MTRR is WC, UC if you can't do that."
> > +	 * For non-PAT systems, translate non-WB request to UC- just in
> > +	 * case the caller set the PWT bit to prot directly without using
> > +	 * pgprot_writecombine(). UC- translates to uncached if the MTRR
> > +	 * is UC or WC. UC- gets the real intention, of the user, which is
> > +	 * "WC if the MTRR is WC, UC if you can't do that."
> >  	 */
> > -	if (!pat_enabled && pgprot_val(prot) == __PAGE_KERNEL_WC)
> > +	if (!pat_enabled && pgprot2cachemode(prot) != _PAGE_CACHE_MODE_WB)
> >  		prot = __pgprot(__PAGE_KERNEL |
> >  				cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS));
> >  
> >  	return (void __force __iomem *) kmap_atomic_prot_pfn(pfn, prot);
> >  }
> >  EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn);
> > -#undef __PAGE_KERNEL_WC
> 
> Rejects. Please update against Juergens latest.

Yes, I have addressed this merge conflict in my next version.  I will
submit it shortly after all other comments are addressed. :-)

Thanks,
-Toshi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ