Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2066878lqo; Mon, 13 May 2024 07:04:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVxBMlwhjhfXAiJhdZrVyEEVGFw/XgG/WqxqdmsFpNW1lLeAyNZ7+xqcLVh0DBWHIcfNLWhn6VUKTh59N1pV9x6VRz2WwwNCPB/AeN9JQ== X-Google-Smtp-Source: AGHT+IG5dsYXEsHYNe0+2FuhFN7jWr9x6oI1wzVRlpGBXKIDrCJPfZ+kk5V+p2zvL88DgSdNYEzt X-Received: by 2002:ac8:7fcb:0:b0:43d:de6c:83ed with SMTP id d75a77b69052e-43dfda8cf03mr132274981cf.8.1715609089335; Mon, 13 May 2024 07:04:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715609089; cv=pass; d=google.com; s=arc-20160816; b=hSPDg5a/mK0AGAF4Z4fWITdTxxnHD9rVgbr+xIvxZCZwkev0PJUvTIr2FnDxptEWw/ vxWvQzBRGDNra2aHqyWz5OGtSyH6r+aCotSwuSZvHnOSXjs2oMqUMbmv50mb+iL9Dc6o KmIzC8IRCmE1ugNJJSpP9kUmzwkPiqkQUhofCJkCpCVelrKwM2e6AgheBCw55rrLT6F/ UJxZD+qo/8hdQnhsMsVQo9gWnW5ADQ6KnCIwGQ+j9fKY/gI7/1A3EyOEqdsZtyQitLby VknnXLANhTyCrsr9Yr7nEzOBgsQYwmMUGu+0haUvpmQpaih9mdDXh7eZnopxNjQcYh5y Mmfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id:dkim-signature:dkim-signature; bh=4Aws5Tlr6h93l+0y4Ao10jR2ectA8pS/U3Q9521iW9o=; fh=61ZXeIW20hMsx8oqaT9hsR1dlq4f7JeFahC9waHnWEU=; b=SHcaSbggtwsTiIXxOAZBEnDARdWQzpkwfvPc3klOWXtXSJfQsnsVIBFpA2u+G7g3N1 FEE/6oBPet90DhnW6JjP51c+brXNTESocQdIf9UFcdvGoyDV90Y6J+aRt3mcgvGU7NrI bUQlN+SagPxgknhSy5c1zcCfzXN0uuczrsj/tk07oepfRyG7xmirLxZ/9qOyVaxrM3gT 4IHWIz0XT4iy3eCXQF2RwK/PUCuh/s42bM8ixtRSF4QtK1Rv49RPvx2NPIoJY+WkUaZO lReB00GPkOTcitx0dopYZdnsi+2FWCGfhYNVXTX71NYFuYgA4G++tpIf6DZbiZH+8460 ufOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=DzShIiKS; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=DzShIiKS; arc=pass (i=1 spf=pass spfdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dmarc=pass fromdomain=hansenpartnership.com); spf=pass (google.com: domain of linux-kernel+bounces-177666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43e0add88a3si52370891cf.418.2024.05.13.07.04.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 07:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=DzShIiKS; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=DzShIiKS; arc=pass (i=1 spf=pass spfdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dkim=pass dkdomain=hansenpartnership.com dmarc=pass fromdomain=hansenpartnership.com); spf=pass (google.com: domain of linux-kernel+bounces-177666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 142681C234EF for ; Mon, 13 May 2024 14:04:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 412D515359B; Mon, 13 May 2024 14:03:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b="DzShIiKS"; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b="DzShIiKS" Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [96.44.175.130]) (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 4AC94153598; Mon, 13 May 2024 14:03:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.44.175.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715609038; cv=none; b=cou21guH9qCsXf+JvKUucpp62vq6tkiwpzbKB+KJa0aAHo+83tApnxuKpAvjcHelQnPZEovbPGss60Td4N6DzfviV63AjfluOV0hDGdkEfmIchKUdbru0MSixHvxbMUDglimV4O876CfRqjhII5lH2ghGp44xPRFbYhj2vlDIrw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715609038; c=relaxed/simple; bh=Lgh6G1eAGr1IMo9Vxnj39v+o8JT8rLEQeJcV+88RQik=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=llnAGMNbgRWdep23V2QLaCJcx7YYGg8QcTdYa4gJYc+YhQ/jRtSdU2M4IzOWSfoX1Id4MxSTGiJwQV4YRkvFE+J7aatMdChVm4flhOD6Ko4X/r4hoJTVTlD4fwLe5jrIOfT6qGxrlnXVxGP1LUIjfpHtDZ1qU29zk7vNvb+2RAQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=HansenPartnership.com; spf=pass smtp.mailfrom=HansenPartnership.com; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b=DzShIiKS; dkim=pass (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b=DzShIiKS; arc=none smtp.client-ip=96.44.175.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=HansenPartnership.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=HansenPartnership.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1715609035; bh=Lgh6G1eAGr1IMo9Vxnj39v+o8JT8rLEQeJcV+88RQik=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=DzShIiKSdsasr4E5wVwexE/6FI5q7gmgOCvYJelYgn5BBWydE+yU+fFY6TxQRQK9p eoCxlHz+3inoYRyYQUU36n7EplsZYAILi0eTMzHY7svMU6X9BcOUCqldaILXNl0S7R ZpqQSofQA2kPOjl5toD/5mti2kL2wVIXHDv1T1DE= Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id A27841286A69; Mon, 13 May 2024 10:03:55 -0400 (EDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavis, port 10024) with ESMTP id fsnPAtpqdWnn; Mon, 13 May 2024 10:03:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1715609035; bh=Lgh6G1eAGr1IMo9Vxnj39v+o8JT8rLEQeJcV+88RQik=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=DzShIiKSdsasr4E5wVwexE/6FI5q7gmgOCvYJelYgn5BBWydE+yU+fFY6TxQRQK9p eoCxlHz+3inoYRyYQUU36n7EplsZYAILi0eTMzHY7svMU6X9BcOUCqldaILXNl0S7R ZpqQSofQA2kPOjl5toD/5mti2kL2wVIXHDv1T1DE= Received: from [172.21.4.27] (unknown [50.204.89.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 069031286A24; Mon, 13 May 2024 10:03:54 -0400 (EDT) Message-ID: Subject: Re: [RFC PATCH v2 4/4] tsm: Allow for extending and reading configured RTMRs From: James Bottomley To: Samuel Ortiz Cc: Dan Williams , Kuppuswamy Sathyanarayanan , Qinkun Bao , "Yao, Jiewen" , "Xing, Cedric" , Dionna Amalie Glaze , biao.lu@intel.com, linux-coco@lists.linux.dev, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 13 May 2024 08:03:53 -0600 In-Reply-To: References: <20240128212532.2754325-1-sameo@rivosinc.com> <20240128212532.2754325-5-sameo@rivosinc.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Mon, 2024-05-13 at 12:16 +0200, Samuel Ortiz wrote: > On Fri, May 10, 2024 at 10:57:37PM -0400, James Bottomley wrote: > > I'm not really sure where to hang this, since there's no posted > > agenda > > or materials for the CCC meeting today. > > The agenda was posted on the linux-coco ml [1]. I sent a link to the > presentation slides [2] to the thread. That's great, thanks. > > However, it struck me you missed a third option: use the ima log > > format.  This has the advantage that we can define additional > > events and have them published with a kernel patch (the IMA log > > format is defined in the kernel).  Thanks to the TCG, it's also CEL > > compatible but doesn't require any sort of TCG blessing of the > > events.  Plus we also have existing kernel infrastructure to log to > > that format. > > That's an interesting idea. It may avoid having to extend the CEL > spec with a new Content Type, but otoh the current spec defines which > IMA events are supported. So adding new ones may require to also > eventually extend the spec. But I guess since IMA is a Linux kernel > subsystem, changing the kernel code and ABI would de-facto extend the > TCG CEL IMA spec. That's what I was assuming since the TCG is currently deferring to IMA in that regard. > Here I assume you're talking about the IMA_TEMPLATE CEL specified > format, which is designed to accomodate for the current kernel IMA > log format. The main drawback of this format is that the digest does > not include the whole content event, making the CEL content type, the > IMA tag name and both lengths (for the content event and the IMA > content) untrusted for event log verifiers. That's only because IMA doesn't yet have such an event. If we're assuming effectively designing an IMA log format for non repudiation of external events, one can be added. Although I wouldn't want to be hasty: one of the big problems of all options is that no existing log format really covers the measure container use case and we're not completely sure what other use cases will arise (the firewall rules measurements was one that regulated cloud providers seem to think would be important ... and that has a periodic rush of events, but there will be others). However, the current IMA templates (event descriptions) are known by an ASCII prefix (they all begin ima-): https://docs.kernel.org/security/IMA-templates.html#supported-template-fields-and-descriptors So it would be easy to add more with a non ima- prefix. Note that this doc is out of date an IMA does support hashes all the way to SHA256 although SHA384 isn't currently listed. The current record fields are defined in security/integrity/ima/ima_template.c > CEL defines another IMA format (IMA_TLV), that hashes the whole event > content. I think we should at least use that format as our output > ABI, if we want to use a TCG specified IMA content type. Possibly. Although avoiding double hashing may be a useful performance measure (not really sure how fast records will come in yet). James