RE: [Linux-ima-devel] [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-10 Thread David Laight
From: Linuxppc-dev [mailto:linuxppc-dev-bounces+david.laight=aculab@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; > >

Re: [Linux-ima-devel] [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-10 Thread Petko Manolov
On 16-08-10 14:40:13, David Laight wrote: > From: Linuxppc-dev > [mailto:linuxppc-dev-bounces+david.laight=aculab@lists.ozlabs.org] On > Behalf Of > > > > So given what you have above, you'd use something like: > > > > > > > > struct ima_kexec_hdr { > > > > u16 version; > > > >

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-10 Thread Mimi Zohar
On Wed, 2016-08-10 at 19:52 +1000, Michael Ellerman wrote: > Thiago Jung Bauermann writes: > > > Am Mittwoch, 10 August 2016, 13:41:08 schrieb Michael Ellerman: > >> Thiago Jung Bauermann writes: > >> > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > >> >> On Tue, 2016-08-09 at 20:59

Re: [Linux-ima-devel] [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-10 Thread Petko Manolov
On 16-08-10 08:54:36, Mimi Zohar wrote: > On Wed, 2016-08-10 at 19:52 +1000, Michael Ellerman wrote: > > Thiago Jung Bauermann writes: > > > > > Am Mittwoch, 10 August 2016, 13:41:08 schrieb Michael Ellerman: > > >> Thiago Jung Bauermann writes: > > >> > Am Dienstag, 09 August 2016, 09:01:13 sch

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-10 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Am Mittwoch, 10 August 2016, 13:41:08 schrieb Michael Ellerman: >> Thiago Jung Bauermann writes: >> > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: >> >> On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: >> >> > Mimi Zohar writes: >> >> > >

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-10 Thread Thiago Jung Bauermann
Am Mittwoch, 10 August 2016, 13:41:08 schrieb Michael Ellerman: > Thiago Jung Bauermann writes: > > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > >> On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > >> > Mimi Zohar writes: > >> > > +/* Some details preceding the binary s

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: >> On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: >> > Mimi Zohar writes: >> > > diff --git a/security/integrity/ima/ima.h >> > > b/security/integrity/ima/ima.h >> > > index b5728da..84e8d36 100

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Samuel Mendoza-Jonas
On Tue, 2016-08-09 at 10:19 -0300, Thiago Jung Bauermann wrote: > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > > > > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > > > > > Mimi Zohar writes: > > > > > > > > diff --git a/security/integrity/ima/ima.h > > > > b/secur

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 09:55 -0400, Mimi Zohar wrote: > On Tue, 2016-08-09 at 10:19 -0300, Thiago Jung Bauermann wrote: > > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > > > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > > > Mimi Zohar writes: > > > > > diff --git a/se

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 13:35 +, David Laight wrote: > Also why '__packed' - guarantees sub-optimal code generation. > Much better to include explicit padding to align everything. This patch set does not define a new format, but piggy backs on top of the existing /ima/binary_runtime_measurement

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 10:19 -0300, Thiago Jung Bauermann wrote: > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > > Mimi Zohar writes: > > > > diff --git a/security/integrity/ima/ima.h > > > > b/security/integrity/ima/ima

RE: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread David Laight
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; > > > > +

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Thiago Jung Bauermann
Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > Mimi Zohar writes: > > > diff --git a/security/integrity/ima/ima.h > > > b/security/integrity/ima/ima.h > > > index b5728da..84e8d36 100644 > > > --- a/security/integrity/ima/

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > Mimi Zohar writes: > > > diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h > > index b5728da..84e8d36 100644 > > --- a/security/integrity/ima/ima.h > > +++ b/security/integrity/ima/ima.h > > @@ -102,6 +102,13 @@ s

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Michael Ellerman
Mimi Zohar writes: > diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h > index b5728da..84e8d36 100644 > --- a/security/integrity/ima/ima.h > +++ b/security/integrity/ima/ima.h > @@ -102,6 +102,13 @@ struct ima_queue_entry { > }; > extern struct list_head ima_measurements

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-05 Thread Petko Manolov
On 16-08-05 09:34:38, Mimi Zohar wrote: > Hi Petko, > > Thank you for review! > > On Fri, 2016-08-05 at 11:44 +0300, Petko Manolov wrote: > > On 16-08-04 08:24:29, Mimi Zohar wrote: > > > The TPM PCRs are only reset on a hard reboot. In order to validate a > > > TPM's quote after a soft reboot (

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-05 Thread Mimi Zohar
Hi Petko, Thank you for review! On Fri, 2016-08-05 at 11:44 +0300, Petko Manolov wrote: > On 16-08-04 08:24:29, Mimi Zohar wrote: > > The TPM PCRs are only reset on a hard reboot. In order to validate a > > TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list > > of the runni

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-05 Thread Petko Manolov
On 16-08-04 08:24:29, Mimi Zohar wrote: > The TPM PCRs are only reset on a hard reboot. In order to validate a > TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list > of the running kernel must be saved and restored on boot. This patch > restores the measurement list. > > Ch

[PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-04 Thread Mimi Zohar
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and restored on boot. This patch restores the measurement list. Changelog: - call ima_load_kexec_buffer() (Thiago) Si