Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp532205rdb; Tue, 31 Oct 2023 14:38:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYIX2hlBGgRitH1+6aY1gpYDRMPuhaHqL+5UTQmRjldsAD6wV1mNaGCeABdO7cwYXAKuvR X-Received: by 2002:a05:6a21:a583:b0:171:4921:f1b7 with SMTP id gd3-20020a056a21a58300b001714921f1b7mr14940514pzc.41.1698788321062; Tue, 31 Oct 2023 14:38:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698788321; cv=pass; d=google.com; s=arc-20160816; b=GyxLPoPTvL7YBvOz4SvJ4heVaKt3QpOxD7xSZuX6Zkrq+y4/KP1YdIdsxZfsnDKDVN p9nFrGDwg1xOZCQrMI5QkjqaNYQbWY8EBIVX9lMhKvHdWS9j5yd5uqSMOh7TmCKXst9N puZJZEkJ+ajWnZ8G1SR9Yb8q4KlUjO9ORDs/pYR2qaVPVH3K+ug9sZ8RzVPac5Kyv0GZ b1hGFhR/wnvlWL0tjx02LZ3h1RotIVZvH6pwKiQ+ydOaKfLKujx4IdLl3wbYG1dUZPoa ppvVNHH71vwdIdMUseJ8MzzMViJQ7JtLS9IIo2zNb7P1IOdtu0AAwNz88Hiv80I0uQNH Q/0Q== 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=cq8F23OzgQ/QL3J1RA09+xWEmFwFiuuG6IpSIrA3cj0=; fh=uLNd6CR/wz9jaNpQ578ZwfJRNBxbivnhZwHT4w+IE7c=; b=ZKpan2IjlQfy0HmboG/yAr92GGfOWGaS1DIZU6+iwyE2E1FDq6tTpgoC303g8tSkUJ ketCC90werV2rVRRqw1ihQteG5paYlflKEOdLHTBD1KBhYvt8c2xRDQgK2aiSApi4n2h PSnl6fljTfCal4NduoplTxHogQJ56ahXuZe+jRewi16xg+VdFHa+ceI8nfO7YmrY4dFc JvacPzVEJ/T1XjhOPCtDovpoeQxE2nzrv758X7lxI34LbUTVO8gZPN3v12Il9DgGYrt1 KZ7MzVcA8ofR+P5PTXSlnuIWPWZAcCwwtLOp733ify6yUgzeVj8a4ioFGC1Hv7TKGlud BiQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=VfT9vYPV; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WcKvecn8; 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-crypto-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id g8-20020a056a0023c800b006be03d801basi214702pfc.331.2023.10.31.14.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 14:38:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=VfT9vYPV; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WcKvecn8; 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-crypto-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9DA6E80294A1; Tue, 31 Oct 2023 14:38:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343698AbjJaVig (ORCPT + 99 others); Tue, 31 Oct 2023 17:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjJaVif (ORCPT ); Tue, 31 Oct 2023 17:38:35 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EC62C9; Tue, 31 Oct 2023 14:38:32 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39VKWO6h001602; Tue, 31 Oct 2023 21:37:58 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=cq8F23OzgQ/QL3J1RA09+xWEmFwFiuuG6IpSIrA3cj0=; b=VfT9vYPVWGDAIZ4CzNZ1gp6G+JLTskCIeME0VpAkvzfza75kyjJTuqxFjqPQ2wdrbL45 hJkw/qOc7No4Y66pmwN8+UsDLZ5iakzjbdUhWZlOPxdKG+DdpW93J652L0BDMWUw2hra UlVKN7EOj0Iyee8he1M53oZVmUDZndvgD0sAUUw60d1qFGJFUvt42N1M4gzaJH4Ne1HZ Q9mAXA8phliFc4uy2CPAdgtD2PzNcIY3yldv8XzvcHaNpXscGaf1Lh+DJqPaNTqj0t0j oLHM26FSjHGH8qfMFH3FcQ4vURb2Hwp849fdAS2aQsNY1H3o+EV0ZyRf+5th6lSoutBx pw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u0swtp93j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 Oct 2023 21:37:58 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 39VJeF65020069; Tue, 31 Oct 2023 21:37:57 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u0rr6bf1m-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 Oct 2023 21:37:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wb2ZAjnAbkxLBDL5il157uugeiHAf/+O/w0VS7+EjlFQ43JZc+q13t5Ww9sYzdBlraPmZI4+fuDFCG8vklWN1gMwP0QGfnFNJeOl7CutUyBfi8Otz7lGISdkylt/0AjUhPhWn8qXQmM0MNu4KIaQR6OrpHwvG27cuOBz9n9EfAbpgJQhYZzGZS6hs0Iv2O85H8bSiKdX4rcVKOnggzivsL7WjQvZWSHxKws15yymElIBKbqZ0vuDSC+uTTcJBYoGlaiwUQDRfsZC4gEqWP1GordZmns0UEr7StZXKlIiFP+DEHmGKz/AcMlD+XrxHFz7obyyoelnBhdS+KOcmuvEDg== 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=cq8F23OzgQ/QL3J1RA09+xWEmFwFiuuG6IpSIrA3cj0=; b=FHsUMKi8XJGjxzVBf9FB00wdsM9xsbntCcDrgccZD2EGfGg5sRWRYHR87h9umyFdwzio/xouFh1VzELyQai0BUgBYYaqlqL/eYoC6N3gfYXtLk5vblff7S/iyrlpU0AQWaz6jJjG2N3CjcDxImbXkuAA2o0sNxx06sjPqal1/zAsmxOY2IGX6FapXCPbIEJxzW4BAoEP9WiVdOhU+SgliQ4w6dXSg3uhpt1hcUbcZIUifK7/jExsEr3c8r9Dtix7o30pSjieV3UkfXHnt8m6zw0vLc2mPlybHpUlvnkw3GmbvWnjtQmHvzJeog1/lelZhimQYJK+TKvJtGuDUVhE5g== 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=cq8F23OzgQ/QL3J1RA09+xWEmFwFiuuG6IpSIrA3cj0=; b=WcKvecn8NEuV3tXBi4RBZG97YVyuMMtUFfy8ReTsQNzeN3jjTo3nScAakxiJTiOl0TYban9Nb9GxmuSkmDSS4BeMkkTpLi3KpspACvN5zTXX5lo55rxoFhc68y1GXJ50kfgSiELiOcdi7+kostBcbVvuNroNNgVyHLG6LMChMcM= Received: from BY5PR10MB3793.namprd10.prod.outlook.com (2603:10b6:a03:1f6::14) by IA0PR10MB7273.namprd10.prod.outlook.com (2603:10b6:208:40b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.29; Tue, 31 Oct 2023 21:37:54 +0000 Received: from BY5PR10MB3793.namprd10.prod.outlook.com ([fe80::37de:88fd:becd:7e3f]) by BY5PR10MB3793.namprd10.prod.outlook.com ([fe80::37de:88fd:becd:7e3f%3]) with mapi id 15.20.6933.029; Tue, 31 Oct 2023 21:37:54 +0000 Message-ID: Date: Tue, 31 Oct 2023 17:37:47 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.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 References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-6-ross.philipson@oracle.com> <20230512110003.GC14461@srcf.ucam.org> <2f7689e0-b79a-c642-815f-a487c1b9e700@oracle.com> From: ross.philipson@oracle.com In-Reply-To: <2f7689e0-b79a-c642-815f-a487c1b9e700@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR13CA0233.namprd13.prod.outlook.com (2603:10b6:a03:2c1::28) To BY5PR10MB3793.namprd10.prod.outlook.com (2603:10b6:a03:1f6::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3793:EE_|IA0PR10MB7273:EE_ X-MS-Office365-Filtering-Correlation-Id: 69152d7c-2c60-4cc8-0e1b-08dbda59a3b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qMJwvEGtuHGZoNb+FMFtYNSdPXgj8EkRMJ0kHQVHozPdHBIDWKWbh+uA0PrBPbSFMC1ysg8IYZH+RaDsbevFpNs4Hgp+lUYmEv8njGwq+lnBvaSgpHgt60BqSXO9HoxygGD9EoF31JgcRenDI8/LrHuFJ/hsXuGvJ7G/CNtICI/Z1iQ0FVMAZOjm9h4owcNceqojlBRQ+e0jwnNZJP7iDl6UwhcESeO5KMr3u7JNFthivRLibvRl1077yD5xjA8PyecxuC9FZFiInVJR29iiXsnGRprjNLOkuMu9Hh7oHfykrnvy9b4rp9EwwFlUD+P5SH2B2rUDpdc0dRdDRS4ubY5OXR/yS7QgXrNeOGcJVlgyeYYBRZZ+OHdNPQwbdmWJyBu0FD1LXpruD5O8/B9Hnq0GOL4tayHLJ2o9QVSgc+Khh6oY6lLOtdgjnM76MMKUB0V7OTYX9QG06yhLy66GTyd7I4kyAYXbutyv01eBeAkdCJpSplyjVlCOV+QLH8RN9zrsJKAtHHrg/NssSlqLALsls5Hg4fn/xC+nEZAJSPqveecWPEJXo1pnF0vB71aSymEKHDxziRvgCbHqipOfCj4SpBMvq64ZZmSUHo8sWyWN+rlwWUB5oT0sEMAR0gXM+zUp3FQI3doR31NBbahkzMql6qxr3+z5Tps9EOgXxRg= 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:(13230031)(376002)(396003)(39860400002)(136003)(366004)(346002)(230273577357003)(230173577357003)(230922051799003)(186009)(64100799003)(451199024)(1800799009)(53546011)(6506007)(6512007)(86362001)(9686003)(6666004)(83380400001)(41300700001)(8676002)(6486002)(8936002)(4326008)(6916009)(316002)(5660300002)(7416002)(26005)(66946007)(478600001)(31696002)(2616005)(38100700002)(36756003)(66556008)(31686004)(66476007)(2906002)(43740500002);DIR:OUT;SFP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?B?M240QWtEb2FEaWpQQnJ2SjVNM2xBVlpqUzFWOEt5ZUQ1bVJERHFmdkMxeTVz?= =?utf-8?B?U3BWcW5KSC9SV3R3RXpwQVFOZGt4WUpEVnJRNTBzQ29Ca0VFdFRZckJ1ZUNG?= =?utf-8?B?bVVUSUR1eU9aZStFb1VmbDlJNFVpUVZYMzZLUmY0RjdGYmhGQzZVRElxakJh?= =?utf-8?B?bmQ1c0R1MzBCTW95SFJ6TDQxdkhNZVZML1E0N1hLcHZxM1VFSnkyaFRaQVZL?= =?utf-8?B?OFRxRUM5Q25DUTJybEtQanZ3YWUyaEhtYUlWVzFWb1FCMldVOXRpb3ZZZzhL?= =?utf-8?B?Zk5vVHZFU3BHcVg1b0RzQTlPUmdBUG5EeXduVjBUZnBQQzJmRndkV2k1aVQw?= =?utf-8?B?NEV5bStnTUxGZzR5RUxuVTR3b1RUT3RZaDMwZFkrMERWdldWYVNlRWgzemdM?= =?utf-8?B?bElhNExKdGl6TFQ1TlAwVVNaL2xBZWs5VWk4SkZpeUYzWjhPOWxsNnRMdnl5?= =?utf-8?Q?HIOStTIjs+ak3aISjQ=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69152d7c-2c60-4cc8-0e1b-08dbda59a3b2 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB3793.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 21:37:53.8866 (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: NDmyqRjuxBgvSw12gUvhc8z7tmsQkA1nLtpi0iaL77SITcEVZOnvSLDyEUx2ghLmd5S15F437naD/4l6g5f1hzTMpnDWSLPJHv0IfxRSe98= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7273 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-31_08,2023-10-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2310310177 X-Proofpoint-ORIG-GUID: 7YlG4XtHoV1Gmv4bQffotyyOaCj86ZGv X-Proofpoint-GUID: 7YlG4XtHoV1Gmv4bQffotyyOaCj86ZGv X-Spam-Status: No, score=-3.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 31 Oct 2023 14:38:36 -0700 (PDT) On 5/12/23 9:10 AM, Ross Philipson wrote: > 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. After looking at it, it seems we would have to drag a whole bunch of TXT related structures into the TPM event log code. I don't think this is really worth it for what these functions do. Thanks Ross > >> >>> +/* >>> + * External functions avalailable in mainline kernel. >> >> Nit: "available" > > Ack > > Thanks > >> >