Linux FSCRYPT development
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: stable@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	linux-fscrypt@vger.kernel.org, Chao Yu <yuchao0@huawei.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [PATCH 4.4] f2fs crypto: avoid unneeded memory allocation in ->readdir
Date: Sun, 1 Nov 2020 11:31:04 +0100	[thread overview]
Message-ID: <20201101103104.GB2558892@kroah.com> (raw)
In-Reply-To: <20201031195809.377983-1-ebiggers@kernel.org>

On Sat, Oct 31, 2020 at 12:58:09PM -0700, Eric Biggers wrote:
> From: Chao Yu <yuchao0@huawei.com>
> 
> commit e06f86e61d7a67fe6e826010f57aa39c674f4b1b upstream.
> [This backport fixes a regression in 4.4-stable caused by commit
> 11a6e8f89521 ("f2fs: check memory boundary by insane namelen"), which
> depended on this missing commit.  This bad backport broke f2fs
> encryption because it moved the incrementing of 'bit_pos' to earlier in
> f2fs_fill_dentries() without accounting for it being used in the
> encrypted dir case.  This caused readdir() on encrypted directories to
> start failing.  Tested with 'kvm-xfstests -c f2fs -g encrypt'.]
> 
> When decrypting dirents in ->readdir, fscrypt_fname_disk_to_usr won't
> change content of original encrypted dirent, we don't need to allocate
> additional buffer for storing mirror of it, so get rid of it.
> 
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  fs/f2fs/dir.c | 7 -------
>  1 file changed, 7 deletions(-)

Now queued up, thanks.

greg k-h

      reply	other threads:[~2020-11-01 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 19:58 [PATCH 4.4] f2fs crypto: avoid unneeded memory allocation in ->readdir Eric Biggers
2020-11-01 10:31 ` Greg KH [this message]

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=20201101103104.GB2558892@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ebiggers@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yuchao0@huawei.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