All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Andreas Schwab <schwab@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Andi Kleen <ak@novell.com>,
	Arthur Jones <arthur.jones@qlogic.com>,
	Vasily Tarasov <vtaras@openvz.org>,
	linux-kernel@vger.kernel.org, Jan Kara <jack@ucw.cz>,
	linux-arch@vger.kernel.org
Subject: Re: build fix for x86_64...
Date: Fri, 20 Jul 2007 10:45:16 -0700	[thread overview]
Message-ID: <46A0F4AC.50809@zytor.com> (raw)
In-Reply-To: <jezm1rq8gz.fsf@sykes.suse.de>

Andreas Schwab wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
> 
>> No, that would be bad.  If compat_u64 is used to carry 32-bit ABIs
>> forward into 64-bit space without needing compatibility hacks, then this
>> would actually introduce ABI incompatibilities depending on CONFIG_COMPAT!
> 
> But without CONFIG_COMPAT there is no 32-bit ABI, thus no need for
> compat_u64 in the first place.
> 

You're missing the point.

Someone introduces an interface, which uses a structure:

struct foo {
	u32 bar;
	u64 baz;
	u32 quux;
};

Now, we want to port that to 64 bits.  We can either introduce a
thunking function to mangle the argument, or we can redefine the structure:

struct foo {
	u32 bar;
	compat_u64 baz;
	u32 quux;
};

... which is still ABI compatible on 32 bits, but doesn't require thunking.

Obviously, this is not a panacea; if the original "struct foo" has also
been introduced on 64 bits before the bug is caught, then you're screwed.

	-hpa

	

  reply	other threads:[~2007-07-20 17:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 22:24 build fix for x86_64 Arthur Jones
2007-07-19 23:09 ` Andi Kleen
2007-07-19 23:54   ` Luck, Tony
2007-07-19 23:54     ` Luck, Tony
2007-07-20  8:32     ` Andi Kleen
2007-07-20 15:55       ` Randy Dunlap
2007-07-20 16:20         ` Luck, Tony
2007-07-20 16:20           ` Luck, Tony
2007-07-20 16:48           ` Matthew Wilcox
2007-07-20 17:03           ` H. Peter Anvin
2007-07-20 17:25             ` Andi Kleen
2007-07-20 17:38               ` H. Peter Anvin
2007-07-20 17:40             ` Andreas Schwab
2007-07-20 17:45               ` H. Peter Anvin [this message]
2007-07-20 18:13                 ` Andi Kleen
2007-07-20 19:29                   ` H. Peter Anvin
2007-07-20 22:08                     ` Luck, Tony
2007-07-20 22:08                       ` Luck, Tony
2007-07-20 22:34                       ` H. Peter Anvin
2007-07-20 18:27                 ` Andreas Schwab

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=46A0F4AC.50809@zytor.com \
    --to=hpa@zytor.com \
    --cc=ak@novell.com \
    --cc=arthur.jones@qlogic.com \
    --cc=jack@ucw.cz \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=schwab@suse.de \
    --cc=tony.luck@intel.com \
    --cc=vtaras@openvz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.