Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1752232ybz; Thu, 30 Apr 2020 05:01:41 -0700 (PDT) X-Google-Smtp-Source: APiQypIfJ6gjEjQPgI8QNyZzDzBHzin23+pls5BL+3yz5uYOTMKigxl7SIVfcyE1g6gloxbFo/Co X-Received: by 2002:a17:906:1dce:: with SMTP id v14mr2386019ejh.244.1588248100896; Thu, 30 Apr 2020 05:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588248100; cv=none; d=google.com; s=arc-20160816; b=ibVdGIHfqpFqBwfQumw5g2/0K/b8NszEBTSZvV/UTpIQxBRda95N5u9S2ru9S3/FYy jmvVDDf+Gd0LUp83kl9i59fpSZuuNRoC4ZMcOL/8ekOCmyllQcZAIxxw1ge73l/AM32h pzGJs2PYkDvLrDWr2DshzVempSUignoabARADdnhK2xuVvkoDgl2Sci1seXN6Gx35+wV Pj4698R+e54jCFbZLP/XlIOh0FZdWsUiiNdvSeYKLjTiFkDTsw9R0y+OPJIIGA+SOvWQ h7613vlsqgpLlwFCmnpMOo7KmZnsAgAHGb6+0K4RJ22pJnaD5P8bB9JgFCUea003WFEt 3UVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=dcBMNhJyVF3JG7u2k+hpIfX5J5/+YNOMhft7o2B+Ju4=; b=0+D4ck6CqCo/pocqJaIPhNU17XtAAzfHGkmJPNGWKWM8P5jPWwk35sgCmshvCiE18Y HambcR66f7cirdK2YenQr6h/msKKPBhBusynuCdGvQLnRS8iYGuEC6RkWP5hKKQj3UyH /CMFfTucxuLEdNX4g2fKKIZDt8ptVjnhPVj6OwjtazlcZymM7qaw/CMJappXqPHMfmnr Dt+zIXwZgsAjq5K0D/hOzG+I/G5qXlpFfzIN67r0aIMDvnFsMm2ezDDpeHwv7Y/hCe4f bUBEi7mt2DF4x7Txtg9vYlqXFtyGeK/NuDqO7mchqq44fI3qVvyP9t/y25Q3RYyinS/q rEDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WVjua0bo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq1si340468edb.116.2020.04.30.05.01.15; Thu, 30 Apr 2020 05:01:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WVjua0bo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727098AbgD3MAR (ORCPT + 99 others); Thu, 30 Apr 2020 08:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727073AbgD3MAQ (ORCPT ); Thu, 30 Apr 2020 08:00:16 -0400 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCD0AC08E859 for ; Thu, 30 Apr 2020 05:00:16 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id d15so6176736qkl.10 for ; Thu, 30 Apr 2020 05:00:16 -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=WVjua0boMZFfyXRxNHxXtkkQlvtsd9hMr76JSeSRnGAS4i4rb0v5hyP/xpU/t08yAU 8iFqQJRhyAkwJFM1oK1XZBTqXHm3CqsdLruIVMn/pVnKPy3fC4DShhJRinGldvR/S/PE BRJ35yKgDNYU78xLeadViChpObrcGpoomH0GOf1yWskNC6xGjTXCQ70zRp3w8mJsEov1 wnopsVuB0htL7AZ3eqUvciTbLOa1LCZTKOiayOWzgpDf/NefzgdtHrk8kZ6h2I0f2Ln0 gH8rvRj4IA4NAJmjknAgox3uK+dYnH04ADDO1Fq1XchcZcytltv69jWbnlNIl/trv1Tn lHrg== 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=kxCLctay15WoX+CuQGaK4S2jQVyLG+kgRf26DIcIMooS5m5gct9IeEaSqX6nRP5/EK lzS/bKVXvb6NmFRCTzHBipyW9BJuh9Qe4Fjn87M8vfoZOtGJ8g6WE5kUvLmRgfqRo2Ya o0RWIV28IhZAGjw0CrvkgMviepi1uE1G0sck0orvNz38GJvaMH5Un9L9qW/h3pGvLmUY e3rW3uaVPewYnt6um0xnYUadBTOF+6TIYGzyhcJKZPeOTtJ7wtYKl6uHhuWZ+9OWhN9Q ZS9+p864AeV/EXJfX1wMd7uP0pECGbfqua00IJvYXuHbrcoBEZWXe9FXTyZJgdo+BjeM /XbQ== X-Gm-Message-State: AGi0Puai4zINzgm7pI1Smj7cQihYzzKajTMLP6/k7TkEtOnvcbU+ZheH v8MFoScJdmHYRequV+gydcmcKJuKL3U= X-Received: by 2002:a05:6214:1804:: with SMTP id o4mr2636288qvw.10.1588248015930; Thu, 30 Apr 2020 05:00:15 -0700 (PDT) Date: Thu, 30 Apr 2020 11:59:56 +0000 In-Reply-To: <20200430115959.238073-1-satyat@google.com> Message-Id: <20200430115959.238073-10-satyat@google.com> Mime-Version: 1.0 References: <20200430115959.238073-1-satyat@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH v12 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-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@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