From: Andrew Morton <akpm@linux-foundation.org>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, safford@watson.ibm.com,
serue@linux.vnet.ibm.com, sailer@watson.ibm.com,
zohar@us.ibm.com, Stephen Smalley <sds@tycho.nsa.gov>,
CaseySchaufler <casey@schaufler-ca.com>
Subject: Re: [RFC][Patch 5/5]integrity: IMA as an integrity service provider
Date: Wed, 28 May 2008 20:30:13 -0700 [thread overview]
Message-ID: <20080528203013.5a927d30.akpm@linux-foundation.org> (raw)
In-Reply-To: <1212031046.4747.57.camel@new-host.home>
On Wed, 28 May 2008 23:17:26 -0400 Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> On Wed, 2008-05-28 at 01:22 -0700, Andrew Morton wrote:
> > On Fri, 23 May 2008 11:05:45 -0400 Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> >
> > > This is a re-release of Integrity Measurement Architecture(IMA) as an
> > > independent Linunx Integrity Module(LIM) service provider, which implements
> > > the new LIM must_measure(), collect_measurement(), store_measurement(), and
> > > display_template() API calls. The store_measurement() call supports two
> > > types of data, IMA (i.e. file data) and generic template data.
> > >
> > > When store_measurement() is called for the IMA type of data, the file
> > > measurement and the file name hint are used to form an IMA template.
> > > IMA then calculates the IMA template measurement(hash) and submits it
> > > to the TPM chip for inclusion in one of the chip's Platform Configuration
> > > Registers (PCR).
> > >
> > > When store_measurement() is called for generic template data, IMA
> > > calculates the measurement(hash) of the template data, and submits
> > > the template measurement to the TPM chip for inclusion in one of the
> > > chip's Platform Configuration Registers(PCR).
> > >
> > > In order to view the contents of template data through securityfs, the
> > > template_display() function must be defined in the registered
> > > template_operations. In the case of the IMA template, the list of
> > > file names and files hashes submitted can be viewed through securityfs.
> > >
> > > IMA can be included or excluded in the kernel configuration. If
> > > included in the kernel and the IMA_BOOTPARAM is selected, IMA can
> > > also be enabled/disabled on the kernel command line with 'ima='.
> > >
> >
> > - I see lots of user file I/O being done from within the kernel.
> > This makes eyebrows raise. Also some other eyebrow-raising
> > file-related things in there.
>
> The amount of I/O is dependent on the number of files being measured.
> The default policy measures a whole lot. An LSM specific integrity
> policy would cut down on the number of files being measured. For now,
> either remove the third rule in default_rules or replace the default
> rules with a new policy. To load a new policy execute:
> ./integrity_load < policy
The problem is that the code is doing in-kernel user file I/O *at all*.
It's a red flag.
Look who else is using kernel_read(): just the exec code. Plus
something in v9fs which I'd better not look at.
>
> ...
>
> > - timespec_set() is unneeeded - just use struct assignment (ie: "=")
>
> Am confused. timespec_set is doing an assignment. Should I
> replace timespec_set with a memcpy?
struct timespec a, b;
a = b;
>
> > - All the games with mtimes should be described in the changelog too.
>
> Ok. The timespec_recent and mtime issues are part of the same problem
> of detecting when a file has been modified.
Can't use inode.i_version?
>
> > - ima_fixup_inodes looks like it will race and crash against a
> > well-timed unmount. I expect you will need to bump s_count before
> > dropping sb_lock. See writeback_inodes() for an example.
>
> ima_fixup_inodes() is called once at initialization.
What is "initialisation"? During initcalls? Are there even any files
in cache at that time? I bet we can arrange for the answer to become
"no".
next prev parent reply other threads:[~2008-05-29 3:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 15:05 [RFC][Patch 5/5]integrity: IMA as an integrity service provider Mimi Zohar
2008-05-23 23:30 ` Randy Dunlap
2008-05-27 1:02 ` Mimi Zohar
2008-05-27 14:36 ` Mimi Zohar
2008-06-11 22:31 ` Randy Dunlap
2008-05-28 8:22 ` Andrew Morton
2008-05-29 3:17 ` Mimi Zohar
2008-05-29 3:30 ` Andrew Morton [this message]
2008-05-29 21:50 ` Mimi Zohar
2008-05-29 23:35 ` Andrew Morton
2008-05-30 1:58 ` Mimi Zohar
2008-05-30 2:04 ` Andrew Morton
2008-05-30 13:06 ` Mimi Zohar
2008-05-29 3:33 ` Mimi Zohar
2008-05-31 7:54 ` Pavel Machek
2008-06-24 16:28 ` david safford
2008-08-05 17:35 ` Pavel Machek
2008-06-24 16:28 ` david safford
2008-08-05 17:32 ` Pavel Machek
[not found] <20080627131946.225566613@linux.vnet.ibm.com>
2008-06-27 16:23 ` [RFC][PATCH 5/5] integrity: " 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=20080528203013.5a927d30.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=casey@schaufler-ca.com \
--cc=linux-kernel@vger.kernel.org \
--cc=safford@watson.ibm.com \
--cc=sailer@watson.ibm.com \
--cc=sds@tycho.nsa.gov \
--cc=serue@linux.vnet.ibm.com \
--cc=zohar@linux.vnet.ibm.com \
--cc=zohar@us.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox