Subject: Re: [PATCH net-next 0/2] Pack struct xfrm_usersa_info and struct xfrm_userpolicy_info

From: Fan Du <[email-masked]>
Date: Thu, 9 Jan 2014 16:24:22 +0800

On 2014年01月08日 02:07, David Miller wrote:
> From: Fan Du<[email-masked]>
> Date: Tue, 7 Jan 2014 14:48:57 +0800
>
>> >  When trying to setup IPsec configuration on a 64bits host with
>> >  iproute2(32bits compiled), the intened xfrm policy and sa is
>> >  either deficit or wrong when kernel trying to parse user land
>> >  information.
> You can't make this change without breaking userspace.
>
> We'll have to translate the data structures somehow with a compat
> layer like we have for 32/64 bit compatability for system calls.

Do you mean below code snippet?

compat_sys_sendmsg
   -> __sys_sendmsg
     -> ___sys_sendmsg
       -> get_compat_msghdr <- translate the structure here

It's a bit of late in the code flow to do the translation in
xfrm_user code, or I missed what you actually mean.

-- 
浮沉随浪只记今朝笑

--fan

_______________________________________________
Dev mailing list
[email-masked]
https://lists.strongswan.org/mailman/listinfo/dev