From: Christoph Hellwig <hch@lst.de>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
James Morris <jmorris@namei.org>,
linux-fsdevel@vger.kernel.org,
linux-ima-devel@lists.sourceforge.net,
linux-security-module@vger.kernel.org,
Matthew Garrett <matthew.garrett@nebula.com>,
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 v5 2/4] ima: use fs method to read integrity data
Date: Fri, 11 Aug 2017 12:21:13 +0200 [thread overview]
Message-ID: <20170811102113.GC11531@lst.de> (raw)
In-Reply-To: <1502408507-4257-3-git-send-email-zohar@linux.vnet.ibm.com>
On Thu, Aug 10, 2017 at 07:41:45PM -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.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Btw, most of this is yours now, feel free to take over the authorship
with a little credit to me for the initial patch if you want.
> Cc: Matthew Garrett <matthew.garrett@nebula.com>
I don't think that will reach Matthew anymore :)
> -static ssize_t efivarfs_file_read(struct file *file, char __user *userbuf,
> - size_t count, loff_t *ppos)
> +static ssize_t efivarfs_file_read_iter(struct kiocb *iocb,
> + struct iov_iter *iter)
The efivars switch to read_iter should be a separate patch before
this one.
> /**
> + * simple_read_iter_from_buffer - copy data from the buffer to user space
> + * @iocb: struct containing the file, the current position and other info
> + * @to: the user space buffer to read to
> + * @from: the buffer to read from
> + * @available: the size of the buffer
> + *
> + * The simple_read_iter_from_buffer() function reads up to @available bytes
> + * from the current buffer into the user space buffer.
> + *
> + * On success, the current buffer offset is advanced by the number of bytes
> + * read, or a negative value is returned on error.
> + **/
> +ssize_t simple_read_iter_from_buffer(struct kiocb *iocb, struct iov_iter *to,
> + const void *from, size_t available)
The addition of simple_read_iter_from_buffer should be another separate
patch, before efivars starts using it.
next prev parent reply other threads:[~2017-08-11 10:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 23:41 [PATCH v5 0/4] define new fs integrity_read method Mimi Zohar
2017-08-10 23:41 ` [PATCH v5 1/4] ima: always measure and audit files in policy Mimi Zohar
2017-08-11 10:18 ` Christoph Hellwig
2017-08-11 12:34 ` Mimi Zohar
2017-08-10 23:41 ` [PATCH v5 2/4] ima: use fs method to read integrity data Mimi Zohar
2017-08-11 10:21 ` Christoph Hellwig [this message]
2017-08-11 13:20 ` Mimi Zohar
2017-08-11 17:11 ` Mimi Zohar
2017-08-11 17:15 ` Christoph Hellwig
2017-08-10 23:41 ` [PATCH v5 3/4] ima: define "dont_failsafe" policy action rule Mimi Zohar
2017-08-10 23:41 ` [PATCH v5 4/4] ima: define "fs_unsafe" builtin policy 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=20170811102113.GC11531@lst.de \
--to=hch@lst.de \
--cc=adilger.kernel@dilger.ca \
--cc=clm@fb.com \
--cc=darrick.wong@oracle.com \
--cc=dwmw2@infradead.org \
--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=matthew.garrett@nebula.com \
--cc=mfasheh@versity.com \
--cc=richard@nod.at \
--cc=rpeterso@redhat.com \
--cc=shaggy@kernel.org \
--cc=swhiteho@redhat.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--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).