From: Stephen Hemminger <stephen@networkplumber.org>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: roy.qing.li@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ip xfrm: support 64bit kernel and 32bit userspace
Date: Sun, 30 Nov 2014 09:42:48 -0800 [thread overview]
Message-ID: <20141130094248.1fbc81a4@urahara> (raw)
In-Reply-To: <1417311202.7215.109.camel@decadent.org.uk>
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
On Sun, 30 Nov 2014 01:33:22 +0000
Ben Hutchings <ben@decadent.org.uk> wrote:
> On Fri, 2014-11-28 at 14:58 +0800, roy.qing.li@gmail.com wrote:
> > From: Li RongQing <roy.qing.li@gmail.com>
> >
> > The size of struct xfrm_userpolicy_info is 168 bytes for 64bit kernel, and
> > 164 bytes for 32bit userspace because of the different alignment.
>
> I think it's specific to x86 as other architectures have the same type
> alignments for 32- and 64-bit variants.
>
> > and lead to "ip xfrm" be unable to work.
> >
> > add a pad in struct xfrm_userpolicy_info, and enable it by set
> > KERNEL_64_USERSPACE_32 to y
> [...]
>
> This doesn't make sense. 32-bit compat needs to work like 32-bit native
> - no exceptions, no workarounds in userland. And if you really want to
> work around this in userland you'll need a run-time, not compile-time,
> check.
I agree with Ben, this is not a good solution.
It creates a 3rd ABI (32, 64, and 32/64).
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-11-30 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 6:58 [PATCH iproute2] ip xfrm: support 64bit kernel and 32bit userspace roy.qing.li
2014-11-28 7:08 ` FengYu LeiDian
2014-11-28 7:35 ` Li RongQing
2014-11-28 8:07 ` FengYu LeiDian
2014-11-28 10:47 ` David Laight
2014-11-30 1:33 ` Ben Hutchings
2014-11-30 17:42 ` Stephen Hemminger [this message]
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=20141130094248.1fbc81a4@urahara \
--to=stephen@networkplumber.org \
--cc=ben@decadent.org.uk \
--cc=netdev@vger.kernel.org \
--cc=roy.qing.li@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).