Thread (7 messages) 7 messages, 5 authors, 2014-11-30

Re: [PATCH iproute2] ip xfrm: support 64bit kernel and 32bit userspace

From: FengYu LeiDian <hidden>
Date: 2014-11-28 08:10:14

于 2014年11月28日 15:35, Li RongQing 写道:
On Fri, Nov 28, 2014 at 3:08 PM, FengYu LeiDian
[off-list ref]  wrote:
quoted
quoted
于 2014年11月28日 14:58,roy.qing.li@gmail.com  写道:
quoted
quoted
From: Li RongQing<redacted>

The size of struct xfrm_userpolicy_info is 168 bytes for 64bit kernel, and
164 bytes for 32bit userspace because of the different alignment. and lead
to "ip xfrm" be unable to work.

add a pad in struct xfrm_userpolicy_info, and enable it by set
KERNEL_64_USERSPACE_32 to y

It's not easy to fix it like this.

Refer:
http://marc.info/?l=linux-netdev&m=139280143513650&w=2
http://thread.gmane.org/gmane.linux.network/157118/focus=157122
is it be practical to find all structures which has the issue for
64bit kernel and 32 bit
userspace, and conditionally add a pad for them
Apparently struct xfrm_userpolicy_info is not the only one,
you could try to set SA as well, it breaks also...
Fix those where it hurts, hehe :) Otherwise, the "compat layer"
fix style is good choice.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help