From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-fscrypt@vger.kernel.org,
Chandan Rajendra <chandan@linux.vnet.ibm.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-ext4@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
Kirill Tkhai <ktkhai@virtuozzo.com>
Subject: Re: [PATCH 0/2] fs-verity: fix !CONFIG_FS_VERITY case
Date: Tue, 11 Dec 2018 21:30:18 -0500 [thread overview]
Message-ID: <20181212023018.GD4464@thunk.org> (raw)
In-Reply-To: <20181211224651.112510-1-ebiggers@kernel.org>
On Tue, Dec 11, 2018 at 02:46:49PM -0800, Eric Biggers wrote:
> Replace the two patches that broken the !CONFIG_FS_VERITY case with
> fixed verisons.
I had fixed this by simply adding the conditional to the
!CONFIG_FS_VERITY versions of fsverity_file_open() and
fsverity_prepare_setattr(), before I found your patch in my inbox. I
think my version is simpler (and results in a fewer lines of code :-),
so I think I'm going to stick with it.
The net diff of my changes from the previous version was:
diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h
index ea8c418bd7d5..6684bb72bbfc 100644
--- a/include/linux/fsverity.h
+++ b/include/linux/fsverity.h
@@ -60,13 +60,13 @@ static inline int fsverity_ioctl_measure(struct file *filp, void __user *arg)
static inline int fsverity_file_open(struct inode *inode, struct file *filp)
{
- return -EOPNOTSUPP;
+ return IS_VERITY(inode) ? -ENOTSUPP : 0;
}
static inline int fsverity_prepare_setattr(struct dentry *dentry,
struct iattr *attr)
{
- return -EOPNOTSUPP;
+ return IS_VERITY(d_inode(dentry)) ? -ENOTSUPP : 0;
}
static inline int fsverity_prepare_getattr(struct inode *inode)
- Ted
next prev parent reply other threads:[~2018-12-12 2:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 22:46 [PATCH 0/2] fs-verity: fix !CONFIG_FS_VERITY case Eric Biggers
2018-12-11 22:46 ` [PATCH 1/2] fsverity: Move verity status check to fsverity_file_open Eric Biggers
2018-12-11 22:46 ` [PATCH 2/2] fsverity: Move verity status check to fsverity_prepare_setattr Eric Biggers
2018-12-12 1:37 ` [PATCH 0/2] fs-verity: fix !CONFIG_FS_VERITY case Tony Lindgren
2018-12-12 2:30 ` Theodore Y. Ts'o [this message]
2018-12-12 2:42 ` Eric Biggers
2018-12-12 4:07 ` Theodore Y. Ts'o
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=20181212023018.GD4464@thunk.org \
--to=tytso@mit.edu \
--cc=chandan@linux.vnet.ibm.com \
--cc=ebiggers@kernel.org \
--cc=krzk@kernel.org \
--cc=ktkhai@virtuozzo.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=tony@atomide.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).