Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp719705rwb; Thu, 10 Nov 2022 06:38:36 -0800 (PST) X-Google-Smtp-Source: AMsMyM4VOA0F8zloWQnhtwRU5xMPcEewOHAXmfGJTOBRE0OvOqoCIGBr6DBC10pwjZwRjcgfnJcC X-Received: by 2002:a05:6402:1c89:b0:461:53b0:2abb with SMTP id cy9-20020a0564021c8900b0046153b02abbmr2404772edb.386.1668091116710; Thu, 10 Nov 2022 06:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668091116; cv=none; d=google.com; s=arc-20160816; b=gGoyM5FYyy0vqg728uM7O9aUTIew+3lWOtBz8sl8IOV+wxU8ES6u7qfSbmfOCTiEoT 7zn4xh9DwXoU2QYXJEtRxxO/WKe6s7GAZveiIBgLMRSmtGdO9go7K6YY118sYerTBh4O W0XBTk39WehkRyes6Eoo3ChBjO8+0Oo6FOyOnzJhnrSCz3PQ4Zvoa58rRDESnj0nzePC 8tCukKmDnC15JQRCxnYMc3mOVJVAsE8YmJdiegS+RCIDzuLCfT4xzPudxNePBTJf3ZbI nFYM3pj+YIvjbP1ZkZFCr/MCdA6NEcc7s8zGW64g+u6jngle/sZGMuLORdjGmct5FaRH P64w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sG+jutGzOgaFRFm9buFpKva94M9MOYUWoscJc0fFXY0=; b=aTMiXlaQEHyoZv4nMVc1haypHIrMerOA4BVqsjj6U4K3/k9YTh+X1FcIWP46JUbx19 Eui2GN0Id5cm9WSjezZ8NABf9/JHgie03+x7yNQglnEe5TaW3M4SQI60VcH7L08OM2DZ SkqYzoQ91pFyFGYGyVTJsKaxd5+Pcn2M4fJdd2gBVu0I77vnWOfDnSc6jqy0Z0M83JaW nSV9s/SDJQQdNFrHkDHHMslMj4SusrOLYER5WJr1FoWLiAiL3b63zGsq0w/zPvxZNDEU JpNxz5iyOeJCXW1v3BZCqiAR/pIqNFtBOiAOrPKaRhLk7JqnyV8KODv9DRw32Qi2UDR5 pVqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bRh843jE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a056402094200b0045ccd2c9944si16442697edz.233.2022.11.10.06.38.12; Thu, 10 Nov 2022 06:38:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bRh843jE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbiKJONn (ORCPT + 92 others); Thu, 10 Nov 2022 09:13:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbiKJONe (ORCPT ); Thu, 10 Nov 2022 09:13:34 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBA986DCDA for ; Thu, 10 Nov 2022 06:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668089562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sG+jutGzOgaFRFm9buFpKva94M9MOYUWoscJc0fFXY0=; b=bRh843jEwPoJ56k/I0fqQGOzd42DZDnG+kRfmzxE7loZVxUayNRSL0uYFlmgbrYdU1aW5X zTOz7x2ItoVc0e8s8aBGKPfvKKYCeazqsmqn28qzaVKZOLXGHzjIVfo8IucGgFlFePr6+Z g8j0TA+v4XJsF/IS6WTKtDM6p8CG5zw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-651-oBEUIxlkMK-zTLbNQHjk3g-1; Thu, 10 Nov 2022 09:12:38 -0500 X-MC-Unique: oBEUIxlkMK-zTLbNQHjk3g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 76BA5833A0D; Thu, 10 Nov 2022 14:12:37 +0000 (UTC) Received: from localhost (unknown [10.39.208.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36B1C4EA5A; Thu, 10 Nov 2022 14:12:37 +0000 (UTC) From: Niels de Vos To: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Xiubo Li , Marcel Lauhoff , Niels de Vos Subject: [RFC 0/4] fs: provide per-filesystem options to disable fscrypt Date: Thu, 10 Nov 2022 15:12:21 +0100 Message-Id: <20221110141225.2308856-1-ndevos@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_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-kernel@vger.kernel.org While more filesystems are getting support for fscrypt, it is useful to be able to disable fscrypt for a selection of filesystems, while enabling it for others. The new USE_FS_ENCRYPTION define gets picked up in include/linux/fscrypt.h. This allows filesystems to choose to use the empty function definitions, or the functional ones when fscrypt is to be used with the filesystem. Using USE_FS_ENCRYPTION is a relatively clean approach, and requires minimal changes to the filesystems supporting fscrypt. This RFC is mostly for checking the acceptance of this solution, or if an other direction is preferred. --- Niels de Vos (4): fscrypt: introduce USE_FS_ENCRYPTION fs: make fscrypt support an ext4 config option fs: make fscrypt support a f2fs config option fs: make fscrypt support a UBIFS config option Documentation/filesystems/fscrypt.rst | 2 +- fs/crypto/Kconfig | 3 +++ fs/crypto/fscrypt_private.h | 2 ++ fs/ext4/Kconfig | 13 ++++++++++++- fs/ext4/Makefile | 2 +- fs/ext4/ext4.h | 12 ++++++++---- fs/ext4/inode.c | 6 +++--- fs/ext4/namei.c | 6 +++--- fs/ext4/super.c | 6 +++--- fs/ext4/sysfs.c | 8 ++++---- fs/f2fs/Kconfig | 15 +++++++++++++-- fs/f2fs/data.c | 2 +- fs/f2fs/dir.c | 6 +++--- fs/f2fs/f2fs.h | 8 ++++++-- fs/f2fs/super.c | 6 +++--- fs/f2fs/sysfs.c | 8 ++++---- fs/ubifs/Kconfig | 14 ++++++++++++-- fs/ubifs/Makefile | 2 +- fs/ubifs/sb.c | 4 ++-- fs/ubifs/ubifs.h | 7 +++++-- include/linux/fscrypt.h | 6 +++--- 21 files changed, 93 insertions(+), 45 deletions(-) -- 2.37.3