netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull request (net-next): ipsec-next 2015-04-09
@ 2015-04-09 10:33 Steffen Klassert
  2015-04-09 10:33 ` [PATCH] xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host Steffen Klassert
  2015-04-09 18:42 ` pull request (net-next): ipsec-next 2015-04-09 David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Steffen Klassert @ 2015-04-09 10:33 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

1) Prohibit the use/abuse of the xfrm netlink interface on
   32/64 bit compatibility tasks. We need a full compat
   layer before we can allow this. From Fan Du.

Please pull or let me know if there are problems.

Thanks!

The following changes since commit b898441f4ece44933af90b116b467f7864dd1ae7:

  Merge branch 'neigh_cleanups' (2015-03-02 16:43:46 -0500)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git master

for you to fetch changes up to 74005991b78a0a7a6546004fb37d33a651c613e7:

  xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host (2015-03-03 10:10:16 +0100)

----------------------------------------------------------------
Fan Du (1):
      xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host

 net/xfrm/xfrm_user.c | 5 +++++
 1 file changed, 5 insertions(+)

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

* [PATCH] xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host
  2015-04-09 10:33 pull request (net-next): ipsec-next 2015-04-09 Steffen Klassert
@ 2015-04-09 10:33 ` Steffen Klassert
  2015-04-09 18:42 ` pull request (net-next): ipsec-next 2015-04-09 David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2015-04-09 10:33 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Fan Du <fan.du@intel.com>

structure like xfrm_usersa_info or xfrm_userpolicy_info
has different sizeof when compiled as 32bits and 64bits
due to not appending pack attribute in their definition.
This will result in broken SA and SP information when user
trying to configure them through netlink interface.

Inform user land about this situation instead of keeping
silent, the upper test scripts would behave accordingly.

Signed-off-by: Fan Du <fan.du@intel.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_user.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 7de2ed9..2091664 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2423,6 +2423,11 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 	const struct xfrm_link *link;
 	int type, err;
 
+#ifdef CONFIG_COMPAT
+	if (is_compat_task())
+		return -ENOTSUPP;
+#endif
+
 	type = nlh->nlmsg_type;
 	if (type > XFRM_MSG_MAX)
 		return -EINVAL;
-- 
1.9.1

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

* Re: pull request (net-next): ipsec-next 2015-04-09
  2015-04-09 10:33 pull request (net-next): ipsec-next 2015-04-09 Steffen Klassert
  2015-04-09 10:33 ` [PATCH] xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host Steffen Klassert
@ 2015-04-09 18:42 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-04-09 18:42 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 9 Apr 2015 12:33:07 +0200

> 1) Prohibit the use/abuse of the xfrm netlink interface on
>    32/64 bit compatibility tasks. We need a full compat
>    layer before we can allow this. From Fan Du.
> 
> Please pull or let me know if there are problems.

Pulled, thanks Steffen.

This is fine as a short term fix, but long term we should translate these data
structures.

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

end of thread, other threads:[~2015-04-09 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09 10:33 pull request (net-next): ipsec-next 2015-04-09 Steffen Klassert
2015-04-09 10:33 ` [PATCH] xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host Steffen Klassert
2015-04-09 18:42 ` pull request (net-next): ipsec-next 2015-04-09 David Miller

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).