On Thu, Sep 08, 2011 at 09:38:48AM -0400, Konrad Rzeszutek Wilk wrote:
> On Wed, Sep 07, 2011 at 03:06:59PM -0400, Konrad Rzeszutek Wilk wrote:
> > > > >> +#define XENPF_enter_acpi_sleep    51
> > > > >> +struct xenpf_enter_acpi_sleep {
> > > > >> +    /* IN variables */
> > > > >> +    uint16_t pm1a_cnt_val;      /* PM1a control value. */
> > > > >> +    uint16_t pm1b_cnt_val;      /* PM1b control value. */
> > > > > These are uint32_t in native Linux--why truncate in the API and not 
> > > > > at use?
> > > > 
> > > > Does ACPI define them as 32 or 16 bit?
> > > 
> > > The spec indicates that the length is variable and could be up to 32 bits 
> > > (AFAICT).  And Linux uses 32b, which your other patch is truncating for 
> > > this call.
> > 
> > Yikes! Well, looks like we need to fix the Xen ABI too. Lets get that fixed
> > and also address all the other comments (thanks for looking at it) you 
> > pointed
> > out.
> 
> So read up the ACPI spec and it says that the minimum is 2 bytes and does not
> say anything about the maximum. The list of what the bits do stops at 16-bits
> (the last two are reserved) so I think we are actually OK.

Perhaps a better way of doing this is in the hypercall (in the Linux kernel)
check if the other 16-bits have any value. And if so WARN (with an appropiate
message to email xen-devel) and also bail out on making the hypercall. That
way we can find out about this.

> 
> Albeit if the spec starts using more of them - then yes we will need to revist
> this Xen ABI and potentially add a new call.
> 
> _______________________________________________
> Xen-devel mailing list
> xen-de...@lists.xensource.com
> http://lists.xensource.com/xen-devel

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to