Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D418DC2D0A3 for ; Sun, 1 Nov 2020 10:30:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99DBD2080A for ; Sun, 1 Nov 2020 10:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604226622; bh=uBOxgKGox72Khbv7lHPCWHnvMnC3J+LhFgAQQopAVW0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=z/N18d3iGCKjRKhngsrkLQCQRzJUWPwV57PkEaMgpcYnwqgtiD3itY5qb2M0Z474p FKVFKIY1zbntLg8wJJw8Ggwi2NSQ+4g+6ozLezn7ge5isZMOSt3cFFi8PNNlWmVYqv ABgvyIgt2KnOM8D4Xun1WY/w6vDQIDln17idMMzw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbgKAKaW (ORCPT ); Sun, 1 Nov 2020 05:30:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:49236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbgKAKaV (ORCPT ); Sun, 1 Nov 2020 05:30:21 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A957E20709; Sun, 1 Nov 2020 10:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604226621; bh=uBOxgKGox72Khbv7lHPCWHnvMnC3J+LhFgAQQopAVW0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PsZc0CNMRSOPIv5SATUZJDagBRiPVhMPpvYxGP99Rcv0eGc6EZl9qE7oqL/xu8MGk UUdAcmz7buYJ05NClfswKpy601VQ96XPxL+xhlBJSXCrwztcGRm1GpsWPekHzqqfvn FCtbvR0HETcrhosbUWm8Tglq1ys0oNS6Aoli8J+s= Date: Sun, 1 Nov 2020 11:31:04 +0100 From: Greg KH To: Eric Biggers Cc: stable@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, Chao Yu , Jaegeuk Kim Subject: Re: [PATCH 4.4] f2fs crypto: avoid unneeded memory allocation in ->readdir Message-ID: <20201101103104.GB2558892@kroah.com> References: <20201031195809.377983-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031195809.377983-1-ebiggers@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org On Sat, Oct 31, 2020 at 12:58:09PM -0700, Eric Biggers wrote: > From: Chao Yu > > 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 > Signed-off-by: Jaegeuk Kim > Signed-off-by: Eric Biggers > --- > fs/f2fs/dir.c | 7 ------- > 1 file changed, 7 deletions(-) Now queued up, thanks. greg k-h