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]
Message-Id: <2637514.5grOLVIibm@localhost.localdomain>
Date:   Sat, 13 Jan 2018 10:52:51 +0530
From:   Chandan Rajendra <chandan@...ux.vnet.ibm.com>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        tytso@....edu
Subject: Re: [RFC PATCH 1/8] ext4: use EXT4_INODE_ENCRYPT flag to detect encrypted bio

On Saturday, January 13, 2018 12:34:04 AM IST Randy Dunlap wrote:
> On 01/12/18 06:11, Chandan Rajendra wrote:
> > For supporting encryption in blocksize < pagesize scenario,
> > bio->bi_private field will be needed to hold the address of the
> > encryption context structure. Hence this commit uses
> > ext4_encrypted_inode() to detect the encryption status of a file.
> > 
> > Signed-off-by: Chandan Rajendra <chandan@...ux.vnet.ibm.com>
> > ---
> >  fs/ext4/readpage.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
> > index 9ffa6fa..0be590b 100644
> > --- a/fs/ext4/readpage.c
> > +++ b/fs/ext4/readpage.c
> > @@ -50,7 +50,13 @@
> >  static inline bool ext4_bio_encrypted(struct bio *bio)
> >  {
> >  #ifdef CONFIG_EXT4_FS_ENCRYPTION
> > -	return unlikely(bio->bi_private != NULL);
> > +        if (bio->bi_vcnt) {
> > +                struct inode *inode = bio->bi_io_vec->bv_page->mapping->host;
> > +                if (ext4_encrypted_inode(inode) && S_ISREG(inode->i_mode))
> > +                        return true;
> 
> There are lots of spaces instead of tabs above...
> 

I will fix them up in the next version of the patchset. 
Thanks for pointing it out.  

-- 
chandan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ