Re: [PATCH] types.h: define __aligned_u64 and expose to userspace

From: Andrew Morton
Date: Fri Oct 15 2010 - 05:02:36 EST


On Fri, 15 Oct 2010 10:43:11 +0200 Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:

> On Fri, Oct 15, 2010 at 12:24:55AM -0400, Eric Paris wrote:
> > We currently have a kernel internal type called aligned_u64 which aligns
> > __u64's on 8 bytes boundaries even on systems which would normally align
> > them on 4 byte boundaries. This patch creates a new type __aligned_u64
> > which does the same thing but which is exposed to userspace rather than
> > being kernel internal.
> >
> > Based-on-patch-by: Andreas Gruenbacher <agruen@xxxxxxx>
> > Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
>
> Acked-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> but only if you:
>
> > +/* this is a special 64bit data type that is 8-byte aligned */
>
> Expand this comment a bit that that using this type as a
> replacement for u64 is recommended
> for any user visible 64bit value in a structure and that it
> avoids problem with the compat layer on x86-64.
>

Well yes, I was actually about to write that comment. But it should
describe the compat problems fully?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/