From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout11.his.huawei.com (frasgout11.his.huawei.com [14.137.139.23]) (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 9ADC615CD7A; Wed, 19 Jun 2024 15:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=14.137.139.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718812559; cv=none; b=gG1pwavna5PUsq8thuMnQlV7Pyy72BsH8zKjwPWowXqSwBsiIDAmDsZb4WPzbYdUw7ajd4gEjXDvt+3TWds8DUEQaRfDru0qecw2HBii6yK/GM/HUIo91lGuGs4ZZtJkkePRiTXaocVHGgJqL4B/cnrX0QkRHGbGm6lGsdmnMAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718812559; c=relaxed/simple; bh=dHNsGU6xkEyAuCQvetJnCdniuDr5wXId58AapfKXg40=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=cO3xijj+Yr6DqxgE6GsxNzo/YZIubC1Egd65LZQyoCEz/P6f+QHNl8dSvXVVE5jHnHnrTx0KAruDc6hGUcDlDgidT+ZNTOrpYUIL9ItBt62R95kIZsb695y6V4/9QooogWAV05krElNEh9Cr2m+qac4V0yQJz/2le1Ir85GItGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=14.137.139.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.18.186.51]) by frasgout11.his.huawei.com (SkyGuard) with ESMTP id 4W476w62NGz9v7Hm; Wed, 19 Jun 2024 23:38:00 +0800 (CST) Received: from mail02.huawei.com (unknown [7.182.16.27]) by mail.maildlp.com (Postfix) with ESMTP id A962A140A12; Wed, 19 Jun 2024 23:55:40 +0800 (CST) Received: from [127.0.0.1] (unknown [10.204.63.22]) by APP2 (Coremail) with SMTP id GxC2BwCHDjlo_3Jm_e28AA--.55865S2; Wed, 19 Jun 2024 16:55:39 +0100 (CET) Message-ID: <520d2dc2ff0091335a280a877fa9eb004af14309.camel@huaweicloud.com> Subject: Re: [PATCH v4 00/14] security: digest_cache LSM From: Roberto Sassu To: Paul Moore Cc: corbet@lwn.net, jmorris@namei.org, serge@hallyn.com, akpm@linux-foundation.org, shuah@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, mic@digikod.net, linux-security-module@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, linux-integrity@vger.kernel.org, wufan@linux.microsoft.com, pbrobinson@gmail.com, zbyszek@in.waw.pl, hch@lst.de, mjg59@srcf.ucam.org, pmatilai@redhat.com, jannh@google.com, dhowells@redhat.com, jikos@kernel.org, mkoutny@suse.com, ppavlu@suse.com, petr.vorel@gmail.com, mzerqung@0pointer.de, kgold@linux.ibm.com, Roberto Sassu Date: Wed, 19 Jun 2024 17:55:16 +0200 In-Reply-To: References: <20240415142436.2545003-1-roberto.sassu@huaweicloud.com> <7cf03a6ba8dbf212623aab2dea3dac39482e8695.camel@huaweicloud.com> 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-security-module@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID:GxC2BwCHDjlo_3Jm_e28AA--.55865S2 X-Coremail-Antispam: 1UD129KBjvJXoW7AFy7Aw13K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 2024-06-19 at 11:49 -0400, Paul Moore wrote: > On Wed, Jun 19, 2024 at 3:59=E2=80=AFAM Roberto Sassu > wrote: > > On Tue, 2024-06-18 at 19:20 -0400, Paul Moore wrote: > > > On Mon, Apr 15, 2024 at 10:25=E2=80=AFAM Roberto Sassu > > > wrote: > > > >=20 > > > > From: Roberto Sassu > > > >=20 > > > > Integrity detection and protection has long been a desirable featur= e, to > > > > reach a large user base and mitigate the risk of flaws in the softw= are > > > > and attacks. > > > >=20 > > > > However, while solutions exist, they struggle to reach the large us= er > > > > base, due to requiring higher than desired constraints on performan= ce, > > > > flexibility and configurability, that only security conscious peopl= e are > > > > willing to accept. > > > >=20 > > > > This is where the new digest_cache LSM comes into play, it offers > > > > additional support for new and existing integrity solutions, to mak= e > > > > them faster and easier to deploy. > > > >=20 > > > > The full documentation with the motivation and the solution details= can be > > > > found in patch 14. > > > >=20 > > > > The IMA integration patch set will be introduced separately. Also a= PoC > > > > based on the current version of IPE can be provided. > > >=20 > > > I'm not sure we want to implement a cache as a LSM. I'm sure it woul= d > > > work, but historically LSMs have provided some form of access control= , > > > measurement, or other traditional security service. A digest cache, > > > while potentially useful for a variety of security related > > > applications, is not a security service by itself, it is simply a fil= e > > > digest storage mechanism. > >=20 > > Uhm, currently the digest_cache LSM is heavily based on the LSM > > infrastructure: >=20 > I understand that, but as I said previously, I don't believe that we > want to support a LSM which exists solely to provide a file digest > cache. LSMs should be based around the idea of some type of access > control, security monitoring, etc. >=20 > Including a file digest cache in IMA, or implementing it as a > standalone piece of kernel functionality, are still options. If you > want to pursue this, I would suggest that including the digest cache > as part of IMA would be the easier of the two options; if it proves to > be generally useful outside of IMA, it can always be abstracted out to > a general kernel module/subsystem. Ok. I thought about IPE and eBPF as potential users. But if you think that adding as part of IMA would be easier, I could try to pursue that. Thanks Roberto