Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6988429pxv; Fri, 30 Jul 2021 07:25:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlnx0x1tP5cLkI81nLIztI61DrM7eLFEXeqJ7s5YZvVkm/dfIJaKD0D+P0HHJ2Gi7dRUaA X-Received: by 2002:a02:c95a:: with SMTP id u26mr2418534jao.49.1627655157486; Fri, 30 Jul 2021 07:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627655157; cv=none; d=google.com; s=arc-20160816; b=RxW6jCHbxHPvhHejDZj+Y+2ZpDCG185oL2QNNKDICUpRmd5A6kuH2O5bxxSKJ+HtPD gkbcupsIqefrQd8zkcQZDW07eDPxgSz5oqKfe8H3y5YPOaw2i6qnaB0x0UGyPlni8Lix IsmIW4S1HA7vjd8iJJwXqfNpSVafo3uYzpYxVk6qTRr2Ci8Jx2cMVWqG0w2VH0q5hQy5 kR8o69MSc9cmom3HndsITzjBGJofHCwlbmw8gGjRx2S/i3cmFDFhdYoCle8jWGAq+ooH UHHmGK8hVdwSxz/YiI/fCsBJ+CsKZfeUKp7oVXQ6k1StWt8vM62K7ZnZlN82aMVuq4Yv RBYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=Ov0YbdFgiPg01/gTE7Pcj40u2nC6PrjBDqePakS2XpQ=; b=dggzM8u7/H+u3AvEiRIx67PADeqeyeSD00M0tRuEBZS0UU9w0LHF/1VaAq/5ryWii0 V2A0awqTeinmiaqBkZiQxHFNhWCWaXwMQvrsmmwlUTZm89WkzPkIeK5vigfqL99VbRXA aB9PcXOlZOrRtT0NrJf/s8ZhUqrAkQkIgHO3+LVNb+qbHc38TptqaH12Wowua9ckZZ0C glh8rxJ+MruU7K5bpx3FR+KdnKfOJNPniN7SPftbYh0FtWm9ggc88nzo4pyOF/3bsJ1B B/+grJUHQUQgxXgQqkDfGcE0chzKa2r0r5wd+Ac5d5bsbkbcbVzJmDQqCOK/0x60M9+P Ctbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si2095523ilo.2.2021.07.30.07.25.45; Fri, 30 Jul 2021 07:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239736AbhG3OZG convert rfc822-to-8bit (ORCPT + 99 others); Fri, 30 Jul 2021 10:25:06 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3543 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239691AbhG3OY6 (ORCPT ); Fri, 30 Jul 2021 10:24:58 -0400 Received: from fraeml701-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Gbq9c47xbz6L9kH; Fri, 30 Jul 2021 22:12:52 +0800 (CST) Received: from fraeml714-chm.china.huawei.com (10.206.15.33) by fraeml701-chm.china.huawei.com (10.206.15.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 30 Jul 2021 16:24:51 +0200 Received: from fraeml714-chm.china.huawei.com ([10.206.15.33]) by fraeml714-chm.china.huawei.com ([10.206.15.33]) with mapi id 15.01.2176.012; Fri, 30 Jul 2021 16:24:51 +0200 From: Roberto Sassu To: Mimi Zohar , "gregkh@linuxfoundation.org" , "mchehab+huawei@kernel.org" CC: "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Igor Stoppa Subject: RE: [RFC][PATCH v2 06/12] diglim: Interfaces - digest_list_add, digest_list_del Thread-Topic: [RFC][PATCH v2 06/12] diglim: Interfaces - digest_list_add, digest_list_del Thread-Index: AQHXgjzPxJ6WuoGgH0KyG3D/y7w0xqtaWSsAgADBDpCAAD+ygIAAIhjQ///1QYCAACKD8A== Date: Fri, 30 Jul 2021 14:24:51 +0000 Message-ID: References: <20210726163700.2092768-1-roberto.sassu@huawei.com> <20210726163700.2092768-7-roberto.sassu@huawei.com> <1ef95096bee13578b3f906dd9f708c6af9d6ff18.camel@linux.ibm.com> <555bf01bee4b4ea7a9bee658366d535a@huawei.com> <2c731f07bd08f01f2a3e032814bc65ae9a8494ad.camel@linux.ibm.com> In-Reply-To: <2c731f07bd08f01f2a3e032814bc65ae9a8494ad.camel@linux.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.221.98.153] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Mimi Zohar [mailto:zohar@linux.ibm.com] > Sent: Friday, July 30, 2021 4:03 PM > Hi Roberto, > > On Fri, 2021-07-30 at 13:16 +0000, Roberto Sassu wrote: > > > From: Mimi Zohar [mailto:zohar@linux.ibm.com] > > > Sent: Friday, July 30, 2021 2:40 PM > > > > "critical data", in this context, should probably be used for verifying > > > the in memory file digests and other state information haven't been > > > compromised. > > > > Actually, this is what we are doing currently. To keep the > > implementation simple, once the file or the buffer are uploaded > > to the kernel, they will not be modified, just accessed through > > the indexes. > > My main concern about digest lists is their integrity, from loading the > digest lists to their being stored in memory. A while back, there was > some work on defining a write once memory allocator. I don't recall > whatever happened to it. This would be a perfect usecase for that > memory allocator. Adding Igor in CC. Regarding loading, everything uploaded to the kernel is carefully evaluated. This should not be a concern. Regarding making them read-only, probably if you can subvert digest lists you can also remove the read-only protection (unless you use an hypervisor). Thanks Roberto HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli > thanks, > > Mimi