[Linux-ima-devel] [PATCH 1/7] ima: on soft reboot, restore the measurement list
David Laight
David.Laight at ACULAB.COM
Wed Aug 10 07:40:13 PDT 2016
From: Linuxppc-dev [mailto:linuxppc-dev-bounces+david.laight=aculab.com at lists.ozlabs.org] On Behalf Of
> > > So given what you have above, you'd use something like:
> > >
> > > struct ima_kexec_hdr {
> > > u16 version;
> > > u16 _reserved0;
> > > u32 _reserved1;
> > > u64 buffer_size;
> > > u64 count;
> > > };
> > >
> > > cheers
> >
> > Thanks, I'll make this change.
>
> I would suggest:
>
> struct ima_kexec_hdr {
> u64 buffer_size;
> u64 count;
> u16 version;
> };
>
> and let the compiler add the proper padding, depending on the architecture. On
> 32bit machine we'll have 4 bytes smaller allocations (compared to 64bit) while
> retaining the same functionality.
AAAArrrrgggg.....
That doesn't work for 32bit applications on 64bit hosts.
The extra bytes will make 0 difference to the allocation cost and
lots to the processing.
David
More information about the kexec
mailing list