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 24ACF44C81; Thu, 20 Jun 2024 09:12:46 +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=1718874770; cv=none; b=km5aoFXcHGvePWPOQidHZrZDiWUpLwwgPmrZcz6LCW2JaF9R++TTJKEr25IYruMNWU2YYeYhOJVjsThSbPMbaLGCLI4qWZ3Pflhd9x5zsI6OmlmGWaMWMzmn0SjNJn6wjgYRW1Ni7F2gR1d0syqu0NxgSsN813hHLIJu2Wk9WwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718874770; c=relaxed/simple; bh=ChY8gl0UQ9gw90dwFyrkevV7MUzuk6dTQKw1LvhGJ8Y=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=njjNK/u12aQynTcUi5VJfciSA4fFxpi61VW8JwwMwqbitsJQYfCBNMHlrc/vPahbPbtPZfGDV0qWiK9kzkBqi6Fe25lnXuO8snS5GEDfl4ETPdpwGgk/SFkPWv1ZVVsvzY9YzzgwBzR8x0Dm2gDftcD7u4+uOy3yjzoFh2jdAYE= 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 4W4Z7M51D2z9v7Hm; Thu, 20 Jun 2024 16:54:55 +0800 (CST) Received: from mail02.huawei.com (unknown [7.182.16.27]) by mail.maildlp.com (Postfix) with ESMTP id E6669140AA0; Thu, 20 Jun 2024 17:12:33 +0800 (CST) Received: from [127.0.0.1] (unknown [10.204.63.22]) by APP2 (Coremail) with SMTP id GxC2BwBHHDdu8nNmgPLIAA--.31992S2; Thu, 20 Jun 2024 10:12:33 +0100 (CET) Message-ID: 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: Thu, 20 Jun 2024 11:12:11 +0200 In-Reply-To: References: <20240415142436.2545003-1-roberto.sassu@huaweicloud.com> <7cf03a6ba8dbf212623aab2dea3dac39482e8695.camel@huaweicloud.com> <520d2dc2ff0091335a280a877fa9eb004af14309.camel@huaweicloud.com> <2b335bdd5c20878e0366dcf6b62d14f73c2251de.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:GxC2B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CM-SenderInfo: purev21wro2thvvxqx5xdzvxpfor3voofrz/1tbiAgAABF1jj5txJwAAs6 On Wed, 2024-06-19 at 14:43 -0400, Paul Moore wrote: > On Wed, Jun 19, 2024 at 12:38=E2=80=AFPM Roberto Sassu > wrote: > >=20 > > Making it a kernel subsystem would likely mean replicating what the LSM > > infrastructure is doing, inode (security) blob and being notified about > > file/directory changes. >=20 > Just because the LSM framework can be used for something, perhaps it > even makes the implementation easier, it doesn't mean the framework > should be used for everything. It is supporting 3 LSMs: IMA, IPE and BPF LSM. That makes it a clear target for the security subsystem, and as you suggested to start for IMA, if other kernel subsystems require them, we can make it as an independent subsystem. Starting from IMA means that we are mixing two different things in the inode security blob, and I'm not sure that it is more straightforward than making the digest_cache LSM require the space it needs and be notified about security events. Thanks Roberto