Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp67119ybx; Tue, 5 Nov 2019 19:38:21 -0800 (PST) X-Google-Smtp-Source: APXvYqybrsl2pYNkL7Ek/5+wmkW0ckHOQfZrkzhhmcrtbtvWigrDlD0sdiApziO6ScHu+C+Jzzcj X-Received: by 2002:a17:906:cca:: with SMTP id l10mr11324018ejh.161.1573011501369; Tue, 05 Nov 2019 19:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573011501; cv=none; d=google.com; s=arc-20160816; b=wJe72yvOehAiZ1ug3S1CAkIFQGqbKIWigCdVgNIJ2ei7qRrnYPz9Pnf+5+ZBDGRgUD DWH0FiIFo8pqknqumY+PwQuq0zAS71uc1ZD1MZBxAjWoiExk0zbSCenOVnSxw+O6AekF BobfoWevt70LhnOYm3ZV0ScnR0XRHF3D53VJyySoZ+ChNWo3cuo74Z5p9/Sh1bO6MLTV hGIEH1tUnpRuyO50elxs19vl1LDfabqDfcoGADuDynsSuuEPpDs/onq0bGycm3ZI2O2Q XHq9Zm4H6SRSgs/L3QXRt4xadTREKJ39GJpBCWmJQrNZZTCZmz3pMPO/NBxijWoMFAKM 3yig== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LbWGdNBAeDe9NI4vUkld1Bfqo0sjzcyiRxPvuPkAGiI=; b=FBoRORStr1T93PBN4WIgRcfkr7/vJHFMjetGfwdyzapa/ukgkyCWAUyPVl0EZblDnA hbrnycTNxgwD072S0Kz8ASCIZq1sXRk2n7ALarrmb56wA8vrPqp3SpdXT8PVU8j7UZgx h2YfcS1rZQ9H+QQACGbc54o8leDTbDwkY+CQSFa59+H1WA5bx5BKsHiFsUKZQ7BcbWIw hqJwjr4h2Tsjiul5YKqkDDF2tFGxiCnZbk+OuwIfyxP3C6c0awxZTMkQACOt2Gvk68m7 y7mDGAVOyiq1/2GGCRDKyUv/5zOzfI6mq1Nlix6EKx0jAjVSYspfcNzAgP3YJzpBxmiP OWEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 k9si214129ejs.439.2019.11.05.19.37.56; Tue, 05 Nov 2019 19:38:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727266AbfKFDgA (ORCPT + 99 others); Tue, 5 Nov 2019 22:36:00 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:59089 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725768AbfKFDgA (ORCPT ); Tue, 5 Nov 2019 22:36:00 -0500 Received: from callcc.thunk.org (ip-12-2-52-196.nyc.us.northamericancoax.com [196.52.2.12]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id xA63Zk2N030405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 5 Nov 2019 22:35:47 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 615B9420311; Tue, 5 Nov 2019 22:35:44 -0500 (EST) Date: Tue, 5 Nov 2019 22:35:44 -0500 From: "Theodore Y. Ts'o" To: Eric Biggers Cc: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, Satya Tangirala , Paul Crowley , Paul Lawrence , Jaegeuk Kim Subject: Re: [PATCH v2 1/3] fscrypt: add support for IV_INO_LBLK_64 policies Message-ID: <20191106033544.GG26959@mit.edu> References: <20191024215438.138489-1-ebiggers@kernel.org> <20191024215438.138489-2-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191024215438.138489-2-ebiggers@kernel.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Oct 24, 2019 at 02:54:36PM -0700, Eric Biggers wrote: > @@ -83,6 +118,10 @@ bool fscrypt_supported_policy(const union fscrypt_policy *policy_u, > return false; > } > > + if ((policy->flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64) && > + !supported_iv_ino_lblk_64_policy(policy, inode)) > + return false; > + > if (memchr_inv(policy->__reserved, 0, > sizeof(policy->__reserved))) { > fscrypt_warn(inode, fscrypt_supported_policy is getting more and more complicated, and supported_iv_ino_lblk_64_policy calls a fs-supplied callback function, etc. And we need to use this every single time we need to set up an inode. Granted that compared to the crypto, even if it is ICE, it's probably small beer --- but perhaps we should think about caching some of what fscrypt_supported_policy does on a per-file system basis at some point? - Ted