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  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, 26 Oct 2009 14:12:52 -0700
From:	Jesse Barnes <jesse.barnes@...el.com>
To:	Suresh Siddha <suresh.b.siddha@...el.com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Thomas Schlichter <thomas.schlichter@....de>,
	LKML <linux-kernel@...r.kernel.org>,
	Eric Anholt <eric@...olt.net>,
	Thomas Hellstrom <thellstrom@...are.com>,
	Jan Beulich <JBeulich@...ell.com>
Subject: Re: [patch] x86, pat: return EINVAL for pci mmap WC request for
 !pat_enabled

On Mon, 26 Oct 2009 13:21:32 -0800
Suresh Siddha <suresh.b.siddha@...el.com> wrote:

> Thomas Schlichter reported:
> > X.org uses libpciaccess which tries to mmap with write combining
> > enabled via /sys/bus/pci/devices/*/resource0_wc. Currently, when
> > PAT is not enabled, the kernel does fall back to uncached mmap.
> > Then libpciaccess thinks it succeeded mapping with write combining
> > enabled and does not set up suited MTRR entries. ;-(
> 
> Instead of silently mapping pci mmap region as UC minus in the case
> of !pat_enabled and wc request, we can return error. Eric Anholt
> mentioned that caller (like X) typically follows up with UC minus pci
> mmap request and if there is a free mtrr slot, caller will manage
> adding WC mtrr.
> 
> Jesse Barnes says:
> > Older versions of libpciaccess will behave better if we do it that
> > way (iirc it only allocates an MTRR if the resource_wc file doesn't
> > exist or fails to get mapped).
> 
> Reported-by: Thomas Schlichter <thomas.schlichter@....de>
> Signed-off-by: Thomas Schlichter <thomas.schlichter@....de>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
> Acked-by: Eric Anholt <eric@...olt.net>
> Acked-by: Jesse Barnes <jbarnes@...tuousgeek.org>
> ---
> 

Applied to my linux-next branch, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
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