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]
Date:	Tue, 10 Mar 2009 14:19:11 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	the arch/x86 maintainers <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Xen-devel <xen-devel@...ts.xensource.com>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH] paravirt/xen: add pvop for page_is_ram

H. Peter Anvin wrote:
> Jeremy Fitzhardinge wrote:
>   
>> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
>>
>> A guest domain may have external pages mapped into its address space,
>> in order to share memory with other domains.  These shared pages are
>> more akin to io mappings than real RAM, and should not pass the
>> page_is_ram test.  Add a paravirt op for this so that a hypervisor
>> backend can validate whether a page should be considered ram or not.
>>
>> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
>>
>>     
>
> Why are these pages mapped as RAM in the memory map?  That is the right
> way to handle that, not by adding yet another bloody hook...
>   
Granted pages can turn up anywhere dynamically, since they're pages 
borrowed from other domains for the purposes of IO.  They're not static 
regions of non-RAM like the other cases page_is_ram() tests for,

They can't be mapped via normal pte operations (because they have 
additional state associated with them, like the grant handle), so 
/dev/mem can't just create an aliased mapping by copying the pte.

page_is_ram is used to:

   1. prevent /dev/mem from mapping non-RAM pages
   2. prevent ioremap from mapping any RAM pages
   3. testing for RAMness in PAT

3) isn't yet relevant to Xen; ioremap can't map granted pages either, so 
2) isn't terribly relevent, so the main motivation for this patch is 
1).  This allows us to reject usermode attempts to map granted pages, 
rather than oopsing (as a failed set_pte will raise a page fault).

So, more cosmetic than essential, but I don't see a better way to 
implement this functionality if its to be there at all.

    J
--
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