Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp900912pxb; Fri, 22 Apr 2022 13:50:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0YL3LwbDH3lMGi9Tf7JF4ih+jKEeJYtswst6fkBGx/Oc03vhsVGHSolWRIFDP+w2kAONN X-Received: by 2002:a05:6a00:1701:b0:50a:8483:a163 with SMTP id h1-20020a056a00170100b0050a8483a163mr6942269pfc.79.1650660634386; Fri, 22 Apr 2022 13:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650660634; cv=none; d=google.com; s=arc-20160816; b=tCfu0xUU52WT1DQvHfmzxLWpiDvbMsm7MKjwdrAQUt7wNWBvjH/tz0PDtfKnxLbcNF fmASs4YFCgEcj5npveyFBaOCeaiufkE54Z9S2+YO5YiX2SpOSY/oOkNL44UQ1hj4DxT+ gbwvC85rVK6MOEqJ0tdb8wKLvOVSZClVL7mNLL6h1lklRDrIJn8kHg9b9o+RgFn6IsZT 1yYJDZPDIkfwWO/N/MOogrlw5je4fJoWlmdq3N3AzHh6K5vd8J2ZntVKKrDca8Z5Zjw/ 8MrHh3GiKg4qvn9sk/Yyqm1apKTSKJ5iJRXlL+/nA7rxhxnOOwouTM53RgpsjixM8Ejt OXWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tieq4g0fhCX9QIn9Q+Ut4tKp+eZAnRx9yURJZ/6kYy4=; b=GrV5ay27MbgW1101LIJtVO2eyu4iSKFicvTLMaGKscwkxg6sL/l1pIveFcnVioo+mG FqFIrNeLo6VwAcIW2wArF+guAtqDu/7OdqWny08WQq/Cg742TVeX20DDPpCg9KQobB3O JOgJszxelZj/nHa4Zeasi56+d9VE3d5bPbJyzeL5G4Qi+Iw3TLoww+6baI93MZjaHyog hVo6Vpyxm3bY7+x2BP6TCArM4msK1KAlR8evBjdByX5plp9zvZtnvu9g02AE7ItOPjRj zbC4/zBKVOOz8P6iAmU5HTuNzQJojJtGFbOuvTVehjLDqLi3xr/Z04wr150MGb22YgZQ d6gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KEMKmCJE; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p20-20020a170903249400b00153ff064711si8310494plw.144.2022.04.22.13.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:50:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KEMKmCJE; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 53D80202519; Fri, 22 Apr 2022 12:42:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353226AbiDUH0z (ORCPT + 99 others); Thu, 21 Apr 2022 03:26:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbiDUH0x (ORCPT ); Thu, 21 Apr 2022 03:26:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82DF01837E; Thu, 21 Apr 2022 00:24:04 -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 ams.source.kernel.org (Postfix) with ESMTPS id 393A0B82297; Thu, 21 Apr 2022 07:24:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4E52C385A1; Thu, 21 Apr 2022 07:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650525841; bh=QAbZly7uVhYF3x+1hUCE5N4c3jqhIBI0hnP70lsaq4k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KEMKmCJE0ZI6LJVRU5ugo+fqWqPGaI+fgDJvUvWevavJtX8VZrbgp5P3al77FM0j/ LOT/upIJBl5AhM/s5OrzRtQtDGrGi7AncTb6Izwewn5WWv8HGLjEWspjBb7O0Hf+5g Fs3tjBXTc3FSBTDf98h52pi+LEAY5cfNWeAj+3AI9vy+ZjBhg4VGDOVp79ICtxnle2 21Z4YaUHu+n6KPG+OHWwy7gMp1YCTaE/ulYM4iC9D1w2iWnYsq8o0+5qDgmav7aZBu wnR34/utUDORKrvFnrtCxnuhdzZV/fzZ8coMyVAHRlEJvcj4uNW3O71wLSrF0w8anl khTC28nmpGVfA== Date: Thu, 21 Apr 2022 00:24:00 -0700 From: Eric Biggers To: Ritesh Harjani Cc: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, Theodore Ts'o , Jan Kara Subject: Re: [RFC 0/6] ext4: Move out crypto ops to ext4_crypto.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Apr 21, 2022 at 10:53:16AM +0530, Ritesh Harjani wrote: > Hello, > > This is 1st in the series to cleanup ext4/super.c, since it has grown quite large. > This moves out crypto related ops and few definitions to fs/ext4/ext4_crypto.c > > Testing > ========= > 1. Tested "-g encrypt" with default configs. > 2. Compiled tested on x86 & Power. > > > Ritesh Harjani (6): > fscrypt: Provide definition of fscrypt_set_test_dummy_encryption > ext4: Move ext4 crypto code to its own file ext4_crypto.c > ext4: Directly opencode ext4_set_test_dummy_encryption > ext4: Cleanup function defs from ext4.h into ext4_crypto.c > ext4: Move all encryption related into a common #ifdef > ext4: Use provided macro for checking dummy_enc_policy > > fs/ext4/Makefile | 1 + > fs/ext4/ext4.h | 81 +++-------------- > fs/ext4/ext4_crypto.c | 192 ++++++++++++++++++++++++++++++++++++++++ > fs/ext4/super.c | 158 ++++----------------------------- > include/linux/fscrypt.h | 7 ++ > 5 files changed, 227 insertions(+), 212 deletions(-) > create mode 100644 fs/ext4/ext4_crypto.c How about calling it crypto.c instead of ext4_crypto.c? It is already in the ext4 directory, so ext4 is implied. Otherwise this patchset looks good to me. Did you consider moving any of the other CONFIG_FS_ENCRYPTION code blocks into the new file as well? The implementation of FS_IOC_GET_ENCRYPTION_PWSALT might be a good candidate too. - Eric