All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petko Manolov <petkan@mip-labs.com>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	"Luis R. Rodriguez" <mcgrof@suse.com>,
	kexec@lists.infradead.org, David Howells <dhowells@redhat.com>,
	linux-security-module@vger.kernel.org,
	linux-ima-devel@lists.sourceforge.net,
	Dave Young <dyoung@redhat.com>, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [Linux-ima-devel] [PATCH v2 4/7] ima: measure and appraise kexec image and initramfs
Date: Mon, 28 Dec 2015 16:29:10 +0200	[thread overview]
Message-ID: <20151228142910.GA16243@localhost> (raw)
In-Reply-To: <1451307075.3289.224.camel@linux.vnet.ibm.com>

On 15-12-28 07:51:15, Mimi Zohar wrote:
> On Mon, 2015-12-28 at 10:08 +0800, Dave Young wrote:
> > On 12/25/15 at 09:45am, Mimi Zohar wrote:
> > > IMA calculates the file hash, in this case, based on the buffer
> > > contents.   The hash is calculated once and used for both measurement
> > > and appraisal.  If the file integrity appraisal fails (eg. hash
> > > comparison or signature failure), IMA prevents the kexec files from
> > > being used.
> > > 
> > 
> > Ok, thanks for the explanatioin. But I have another question, why do we
> > need a special hook for KEXEC? Shouldn't all files use same way to do the
> > measurement and appraisal?
> 
> "By all files" are you referring to all files read by the kernel or all
> files opened, executed or mmapped by the system?
> 
> Currently IMA allocates a page sized buffer, reads a file a page chunk
> at a time calculating the file hash as it does so, and then frees the
> buffer before returning to the caller.  This method of calculating the

I kind of wonder isn't it possible to optimize the file read?  If the file is 
relatively small (a few megabytes, for example) it will fit into any modern 
system's memory.  At least those that cares to run IMA, i mean.

Fetching file page by page is a slow process even though the BIO subsystem reads 
larger chunks off the real storage devices.  Has anyone done a benchmark test?


cheers,
Petko

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2015-12-28 14:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1450914903-5793-1-git-send-email-zohar@linux.vnet.ibm.com>
     [not found] ` <1450914903-5793-5-git-send-email-zohar@linux.vnet.ibm.com>
2015-12-25  5:33   ` [Linux-ima-devel] [PATCH v2 4/7] ima: measure and appraise kexec image and initramfs Dave Young
2015-12-25 14:45     ` Mimi Zohar
2015-12-28  2:08       ` Dave Young
2015-12-28 12:50         ` Mimi Zohar
2015-12-28 12:51         ` Mimi Zohar
2015-12-28 14:29           ` Petko Manolov [this message]
2015-12-28 14:42             ` Mimi Zohar
2015-12-28 14:59               ` Petko Manolov
2015-12-28 15:34                 ` Mimi Zohar
2015-12-29  8:21           ` Dave Young
2015-12-29 12:06             ` Mimi Zohar
2015-12-29 12:22               ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151228142910.GA16243@localhost \
    --to=petkan@mip-labs.com \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-ima-devel@lists.sourceforge.net \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mcgrof@suse.com \
    --cc=vgoyal@redhat.com \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.