From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EF10C433EF for ; Thu, 14 Apr 2022 05:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239858AbiDNFeB (ORCPT ); Thu, 14 Apr 2022 01:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbiDNFd7 (ORCPT ); Thu, 14 Apr 2022 01:33:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A4923A18B; Wed, 13 Apr 2022 22:31:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A977561E32; Thu, 14 Apr 2022 05:31:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0E90C385A1; Thu, 14 Apr 2022 05:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649914295; bh=L5WfTzpjmjPzbWBOyi36W4xnedgDh3ktWaS0CuxYK2A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gRf6aEfGzR7cjx2ARWlkHDkLhiYl21dZDhTgSJtG1yCo6JAZZQoZ3VD0ckT/44hy0 IBgRPNsmLZf1C1+ya4UCWyPlFjo9/iWkLxeOYhvlrYhDPeGhgs6SKlm0TvUSnLM6tZ 5htpQJu+7Ep7a2Mj0Ja+ZM+avjLOV41Ggqdd4SZFwbYDY4mXNVVVCTNNTNQ2UPAwDK ilCpygqNTadPdfUW6h8nbVonntqOeyYLI5YMaAXba7ghSpOk2x0Mkc2hpXxihFLZMg g8YAgbyBFpBPzblXAtfGGzy9pinnedmIJ/wjZ5Wq11DwNYN5BANzlUaLM41cX5G5X6 GpystR7vfkPjA== Date: Wed, 13 Apr 2022 22:31:33 -0700 From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] fscrypt: split up FS_CRYPTO_BLOCK_SIZE Message-ID: References: <20220405010914.18519-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220405010914.18519-1-ebiggers@kernel.org> Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org On Mon, Apr 04, 2022 at 06:09:14PM -0700, Eric Biggers wrote: > From: Eric Biggers > > FS_CRYPTO_BLOCK_SIZE is neither the filesystem block size nor the > granularity of encryption. Rather, it defines two logically separate > constraints that both arise from the block size of the AES cipher: > > - The alignment required for the lengths of file contents blocks > - The minimum input/output length for the filenames encryption modes > > Since there are way too many things called the "block size", and the > connection with the AES block size is not easily understood, split > FS_CRYPTO_BLOCK_SIZE into two constants FSCRYPT_CONTENTS_ALIGNMENT and > FSCRYPT_FNAME_MIN_MSG_LEN that more clearly describe what they are. > > Signed-off-by: Eric Biggers > --- > fs/crypto/crypto.c | 10 +++++----- > fs/crypto/fname.c | 11 +++++++++-- > fs/ubifs/ubifs.h | 2 +- > include/linux/fscrypt.h | 12 +++++++++++- > 4 files changed, 26 insertions(+), 9 deletions(-) Applied to fscrypt.git#master for 5.19. - Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F9DAC4332F for ; Thu, 14 Apr 2022 05:31:55 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nes5C-0000uP-OV; Thu, 14 Apr 2022 05:31:53 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nes5B-0000uJ-L1 for linux-f2fs-devel@lists.sourceforge.net; Thu, 14 Apr 2022 05:31:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7tiswAjqbGC0WKq4AaVaAbhfgYrnLGWY4E1O61GtQ78=; b=IwifiX6pWrPNdJn45STYQpNRiB JdTqEpCFGNyl9gbAMxqUlzmCd6L87YfaCwb/PXfk0EjpXtFpyiDeMpB036WtbNGX/gnaeMRfz5+Et XeZP2KIC2AbBLnFw8nv0XV903KNhrSB0I2SqAISA5rt/wABHQnm0N4ic1+VhbBssanhs=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7tiswAjqbGC0WKq4AaVaAbhfgYrnLGWY4E1O61GtQ78=; b=fQkK21cdUW4yd5UxEV2bgECSdn Anfq+Wgxs49gNklSoqLrOXdOeT9jGhLdoUG6auEXJAD68hodlL+dgX4VCCif8K/xdX8uYoKNPCS+j R5/oNPIkatJuB5v4Ri0R5qJz2NI291V4fLak12kOHVT9cpMQRIxLF758FL5HvOpWxkr0=; Received: from ams.source.kernel.org ([145.40.68.75]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nes58-0002kW-Je for linux-f2fs-devel@lists.sourceforge.net; Thu, 14 Apr 2022 05:31:51 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4C352B827CE; Thu, 14 Apr 2022 05:31:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0E90C385A1; Thu, 14 Apr 2022 05:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649914295; bh=L5WfTzpjmjPzbWBOyi36W4xnedgDh3ktWaS0CuxYK2A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gRf6aEfGzR7cjx2ARWlkHDkLhiYl21dZDhTgSJtG1yCo6JAZZQoZ3VD0ckT/44hy0 IBgRPNsmLZf1C1+ya4UCWyPlFjo9/iWkLxeOYhvlrYhDPeGhgs6SKlm0TvUSnLM6tZ 5htpQJu+7Ep7a2Mj0Ja+ZM+avjLOV41Ggqdd4SZFwbYDY4mXNVVVCTNNTNQ2UPAwDK ilCpygqNTadPdfUW6h8nbVonntqOeyYLI5YMaAXba7ghSpOk2x0Mkc2hpXxihFLZMg g8YAgbyBFpBPzblXAtfGGzy9pinnedmIJ/wjZ5Wq11DwNYN5BANzlUaLM41cX5G5X6 GpystR7vfkPjA== Date: Wed, 13 Apr 2022 22:31:33 -0700 From: Eric Biggers To: linux-fscrypt@vger.kernel.org Message-ID: References: <20220405010914.18519-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220405010914.18519-1-ebiggers@kernel.org> X-Headers-End: 1nes58-0002kW-Je Subject: Re: [f2fs-dev] [PATCH] fscrypt: split up FS_CRYPTO_BLOCK_SIZE X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Mon, Apr 04, 2022 at 06:09:14PM -0700, Eric Biggers wrote: > From: Eric Biggers > > FS_CRYPTO_BLOCK_SIZE is neither the filesystem block size nor the > granularity of encryption. Rather, it defines two logically separate > constraints that both arise from the block size of the AES cipher: > > - The alignment required for the lengths of file contents blocks > - The minimum input/output length for the filenames encryption modes > > Since there are way too many things called the "block size", and the > connection with the AES block size is not easily understood, split > FS_CRYPTO_BLOCK_SIZE into two constants FSCRYPT_CONTENTS_ALIGNMENT and > FSCRYPT_FNAME_MIN_MSG_LEN that more clearly describe what they are. > > Signed-off-by: Eric Biggers > --- > fs/crypto/crypto.c | 10 +++++----- > fs/crypto/fname.c | 11 +++++++++-- > fs/ubifs/ubifs.h | 2 +- > include/linux/fscrypt.h | 12 +++++++++++- > 4 files changed, 26 insertions(+), 9 deletions(-) Applied to fscrypt.git#master for 5.19. - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31C6FC433EF for ; Thu, 14 Apr 2022 05:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gN5bIYmvrerVrv+cm66OKfYf3HF/HXq2uTmYbw3KawI=; b=a/EG0VPh17yYxG lLxS7HAAOmyv5bI7lAA7/vGSOUW/QFiVdnGS5q2Teo/iLAcxLy/VBYE2Yp5OFmMYEi5sVmxIxjZ5a PJ41Mmjk5qXAt5Z61QJnUHC0yDtwFHPAvOgqhBy5UkCBmA7Djo8IJruMS3dSxJCG/Hmr1JomLCSJm dt1ShT/nV4x+TbbP834V3kYMGNt1SuOFDGJy7rDZgED2zW9UD1UKWalPGODy0Ig2G8lsRmP+F6wJC PzERX8okepYThceO9onkjR5ibgB2Jfo4SJvO3fG7BybIadbR2BNt3OJ/q9DnmN2EOPtaexEg0EXIx GoThsLpAZxuNVx23Pruw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nes51-003vZy-B8; Thu, 14 Apr 2022 05:31:43 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nes4z-003vYq-88 for linux-mtd@lists.infradead.org; Thu, 14 Apr 2022 05:31:42 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4C352B827CE; Thu, 14 Apr 2022 05:31:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0E90C385A1; Thu, 14 Apr 2022 05:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649914295; bh=L5WfTzpjmjPzbWBOyi36W4xnedgDh3ktWaS0CuxYK2A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gRf6aEfGzR7cjx2ARWlkHDkLhiYl21dZDhTgSJtG1yCo6JAZZQoZ3VD0ckT/44hy0 IBgRPNsmLZf1C1+ya4UCWyPlFjo9/iWkLxeOYhvlrYhDPeGhgs6SKlm0TvUSnLM6tZ 5htpQJu+7Ep7a2Mj0Ja+ZM+avjLOV41Ggqdd4SZFwbYDY4mXNVVVCTNNTNQ2UPAwDK ilCpygqNTadPdfUW6h8nbVonntqOeyYLI5YMaAXba7ghSpOk2x0Mkc2hpXxihFLZMg g8YAgbyBFpBPzblXAtfGGzy9pinnedmIJ/wjZ5Wq11DwNYN5BANzlUaLM41cX5G5X6 GpystR7vfkPjA== Date: Wed, 13 Apr 2022 22:31:33 -0700 From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] fscrypt: split up FS_CRYPTO_BLOCK_SIZE Message-ID: References: <20220405010914.18519-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220405010914.18519-1-ebiggers@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_223141_472472_AC76C59E X-CRM114-Status: GOOD ( 15.58 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Mon, Apr 04, 2022 at 06:09:14PM -0700, Eric Biggers wrote: > From: Eric Biggers > > FS_CRYPTO_BLOCK_SIZE is neither the filesystem block size nor the > granularity of encryption. Rather, it defines two logically separate > constraints that both arise from the block size of the AES cipher: > > - The alignment required for the lengths of file contents blocks > - The minimum input/output length for the filenames encryption modes > > Since there are way too many things called the "block size", and the > connection with the AES block size is not easily understood, split > FS_CRYPTO_BLOCK_SIZE into two constants FSCRYPT_CONTENTS_ALIGNMENT and > FSCRYPT_FNAME_MIN_MSG_LEN that more clearly describe what they are. > > Signed-off-by: Eric Biggers > --- > fs/crypto/crypto.c | 10 +++++----- > fs/crypto/fname.c | 11 +++++++++-- > fs/ubifs/ubifs.h | 2 +- > include/linux/fscrypt.h | 12 +++++++++++- > 4 files changed, 26 insertions(+), 9 deletions(-) Applied to fscrypt.git#master for 5.19. - Eric ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/