All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] xfrm: add x86 CONFIG_COMPAT support
@ 2010-04-05 22:27 Florian Westphal
  2010-04-05 22:27 ` [PATCH 1/4] netlink: append NLMSG_DONE to compatskb, too Florian Westphal
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Florian Westphal @ 2010-04-05 22:27 UTC (permalink / raw)
  To: netdev; +Cc: johannes

3rd version of xfrm x86-compat patch set.

No changes since v2, except patch 5/5, which I dropped from the set.

This has the consequence that compat support is restricted to
applications that use sendmsg() to talk to the kernel (e.g. iproute2
would work); because write() will not go through the socket compat
layer (and thus, the MSG_CMSG_COMPAT won't be set on messages sent
by means of write() ).

I sent a patch that solved this by adding a sys_compat_write syscall
and a ->compat_aio_write() to struct file_operations to the
vfs mailing list, but that patch was ignored by the vfs people,
and the x86 folks did not exactly like the idea either.

So this leaves three alternatives:
1 - drop the whole idea and keep the current status.
2 - Add new structure definitions (with new numbering) that would work
    everywhere, keep the old ones for backwards compatibility (This
    was suggested by Arnd Bergmann).
3 - apply this patch set and tell userspace to move the sendmsg() when
    they want to work with xfrm on x86_64 with 32 bit userland.

Other than that, I am out of ideas.

Patch set description:

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.

Florian Westphal (4):
      netlink: append NLMSG_DONE to compatskb, too
      netlink: store MSG_CMSG_COMPAT flag in netlink_skb_parms
      xfrm: split nlmsg allocation and data copying
      xfrm: CONFIG_COMPAT support for x86 architecture

 include/linux/netlink.h  |    1 +
 net/netlink/af_netlink.c |   11 +
 net/xfrm/Kconfig         |    1 +
 net/xfrm/xfrm_user.c     |  508 ++++++++++++++++++++++++++++++++++++++++------
 4 files changed, 460 insertions(+), 61 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-05-13  6:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 22:27 [PATCH v3 0/4] xfrm: add x86 CONFIG_COMPAT support Florian Westphal
2010-04-05 22:27 ` [PATCH 1/4] netlink: append NLMSG_DONE to compatskb, too Florian Westphal
2010-04-05 22:27 ` [PATCH 2/4] netlink: store MSG_CMSG_COMPAT flag in netlink_skb_parms Florian Westphal
2010-04-05 22:27 ` [PATCH 3/4] xfrm: split nlmsg allocation and data copying Florian Westphal
2010-04-05 22:27 ` [PATCH 4/4] xfrm: CONFIG_COMPAT support for x86 architecture Florian Westphal
2010-04-07 10:08 ` [PATCH v3 0/4] xfrm: add x86 CONFIG_COMPAT support David Miller
2010-04-07 13:35   ` Florian Westphal
2010-04-07 13:45     ` Patrick McHardy
2010-04-07 23:48       ` David Miller
2010-04-08  9:44         ` Patrick McHardy
2010-04-08  9:54           ` David Miller
2010-04-08 11:24             ` Patrick McHardy
2010-04-08  5:00     ` David Miller
2010-05-13  6:41 ` David Miller

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.