Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp299175ybt; Wed, 17 Jun 2020 00:58:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/hzbC7zfIDbl43hSVPy64EXU14mAZacTZlVq7m0ruqHmphRkn6shVU73+uEsrcql1NV5E X-Received: by 2002:a17:906:b7c8:: with SMTP id fy8mr6287601ejb.85.1592380699612; Wed, 17 Jun 2020 00:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592380699; cv=none; d=google.com; s=arc-20160816; b=nTtjBtNURTR9lxwDOgXOcb5xa5YAkOoMiVkDFTrmWikL6F9pBUBgihzZdVqUNqjIqg hScuS4X3tAc8AgB4FJI5Tf3AJAPXeQsitaNsWtpJDcAmecWo3UzFprmNsaJ73RCVwHxs v3/j0AAqBkRhL6mhfkbO/Hwz3MiZezF5M9CYLOZQNBc73omCRV/Jd/sGfiBM4SkxWycl eQZprlR2hBbgb0VfKaAX6r8kRenmINet5FS9wzWR09WHtYig+AYQ/1HGOxhSAlN/eSoR 6KQ/T5Y3TLDbjOon+F4LcLvvdpWy/nLKS6GF2ftcBrSEztiwSZj9vAV16+Upy6o7BMQG zCUA== 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=G/fPjNKj6PNXBhhglcGDXFh+C2RJTmo0o/rYX7Lpb+0=; b=to0piaixSFRRQTvmIv8COXO7xWUOXLouOi75Kk1YWrKmt5+vbTDGatnEjffGxCNH0w DCE00JZyt+HtqlQC+o+c2HV6ENIp2L2Wa4uiGJO/A8lTLS3kCjfl6/EMRkbYSkDn9+0r 48ZofS6VHD+f4gG/hy76NQSRgu0RrxbVwYtmUgCuE9XxBLuSkd4swB9qXjru6uW/3QHq aeVLwY4ChPtKx/SSHH2goggSc+kqeBcygxA5UnXFzXeYxg1nFK2KcYPCte/AJ08/j/vX Dhq4Lf1wmC/fMcqKVmJEegdqVO5L7UTAZaOdNIRChSIcfo7xQuv9Par3i+HMUFe/La4L gwmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TluV8U8p; 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 g8si12499581ejb.653.2020.06.17.00.57.52; Wed, 17 Jun 2020 00:58:19 -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=TluV8U8p; 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 S1726542AbgFQH5l (ORCPT + 99 others); Wed, 17 Jun 2020 03:57:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726519AbgFQH5k (ORCPT ); Wed, 17 Jun 2020 03:57:40 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42862C06174E for ; Wed, 17 Jun 2020 00:57:39 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id r17so1579779ybj.22 for ; Wed, 17 Jun 2020 00:57:39 -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=G/fPjNKj6PNXBhhglcGDXFh+C2RJTmo0o/rYX7Lpb+0=; b=TluV8U8p4btHvRnG6E6rAe71kNH+BvrrGlEUayjO0HSPyFC+sXTxG1hYdqjhQRPKUY YDfNaP8YEbdwvHiu0XmRd3SNZSVbMyEDvebwv262dL8uHXfSd2dHrP2ZMHzf8smMGyf8 aZSebf2M/SqHt4cF4SJ2tKEQvOlqkH606abeCiH0hh2KPEqZG0VysoQXAisisVGnR9hy CcDI6rzrx6tGcujgcyBKLSyDzqFCaSEA7l41SnukYRgykKsAYwIMcZDIQe5M8U1Mej2F vIl2mlIUiX9vxJe0t0YzmIQiOqjs+8O58+gZVqrIu/vEFjVjpOI9UWCeLB1Jn4CMO8zf luQw== 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=G/fPjNKj6PNXBhhglcGDXFh+C2RJTmo0o/rYX7Lpb+0=; b=NnhQlbkGohlzzZLqfYm/JjoR3uTV+T6+ABFGfOuwJ+qaS/xMqBzAVi3KDNMXb99VLg Z0JO73kd2F/Kb7iYE4FP5cO/jw8Xp259/SDNqBJAjnz+9rjDWPN8h6PVQMYYcN1MA12Z /9tQlXTO+6U0txXfOFRWzP4rtB7oZe2wjW0GFghcqho9NmkdX53MRygob9DzJRLYgvaA 0C4bmBM4dgdod7LSlZAr7u/qrD/yFUqAF5FNgPZuuMOGvAhPPaMKiqOrLwpwwfMMA/XE QFNSN1LQeYg/81F0AenVd8rcArhvVrJAyJVW596oeGtvJryFNvqX6azCTJXs7yCClc3S XaTg== X-Gm-Message-State: AOAM533/gb3W8nMCanP7jIs6Ta6bR9w11Pft2gqppX+pTULbeeVJgcj5 B2RxdVgMdQAWut0bA+WmDLdc7WBVSL8= X-Received: by 2002:a25:2f4b:: with SMTP id v72mr10935088ybv.232.1592380658499; Wed, 17 Jun 2020 00:57:38 -0700 (PDT) Date: Wed, 17 Jun 2020 07:57:29 +0000 In-Reply-To: <20200617075732.213198-1-satyat@google.com> Message-Id: <20200617075732.213198-2-satyat@google.com> Mime-Version: 1.0 References: <20200617075732.213198-1-satyat@google.com> X-Mailer: git-send-email 2.27.0.290.gba653c62da-goog Subject: [PATCH 1/4] fs: introduce SB_INLINECRYPT From: Satya Tangirala To: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org Cc: 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 3059a9394c2d..e0ff1f6ac8f1 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_opts *fs_infop; diff --git a/include/linux/fs.h b/include/linux/fs.h index 6c4ab4dc1cd7..abef6aa95524 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1380,6 +1380,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.27.0.290.gba653c62da-goog