[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F50D431@AcuExch.aculab.com>
Date: Tue, 9 Aug 2016 13:35:13 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Thiago Jung Bauermann' <bauerman@...ux.vnet.ibm.com>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>
CC: Dave Young <dyoung@...hat.com>,
"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"linux-ima-devel@...ts.sourceforge.net"
<linux-ima-devel@...ts.sourceforge.net>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Subject: RE: [PATCH 1/7] ima: on soft reboot, restore the measurement list
From: Thiago Jung Bauermann
> Sent: 09 August 2016 14:19
...
> > > > +/* Some details preceding the binary serialized measurement list */
> > > > +struct ima_kexec_hdr {
> > > > + unsigned short version;
> > > > + unsigned long buffer_size;
> > > > + unsigned long count;
> > > > +} __packed;
> > > > +
> > >
> > > Am I understanding it correctly that this structure is passed between
> > > kernels?
> > Yes, the header prefixes the measurement list, which is being passed on
> > the same computer to the next kernel. Could the architecture (eg.
> > LE/BE) change between soft re-boots?
>
> Yes. I am able to boot a BE kernel from an LE kernel with my patches.
64bit kernel to/from 32bit one? (if that makes sense on the hardware).
> Whether we want to support that or not is another question...
In which case shouldn't they be annotated with the endianness??
Also why '__packed' - guarantees sub-optimal code generation.
Much better to include explicit padding to align everything.
David
Powered by blists - more mailing lists