From d14b49bef6c1da2e90e7487c2594d93376e8dfce Mon Sep 17 00:00:00 2001 From: Yixun Lan Date: Fri, 13 Jul 2018 16:20:13 +0800 Subject: [PATCH] net: xfrm: enable compat xfrm syscall PD#170491: net: xfrm: enable compat xfrm syscall When using 32bit user space and 64bit kernel in ARM64 platform, we do not need to disable compat syscall, since there is struct size difference between user space and kernel space. This will fix error in xfrm test cases of VtsKernelNetTest. Change-Id: Ifd6c1f5e678138286678d5c119c0efa42d5b3a59 Signed-off-by: Yixun Lan --- net/xfrm/xfrm_state.c | 2 ++ net/xfrm/xfrm_user.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index d869b1d..77bf460 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1886,9 +1886,11 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen struct xfrm_policy *pol = NULL; #ifdef CONFIG_COMPAT +#ifndef CONFIG_AMLOGIC_MODIFY if (in_compat_syscall()) return -EOPNOTSUPP; #endif +#endif if (!optval && !optlen) { xfrm_sk_policy_insert(sk, XFRM_POLICY_IN, NULL); diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 3920030..a75f4f2 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -2501,9 +2501,11 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) int type, err; #ifdef CONFIG_COMPAT +#ifndef CONFIG_AMLOGIC_MODIFY if (in_compat_syscall()) return -EOPNOTSUPP; #endif +#endif type = nlh->nlmsg_type; if (type > XFRM_MSG_MAX) -- 2.7.4