public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Chris Wright <chrisw-69jw2NvuJkxg9hUCZPvPmw@public.gmane.org>
Cc: kvm-devel
	<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	andrea-atKUWr5tajBWk0Htik3J/w@public.gmane.org,
	yaniv-atKUWr5tajBWk0Htik3J/w@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org
Subject: Re: [RFC][PATCH 3/5] ksm source code
Date: Thu, 24 Jan 2008 21:41:06 +0200	[thread overview]
Message-ID: <4798E9D2.8030503@qumranet.com> (raw)
In-Reply-To: <20080124175132.GR3627-JyIX8gxvWYPr2PDY2+4mTGD2FQJk+8+b@public.gmane.org>

Chris Wright wrote:
>>>  struct ksm_memory_region {
>>>  	__u32 npages; /* number of pages to share */
>>>  	__u64 addr; /* the begining of the virtual address */
>>>  };
>>>       
>> why isnt it compat safe?
>>     
>
> 32-bit has more relaxed alignment requirement for __u64 (4 bytes)
> than 64-bit (8 bytes).  choices are reverse the order or add padding
> (can test by compiling structure in 32 and 64 bit).
>   

Reversing the order isn't good enough, since the structure size would be 
different, and that is embedded in the ioctl number.  Padding is necessary.

[wishlist: struct { ... } __attribute__((abi_x86_64));]

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-01-24 19:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 16:12 [RFC][PATCH 3/5] ksm source code Izik Eidus
     [not found] ` <4794C477.3090708-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-24  7:24   ` Chris Wright
     [not found]     ` <20080124072432.GQ3627-JyIX8gxvWYPr2PDY2+4mTGD2FQJk+8+b@public.gmane.org>
2008-01-24  9:07       ` Izik Eidus
     [not found]         ` <4798554D.1010300-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-24  9:22           ` Avi Kivity
     [not found]             ` <479858CE.3060704-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-24  9:48               ` Izik Eidus
2008-01-24 17:53               ` Chris Wright
2008-01-24 17:51           ` Chris Wright
     [not found]             ` <20080124175132.GR3627-JyIX8gxvWYPr2PDY2+4mTGD2FQJk+8+b@public.gmane.org>
2008-01-24 19:41               ` Avi Kivity [this message]
     [not found]                 ` <4798E9D2.8030503-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-24 20:34                   ` Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4798E9D2.8030503@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=andrea-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=chrisw-69jw2NvuJkxg9hUCZPvPmw@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=yaniv-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox