Re: struct fanotify_event_metadata

From: Eric Paris
Date: Fri Aug 20 2010 - 09:14:05 EST


On Fri, 2010-08-20 at 11:16 +0200, Andreas Schwab wrote:
> Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxx> writes:
>
> > Shrink pid field in the fanotify_event_metadata to 32-bit to match
> > the kernel representation. Pull mask field up since it logically
> > comes before event auxiliary data and also makes for a nicer
> > alignment.
>
> That won't buy you much wrt. alignment though, due to the packed
> attribute.

Can you help me understand the packed attribute and why it hurts in this
case? It's not going to change the alignment or placement of anything
and I saw it as just being needed to make sure everything would continue
to work in the future.

I'm going to compile a couple of test programs (I only have x86 and
x86_64) to see if I can find what the assembly is doing different but
maybe you can point me at the information more easily?

-Eric


--
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/