From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932878AbcHIXX4 (ORCPT ); Tue, 9 Aug 2016 19:23:56 -0400 Received: from mendozajonas.com ([188.166.185.233]:56793 "EHLO mendozajonas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932718AbcHIXXx (ORCPT ); Tue, 9 Aug 2016 19:23:53 -0400 X-Greylist: delayed 628 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Aug 2016 19:23:52 EDT Message-ID: <1470784396.2301.2.camel@mendozajonas.com> Subject: Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list From: Samuel Mendoza-Jonas To: Thiago Jung Bauermann , Mimi Zohar Cc: Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-ima-devel@lists.sourceforge.net, linuxppc-dev@lists.ozlabs.org Date: Wed, 10 Aug 2016 09:13:16 +1000 In-Reply-To: <3544655.o5QPxko4Ba@hactar> References: <1470313475-20090-1-git-send-email-zohar@linux.vnet.ibm.com> <87wpjqtdg8.fsf@concordia.ellerman.id.au> <1470747673.2881.118.camel@linux.vnet.ibm.com> <3544655.o5QPxko4Ba@hactar> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.4 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.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; /* list of all > measurements > > > > > > > > > > > > > */ > > > > > > > > +/* 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. > Whether we want to support that or not is another question... The answer to that question is almost certainly yes - on POWER the most immediate example would be soft-rebooting from a BE host into an LE Petitboot kernel, or vice versa.