Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2825603imu; Sun, 23 Dec 2018 08:38:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Nr9buXB5dIKf5d3wNX3ypBtUTqtGpaaLNlU70jPlvnLv1ox6xLKL52wPk/gPYe07vyWhG X-Received: by 2002:a63:ef04:: with SMTP id u4mr9693593pgh.197.1545583082185; Sun, 23 Dec 2018 08:38:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545583082; cv=none; d=google.com; s=arc-20160816; b=ggnRiXokoljnFue/sg4lQIz5r0g8j533Z2OqEiLtwgjOMWFJi1uUZC23LOpFkZGLuu WOFSOhoMpea/dIM1AbBl+v5AyXfXzATPrOIT8Wfdbj6C1ZC6Suf1xLaaAdxyg+YoRswc pL119OkcDIi6afKLGRLo6/yDm6EtbCnl8sYzl8x23oXFq6V+xveTzI5cVQySWo8QIjOo X1ZH4hyJSH+wBbTCt+STbqS0o9DusjAxScgBM7SUYQO9wgIASSKMjX6I3kUQeYQ1SOdA 80TwDFXYvwrCNH5fzOH5COW0jw+ehDxnWRtTG3Q99jmJkwvpHkxw6Q685V5LgacFCIxX OuVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=WkCmgRnfySojTkpQrcM1PB71QcrkdA1SbhgM007bJMg=; b=ZNb/EdUdmjYbp7C/YXLCPj8OFJZiJkdCylYSGFSogTNKklIE4XwCCm+LJ2yb0KAJ1l wROxniFC5ikpUX0yR6hK3AeF4MJMt5h9VOCeIMv+xVCmXVtiARMhGmqCVBVylBztK47w 77Ko0ryy2tqA90AbyiDuOd4P94a0jyjoMBPIe+PUrcNzhxi1rKbscAwNQtmv498TCnxB pwqmvUS6J9pl2SdaeqpMoXs9R+f88EU6ptbVNUKb53mCQRrGz478Dc3fXnsqToG1ygr9 MoLbvfaTqNHIIF67UeGJdghL9iwNmBTgEl1ogmVgkmYGdm0yB+s2DhTaaXycke0343MW 52hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t74si26416640pgc.150.2018.12.23.08.37.46; Sun, 23 Dec 2018 08:38:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393190AbeLWEqA (ORCPT + 99 others); Sat, 22 Dec 2018 23:46:00 -0500 Received: from dmz-mailsec-scanner-1.mit.edu ([18.9.25.12]:63706 "EHLO dmz-mailsec-scanner-1.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389933AbeLWEp7 (ORCPT ); Sat, 22 Dec 2018 23:45:59 -0500 X-AuditID: 1209190c-7ddff700000014b1-64-5c1f1305f46f Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 05.1E.05297.5031F1C5; Sat, 22 Dec 2018 23:45:57 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) by mailhub-auth-1.mit.edu (8.14.7/8.9.2) with ESMTP id wBN4juCl032463; Sat, 22 Dec 2018 23:45:57 -0500 Received: from callcc.thunk.org (96-72-84-49-static.hfc.comcastbusiness.net [96.72.84.49] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id wBN4jr8r021991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 22 Dec 2018 23:45:55 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 49A077A4704; Sat, 22 Dec 2018 23:45:53 -0500 (EST) Date: Sat, 22 Dec 2018 23:45:53 -0500 From: "Theodore Y. Ts'o" To: Matthew Wilcox Cc: Linus Torvalds , Christoph Hellwig , Dave Chinner , "Darrick J. Wong" , Eric Biggers , linux-fscrypt@vger.kernel.org, linux-fsdevel , linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-integrity@vger.kernel.org, Linux List Kernel Mailing , Jaegeuk Kim , Victor Hsieh , Chandan Rajendra Subject: Re: [PATCH v2 01/12] fs-verity: add a documentation file Message-ID: <20181223044553.GG26547@mit.edu> Mail-Followup-To: "Theodore Y. Ts'o" , Matthew Wilcox , Linus Torvalds , Christoph Hellwig , Dave Chinner , "Darrick J. Wong" , Eric Biggers , linux-fscrypt@vger.kernel.org, linux-fsdevel , linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-integrity@vger.kernel.org, Linux List Kernel Mailing , Jaegeuk Kim , Victor Hsieh , Chandan Rajendra References: <20181219071420.GC2628@infradead.org> <20181219021953.GD31274@dastard> <20181219193005.GB6889@mit.edu> <20181219213552.GO6311@dastard> <20181220220158.GC2360@mit.edu> <20181221070447.GA21687@infradead.org> <20181221154714.GA26547@mit.edu> <20181222041712.GC26547@mit.edu> <20181223041007.GL10600@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181223041007.GL10600@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Brightmail-Tracker: H4sIAA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kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 22, 2018 at 08:10:07PM -0800, Matthew Wilcox wrote: > Pretty much every file format has the ability to put arbitrary blocks > of information into a file somewhere the tools which don't know about > it will skip it. For example, ZIP "includes an extra field facility > within file headers, which can be used to store extra data not defined > by existing ZIP specifications, and which allow compliant archivers that > do not recognize the fields to safely skip them. Header IDs 0–31 are > reserved for use by PKWARE. The remaining IDs can be used by third-party > vendors for proprietary usage. " (Wikipedia) > > ELF, PNG, PDF and many other formats have the ability to put data > _somewhere_. It might not be at the tail of the file, but there's > somewhere to do it. > > (I appreciate this isn't what Linus is asking for, but I'm pointing out > that this is by no means as intractable as you make it sound.) That design would require the fs-verity code to know the type of eacho file, and where to find the in-band Merkle tree for each file type that we wanted to support. And if you wanted to use fs-verity to protect a sudoers text configuration file (for example), we'd have to teach sudo how to ignore the userspace visible Merkle tree. So I agree with you that it's *possible*. But it's ***ugly***. *Way* uglier than putting the Merkle tree at the end of the file data and then making it invisible to userspace. Cheers, - Ted