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

xen-devel

[Top] [All Lists]

Re: [Xen-devel] Re: [PATCH 2.6.12.6-xen] sysfs attributes for xen

To: "Mike D. Day" <ncmike@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 2.6.12.6-xen] sysfs attributes for xen
From: Dave Hansen <haveblue@xxxxxxxxxx>
Date: 2006年1月30日 09:04:25 -0800
Cc: Greg KH <greg@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, lkml <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: 2006年1月30日 17:14:15 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <43DE45A4.6010808@xxxxxxxxxx>
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: <43DAD4DB.4090708@xxxxxxxxxx> <1138637931.19801.101.camel@xxxxxxxxxxxxxxxxxxxxx> <43DE45A4.6010808@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2006年01月30日 at 11:58 -0500, Mike D. Day wrote:
> Dave Hansen wrote:
> > Where does that 1024 come from? Is it a guarantee from Xen that it will
> > never fill more than 1k? I know it is a long shot, but what if the page
> > size is less than 1k? Would this function have strange results?
>
> Per the xen headers, this particular hcall option returns a typedef
> char[1024] thingy_t (which is simply a char [1024] in the patch). Yes,
> if the page size is < 1024 there is a problem. So a check against
> PAGE_SIZE may be prudent. 
I was just looking, and noticed that there is a check in the sysfs
->show() code that checks for return values greater than PAGE_SIZE and
BUG()s, so you at least won't get silent corruption. That is probably
good enough to not worry about it.
In the final version, there will be available Xen headers, and the patch
won't need the open-coded 1024?
-- Dave
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] Re: [PATCH 2.6.12.6-xen] sysfs attributes for xen , Mike D. Day
Next by Date: Re: [Xen-devel] Re: [PATCH 2.6.12.6-xen] sysfs attributes for xen , Mike D. Day
Previous by Thread: Re: [Xen-devel] Re: [PATCH 2.6.12.6-xen] sysfs attributes for xen , Mike D. Day
Next by Thread: Re: [Xen-devel] Re: [PATCH 2.6.12.6-xen] sysfs attributes for xen , Mike D. Day
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /