From patchwork Mon Dec 31 20:22:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 10745561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEC2214DE for ; Mon, 31 Dec 2018 20:22:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AED828985 for ; Mon, 31 Dec 2018 20:22:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B4DA289B4; Mon, 31 Dec 2018 20:22:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE67328985 for ; Mon, 31 Dec 2018 20:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727846AbeLaUWz (ORCPT ); Mon, 31 Dec 2018 15:22:55 -0500 Received: from mail-eopbgr760134.outbound.protection.outlook.com ([40.107.76.134]:2112 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727311AbeLaUWz (ORCPT ); Mon, 31 Dec 2018 15:22:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SqStiElJDUv22fTvaFSYuxiSRPHW351mQyKlUInuoqk=; b=G+FWZUx8ABdywSy1zgAc3s1IvFTdMIhiyC9qziuPLr75Y2loBn0bgwYWUImTK4ATY5tLOIe1kOYAE7QHfRHfWcPbCsAESWP+HCfN5E9FIdvBbgr2t5CucDDcsh+uwM9WJYzHTMts3gmR+8htlyrVG4Yo0BMACzUHKLG+p4KBF6s= Received: from SN2PR01CA0028.prod.exchangelabs.com (2603:10b6:804:2::38) by CY4PR0101MB2949.prod.exchangelabs.com (2603:10b6:910:3f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1471.20; Mon, 31 Dec 2018 20:22:51 +0000 Received: from BY2NAM03FT029.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::205) by SN2PR01CA0028.outlook.office365.com (2603:10b6:804:2::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.20 via Frontend Transport; Mon, 31 Dec 2018 20:22:50 +0000 Authentication-Results: spf=pass (sender IP is 18.9.28.11) smtp.mailfrom=mit.edu; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=mit.edu; Received-SPF: Pass (protection.outlook.com: domain of mit.edu designates 18.9.28.11 as permitted sender) receiver=protection.outlook.com; client-ip=18.9.28.11; helo=outgoing.mit.edu; Received: from outgoing.mit.edu (18.9.28.11) by BY2NAM03FT029.mail.protection.outlook.com (10.152.84.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.13 via Frontend Transport; Mon, 31 Dec 2018 20:22:50 +0000 Received: from callcc.thunk.org ([104.200.153.98]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id wBVKMj4C013673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Dec 2018 15:22:47 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 7B88E7A01A3; Mon, 31 Dec 2018 15:22:45 -0500 (EST) Date: Mon, 31 Dec 2018 15:22:45 -0500 From: "Theodore Y. Ts'o" , To: CC: Subject: [GIT PULL] fsverity for 4.21-rc Message-ID: <20181231202245.GA13792@mit.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:18.9.28.11;IPV:CAL;SCL:-1;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10019020)(346002)(39860400002)(396003)(376002)(136003)(2980300002)(199004)(189003)(36906005)(4326008)(6266002)(6306002)(88552002)(316002)(8676002)(786003)(486006)(2906002)(305945005)(9686003)(103686004)(106466001)(47776003)(2351001)(8936002)(4001150100001)(90966002)(52956003)(246002)(50466002)(14444005)(23726003)(356004)(336012)(6916009)(26005)(126002)(46406003)(2616005)(75432002)(476003)(86362001)(97756001)(36756003)(58126008)(42186006)(26826003)(966005)(16586007)(478600001)(33656002)(186003)(106002)(1076003)(5660300001)(18370500001)(49092003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR0101MB2949;H:outgoing.mit.edu;FPR:;SPF:Pass;LANG:en;PTR:outgoing-auth-1.mit.edu;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;BY2NAM03FT029;1:dFRUQRh46FWaVFrKZiaE3VGGXLonjr9wu316kWbSCgckSJWOeAfaLWN3HKMf7NOM5XNBffgJpkqCW9XCszLEbG+yEN6dmOyEUU5UF6DGSGIDS1QzmqoAx6tZKTsNDUdu X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ad66bff1-6ba8-49ac-59f5-08d66f5dbc86 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4608076)(4709027)(2017052603328)(7153060);SRVR:CY4PR0101MB2949; X-Microsoft-Exchange-Diagnostics: 1;CY4PR0101MB2949;3:fFEhqgKvsBEcS3SAsx4P1okBTuHAzwIY63wgDtfkuYLJgdlpd8EugC/U/C7+Ydw6RqYhp4ICGNBnjBYCwE/tfnbQINwe8cp1mjvCFGs2x8Tm5bdeyIIMWt8marI17qDwSvEVerf5DAp6RAGB69CxESt9WlZeU8P3oU/yA6Kpfbm+9QObzt5c4ZjkgJp50uiVsJgvyOtxU4olxYSC37Dkc/GZv4fNkDTdkpd1TYGHRe2Ve3YH6gIN4dvHapDyhP9BYriC3RVkYp7TwrF0K2wsgQ84lpQwUAoty1UHgTlzvFq1WGUjB6dNry1hYy0fzlq0QXonBSGt5vKB3VdfAdX6og==;25:yXGGfA0S/XGCavjdztdzrNpgpTTlD6i4syj8sm8nrM8rs73ojXlOUjjNuthK+1zrpc0EeorFOpCiNWJRsyL63mW233d5lLxOqhKos/+HNvTQpwzKiPkNIjwyC8Ow9otFNqXbT23bzefqatVSjH9EyFTtx1rQ9FDF8DXx/1ALyN+ipq5Gfgj8jKXwyM3jnzm1+t8JNSYByLJTQc2lTyKxKmcMNB+1hEUJN1EWouXzwhh7GtWMvN4Pb/6jxSbkSgDILh//53voaMQnoUdNkCUcxXjmVhGdnowcfhp7l33FlIrBujQnbJGOJ3Y1vTff0qRkUPE+Z/rnCm0Vc2a0QEUYTw==;31:ldtTHQ3nX+Jkkx1HQpHqzC/lyJLWAQ1krSeNIpTF+lqAMV35G+j0F1C15xypVM/INKApwMB9SyjNZPA1ttWTaqk6tMVpPIPveppcbedl4YwwM+wNT1lPjfr/IdBv5KUN+qRRf+WjKAQvfRt9ORU1IyIo/ZQeDcU6knploPsCCQS0gzng+fSBuwIkhLoic5cNgljtpoiGjaBEvfFwtut+Jv1QKCG81VgLIQ6H1fmOJd0= X-MS-TrafficTypeDiagnostic: CY4PR0101MB2949: X-LD-Processed: 64afd9ba-0ecf-4acf-bc36-935f6235ba8b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;CY4PR0101MB2949;20:RXgun62+Vs1Ww8pxiPXP+W9ISmvHtKR3QTClUr9HIDnFC0ftShHIw9y/jNnw+7eFurSSGqKG6j7OEWbSi0oxDVNyBl+upJL52gUfotUeJUErqYEPJICfWZwRpYvZNyhNBvpqFcqjE6znCM0/Gc61gq9jbVHLQBULotvA2eM8f4rVoWtKpRRWpa/9BJPvKdNTg5YohTo1PDflgWHv7Ix55dDbBTCoWj0mh6cUreUvl65xdCaEKB5Ro79E+HMPVFyZacgxY6bFqUCAmfudYVcfX4U6k+4xsg56ONZN/B63o9e1Pi0/AdsOoVX8+yp/vIKnJq4abhXLKrM8ZwL532fkpct78gpdrCOJ5ewHeFiP1ykpFQBu0XtUE5IY+6dDqilJ+kL2pozzlGnv4yVZSACDeumlsDBHviIu/Yr4gHbaO47Kl67lFqM7QFc05oMnYT3afh/QkdaLVCj7z5r+z4hpImfm2NV0irGDmSkqfit2devDjxqBdltkY12MFeXG/yPq;4:zw6QFm1g8yyl71DGm05qKGJYr49490SjpCjlnT6duR585sWTj4V7vtKMqnirWx6c7qn1Qrdr4Pe6LjMD855rpDfOu+S2cVISUmqEGgoC+JPzljpIizedCsSs2YvqdLyoekNPlI2FfZvz8pl6/Y66wyG0qnK8GXhZ/gSUH5LEH7MeYoCOSILMrCnNOetNcCeL1wyWFGatG8BpwfuoMGV/l1cSYJa+6ARGcvahxfqCh75+30S55e+p6FzrzXXKizDjP6MxTkSbzpnDCECOJC8YeQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220055)(2401047)(8121501046)(3002001)(93006095)(93004095)(3231475)(944501520)(52105112)(10201501046)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(201702281529075)(20161123555045)(201703061421075)(201703061406153)(201708071742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Z06T72i+AaDf1qidX8Y8D+EEfdodw7WkySHpTgwB+usfuJy3ILQeBSd1HhqABdqVG/Srrl5cshsQ/gQbLaEC7qpP8PBJmqwWYzk6RCJ3sYQdNQuijxbh7Js8kbk9B+Des8XLf76nybpYF7TjLrzUn3sv69eoz1k+p7cuApuaFBt92rdfdL4uTfuxTJIh1jmZpuhDy9kPJJ+8z8hscI5aupNOcvnF5LuBnxXyCYssariDRlB5M7yvkBM5K/Ogx/8HUKql3blLT6kLX00P2ZNNNMZ4F+l7quNNxp0yQSJB64/jzZfzxvOIzyDMPviZ2465XRAUVYRurtSANTFC3W00 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: tgrriaw5pQBW+xtfbWV2exYlIcPQplNEufKtvDa5Lz5SNT1jEpnBkIwI6bktQTRi9oSp5MS4YejBhkuHMeIhRiFiQnELKPUs5PUwJRuOXxqBveUC2po+DNtCJFZtZw/DJfn+JX+3anIX28QJ1d8QCIuNLFPwBe9jeXzYvZitkmXg+7fiGnV3FAKlUhVpvleqfnkJrfJDaIJoCka9zcTiaWyMNyRQNyvwjselwb6oy0YHXwUBaQFGpcNhMv32o8E8A4CF9BnV/FSsOc0CVkVhR+IorhP3ZehwgeLFS7FkE1jGXbPI9aQZkatYycm9Yj1k X-Microsoft-Exchange-Diagnostics: 1;CY4PR0101MB2949;6:b5+iOO3ZvpTYGpXZ215lIgAkFyC731Ls87YdYxlVEpmwIiYxTxxOWnAqR5xXQ5tV26M7qa7+5dCqLt9eU8s+0eFqvG43GauxRVGlNVTo+1KQLP6Fx2Bp8bxTEaRugi+25Yjgq+kO0h7OIpnNV1C7RRVeS8UlO3firuGyN29WV+uU569SkrEcSWiD491KBNmnriTe7VrhMlh6BgXKMWG8kojqLPvXxoaHsYStjUCb2/bGwkleRFAVpO1tjiQTGc0wTRIY3m7K1sND9OZfCzPdXFRuPN4fPNsTGI7ASoYSuvIkg6KlrosjsvDUAAdLigqfiRSWaXnILacBSzWXjsT0a28qak7YL0jR61KVgPY+1aWRXH4qWlrhS+SefI33tWc2zbh51nSsxnIAqYcFO+UxUbmfTcdTAnPo3/5z7CaQyNwNxxFgGpMur74amlHaOQGbGqiBsHzxdu2gn9cURpohTw==;5:nDTzCF5xCzSeslritQjVWlFFahTPM8VkdjCIOv4HMawZSraEHBsO7Z9fUUgib6shZkgVDNcCPdvvpLPhyJW6OIlB9jnnppV2G7+uPF9NQOd2vW1d0isbWqw4y+yxWfHkBPl1jFm1ekl5IEVV1pJOcAucxWAtBZM/zYdRowuHX7o=;7:/JUXb8Wrm5Tvw2cE+hSyAd58nrB8REu8/5BFuyRv/hOPim3ObBhZoBQgOO/UhNdGFLkhXoocNlzNsUUCaL+9TJjw3+E/9aR4iejsgxkxBKJNKDTIL6Ccmcncn/HhwKnw79txZ/KShZHBWy+kUyV0nQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: mit.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2018 20:22:50.2098 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad66bff1-6ba8-49ac-59f5-08d66f5dbc86 X-MS-Exchange-CrossTenant-Id: 64afd9ba-0ecf-4acf-bc36-935f6235ba8b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=64afd9ba-0ecf-4acf-bc36-935f6235ba8b;Ip=[18.9.28.11];Helo=[outgoing.mit.edu] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0101MB2949 Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Linus, Since I didn't get a reply my last e-mail on the thread to you[1], I'm not sure what your current thinking is on fs-verity. So here's the pull request; please pull if you're OK with this. [1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1886004.html Thanks, - Ted The following changes since commit 7beb01f74415c56f5992922b5b902b45d365e694: f2fs: clean up f2fs_sb_has_##feature_name (2018-11-26 15:53:55 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt.git tags/fsverity_for_linus for you to fetch changes up to 50ee9e5d8e3ef15fc4bed781df9a6b2f708230ff: f2fs: fs-verity support (2018-11-28 18:14:53 -0500) ---------------------------------------------------------------- Add fs-verity support for ext4 and f2fs ---------------------------------------------------------------- Eric Biggers (12): fs-verity: add a documentation file fs-verity: add setup code, UAPI, and Kconfig fs-verity: add MAINTAINERS file entry fs-verity: add data verification hooks for ->readpages() fs-verity: implement FS_IOC_ENABLE_VERITY ioctl fs-verity: implement FS_IOC_MEASURE_VERITY ioctl fs-verity: add SHA-512 support fs-verity: add CRC-32C support fs-verity: support builtin file signatures ext4: add basic fs-verity support ext4: add fs-verity read support f2fs: fs-verity support Documentation/filesystems/fsverity.rst | 583 ++++++++++++++++++++++++++ Documentation/filesystems/index.rst | 11 + Documentation/ioctl/ioctl-number.txt | 1 + MAINTAINERS | 12 + fs/Kconfig | 2 + fs/Makefile | 1 + fs/ext4/Kconfig | 20 + fs/ext4/ext4.h | 22 +- fs/ext4/file.c | 6 + fs/ext4/inode.c | 11 + fs/ext4/ioctl.c | 12 + fs/ext4/readpage.c | 209 ++++++++-- fs/ext4/super.c | 100 ++++- fs/ext4/sysfs.c | 6 + fs/f2fs/Kconfig | 20 + fs/f2fs/data.c | 43 +- fs/f2fs/f2fs.h | 17 +- fs/f2fs/file.c | 58 +++ fs/f2fs/inode.c | 3 +- fs/f2fs/super.c | 30 ++ fs/f2fs/sysfs.c | 11 + fs/verity/Kconfig | 52 +++ fs/verity/Makefile | 5 + fs/verity/fsverity_private.h | 135 ++++++ fs/verity/hash_algs.c | 115 ++++++ fs/verity/ioctl.c | 164 ++++++++ fs/verity/setup.c | 908 +++++++++++++++++++++++++++++++++++++++++ fs/verity/signature.c | 187 +++++++++ fs/verity/verify.c | 298 ++++++++++++++ include/linux/fs.h | 9 + include/linux/fsverity.h | 112 +++++ include/uapi/linux/fsverity.h | 98 +++++ 32 files changed, 3219 insertions(+), 42 deletions(-) create mode 100644 Documentation/filesystems/fsverity.rst create mode 100644 fs/verity/Kconfig create mode 100644 fs/verity/Makefile create mode 100644 fs/verity/fsverity_private.h create mode 100644 fs/verity/hash_algs.c create mode 100644 fs/verity/ioctl.c create mode 100644 fs/verity/setup.c create mode 100644 fs/verity/signature.c create mode 100644 fs/verity/verify.c create mode 100644 include/linux/fsverity.h create mode 100644 include/uapi/linux/fsverity.h