WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: /dev/mem and /dev/kmem

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: /dev/mem and /dev/kmem
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Thu, 22 Mar 2007 01:47:28 +0000
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Delivery-date: Wed, 21 Mar 2007 18:44:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2270ED7.BFA0%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C2270ED7.BFA0%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
> > So how about applications which simply use /dev/mem to map
> > normal domain memory? Seems this breaks compatibility
> > in user level though desired for above Xserver case... Or such
> > case is rare?
>
> This case seems not to occur in practise (no complaints so far and our
> /dev/mem has had this limitation since day one). This is perhaps not
> surprising: really not much good can come out of direct grokking of
> kernel-maintained memory without the kernel's knowledge.

IIRC the Linux /dev/mem didn't support mapping "real" memory for ages anyhow 
(causing a certain amount of confusion to users / developers) so it's not 
surprising if nobody out there is using it!  It was mainly there to keep X 
happy.

Cheers,
Mark

> > BTW, I didn't find code to protect Xen to be mapped in this path,
> > like in get_page_from_l1e(). Could you help pointing out?
>
> Not sure how you mean. Only pages that explicitly are owned by a domain and
> have a non-zero refcount can have get_page() succeed on them. So random
> Xen-owned pages are safe.
>
>  -- Keir
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>