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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161216204640.GA14264@gmail.com>
Date:   Fri, 16 Dec 2016 12:46:40 -0800
From:   Eric Biggers <ebiggers3@...il.com>
To:     Richard Weinberger <richard@....at>
Cc:     linux-fsdevel@...r.kernel.org, "Theodore Y . Ts'o" <tytso@....edu>,
        Jaegeuk Kim <jaegeuk@...nel.org>, linux-ext4@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net,
        David Gstir <david@...ma-star.at>,
        Eric Biggers <ebiggers@...gle.com>
Subject: Re: [PATCH 3/3] fscrypt: consolidate fscrypt_has_permitted_context()
 checks

On Fri, Dec 16, 2016 at 01:22:51PM +0100, Richard Weinberger wrote:
> On 15.12.2016 20:19, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@...gle.com>
> > 
> > Now that fscrypt_has_permitted_context() compares the fscrypt_context
> > rather than the fscrypt_info when needed, it is no longer necessary to
> > delay fscrypt_has_permitted_context() from ->lookup() to ->open() for
> > regular files, as introduced in commit ff978b09f973 ("ext4 crypto: move
> > context consistency check to ext4_file_open()").  Therefore the check in
> > ->open(), along with the dget_parent() hack, can be removed.
> > 
> > It's also no longer necessary to check the file type before calling
> > fscrypt_has_permitted_context().
> > 
> > This patch makes these changes for both ext4 and f2fs.
> > 
> > Signed-off-by: Eric Biggers <ebiggers@...gle.com>
> > ---
> >  fs/ext4/file.c  | 12 ------------
> >  fs/ext4/namei.c | 10 ++--------
> >  fs/f2fs/file.c  | 15 +++++----------
> >  fs/f2fs/namei.c |  7 ++-----
> >  4 files changed, 9 insertions(+), 35 deletions(-)
> 
> Can please also take care of UBIFS? :-)
> 
> Thanks,
> //richard

Yes, I see that UBIFS encryption just got merged yesterday, so I'll send a
version that updates UBIFS too.  And it seems the
fscrypt_has_permitted_context() call in ubifs_lookup() is missing, so I'll add
that too.

I'm wondering if it would make more sense to do a separate patch for each
filesystem?  But in this case the filesystem changes are dependent on the prior
patches to fs/crypto/, so they can't simply be sent through the per-filesystem
trees unless each one merges in the fs/crypto/ changes too.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ