netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fwestphal@astaro.com>
To: netdev@vger.kernel.org
Cc: johannes@sipsolutions.net
Subject: [PATCH v2 0/5] xfrm: add x86 CONFIG_COMPAT support
Date: Fri, 19 Feb 2010 13:41:42 +0100	[thread overview]
Message-ID: <1266583307-3049-1-git-send-email-fwestphal@astaro.com> (raw)

2nd version of xfrm x86-compat patch set.

please refer to the individual patches for the list of
changes since v1.

At the moment it is not possible to use the xfrm netlink interface on
x86_64 with a 32bit userland.

The problem exists because a few structures, e.g. struct xfrm_usersa_info,
have different sizes in user/kernelspace (3 byte padding on x86, 7
byte on x86_64) due to different alignment requirements of "u64".

First two patches add necessary CONFIG_COMPAT_NETLINK_MESSAGES
infrastructure to netlink in/output path.

Patch 3 is a refactoring patch to split functionality (especially
nlmsg allocation and adding data to the nlmsg) in order to
re-use code and ease review.

Patch 4 adds CONFIG_COMPAT_FOR_U64_ALIGNMENT support to xfrm.

Patch 5 sets CMSG_MSG_COMPAT in sock_aio_write(), depending on
is_compat_task().  If patch 5 is deemed too ugly, just pretend it
doesn't exist; userspace can be patched to use sendmsg instead of
write() to fix the problem, too.

 include/linux/netlink.h  |    1 
 net/netlink/af_netlink.c |   11 +
 net/socket.c             |    4 
 net/xfrm/Kconfig         |    1 
 net/xfrm/xfrm_user.c     |  505 +++++++++++++++++++++++++++++++++++++++++------
 5 files changed, 462 insertions(+), 60 deletions(-)

             reply	other threads:[~2010-02-19 12:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-19 12:41 Florian Westphal [this message]
2010-02-19 12:41 ` [PATCH 1/5] netlink: append NLMSG_DONE to compatskb, too Florian Westphal
2010-02-19 12:41 ` [PATCH 2/5] netlink: store MSG_CMSG_COMPAT flag in netlink_skb_parms Florian Westphal
2010-02-19 12:49   ` Johannes Berg
2010-02-19 13:34     ` Florian Westphal
2010-02-19 12:41 ` [PATCH 3/5] xfrm: split nlmsg allocation and data copying Florian Westphal
2010-02-19 12:41 ` [PATCH 4/5] xfrm: CONFIG_COMPAT support for x86 architecture Florian Westphal
2010-02-19 12:41 ` [PATCH 5/5] net: sock_aio_write: set CMSG_MSG_COMPAT flag if is_compat_task Florian Westphal
2010-02-26  9:16   ` David Miller
2010-02-26  9:17     ` David Miller
2010-02-26 10:03     ` Florian Westphal
2010-02-26 10:06       ` David Miller

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=1266583307-3049-1-git-send-email-fwestphal@astaro.com \
    --to=fwestphal@astaro.com \
    --cc=johannes@sipsolutions.net \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).