[strongSwan-dev] [PATCH net-next 0/2] Pack struct xfrm_usersa_info and struct xfrm_userpolicy_info

Fan Du fan.du at windriver.com
Thu Jan 9 09:24:22 CET 2014



On 2014年01月08日 02:07, David Miller wrote:
> From: Fan Du<fan.du at windriver.com>
> 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




More information about the Dev mailing list