[{"id":1772449,"web_url":"http://patchwork.ozlabs.org/comment/1772449/","msgid":"<20170921064502.GR10621@dastard>","list_archive_url":null,"date":"2017-09-21T06:45:02","subject":"Re: [PATCH 00/25] fscrypt: add some higher-level helper functions","submitter":{"id":421,"url":"http://patchwork.ozlabs.org/api/people/421/","name":"Dave Chinner","email":"david@fromorbit.com"},"content":"On Wed, Sep 20, 2017 at 03:45:40PM -0700, Eric Biggers wrote:\n> From: Eric Biggers <ebiggers@google.com>\n> \n> This series reduces code duplication among ext4, f2fs, and ubifs by\n> introducing a S_ENCRYPTED inode flag (so we don't have to call back into\n> the filesystem to test the filesystem-specific inode flag), then\n> introducing new helper functions that are called at the beginning of the\n> open, link, rename, lookup, and setattr operations.\n> \n> In the future we maybe should even call these new helpers from the VFS\n> so that each individual filesystem doesn't have to do it.  But that's\n> not possible currently because fs/crypto/ can be built as a module.\n> \n> Making changes like this is a bit challenging due to interdependencies\n> between fscrypt and the individual filesystems, all of which have\n> different maintainers.  For now my intent is that patches 1-10 be taken\n> through the fscrypt tree --- though it's not perfect since patches 1-4\n> do make some changes to each filesystem, as everyone must set\n> S_ENCRYPTED before we can use it everywhere in the shared code.  But\n> afterwards, patches 11-25 can be picked up by the individual filesystems\n> to switch to the new helpers.\n\nThis all looks much nicer. Having just been looking at this stuff,\nit makes the code much simpler to understand. So:\n\nAcked-by: Dave Chinner <dchinner@redhat.com>\n\nWhile I'm here, the fscrypt header file includes are clunky and\nnasty. I worte a quick patch a couple of days ago to clean it up.\nSee below....\n\nCheers,\n\nDave.","headers":{"Return-Path":"<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"ebHb4HfG\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyRvh6sMDz9t3v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 16:45:52 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duvEz-0000TG-0t; Thu, 21 Sep 2017 06:45:41 +0000","from ipmail06.adl6.internode.on.net ([150.101.137.145])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duvEt-00083w-2i\n\tfor linux-mtd@lists.infradead.org; Thu, 21 Sep 2017 06:45:38 +0000","from ppp59-167-129-252.static.internode.on.net (HELO dastard)\n\t([59.167.129.252]) by ipmail06.adl6.internode.on.net with ESMTP;\n\t21 Sep 2017 16:15:04 +0930","from dave by dastard with local (Exim 4.80)\n\t(envelope-from <david@fromorbit.com>)\n\tid 1duvEM-0001pl-Sg; Thu, 21 Sep 2017 16:45:02 +1000"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=dF1p6ot7NGP3HBhPMFxV1Y9k4q3S7zbr6/x5CoBVndg=;\n\tb=ebHb4HfGmcVtQs\n\tEjC2Qq7kNfc97fj9amnVtOTT6YbJcCOs8hVo6oqfdFVcFnCkzSoZgHkxtVAlvAgoNiLRTIsdLyHCa\n\tnXXE3zGj55fZyB3TyPszTs8KmKq8PEYH+yPNLAh+5xoyxciF+PMADFuPvvTqIMVm16apQSpnrTpSK\n\tlTmblDgCqMkARQ/N89Y9cXxv4hepzb2/uwyWcS1ALualIf9mp9KsQc8s3GgKmxLjVtXYq/N8hBhtm\n\tZzk1E9gQUiaH3pTi2OKZ1r1FfwCdAj1a+Tox7Ev1viMR1u6/RjyUHhn++HxmLnmA47y7RnCawDfGu\n\tOCQy3rIoQ++18tVsV/Sg==;","X-IronPort-Anti-Spam-Filtered":"true","X-IronPort-Anti-Spam-Result":"A2DAAQB+XsNZ//yBpztbGQEBAQEBAQEBAQEBBwEBAQEBhSwngyuLX49FAQEBBoEqjRuJHIElA1yFPwICAQEChUABAgEBAQEBAmsohRgBAQEBAycTHCMQCAMOBwMJJQ8FJQMhE4omDKktOop+AQEBBwIBJSGDCoELggCCLIIbgQ2EQIYuBaETlEqTCJZzV04/MiEIHBWFYR2BeS42iSIBAQE","Date":"Thu, 21 Sep 2017 16:45:02 +1000","From":"Dave Chinner <david@fromorbit.com>","To":"Eric Biggers <ebiggers3@gmail.com>","Subject":"Re: [PATCH 00/25] fscrypt: add some higher-level helper functions","Message-ID":"<20170921064502.GR10621@dastard>","References":"<20170920224605.22030-1-ebiggers3@gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170920224605.22030-1-ebiggers3@gmail.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170920_234535_651578_233F16E1 ","X-CRM114-Status":"GOOD (  23.68  )","X-Spam-Score":"-2.6 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.6 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow trust [150.101.137.145 listed in list.dnswl.org]\n\t-0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)\n\t[150.101.137.145 listed in wl.mailspike.net]\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd/>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Cc":"\"Theodore Y . Ts'o\" <tytso@mit.edu>, Eric Biggers <ebiggers@google.com>, \n\tMichael Halcrow <mhalcrow@google.com>,\n\tlinux-f2fs-devel@lists.sourceforge.net, \n\tlinux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,\n\tlinux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,\n\tlinux-ext4@vger.kernel.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>","Errors-To":"linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1772835,"web_url":"http://patchwork.ozlabs.org/comment/1772835/","msgid":"<d7d91976-65b9-63d9-f34e-b322a9d0c472@kernel.org>","list_archive_url":null,"date":"2017-09-21T14:19:49","subject":"Re: [f2fs-dev] [PATCH 00/25] fscrypt: add some higher-level helper\n\tfunctions","submitter":{"id":69001,"url":"http://patchwork.ozlabs.org/api/people/69001/","name":"Chao Yu","email":"chao@kernel.org"},"content":"On 2017/9/21 6:45, Eric Biggers wrote:\n> From: Eric Biggers <ebiggers@google.com>\n> \n> This series reduces code duplication among ext4, f2fs, and ubifs by\n> introducing a S_ENCRYPTED inode flag (so we don't have to call back into\n> the filesystem to test the filesystem-specific inode flag), then\n> introducing new helper functions that are called at the beginning of the\n> open, link, rename, lookup, and setattr operations.\n> \n> In the future we maybe should even call these new helpers from the VFS\n> so that each individual filesystem doesn't have to do it.  But that's\n> not possible currently because fs/crypto/ can be built as a module.\n> \n> Making changes like this is a bit challenging due to interdependencies\n> between fscrypt and the individual filesystems, all of which have\n> different maintainers.  For now my intent is that patches 1-10 be taken\n> through the fscrypt tree --- though it's not perfect since patches 1-4\n> do make some changes to each filesystem, as everyone must set\n> S_ENCRYPTED before we can use it everywhere in the shared code.  But\n> afterwards, patches 11-25 can be picked up by the individual filesystems\n> to switch to the new helpers.\n\nFor all patches touching f2fs, looks good to me, feel free to add:\n\nReviewed-by: Chao Yu <yuchao0@huawei.com>\n\n> \n> Eric Biggers (25):\n>   fs, fscrypt: add an S_ENCRYPTED inode flag\n>   fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED()\n>   fscrypt: remove ->is_encrypted()\n>   fscrypt: remove unneeded empty fscrypt_operations structs\n>   fscrypt: new helper function - fscrypt_require_key()\n>   fscrypt: new helper function - fscrypt_file_open()\n>   fscrypt: new helper function - fscrypt_prepare_link()\n>   fscrypt: new helper function - fscrypt_prepare_rename()\n>   fscrypt: new helper function - fscrypt_prepare_lookup()\n>   fscrypt: new helper function - fscrypt_prepare_setattr()\n>   ext4: switch to fscrypt_file_open()\n>   ext4: switch to fscrypt_prepare_link()\n>   ext4: switch to fscrypt_prepare_rename()\n>   ext4: switch to fscrypt_prepare_lookup()\n>   ext4: switch to fscrypt_prepare_setattr()\n>   f2fs: switch to fscrypt_file_open()\n>   f2fs: switch to fscrypt_prepare_link()\n>   f2fs: switch to fscrypt_prepare_rename()\n>   f2fs: switch to fscrypt_prepare_lookup()\n>   f2fs: switch to fscrypt_prepare_setattr()\n>   ubifs: switch to fscrypt_file_open()\n>   ubifs: switch to fscrypt_prepare_link()\n>   ubifs: switch to fscrypt_prepare_rename()\n>   ubifs: switch to fscrypt_prepare_lookup()\n>   ubifs: switch to fscrypt_prepare_setattr()\n> \n>  fs/crypto/Makefile              |   2 +-\n>  fs/crypto/crypto.c              |   2 +-\n>  fs/crypto/fname.c               |   3 +-\n>  fs/crypto/hooks.c               | 112 +++++++++++++++++++++++++++++\n>  fs/crypto/keyinfo.c             |   2 +-\n>  fs/crypto/policy.c              |   6 +-\n>  fs/ext4/file.c                  |  23 ++----\n>  fs/ext4/inode.c                 |  19 +++--\n>  fs/ext4/namei.c                 |  62 +++++-----------\n>  fs/ext4/super.c                 |  15 ++--\n>  fs/f2fs/f2fs.h                  |   1 +\n>  fs/f2fs/file.c                  |  30 ++------\n>  fs/f2fs/inode.c                 |   5 +-\n>  fs/f2fs/namei.c                 |  54 ++++----------\n>  fs/f2fs/super.c                 |   7 +-\n>  fs/ubifs/crypto.c               |   1 -\n>  fs/ubifs/dir.c                  |  43 ++++-------\n>  fs/ubifs/file.c                 |  41 ++---------\n>  fs/ubifs/ioctl.c                |   5 +-\n>  fs/ubifs/super.c                |   8 +--\n>  fs/ubifs/ubifs.h                |   9 +--\n>  fs/ubifs/xattr.c                |   1 +\n>  include/linux/fs.h              |   2 +\n>  include/linux/fscrypt_common.h  |   1 -\n>  include/linux/fscrypt_notsupp.h |  54 +++++++++++++-\n>  include/linux/fscrypt_supp.h    | 153 ++++++++++++++++++++++++++++++++++++++++\n>  26 files changed, 418 insertions(+), 243 deletions(-)\n>  create mode 100644 fs/crypto/hooks.c\n>","headers":{"Return-Path":"<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"UjiGeFG9\"; \n\tdkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=chao@kernel.org"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyf0r66tvz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 00:21:00 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv2LW-0001F3-Ij; Thu, 21 Sep 2017 14:20:54 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv2LS-0001BL-I5\n\tfor linux-mtd@lists.infradead.org; Thu, 21 Sep 2017 14:20:52 +0000","from [192.168.0.101] (unknown [49.77.233.154])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id E11B1217C5;\n\tThu, 21 Sep 2017 14:20:23 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=DHBXCR2reQulIqnVI+UyX3cKIEqmgOyYWJA0rNYOaSs=;\n\tb=UjiGeFG9LSFRI2\n\tu9nx1WnKnRAsOdn8yFQ3XKPPLiNyGu6HMYN5J+N5XgHubknp2vwhCUktWPBcKAWGfnPSh0aRIiHd6\n\tZ+3uVIv+fcVvDlFvZSosxK3ThfEQarNZiDTY1LX5Wec1zM4T7NL4CZ3l/NwwvGgOJ/Jufencl++Pc\n\tVGw9dFAo02xmd6eOHjGxWAciwkPmNjoGBuqhirzVg3lZTb+9KpnQkfbUvYTUOrx3D6XJuPjxmOKe0\n\tCba6triAq2zsyqO6yJEQp/X68y+KvmoF50BYXbW9LqTrwHIHNIH5dboQnCabXfCUb3SD45NxyicWL\n\tSAqQSirm3b7yYVby5KrQ==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org E11B1217C5","Subject":"Re: [f2fs-dev] [PATCH 00/25] fscrypt: add some higher-level helper\n\tfunctions","To":"Eric Biggers <ebiggers3@gmail.com>, linux-fscrypt@vger.kernel.org","References":"<20170920224605.22030-1-ebiggers3@gmail.com>","From":"Chao Yu <chao@kernel.org>","Message-ID":"<d7d91976-65b9-63d9-f34e-b322a9d0c472@kernel.org>","Date":"Thu, 21 Sep 2017 22:19:49 +0800","User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170920224605.22030-1-ebiggers3@gmail.com>","Content-Language":"en-US","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170921_072050_753785_89CD30DE ","X-CRM114-Status":"GOOD (  15.35  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd/>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Cc":"\"Theodore Y . Ts'o\" <tytso@mit.edu>, Eric Biggers <ebiggers@google.com>, \n\tMichael Halcrow <mhalcrow@google.com>,\n\tlinux-f2fs-devel@lists.sourceforge.net, \n\tlinux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org,\n\tJaegeuk Kim <jaegeuk@kernel.org>, linux-ext4@vger.kernel.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>","Errors-To":"linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1773033,"web_url":"http://patchwork.ozlabs.org/comment/1773033/","msgid":"<20170921174705.GA29643@gmail.com>","list_archive_url":null,"date":"2017-09-21T17:47:05","subject":"Re: [PATCH 00/25] fscrypt: add some higher-level helper functions","submitter":{"id":65202,"url":"http://patchwork.ozlabs.org/api/people/65202/","name":"Eric Biggers","email":"ebiggers3@gmail.com"},"content":"Hi Dave,\n\nOn Thu, Sep 21, 2017 at 04:45:02PM +1000, Dave Chinner wrote:\n> fscrypto: clean up include file mess\n> \n> From: Dave Chinner <dchinner@redhat.com>\n> \n> Filesystems have to include different header files based on whether\n> they are compiled with encryption support or not. That's nasty and\n> messy.\n> \n> Instead, rationalise the headers so we have a single include\n> fscrypt.h and let it decide what internal implementation to include\n> based on the __FS_HAS_ENCRYPTION define. Filesystems set\n> __FS_HAS_ENCRYPTION before including linux/fscrypt.h if they are\n> built with encryption support.\n> \n> Add guards to prevent fscrypt_supp.h and fscrypt_notsupp.h from\n> being directly included by filesystems.\n\nThis looks good; we probably should have done it that way originally.  This will\nallow us to have the inline functions like fscrypt_prepare_rename() defined in\nfscrypt.h, and then have supp/notsupp versions of __fscrypt_prepare_rename()\ninstead --- so common checks like for IS_ENCRYPTED() will be in one place only.\n\nOne nit:\n\n> +#ifdef CONFIG_EXT4_FS_ENCRYPTION\n> +#define __FS_HAS_ENCRYPTION 1\n> +#endif\n> +#include <linux/fscrypt.h>\n\nHow about doing\n\n\t#define __FS_HAS_ENCRYPTION IS_ENABLED(CONFIG_EXT4_FS_ENCRYPTION)\n\n(and likewise for f2fs and ubifs), then checking '#if __FS_HAS_ENCRYPTION'\nrather than '#ifdef __FS_HAS_ENCRYPTION'?\n\nEric","headers":{"Return-Path":"<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"Gk2h/F/M\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"SkyFlXE/\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"ZKIIbYf2\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xykbt6PRpz9t3w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 03:48:10 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv5Zt-0000wt-Gj; Thu, 21 Sep 2017 17:47:57 +0000","from merlin.infradead.org ([2001:8b0:10b:1231::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv5ZW-0000wJ-6d\n\tfor linux-mtd@bombadil.infradead.org; Thu, 21 Sep 2017 17:47:34 +0000","from mail-pg0-x22f.google.com ([2607:f8b0:400e:c05::22f])\n\tby merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv5ZT-0004Jt-0l\n\tfor linux-mtd@lists.infradead.org; Thu, 21 Sep 2017 17:47:32 +0000","by mail-pg0-x22f.google.com with SMTP id p5so3906274pgn.7\n\tfor <linux-mtd@lists.infradead.org>;\n\tThu, 21 Sep 2017 10:47:10 -0700 (PDT)","from gmail.com ([2620:15c:17:3:5cbf:ff88:6574:7f3])\n\tby smtp.gmail.com with ESMTPSA id\n\ta1sm7630025pgu.47.2017.09.21.10.47.07\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tThu, 21 Sep 2017 10:47:07 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=fOtzs5hmR5/BxYBNxBT8IlVKg7y5aKcPhMhCpjzGh/Q=;\n\tb=Gk2h/F/Mx9P/Cn\n\t+adDqMqdOSH+quZqNCd+78QgzS4msyhBVsn/mJEGhyqlKGhk3+LmD/PbMIIeL0HUgiODZbHH9BAQW\n\tX+yMOTyBeDvz5t8DvrTWeTcSsbv/Zf4fMz1iGj+2eqzMahLROaV8JybUG3g2Hxm8Avdd0pTs1Rz8W\n\twwCfUMnH6igBVthAzg3CAgAtQojQW9lBYTC5PYwiHaNeSIzC+Xvh70qOiWhyUpH685hDZ/rZS21bK\n\tqdM1+UuFisxqOTDVGSzooH5iukY0DLepudBac3kWHnC4ptX/GYDZWw/dgC80HoXHlQFgeTM/cQBk5\n\tHdOa8Wx4DrAJkNMyxFoQ==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=merlin.20170209;\n\th=In-Reply-To:Content-Type:MIME-Version:\n\tReferences:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=0eMZlhsxyzKAKBdwPXSYfxSnwww1NBS58egT3WuWCDE=;\n\tb=SkyFlXE/T/WGjVU6st7D2EN3J\n\tsgBIbuMg4hDnOpPI04Lz69e7nhwDVLhFHO4mqq0qWGXxZf9v9Tq6L2uk3KjOtfuGjefDCyPbVSlSC\n\tyHmcticQqsV34ReYENxCIgCjUXZZxxENaDIKHpsAFxGrYLiYtEX8PA4q/eXNBScRVcDnsaWm0OjQ9\n\t1si52TunKiWp9zyuQnW567HToqPBujsAPqnHRmpvEui/Zta/+iU+usowGuuXV7RyiKj4wT4kg6xMI\n\tjw19RHKZvQZi3PeOy7NbzS5SUKu61XArbPOJIestCjJGln3VLTMNbOyz+GkBeJjzPm+DYF3rupfGN\n\t7nZ+0XdOg==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=0eMZlhsxyzKAKBdwPXSYfxSnwww1NBS58egT3WuWCDE=;\n\tb=ZKIIbYf2gZuIoTSol1XpQg4v572X1TuVEjo3OBf771GiFe0D54Z7/84wwlHEliD9sL\n\tIkqi5WpitKy74SmsAqykLMJCCbjDSdbjoGAwEPsP2qnXDMgNsu8kfRtx2/6IrcyolpGj\n\tDUwcPTinsluQ/GdyDl8qAvdblcpa4w6ONkd5fe2A56mAHbZ+E/BAZFcMl+qiu1apy9pO\n\t/fnKdeWykqcRYFOJocLy3Y9zTlvtiutRu7d9Fcon8YW+EdLL2CWRFAtEzQZqVecz5UMI\n\tmUcafBeCml8Zueq10+VDAWtTcFnJuGniJn0OQWD6FD++WfPYe0qler2j2DbV+DFzE54+\n\t6XjA=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=0eMZlhsxyzKAKBdwPXSYfxSnwww1NBS58egT3WuWCDE=;\n\tb=F1oZr2P45M/6ix3zj9f4N7AficeeXAOLoI/x3tDTqHyfY8YGrtqn300zxy02kYsMB3\n\tmur4SiVMa4HTEMiXZxFadLw+BIrxKcrPNYSbFrE3S+vn/33gxXn3+Sp8ThWJqYfZqhtZ\n\tWHnjbPRqEw4LoBqh/HllztBnlbkm/GorG5B/ZXNhvQeJsUXqx+aLqFlHO3cankS16HT5\n\txkPeEkxCOtURUokRe+dRXskIpKg79FQcXd819b1PiCT5Qrh/rasgxBAgiE+XqkYYckFz\n\tt3X9tJtV05P3Nui6ARjAJZ/v9PAI9SKCVCvINa1aBVP/EtqqgKZrOS+f1GBPBOggo177\n\tGBdQ==","X-Gm-Message-State":"AHPjjUivENm4vokFJVXjUtFRgQMUspCpoGP/WZ7Jp0Nb48uBFug3T1rf\n\tM8/o7Xg4bS0m7HmnxH2Ok4G4csFc","X-Google-Smtp-Source":"AOwi7QBhY2c4doD/tlhEPlAdHbdkEKnLTgbWsjEoufpASK9kSN0nAPs0sxcqSjk7WoweITUE0fppgA==","X-Received":"by 10.98.139.15 with SMTP id j15mr6482118pfe.33.1506016027949;\n\tThu, 21 Sep 2017 10:47:07 -0700 (PDT)","Date":"Thu, 21 Sep 2017 10:47:05 -0700","From":"Eric Biggers <ebiggers3@gmail.com>","To":"Dave Chinner <david@fromorbit.com>","Subject":"Re: [PATCH 00/25] fscrypt: add some higher-level helper functions","Message-ID":"<20170921174705.GA29643@gmail.com>","References":"<20170920224605.22030-1-ebiggers3@gmail.com>\n\t<20170921064502.GR10621@dastard>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170921064502.GR10621@dastard>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-Spam-Note":"CRM114 invocation failed","X-Spam-Score":"-1.8 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on merlin.infradead.org summary:\n\tContent analysis details:   (-1.8 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c05:0:0:0:22f listed in] [list.dnswl.org]\n\t0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends\n\tin digit (ebiggers3[at]gmail.com)\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (ebiggers3[at]gmail.com)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd/>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Cc":"\"Theodore Y . Ts'o\" <tytso@mit.edu>, Eric Biggers <ebiggers@google.com>, \n\tMichael Halcrow <mhalcrow@google.com>,\n\tlinux-f2fs-devel@lists.sourceforge.net, \n\tlinux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,\n\tlinux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,\n\tlinux-ext4@vger.kernel.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>","Errors-To":"linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1773098,"web_url":"http://patchwork.ozlabs.org/comment/1773098/","msgid":"<20170921204814.GA7716@dastard>","list_archive_url":null,"date":"2017-09-21T20:48:14","subject":"Re: [PATCH 00/25] fscrypt: add some higher-level helper functions","submitter":{"id":421,"url":"http://patchwork.ozlabs.org/api/people/421/","name":"Dave Chinner","email":"david@fromorbit.com"},"content":"On Thu, Sep 21, 2017 at 10:47:05AM -0700, Eric Biggers wrote:\n> Hi Dave,\n> \n> On Thu, Sep 21, 2017 at 04:45:02PM +1000, Dave Chinner wrote:\n> > fscrypto: clean up include file mess\n> > \n> > From: Dave Chinner <dchinner@redhat.com>\n> > \n> > Filesystems have to include different header files based on whether\n> > they are compiled with encryption support or not. That's nasty and\n> > messy.\n> > \n> > Instead, rationalise the headers so we have a single include\n> > fscrypt.h and let it decide what internal implementation to include\n> > based on the __FS_HAS_ENCRYPTION define. Filesystems set\n> > __FS_HAS_ENCRYPTION before including linux/fscrypt.h if they are\n> > built with encryption support.\n> > \n> > Add guards to prevent fscrypt_supp.h and fscrypt_notsupp.h from\n> > being directly included by filesystems.\n> \n> This looks good; we probably should have done it that way originally.  This will\n> allow us to have the inline functions like fscrypt_prepare_rename() defined in\n> fscrypt.h, and then have supp/notsupp versions of __fscrypt_prepare_rename()\n> instead --- so common checks like for IS_ENCRYPTED() will be in one place only.\n\n*nod*\n\n> One nit:\n> \n> > +#ifdef CONFIG_EXT4_FS_ENCRYPTION\n> > +#define __FS_HAS_ENCRYPTION 1\n> > +#endif\n> > +#include <linux/fscrypt.h>\n> \n> How about doing\n> \n> \t#define __FS_HAS_ENCRYPTION IS_ENABLED(CONFIG_EXT4_FS_ENCRYPTION)\n> \n> (and likewise for f2fs and ubifs), then checking '#if __FS_HAS_ENCRYPTION'\n> rather than '#ifdef __FS_HAS_ENCRYPTION'?\n\nYeah, that's cleaner. I'll modify it and resend as a standalone\npatch.\n\nCheers,\n\nDave.","headers":{"Return-Path":"<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"kyupl3IX\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xypd30Nd9z9s03\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 06:49:27 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv8PJ-0004B4-RN; Thu, 21 Sep 2017 20:49:13 +0000","from ipmail01.adl2.internode.on.net ([150.101.137.133])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv8Ot-00046O-Nc\n\tfor linux-mtd@lists.infradead.org; Thu, 21 Sep 2017 20:48:50 +0000","from ppp59-167-129-252.static.internode.on.net (HELO dastard)\n\t([59.167.129.252]) by ipmail01.adl2.internode.on.net with ESMTP;\n\t22 Sep 2017 06:18:15 +0930","from dave by dastard with local (Exim 4.80)\n\t(envelope-from <david@fromorbit.com>)\n\tid 1dv8OM-0002in-NJ; Fri, 22 Sep 2017 06:48:14 +1000"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=AFhsvIsenwAqKOqbz0qkTgKiKPa5GiRtynIhQ8UEVSo=;\n\tb=kyupl3IXbUP1B6\n\tyN+7+BOk5YnYEaJY1i0+bwysu7aJRIpumEKPqTKxDxQ3guDykifYP/kFVO5/ALBPYuULQt6AohLya\n\teJQO8kUemS9L3UEEayRkN+4DhXqvO/RHo9ojIh1QjO7p47MsiXEuNZ6zGGY84cFQqhNEuIsW8jyix\n\t1u3wgtOY8AFPyt/WEMFLaiasqUl9H9GYihuiDTCR5zlkF63Mao76GIaD2Z06FVse2G04V2CLbOe3e\n\tq6R9GsQ98Dfop8hkD8zluqQChgYW3XNAyrXr3ylR2m3T9NJanrsq6KlQduV2tZpP87ZoAnWOTkDTp\n\tnzLgEqM4B5tX9ouSqnCA==;","X-IronPort-Anti-Spam-Filtered":"true","X-IronPort-Anti-Spam-Result":"A2DZAQCLJMRZ//yBpztbGQEBAQEBAQEBAQEBBwEBAQEBhSwnjwqPRQEBAQEBAQaBKo0biyGFPwICAQEChFcUAQIBAQEBAQEBayiFGAEBAQECATocIwULCAMOBwMJJQ8FJQMhE4omBQeqEYsDAQEBAQYCASUhgwqDC4VUiD2CMQWhE5RLkwuWdzYhgQ0yIQgcFYd3LjaLYAEBAQ","Date":"Fri, 22 Sep 2017 06:48:14 +1000","From":"Dave Chinner <david@fromorbit.com>","To":"Eric Biggers <ebiggers3@gmail.com>","Subject":"Re: [PATCH 00/25] fscrypt: add some higher-level helper functions","Message-ID":"<20170921204814.GA7716@dastard>","References":"<20170920224605.22030-1-ebiggers3@gmail.com>\n\t<20170921064502.GR10621@dastard> <20170921174705.GA29643@gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170921174705.GA29643@gmail.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170921_134848_229518_F310F387 ","X-CRM114-Status":"GOOD (  13.62  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd/>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Cc":"\"Theodore Y . Ts'o\" <tytso@mit.edu>, Eric Biggers <ebiggers@google.com>, \n\tMichael Halcrow <mhalcrow@google.com>,\n\tlinux-f2fs-devel@lists.sourceforge.net, \n\tlinux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,\n\tlinux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,\n\tlinux-ext4@vger.kernel.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>","Errors-To":"linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}}]