From patchwork Fri Nov 25 19:20:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 13056234 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 7AD6EC4332F for ; Fri, 25 Nov 2022 19:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbiKYTUy (ORCPT ); Fri, 25 Nov 2022 14:20:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbiKYTUy (ORCPT ); Fri, 25 Nov 2022 14:20:54 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FC072CCAD for ; Fri, 25 Nov 2022 11:20:53 -0800 (PST) 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 38CEFB82C0B for ; Fri, 25 Nov 2022 19:20:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C54FCC433C1; Fri, 25 Nov 2022 19:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669404050; bh=TsKgHYqePFfdWcyQkwlq5qeu1v7YvXCF3Dko3dHrcNE=; h=From:To:Cc:Subject:Date:From; b=aRQpi8DC30/eHPdHm/w81QI2ypvK2BJufyjcNbpuKM8SEozUJFOMyRIJoQ9gCDF+x USjZhLUvoGHfC+w4VFIJtolmROIf9CosU34ZTwdeZLNGQR8a0rSSKgUwPXowRRWJkf Vb6HKJXAHie9rc7vnK6QBef0MAFmwYBYoRCjlwHDMD7qB29R2GuSgmNSkJk5vTEKQ+ 7o5/WSIQe+//fRzOAH3s+hLq4GqXCPj8oNv5xbCKAt39I9XhRtbfyXErt6dOL3x8yE sgt4eFNT2wohmSj+0QWqTmqJLSaWtVUucbk0WqeamiddGHM+uflYJOtPgsettu76mB zcxukLwL2o5Cw== From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: Tianjia Zhang Subject: [PATCH] fscrypt: add comment for fscrypt_valid_enc_modes_v1() Date: Fri, 25 Nov 2022 11:20:47 -0800 Message-Id: <20221125192047.18916-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org From: Eric Biggers Make it clear that nothing new should be added to this function. Signed-off-by: Eric Biggers --- fs/crypto/policy.c | 7 +++++++ 1 file changed, 7 insertions(+) base-commit: 02aef4225258fa6d022ce9040716aeecc3afc521 diff --git a/fs/crypto/policy.c b/fs/crypto/policy.c index 46757c3052ef9..84fa51604b151 100644 --- a/fs/crypto/policy.c +++ b/fs/crypto/policy.c @@ -61,6 +61,13 @@ fscrypt_get_dummy_policy(struct super_block *sb) return sb->s_cop->get_dummy_policy(sb); } +/* + * Return %true if the given combination of encryption modes is supported for v1 + * (and later) encryption policies. + * + * Do *not* add anything new here, since v1 encryption policies are deprecated. + * New combinations of modes should go in fscrypt_valid_enc_modes_v2() only. + */ static bool fscrypt_valid_enc_modes_v1(u32 contents_mode, u32 filenames_mode) { if (contents_mode == FSCRYPT_MODE_AES_256_XTS &&