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 7790CC32789 for ; Sat, 20 Aug 2022 19:10:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbiHTTKz (ORCPT ); Sat, 20 Aug 2022 15:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiHTTKx (ORCPT ); Sat, 20 Aug 2022 15:10:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E53C26AF7; Sat, 20 Aug 2022 12:10:50 -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 E0F2B60F9D; Sat, 20 Aug 2022 19:10:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 202FAC433C1; Sat, 20 Aug 2022 19:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661022649; bh=uNUb1M7CCQXGOxGrsYBQxCVkKEk2ADvQo+VwUlJ9jHQ=; h=From:To:Cc:Subject:Date:From; b=KzQ/lWHqSAiLkeoOQivxT89bOTDFv6C+41BHNiWuwaeSsE3Wsmfr4ybvTY+i7MKm6 kIC5kqNNUqyXGGprcbKIiXbJA51rNHvFYmRwj4qRXACUqb63yhId9WPe1l3A2aI/Fj sTOTyORCQFdc61zxLhl3CHOBrdMjqJweKKfqlcbUA0pUebdKH7hswnkUEkzN/VhDnT a0gZ5Rh713lZrWZPzgqDnTB1CW8g0CpwwPGx6zZS7HaQv5e9gsg/f9GFOmpm6UwJJJ uVzRE8d4PvzS2DgzPHFMeAIUrbsZhZE1+hmQ1uXMh7dS2CSQr/xM9+y5I5FFL8GnGX dbb8hI9LPdRAA== From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Christoph Hellwig Subject: [PATCH v2 0/2] fscrypt: rework filesystem-level keyring Date: Sat, 20 Aug 2022 12:02:08 -0700 Message-Id: <20220820190210.169734-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This series reworks the filesystem-level keyring to not use the keyrings subsystem as part of its internal implementation (except for ->mk_users, which remains unchanged for now). This fixes several issues, described in the first patch. This is also a prerequisite for removing the direct use of struct request_queue from filesystem code, as discussed at https://lore.kernel.org/linux-fscrypt/20220721125929.1866403-1-hch@lst.de/T/#u Changed v1 => v2: - Don't compare uninitialized bytes of struct fscrypt_key_specifier - Don't use refcount_dec_and_lock() unnecessarily - Other minor cleanups Eric Biggers (2): fscrypt: stop using keyrings subsystem for fscrypt_master_key fscrypt: stop holding extra request_queue references fs/crypto/fscrypt_private.h | 74 ++++-- fs/crypto/hooks.c | 10 +- fs/crypto/inline_crypt.c | 83 +++--- fs/crypto/keyring.c | 495 +++++++++++++++++++----------------- fs/crypto/keysetup.c | 89 +++---- fs/crypto/keysetup_v1.c | 4 +- fs/crypto/policy.c | 8 +- fs/super.c | 2 +- include/linux/fs.h | 2 +- include/linux/fscrypt.h | 4 +- 10 files changed, 406 insertions(+), 365 deletions(-) base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 -- 2.37.1 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 8C67CC25B08 for ; Sat, 20 Aug 2022 19:11:25 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1oPTsT-0006pa-57; Sat, 20 Aug 2022 19:11:25 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oPTsR-0006pO-KS for linux-f2fs-devel@lists.sourceforge.net; Sat, 20 Aug 2022 19:11:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Hjq/9MnObc3Z8XhrXl896s6OXlEJ+vn+xSGaklbo2jY=; b=EziZqfdXUS9Z1MVv9P4V1YMOrk qWqaK+fU18gHMrHjfUqtAtkIV0yL01BNUIsAQn+1lxzB9AeceKR7VAQTyXrClsKc2IdPenla6SSWG H43AtsQ9H9gVKDRRRCjL6IbLm/Tyv1zRts1F2HeDN8yEV8p3enPpuipf6ZjxVHj7La8Q=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=Hjq/9MnObc3Z8XhrXl896s6OXlEJ+vn+xSGaklbo2jY=; b=T KfXLtQYtVTmHLzMXJWxifxfQUymQCk6mRkGGwCuUy1PpiWIOFOx1NPGhtHQamF5GvJQM2JoL2OYGC o05NNeXJF9nZOZKvFx/+XZY2HTK21YJ+6mrg/8n1lNZRxeZpWDu9tGc9MKxr3OKaAhTLg3JSnMCIW fV9dKIa/sbjgrLig=; 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.95) id 1oPTsA-0006P7-J9 for linux-f2fs-devel@lists.sourceforge.net; Sat, 20 Aug 2022 19:11:09 +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 97081B80AAD; Sat, 20 Aug 2022 19:10:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 202FAC433C1; Sat, 20 Aug 2022 19:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661022649; bh=uNUb1M7CCQXGOxGrsYBQxCVkKEk2ADvQo+VwUlJ9jHQ=; h=From:To:Cc:Subject:Date:From; b=KzQ/lWHqSAiLkeoOQivxT89bOTDFv6C+41BHNiWuwaeSsE3Wsmfr4ybvTY+i7MKm6 kIC5kqNNUqyXGGprcbKIiXbJA51rNHvFYmRwj4qRXACUqb63yhId9WPe1l3A2aI/Fj sTOTyORCQFdc61zxLhl3CHOBrdMjqJweKKfqlcbUA0pUebdKH7hswnkUEkzN/VhDnT a0gZ5Rh713lZrWZPzgqDnTB1CW8g0CpwwPGx6zZS7HaQv5e9gsg/f9GFOmpm6UwJJJ uVzRE8d4PvzS2DgzPHFMeAIUrbsZhZE1+hmQ1uXMh7dS2CSQr/xM9+y5I5FFL8GnGX dbb8hI9LPdRAA== From: Eric Biggers To: linux-fscrypt@vger.kernel.org Date: Sat, 20 Aug 2022 12:02:08 -0700 Message-Id: <20220820190210.169734-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Headers-End: 1oPTsA-0006P7-J9 Subject: [f2fs-dev] [PATCH v2 0/2] fscrypt: rework filesystem-level keyring 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: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-ext4@vger.kernel.org, Christoph Hellwig , 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 This series reworks the filesystem-level keyring to not use the keyrings subsystem as part of its internal implementation (except for ->mk_users, which remains unchanged for now). This fixes several issues, described in the first patch. This is also a prerequisite for removing the direct use of struct request_queue from filesystem code, as discussed at https://lore.kernel.org/linux-fscrypt/20220721125929.1866403-1-hch@lst.de/T/#u Changed v1 => v2: - Don't compare uninitialized bytes of struct fscrypt_key_specifier - Don't use refcount_dec_and_lock() unnecessarily - Other minor cleanups Eric Biggers (2): fscrypt: stop using keyrings subsystem for fscrypt_master_key fscrypt: stop holding extra request_queue references fs/crypto/fscrypt_private.h | 74 ++++-- fs/crypto/hooks.c | 10 +- fs/crypto/inline_crypt.c | 83 +++--- fs/crypto/keyring.c | 495 +++++++++++++++++++----------------- fs/crypto/keysetup.c | 89 +++---- fs/crypto/keysetup_v1.c | 4 +- fs/crypto/policy.c | 8 +- fs/super.c | 2 +- include/linux/fs.h | 2 +- include/linux/fscrypt.h | 4 +- 10 files changed, 406 insertions(+), 365 deletions(-) base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 -- 2.37.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel