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 X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A20B8C83003 for ; Wed, 29 Apr 2020 07:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 799FF20775 for ; Wed, 29 Apr 2020 07:21:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dfrGTfJj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726765AbgD2HV5 (ORCPT ); Wed, 29 Apr 2020 03:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbgD2HVp (ORCPT ); Wed, 29 Apr 2020 03:21:45 -0400 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B68C09B044 for ; Wed, 29 Apr 2020 00:21:42 -0700 (PDT) Received: by mail-qk1-x74a.google.com with SMTP id h186so1613538qkc.22 for ; Wed, 29 Apr 2020 00:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=dcBMNhJyVF3JG7u2k+hpIfX5J5/+YNOMhft7o2B+Ju4=; b=dfrGTfJjx+xsOcKHeejLK4oMt9g5AcqcRK5/UgBb14pn/JbWFb1vMwUyV+V1slwjtj 2nFObH6Yei1hbvG9BW2Ll9vbpOcTaaQWiATCvTV1B/VYCTXeUPCW+hLpf049cVmCdboI rHS6z3TM/IJRit3QH4E1ap9PyEFxHqulYCq7YE0up+baJBD6tgxW4NrGKOf9TJ+F3+Km QcXzGA2M5GB6W6B2ghC6wC+zS04Bwtty77EltXC43D73oIukh3a67IIcPcLbMepNDXfr 2Xrzb2Hp+Ov7eBjxW/m2vgPs2VZpLO9whdG848N9ksL78T4b8vthHOeR4v9S1c4cj0LF qOJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=dcBMNhJyVF3JG7u2k+hpIfX5J5/+YNOMhft7o2B+Ju4=; b=BcxTyMQ0364bfrWWQi9OZDILD/HV39EVzSrbM/OOO1L3Q5wMMirceguBGdQdI9byto 0SWgPsFyS9p0L2/vqAvP33s75bJT35Z2rQ4KHNY0IuwV57uVis12ZL36hJk5Vjeic6dw sWbg3bEl8LszAwP0KyGXwiC+P3BppGYxyEWjtCDefz6hvtxXSis4cP2wdC1ZVoId6e24 yFVGj0vB8Ea2Zaw/zp8lCsfRkZ0J9wajpeeoyp4ljK9hyZB8ObNuX/0hKeWoGjzmPp1o qNPFnqbVwAx6hvMFI9j//mxso/9nrTjJj9hWtwuBe//ym1MLpn38sgotgGWGlY6atmN5 65Kw== X-Gm-Message-State: AGi0PuZF8kkAlipZ86djd42HpSFFKA3NF/w0eMEib/1Zw7pSv3qO9HVS zBzSoE5WN26Co7+D4ZfqjjBhzXxKuys= X-Google-Smtp-Source: APiQypJz89cxZWdYzpcW5zsQCLnnJh9hiKeWJOQg2VT8hOJvTQfkY3cXLSwBZXj2P4l7aalg3AeJ9YcyX18= X-Received: by 2002:ad4:55e7:: with SMTP id bu7mr32187009qvb.88.1588144901506; Wed, 29 Apr 2020 00:21:41 -0700 (PDT) Date: Wed, 29 Apr 2020 07:21:18 +0000 In-Reply-To: <20200429072121.50094-1-satyat@google.com> Message-Id: <20200429072121.50094-10-satyat@google.com> Mime-Version: 1.0 References: <20200429072121.50094-1-satyat@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH v11 09/12] fs: introduce SB_INLINECRYPT From: Satya Tangirala To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org Cc: Barani Muthukumaran , Kuohong Wang , Kim Boojin , Satya Tangirala Content-Type: text/plain; charset="UTF-8" Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org Introduce SB_INLINECRYPT, which is set by filesystems that wish to use blk-crypto for file content en/decryption. This flag maps to the '-o inlinecrypt' mount option which multiple filesystems will implement, and code in fs/crypto/ needs to be able to check for this mount option in a filesystem-independent way. Signed-off-by: Satya Tangirala --- fs/proc_namespace.c | 1 + include/linux/fs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 273ee82d8aa97..8bf195d3bda69 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c @@ -49,6 +49,7 @@ static int show_sb_opts(struct seq_file *m, struct super_block *sb) { SB_DIRSYNC, ",dirsync" }, { SB_MANDLOCK, ",mand" }, { SB_LAZYTIME, ",lazytime" }, + { SB_INLINECRYPT, ",inlinecrypt" }, { 0, NULL } }; const struct proc_fs_info *fs_infop; diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f6f59b4f22a8..38fc6c8d4f45b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1376,6 +1376,7 @@ extern int send_sigurg(struct fown_struct *fown); #define SB_NODIRATIME 2048 /* Do not update directory access times */ #define SB_SILENT 32768 #define SB_POSIXACL (1<<16) /* VFS does not apply the umask */ +#define SB_INLINECRYPT (1<<17) /* Use blk-crypto for encrypted files */ #define SB_KERNMOUNT (1<<22) /* this is a kern_mount call */ #define SB_I_VERSION (1<<23) /* Update inode I_version field */ #define SB_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */ -- 2.26.2.303.gf8c07b1a785-goog 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 X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EEE3C8301C for ; Wed, 29 Apr 2020 07:21:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id CF8E62076B; Wed, 29 Apr 2020 07:21:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.sourceforge.net header.i=@lists.sourceforge.net header.b="EWTF6ijo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="X5oBqvef"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="CyAKK0TP"; dkim=neutral (0-bit key) header.d=google.com header.i=@google.com header.b="dfrGTfJj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF8E62076B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.sourceforge.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:To:References:Mime-Version:Message-Id: In-Reply-To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nFT6MAzUmHSHG0odiVdcRegFPRfF3bGQgU81nJhZ3l0=; b=EWTF6ijonyoK20pGP5Tmq9n92 9jvNCYD5aBBgN8BhQK2zuXTmdYs4jkHlNl0v6eNGtxd2lTuIpYaHSzJWz5Vlomb4QjVgNTSx0i9Is Hl/OGwZLIyMtfG+kDd+4NhfPYHsjPhXKtui7mX5Nfnx74jCKXNUhzxjhixClAOBiNICe0=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jTh2W-0002lT-Gu; Wed, 29 Apr 2020 07:21:52 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <3BSupXgYKAPoucv0cviqqing.eqo@flex--satyat.bounces.google.com>) id 1jTh2S-0002kh-O6 for linux-f2fs-devel@lists.sourceforge.net; Wed, 29 Apr 2020 07:21:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To: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=dcBMNhJyVF3JG7u2k+hpIfX5J5/+YNOMhft7o2B+Ju4=; b=X5oBqvef1B5V+4Wi+WyJ+p/HJ alpYRtH2NEB/lY6ilDD8JGiK8ZVKq/gs4lH344j7t3pWs8qH/HCDnoP4qlpoD/J+t8xdS2cBUbSol TLKbR/VedyTVRMWreLPoWJG5pbXfSUhUYRbVpS1tm9OVG32xe782sCoLhRCNQ9jGzt0lU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Cc:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To: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=dcBMNhJyVF3JG7u2k+hpIfX5J5/+YNOMhft7o2B+Ju4=; b=CyAKK0TPZlZoip2MhsWlaJKA+n 7hfqxdUo7Bnk58k+1nRsQjZbk7S4aCHs4bvEl5syWHjz7aZ6seel8ufcvN6CVLTkEGOffZCaH0suh PgAIF5trhM6C5Yl7Wi+xC0tNtslMK+LStiKtb99fJl5j8RBLxreLIkX3qzrX5yWX4GeM=; Received: from mail-qv1-f73.google.com ([209.85.219.73]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jTh2R-00FwNB-Im for linux-f2fs-devel@lists.sourceforge.net; Wed, 29 Apr 2020 07:21:48 +0000 Received: by mail-qv1-f73.google.com with SMTP id o18so1638702qvu.8 for ; Wed, 29 Apr 2020 00:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=dcBMNhJyVF3JG7u2k+hpIfX5J5/+YNOMhft7o2B+Ju4=; b=dfrGTfJjx+xsOcKHeejLK4oMt9g5AcqcRK5/UgBb14pn/JbWFb1vMwUyV+V1slwjtj 2nFObH6Yei1hbvG9BW2Ll9vbpOcTaaQWiATCvTV1B/VYCTXeUPCW+hLpf049cVmCdboI rHS6z3TM/IJRit3QH4E1ap9PyEFxHqulYCq7YE0up+baJBD6tgxW4NrGKOf9TJ+F3+Km QcXzGA2M5GB6W6B2ghC6wC+zS04Bwtty77EltXC43D73oIukh3a67IIcPcLbMepNDXfr 2Xrzb2Hp+Ov7eBjxW/m2vgPs2VZpLO9whdG848N9ksL78T4b8vthHOeR4v9S1c4cj0LF qOJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=dcBMNhJyVF3JG7u2k+hpIfX5J5/+YNOMhft7o2B+Ju4=; b=jJ66WaIBASPJ2gxk6h4uh4pEzFl8fq9SKHVbK8dTmVekwaDxMdONz15luJRJ/gCm+P BCfmzcnuJ/qXmvY3aP4C0fYNUHxZpQSf44uipqvyIKYEKEBxbD55DAyZWTli0mwshm1W kAqegV64tqcjYOffzoBCyGv91jS2nf/E0gmOTqAnBp4hnXcafe299ebT9k1CSbtvTvxY P3OvkDrreYVYYBv/AGhqVhcO56S/RjsFl24EVqYUp6DwJMHyU2BynFaw80dc/xrbaNDu WWj7WIkTZsOeUO1ycwth8jqUt2QMAqixdOq1AcWPBO6Wn3vjPRUvqVvoiqzSc83S3VVj b4fw== X-Gm-Message-State: AGi0PuZY9OCxPl9ViBjigyTriXcH9YlsvY6KaFZPzsA5neByZ9LVotfK nM5TQIPQKelI8IqidRDdktIrTqG0bHU= X-Google-Smtp-Source: APiQypJz89cxZWdYzpcW5zsQCLnnJh9hiKeWJOQg2VT8hOJvTQfkY3cXLSwBZXj2P4l7aalg3AeJ9YcyX18= X-Received: by 2002:ad4:55e7:: with SMTP id bu7mr32187009qvb.88.1588144901506; Wed, 29 Apr 2020 00:21:41 -0700 (PDT) Date: Wed, 29 Apr 2020 07:21:18 +0000 In-Reply-To: <20200429072121.50094-1-satyat@google.com> Message-Id: <20200429072121.50094-10-satyat@google.com> Mime-Version: 1.0 References: <20200429072121.50094-1-satyat@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org X-Headers-End: 1jTh2R-00FwNB-Im Subject: [f2fs-dev] [PATCH v11 09/12] fs: introduce SB_INLINECRYPT 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: , From: Satya Tangirala via Linux-f2fs-devel Reply-To: Satya Tangirala Cc: Kuohong Wang , Satya Tangirala , Barani Muthukumaran , Kim Boojin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Introduce SB_INLINECRYPT, which is set by filesystems that wish to use blk-crypto for file content en/decryption. This flag maps to the '-o inlinecrypt' mount option which multiple filesystems will implement, and code in fs/crypto/ needs to be able to check for this mount option in a filesystem-independent way. Signed-off-by: Satya Tangirala --- fs/proc_namespace.c | 1 + include/linux/fs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 273ee82d8aa97..8bf195d3bda69 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c @@ -49,6 +49,7 @@ static int show_sb_opts(struct seq_file *m, struct super_block *sb) { SB_DIRSYNC, ",dirsync" }, { SB_MANDLOCK, ",mand" }, { SB_LAZYTIME, ",lazytime" }, + { SB_INLINECRYPT, ",inlinecrypt" }, { 0, NULL } }; const struct proc_fs_info *fs_infop; diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f6f59b4f22a8..38fc6c8d4f45b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1376,6 +1376,7 @@ extern int send_sigurg(struct fown_struct *fown); #define SB_NODIRATIME 2048 /* Do not update directory access times */ #define SB_SILENT 32768 #define SB_POSIXACL (1<<16) /* VFS does not apply the umask */ +#define SB_INLINECRYPT (1<<17) /* Use blk-crypto for encrypted files */ #define SB_KERNMOUNT (1<<22) /* this is a kern_mount call */ #define SB_I_VERSION (1<<23) /* Update inode I_version field */ #define SB_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */ -- 2.26.2.303.gf8c07b1a785-goog _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel