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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200715164220.GC1167@sol.localdomain>
Date:   Wed, 15 Jul 2020 09:42:20 -0700
From:   Eric Biggers <ebiggers@...nel.org>
To:     Daeho Jeong <daeho43@...il.com>
Cc:     Chao Yu <yuchao0@...wei.com>, Jaegeuk Kim <jaegeuk@...nel.org>,
        linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com,
        Daeho Jeong <daehojeong@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: change the way of handling range.len
 in F2FS_IOC_SEC_TRIM_FILE

On Wed, Jul 15, 2020 at 07:25:13PM +0900, Daeho Jeong wrote:
> Chao,
> 
> I can't find fscrypt_zeroout_range_inline_crypt() function. Do you
> mean we need to implement this one for inline encryption?
> 
> 2020년 7월 15일 (수) 오후 4:17, Chao Yu <yuchao0@...wei.com>님이 작성:
> >
> > On 2020/7/15 14:54, Daeho Jeong wrote:
> > > You mean we can support ZEROOUT option only for encrypted files of
> > > non-multidevice f2fs,
> > > and return -EOPNOTSUPP in the multidevice case, right now?
> >
> > Yes, something like:
> >
> > f2fs_sec_trim_file()
> >
> > if ((range.flags & F2FS_TRIM_FILE_ZEROOUT) &&
> >         f2fs_encrypted_file() && f2fs_is_multi_device())
> >         return -EOPNOTSUPP;
> >
> >
> > f2fs_secure_erase()
> >
> > if (!ret && (flags & F2FS_TRIM_FILE_ZEROOUT)) {
> >         if (f2fs_encrypted_file()) {
> >                 if (fscrypt_inode_uses_fs_layer_crypto)
> >                         ret = fscrypt_zeroout_range();
> >                 else
> >                         ret = fscrypt_zeroout_range_inline_crypt();
> >         } else {
> >                 ret = blkdev_issue_zeroout();
> >         }
> > }

fscrypt_zeroout_range_inline_crypt() is being added by
"fscrypt: add inline encryption support", which is queued in the fscrypt tree
(the master branch of https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git).

But that's not actually relevant here because fscrypt_zeroout_range() calls
fscrypt_zeroout_range_inline_crypt() when needed.

Just use fscrypt_zeroout_range().

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ