linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Matthew Garrett <mjg59@google.com>,
	James Morris <jmorris@namei.org>,
	linux-fsdevel@vger.kernel.org,
	linux-ima-devel@lists.sourceforge.net,
	linux-security-module@vger.kernel.org,
	Matthew Garrett <mjg59@srcf.ucam.org>, Jan Kara <jack@suse.com>,
	Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <yuchao0@huawei.com>,
	Steven Whitehouse <swhiteho@redhat.com>,
	Bob Peterson <rpeterso@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Dave Kleikamp <shaggy@kernel.org>,
	Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>,
	Mark Fasheh <mfasheh@versity.com>,
	Joel Becker <jlbec@evilplan.org>,
	Richard Weinberger <richard@nod.at>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Hugh Dickins <hughd@google.com>, Chris Mason <clm@fb.com>
Subject: Re: [PATCH v6 4/6] ima: use fs method to read integrity data
Date: Mon, 28 Aug 2017 05:13:01 +0100	[thread overview]
Message-ID: <20170828041301.GA21125@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1502808237-2035-5-git-send-email-zohar@linux.vnet.ibm.com>

On Tue, Aug 15, 2017 at 10:43:55AM -0400, Mimi Zohar wrote:
> From: Christoph Hellwig <hch@lst.de>
> 
> Add a new ->integrity_read file operation to read data for integrity
> hash collection.  This is defined to be equivalent to ->read_iter,
> except that it will be called with the i_rwsem held exclusively.

Hmm...  I'm really tempted to add default_integrity_read() that would
just call ->read_iter(), with boilerplate part becoming
	.integrity_read = default_integrity_read

Note that all stuff accessed in it would be fresh in caches, so
it's not as if we had serious overhead there.  And we are going
to be reading from file, anyway...

I agree that it should be an opt-in from filesystem; default is still
"don't know how to read, sod off".  It's just that telling at the
glance whether it's supposed to be a simple case or something tricky
is needed would be simpler that way and it might turn out to be
more robust that way...

  parent reply	other threads:[~2017-08-28  4:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 14:43 [PATCH v6 0/6] define new fs integrity_read method Mimi Zohar
2017-08-15 14:43 ` [PATCH v6 1/6] libfs: define simple_read_iter_from_buffer Mimi Zohar
2017-08-16  6:35   ` Christoph Hellwig
2017-08-16 17:43     ` Mimi Zohar
2017-08-17  2:42       ` James Morris
2017-08-17 11:00         ` Mimi Zohar
2017-08-22 10:04   ` Dmitry Kasatkin
2017-08-15 14:43 ` [PATCH v6 2/6] efivarfs: replaces the read file operation with read_iter Mimi Zohar
2017-08-16  6:35   ` Christoph Hellwig
2017-08-15 14:43 ` [PATCH v6 3/6] ima: always measure and audit files in policy Mimi Zohar
2017-08-22 10:05   ` Dmitry Kasatkin
2017-08-22 12:54     ` Mimi Zohar
2017-08-15 14:43 ` [PATCH v6 4/6] ima: use fs method to read integrity data Mimi Zohar
2017-08-16 13:17   ` Jan Kara
2017-08-16 17:43     ` Mimi Zohar
2017-08-22 10:09   ` Dmitry Kasatkin
2017-08-28  4:13   ` Al Viro [this message]
2017-08-28 18:30     ` Mimi Zohar
2017-08-15 14:43 ` [PATCH v6 5/6] ima: define "dont_failsafe" policy action rule Mimi Zohar
2017-08-22 10:07   ` Dmitry Kasatkin
2017-08-22 12:54     ` Mimi Zohar
2017-08-22 13:31       ` Dmitry Kasatkin
2017-08-15 14:43 ` [PATCH v6 6/6] ima: define "fs_unsafe" builtin policy Mimi Zohar
2017-08-22 10:07   ` Dmitry Kasatkin
2017-08-22 13:13     ` Mimi Zohar
2017-08-22 13:41       ` Dmitry Kasatkin
2017-08-16  2:43 ` [PATCH v6 0/6] define new fs integrity_read method James Morris
2017-08-16  6:34   ` Christoph Hellwig
2017-08-16  9:52     ` James Morris
2017-08-16 11:05       ` Mimi Zohar
2017-08-28  4:18   ` Al Viro

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=20170828041301.GA21125@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=adilger.kernel@dilger.ca \
    --cc=clm@fb.com \
    --cc=darrick.wong@oracle.com \
    --cc=dwmw2@infradead.org \
    --cc=hch@lst.de \
    --cc=hughd@google.com \
    --cc=jack@suse.com \
    --cc=jaegeuk@kernel.org \
    --cc=jlbec@evilplan.org \
    --cc=jmorris@namei.org \
    --cc=konishi.ryusuke@lab.ntt.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-ima-devel@lists.sourceforge.net \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mfasheh@versity.com \
    --cc=mjg59@google.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=richard@nod.at \
    --cc=rpeterso@redhat.com \
    --cc=shaggy@kernel.org \
    --cc=swhiteho@redhat.com \
    --cc=tytso@mit.edu \
    --cc=yuchao0@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).