Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp319036rdb; Tue, 16 Jan 2024 00:48:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSTjJ9aTKtz6tnM5K3Ae8WwfMUvNgd4vt3e+Nlu298j9JjQXKQgVCirBFY9M+Ba8XQ3gwZ X-Received: by 2002:a2e:9614:0:b0:2cc:c895:7140 with SMTP id v20-20020a2e9614000000b002ccc8957140mr1555882ljh.73.1705394882396; Tue, 16 Jan 2024 00:48:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705394882; cv=none; d=google.com; s=arc-20160816; b=m3NLqJ8oLcrEybd367WmFSXWfHJ5Zx1HUA4PYLaC9uFrrnfbl7LDe24NO744B5yIA3 vqDM3HaBdWp2aJGl/K3dERG18+VGLa1560dRNkh3V5rfzXdb5ocYbcKre9yBTMf6l8D+ BWyoJfgtgBZRTsLNZE6F1dfzr9AJEcx378ekPdMWIWxiLEVZNesd0qqTXzt5TuoF1+60 A5spwZ5vTRqFVCP0Vkpbd4eQUYHa4RcqoV+wJ4fDTAGE6vlGaxF4LSYX7Q32ptHsquLJ 6wzhBDttJ1AvEmk3mHB6UD7DxRd19GNzt7wBV2fZAeMR4Z/zUPw3U4kP4UnC22ka5/+6 O+fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id; bh=z4ajmrR9UerpwGnsRrdJK8AgeUWh1C9lcN5qx+cHnFI=; fh=TYFevSYOg/4IQ0kgVyjwZ0HVg2kGLhkgkhpI9tZG0UY=; b=O8F7pi7KT8Gwswyad5XlI2AyIPvE4BAFUPtb/2P0R2fEFeFn6XjMSIPI4gCroUagFE GkWi3u/8/Jq7m4EaVW6Rxww8zZqf5WWjW5hzesNnlOGluDrJiy9kECL6Ah7CxfR4lR3p 3TNy2HmRYHHu6mD5achG5GmUcZFsJk+AaqV3bJxJNVekMMJLaF73OvaJ7D0nXNorihJO rzEysy8LIwqibWEH/pYBZZJ9XRqRUKaK0yqFM4Upi/aqeGvikOeynh/Vl/gDisvhXZcn iJsKN+LiN3yrin9hYPVcGwj973Tf+U8NWWrUhZw5LGeEUAk0pk0rCvYoukzYr5NDchhq nHaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-1127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1127-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h6-20020a056402280600b0055484293d64si4841661ede.372.2024.01.16.00.48.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 00:48:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-1127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1127-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 26D821F24122 for ; Tue, 16 Jan 2024 08:48:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55389125B4; Tue, 16 Jan 2024 08:47:58 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org Received: from frasgout12.his.huawei.com (frasgout12.his.huawei.com [14.137.139.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4E17125B0; Tue, 16 Jan 2024 08:47:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.18.186.29]) by frasgout12.his.huawei.com (SkyGuard) with ESMTP id 4TDhy80gLFz9xvNW; Tue, 16 Jan 2024 16:29:36 +0800 (CST) Received: from mail02.huawei.com (unknown [7.182.16.27]) by mail.maildlp.com (Postfix) with ESMTP id 8282314025A; Tue, 16 Jan 2024 16:47:52 +0800 (CST) Received: from [127.0.0.1] (unknown [10.204.63.22]) by APP2 (Coremail) with SMTP id GxC2BwC38CSpQqZlOdikAA--.3968S2; Tue, 16 Jan 2024 09:47:51 +0100 (CET) Message-ID: <3b440f064a1ae04d69f7e85f4077f8406c0eac67.camel@huaweicloud.com> Subject: Re: [PATCH v9 13/25] security: Introduce file_release hook From: Roberto Sassu To: Al Viro , casey@schaufler-ca.com Cc: brauner@kernel.org, chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, eric.snowberg@oracle.com, dhowells@redhat.com, jarkko@kernel.org, stephen.smalley.work@gmail.com, eparis@parisplace.org, shuah@kernel.org, mic@digikod.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, selinux@vger.kernel.org, linux-kselftest@vger.kernel.org, Roberto Sassu Date: Tue, 16 Jan 2024 09:47:34 +0100 In-Reply-To: <20240115191508.GG1674809@ZenIV> References: <20240115181809.885385-1-roberto.sassu@huaweicloud.com> <20240115181809.885385-14-roberto.sassu@huaweicloud.com> <20240115191508.GG1674809@ZenIV> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID:GxC2BwC38CSpQqZlOdikAA--.3968S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw1DZr4xZrWxZr48XF43Wrg_yoWxArX_ur yqkw1kC398CF47A3sruF1fZrZ2qFW8AF15X390qrnxWayfGa4IkFWF9rZ5Z348GF4IyF9I gFn0vF4xKr1agjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb7xYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aVCY1x0267 AKxVW8JVW8Jr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2 j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7x kEbVWUJVW8JwACjcxG0xvEwIxGrwACI402YVCY1x02628vn2kIc2xKxwCF04k20xvY0x0E wIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04 k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UQZ2-UUUUU= X-CM-SenderInfo: purev21wro2thvvxqx5xdzvxpfor3voofrz/1tbiAQAEBF1jj5iWWAABsn On Mon, 2024-01-15 at 19:15 +0000, Al Viro wrote: > On Mon, Jan 15, 2024 at 07:17:57PM +0100, Roberto Sassu wrote: > > From: Roberto Sassu > >=20 > > In preparation for moving IMA and EVM to the LSM infrastructure, introd= uce > > the file_release hook. > >=20 > > IMA calculates at file close the new digest of the file content and wri= tes > > it to security.ima, so that appraisal at next file access succeeds. > >=20 > > An LSM could implement an exclusive access scheme for files, only allow= ing > > access to files that have no references. >=20 > Elaborate that last part, please. Apologies, I didn't understand that either. Casey? Thanks Roberto