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, 28 Oct 2013 15:19:24 +0100
From:	Andreas Werner <wernerandy@....de>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Ingo Molnar <mingo@...nel.org>, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] X86: MM: Add PAT Type write-through in combination with
 mtrr

On Mon, Oct 28, 2013 at 02:58:47PM +0100, Borislav Petkov wrote:
> On Mon, Oct 28, 2013 at 01:03:58PM +0100, Andreas Werner wrote:
> > > That doesn't mean you can return _PAGE_CACHE_WB for MTRR_TYPE_WRTHROUGH.
> > > The correct thing to do, IMHO, would be to set the PWT bit in the PTEs
> > > of those pages comprising your buffer.
> > > 
> > But why? the combination of PAT=WB and MTRR=WT is allowed isnĀ“t it?
> > What should i return instead of?
> 
> Well, since the pat code can't give you PWT, I'm thinking the cleaner
> thing would be to do it yourself. I.e., allocate a WT buffer with
> mtrr_add and then set the PWT bit of each page in that buffer.
> 
> Alternatively, your solution - albeit not that correct - is a simple one
> and probably could use a good comment in the code explaining why you're
> doing that if we decide to go that way.

At the moment if you check the function in pat.c there is also UC returned
if the requested type is not WB. So that was my idea to add WT and return WB.

If i understand it right, i have to add a comment why i do that
and if that is good enough, the patch could be submitted to the kernel?

regards 
Andy
 

> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> Sent from a fat crate under my desk. Formatting is fine.
> --
--
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