Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10534579rwr; Fri, 12 May 2023 09:19:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7i6jk8lW+cTUjCEH02RHh1go96dTck90Lhi8bTy/YTt3/0TXHi4akp6giL8yqZpoSODUvt X-Received: by 2002:a05:6a00:1d14:b0:643:90ee:56f with SMTP id a20-20020a056a001d1400b0064390ee056fmr32911649pfx.1.1683908341283; Fri, 12 May 2023 09:19:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683908341; cv=pass; d=google.com; s=arc-20160816; b=ZXh67Lomo4ofsT0xTkSIqQSdQ8ksXWBlWVeaReNQlci8KMUWlFfsTNkvlBB6cyNwHp fjusXNSrzFxvjB9gDkWltfwS3mCWIWeqMnUugbo+ATyqoKQ96ukThxYStWnnHZMrrSTl ND+Z+7fmcvuykGGz6rrbdoRvbjqRvQxMyUZNQeNs59ITNEvmOs2qNBlpUeLWsvHIwaSm UaPQMD4wtOYr/3HSp4OIGciIjYWVXhdn8FewNarefAZrNEr/SwoNPQF6+XpyZI3KjSQk p13ZiHeUadIdQsR+bKbYwyp+a06fxL9sstvz/N9eqDxZH58l+UupgT3BbAgcQFjk4tR0 zahQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=7k3CQPvvEDGC6MlNKFh2f4kEFdRvRGKsv6wX2b/6bnE=; b=dl2jz7Zc9ZDFfomrd9isswBfv5MMEQ2KBSl4SBTucOTe3+3VgN6+cxlgTPRhtomCBk CwC2FI2G4I2rCtHNppZ4wkgECInkUWnpW98H3lakE3/PY2RFyu5g+OutgWzkzwn7l+cJ t22Xx9DJ2Z2zdWxtanU90JZbn2eD5n/9MNbCVDNce+VgS7jR1fr0AK+HbMQk+pjaQy48 VmiCyxbBsnKtS7/ftkHtqDAkiI2xd2HEltE+QvdUUrneuBFfGT7e9bKeEudhP14jL+VL 4KxHhADTiYNi0U0NS7s3Ji8iKpDfCMEiQ0NuMn6AsUL8oAw3MxsIx4wUSun8CJKWX7DX t5/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=SQnayg1b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=DCg6sKTO; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t67-20020a625f46000000b00643a251968fsi10676025pfb.350.2023.05.12.09.18.46; Fri, 12 May 2023 09:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=SQnayg1b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=DCg6sKTO; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242025AbjELQKv (ORCPT + 99 others); Fri, 12 May 2023 12:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230453AbjELQKt (ORCPT ); Fri, 12 May 2023 12:10:49 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 023C230C7; Fri, 12 May 2023 09:10:46 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34CF48K6010115; Fri, 12 May 2023 16:10:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=7k3CQPvvEDGC6MlNKFh2f4kEFdRvRGKsv6wX2b/6bnE=; b=SQnayg1bEcXAm5AO/3NS628aqRAZCnO/E3G2UbJLccAaINE6bKb5uwOS5WUyDS4n8QCD qOkQ0KoUEudXryCDO0mwmi74H/yUyaath5ZUwMqALYdzBHrRfINU/wCkfglMCcW2Rq/g QtG3tWuMqzXBU2GBrzuavY6vPSePp9t35q4gI0yQ4B7pogOtiHeu/FYBydQFxyx/kJCQ rV5pYd+DYaEqRmNWS5pymx5z7ey28VYwxyDkCjPxealSj2snnny3teFJmWj8uC7JBV0O fGVYIUeUhm0JUOEJgvbMsm87JJceLFS5XAtoswSuZ/mSA+tlMGQTwuF6avQhJc/An0fK 3A== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qf776ttxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 May 2023 16:10:28 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34CFmSKs018251; Fri, 12 May 2023 16:10:27 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qf77mdtk5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 May 2023 16:10:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G1fIF0iEvX3lHHoxVmiPx2Vl2DWLDpeeztJHZT92w6GKzO/Uk+Xxx0E88cMaXbEQXzlzlzAZ7/q9dUGPCeXZ9o1kDQmLaE50Uz/+DEc5eSAAFh871NwfuyQcg7yv/m+o0fyGRmgZucdFmNvHol1oDUii9Vdk6sUwizPKW9038GYdgUlSUIQxiGj7JdpLhByvFe4v5sXq/pXDowUJfE81ewiRRI9nW+us/learMDPRI6pfq93GwC94X5Tevxf0zCh4BSLYonFrwq0jPK3kgAvKndgWSNQ8xOmSUkRnlTePf1IaL16HWVY5EKlZoTUXDxQ1Lau1bt/05RPJXKWo35J+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7k3CQPvvEDGC6MlNKFh2f4kEFdRvRGKsv6wX2b/6bnE=; b=Q5hAH1UsX/HSbguiInkKzL8VUHkkt0i10TS8khUDqQdV7U+Vacy9KdeuD4PeMKPCjuy3QCMM7C7M+s0oPT77vWB+B0vMLVCDto1Vu/DFFdfjlENHdXwcPKCQBriQopjqOQFTylbeP9fmM+2tpjjdqOd8RsYuF/RjFKvGSM/bR3fI3IiJAoHAKVOPlSRWzZ1v15JQ3bWsMkPWuky1WTZBHKnSvJQ84OyNL7In4DiAzQPr2SuCVfShjoLgaTGk4RkPIs8CHwgFxxUUPKPyB/8Wa3evsPB1Re/MG1dXkOdUaljG7kPZelhRzlRGHqQXSxwoNxR8OJ5GxhhKExXQ37uYSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7k3CQPvvEDGC6MlNKFh2f4kEFdRvRGKsv6wX2b/6bnE=; b=DCg6sKTOeUwSyoS0JOP+NsdFyZVtw/RSH5pRjHDvy8ZtZUcTDEBCAwnRu6aWgVqjUUOf9nIk+u4p8uG3WG9v06orIrkA2xulsneRhoEtTaoT5ivr/q6oS+Wr05KAmICPycCGKwPmry+Ib7GZ+EB6W95hBZrxYOGTr2DRR3g8Bbc= Received: from BY5PR10MB3793.namprd10.prod.outlook.com (2603:10b6:a03:1f6::14) by DM4PR10MB7427.namprd10.prod.outlook.com (2603:10b6:8:181::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Fri, 12 May 2023 16:10:24 +0000 Received: from BY5PR10MB3793.namprd10.prod.outlook.com ([fe80::37d1:ec08:a280:1d91]) by BY5PR10MB3793.namprd10.prod.outlook.com ([fe80::37d1:ec08:a280:1d91%4]) with mapi id 15.20.6387.024; Fri, 12 May 2023 16:10:24 +0000 Message-ID: <2f7689e0-b79a-c642-815f-a487c1b9e700@oracle.com> Date: Fri, 12 May 2023 12:10:19 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v6 05/14] x86: Secure Launch main header file Content-Language: en-US To: Matthew Garrett Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, kexec@lists.infradead.org, linux-efi@vger.kernel.org, dpsmith@apertussolutions.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, ardb@kernel.org, James.Bottomley@hansenpartnership.com, luto@amacapital.net, nivedita@alum.mit.edu, kanth.ghatraju@oracle.com, trenchboot-devel@googlegroups.com, Ross Philipson References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-6-ross.philipson@oracle.com> <20230512110003.GC14461@srcf.ucam.org> From: Ross Philipson In-Reply-To: <20230512110003.GC14461@srcf.ucam.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH0PR04CA0010.namprd04.prod.outlook.com (2603:10b6:610:76::15) To BY5PR10MB3793.namprd10.prod.outlook.com (2603:10b6:a03:1f6::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3793:EE_|DM4PR10MB7427:EE_ X-MS-Office365-Filtering-Correlation-Id: 73bdc13f-6ab8-4e95-ff6d-08db530364d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 731PhbSa+XpLdaDdHghr90ZksUp8u2ow0B4WBn9PMVz7c//LRUBeXS6zcftjSZmpU8Ra6RuEuGb2IiroX6R7vZWtPJ2DWq1twb5zn0zHo1yJNUVIOK4LoSfLm5B2pGon6OSbarDoP7YKDMPrlB4NM7lsWRuZayh1QdWn7xO52ph/KCq/Lf8y3ZlEhNZAlciwT0+SeUwSpyQngaP0kROCAwd3SZYcVka+3vZAwEBu0ZsP7uzxt+gRSiqLDg09Z1XWpVFhLhMKpUJshc2A+FsGGLdgoc5CdaIdkH8/mj0oTNrwKFRSRLjWdZbQMCzpSzxMCXdJ6TrJkDlQ8I9BnEPaDMsVQCR/RHosQf/VXczBnZ+JaqUhkne/SviELOMUj85vls5X7JFtHC4VaPv1P4k9YFHav7m2XS++kO2efkUUT04zCFOnP6rMA7FF9M0BWBREpp+UtCzgfnSEc2PFEmPMTSgXP2GBLWRWxB/pgJD0/uL1KkRQUYvn0TvuBqu8mGb05FZPYvQssIprF8Cp4BZXYymz0c/Ml64FTiXEBiMvhgyxcVqLTFl9Gh0Cepo6H3fZi7YXGsKxl34JXLhaChmH+7C0gWSPDhqOGV0H+dE2S0RYW/1gj6sIXQoVNNxg9cCRp/36LJEGf2yq95oO9TN/0A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB3793.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(366004)(376002)(346002)(136003)(396003)(451199021)(86362001)(31686004)(31696002)(478600001)(83380400001)(316002)(6916009)(41300700001)(66946007)(66556008)(6666004)(4326008)(36756003)(66476007)(6486002)(8936002)(8676002)(7416002)(38100700002)(5660300002)(107886003)(44832011)(6506007)(186003)(6512007)(53546011)(2906002)(2616005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RHViOE1ETmozN3kwRmNNamFqWDBVcnVTMVZJUVd6U2tHWTIxSUk1M3ZXR3F1?= =?utf-8?B?NDRWT2ljQWl6ZW9aNERaQitkd2Q0d2ZaOFh6N3lGRHFqeUlXalhadGRGRll1?= =?utf-8?B?U1UwK2ZUSU5DaWJkVVdwTTJ4MkRnT0tSQzBSQWdnWmJZK0RZUVJsekpZRVRD?= =?utf-8?B?U1NiNVJ5YUhsSlp6VURhQ0FxeDZpV0lIait0blc5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Vx?= =?utf-8?B?bEd1eVJvVENQZ3BtdXRIYVErNmFqVXdhc2l4TVBwa2VIeUx0eHJXMExEeUZs?= =?utf-8?B?Q0tsVEF3VzRZWHhWVzlPZWlOMlVYZVhMZ1p3S1FDYjlRVjMxZkQ0UmpVUFRS?= =?utf-8?B?OExqTDlRdWpIZDVSYlc2TWxabjdLdjBTYVprQnh0U25DdFZmWXgwUEdZL0dU?= =?utf-8?B?ZHZtdXN2aTlnSHdkays3VFI2UWxpQ2ttWGdGK1hHWVd2cS9OdTNZQlJuTHRJ?= =?utf-8?Q?DWqLZ242nGzwcJBPis=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73bdc13f-6ab8-4e95-ff6d-08db530364d2 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB3793.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 16:10:24.6919 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DRw9VzBOQZzh9hFveXaEarvqjbugK1Yw+fiS17cs4bME2lllHPw7xrkiIeFvCQHMM5XToTJ+u2U09cUuym9DVExM0FaDbNcFQUefojD831Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB7427 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-12_10,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 adultscore=0 spamscore=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305120134 X-Proofpoint-ORIG-GUID: 7PO8d30rEWqb9ffQddNvT_Z80KiyfjL5 X-Proofpoint-GUID: 7PO8d30rEWqb9ffQddNvT_Z80KiyfjL5 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/12/23 07:00, Matthew Garrett wrote: > On Thu, May 04, 2023 at 02:50:14PM +0000, Ross Philipson wrote: > >> +static inline int tpm12_log_event(void *evtlog_base, u32 evtlog_size, >> + u32 event_size, void *event) >> +{ >> + struct tpm12_event_log_header *evtlog = >> + (struct tpm12_event_log_header *)evtlog_base; >> + >> + if (memcmp(evtlog->signature, TPM12_EVTLOG_SIGNATURE, >> + sizeof(TPM12_EVTLOG_SIGNATURE))) >> + return -EINVAL; >> + >> + if (evtlog->container_size > evtlog_size) >> + return -EINVAL; >> + >> + if (evtlog->next_event_offset + event_size > evtlog->container_size) >> + return -E2BIG; >> + >> + memcpy(evtlog_base + evtlog->next_event_offset, event, event_size); >> + evtlog->next_event_offset += event_size; >> + >> + return 0; >> +} >> + >> +static inline int tpm20_log_event(struct txt_heap_event_log_pointer2_1_element *elem, >> + void *evtlog_base, u32 evtlog_size, >> + u32 event_size, void *event) >> +{ >> + struct tcg_pcr_event *header = >> + (struct tcg_pcr_event *)evtlog_base; >> + >> + /* Has to be at least big enough for the signature */ >> + if (header->event_size < sizeof(TCG_SPECID_SIG)) >> + return -EINVAL; >> + >> + if (memcmp((u8 *)header + sizeof(struct tcg_pcr_event), >> + TCG_SPECID_SIG, sizeof(TCG_SPECID_SIG))) >> + return -EINVAL; >> + >> + if (elem->allocated_event_container_size > evtlog_size) >> + return -EINVAL; >> + >> + if (elem->next_record_offset + event_size > >> + elem->allocated_event_container_size) >> + return -E2BIG; >> + >> + memcpy(evtlog_base + elem->next_record_offset, event, event_size); >> + elem->next_record_offset += event_size; >> + >> + return 0; >> +} >> + > > These seem like they'd potentially be useful outside the context of SL, > maybe put them in a more generic location? Very much a nice to have, not > a blocker from my side. Yea we can look into finding a nice home somewhere in the TPM event log code for these. > >> +/* >> + * External functions avalailable in mainline kernel. > > Nit: "available" Ack Thanks >