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: <924EFEDD5F540B4284297C4DC59F3DEEF313A6@orsmsx423.amr.corp.intel.com>
Date:	Sat, 26 Apr 2008 09:54:23 -0700
From:	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>
To:	"Ingo Molnar" <mingo@...e.hu>,
	"Linus Torvalds" <torvalds@...ux-foundation.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>, <linux-kernel@...r.kernel.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Thomas Gleixner" <tglx@...utronix.de>
Subject: RE: [git pull] x86 PAT changes

 

>-----Original Message-----
>From: linux-kernel-owner@...r.kernel.org 
>[mailto:linux-kernel-owner@...r.kernel.org] On Behalf Of Ingo Molnar
>Sent: Saturday, April 26, 2008 1:56 AM
>To: Linus Torvalds
>Cc: H. Peter Anvin; linux-kernel@...r.kernel.org; Andrew 
>Morton; Thomas Gleixner
>Subject: Re: [git pull] x86 PAT changes
>
>
>* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
>> On Fri, 25 Apr 2008, H. Peter Anvin wrote:
>> > 
>> > The problem is that that can create cached/uncached aliases, which 
>> > can cause some processors to lock up (especially AMD is known to 
>> > have a lot of errata in this area.)
>> 
>> Umm.. I don't think you understand. Right now, NONPROMISC_DEVMEM 
>> doesn't just disable mmap() on /dev/mem, it disables totally regular 
>> reads and writes too. That seems pretty damn excessive.
>> 
>> If it was just mmap(), I don't think it would matter much. I don't 
>> think we traditionally even supported mmap() on real RAM 
>(because the 
>> page counting would get confused), and that actually got supported 
>> only thanks to VM changes that made it possible.
>> 
>> But read/write has always been supported, and shouldn't cause any 
>> cached/uncached aliases!
>
>You are right, there should be no architectural need to make PAT 
>dependent on nonpromisc-devmem, and thus the patch below 
>should be safe.
>

Agreed that NONPROMISC_DEVMEM is not really needed for read/write. But,
we will still need it for /dev/mem.

The problem with /dev/mem maps of RAM is situation like this:
1) drivers does vmalloc(), followed by set_memory_uc.
2) User does a /dev/mem map of that vmalloced physical address. User
will get a UC mapping for /dev/mem.
3) driver changes the memory to set_memory_wb and frees the memory.
4) user mapping for this address is still UC which will lead to
aliasing.

Read/write is ok, as they will just use __va for RAM to access and that
will always be consistent.

Thanks,
Venki
--
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