Re: struct fanotify_event_metadata

Eric Paris
2010-08-20T13:13:58Z

On Fri, 2010-08-20 at 11:16 +0200, Andreas Schwab wrote:
> Tvrtko Ursulin <tvrtko.ursulin@sophos.com> 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