lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Dec 2018 21:30:18 -0500
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     linux-fscrypt@...r.kernel.org,
        Chandan Rajendra <chandan@...ux.vnet.ibm.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        linux-ext4@...r.kernel.org, Tony Lindgren <tony@...mide.com>,
        Kirill Tkhai <ktkhai@...tuozzo.com>
Subject: Re: [PATCH 0/2] fs-verity: fix !CONFIG_FS_VERITY case

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ