On Mon, 2006-20-02 at 15:05 -0800, David S. Miller wrote:
> From: jamal <[EMAIL PROTECTED]>
> Date: Mon, 20 Feb 2006 08:10:44 -0500
>
> > Explain the rules to me: is it because the alignment in xfrm_usersa_id
> > may change in the future?
>
> Alignment on x86 of u64 is different from x86_64 and ia64,
> so we must be extremely careful else we will have to
> translate these structures going in and out of compat
> processes, which is beyond painful.
>
> So we should ensure the structure layout and alignment
> is identical on all systems, 32-bit or 64-bit, in order
> to avoid these problems.
Ok. Patch attached against net-2617
Yoshfuji-san you should probably write a little doc that should be
available in the Doc/ directory.
cheers,
jamal
--
struct xfrm_aevent_id needs to be 32-bit + 64-bit align friendly.
Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]>
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index b54a129..6b42cc4 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -259,8 +259,8 @@ struct xfrm_usersa_id {
};
struct xfrm_aevent_id {
- __u32 flags;
struct xfrm_usersa_id sa_id;
+ __u32 flags;
};
struct xfrm_userspi_info {