From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B881CCFC50A for ; Mon, 14 Oct 2024 09:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To: Subject:Date:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Hj9ulef/ECGcrazQrOsCM2HA8rJXxjA+D3YADl+rRpc=; b=DGlCk0CpHV+1iu2jLI8yasq1I2 vQtPNtoTxBLrWqpj/KTQ3n1mP12y+NpcOjiC7VqJLTgBIjxJNZRE9EMaISpRy4kyD8Dw6j+KW9OY7 X86NL3gkGfgunTclDYuUQCv6Ei/T8oIgjHY8afpAr7599Pf88xXhddW/wC/lesolNcS3weX9xwO3M A9OgcsbUGlZhDWOfoxjf7w+WYO0eVAhPsPYjs19XXnlz9klDNDhn97Em/FQBoSVXb+nB6bYI0Lobh IH6zXvBLQvdAPvIxdoVB1T4daaJSXMeSjlRYQ5EFJiJp0alJ+fM1ejgqAuBeqhSLi2eBn3cMVbFpi JJk7U4dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0HBp-00000004TJZ-1tk4; Mon, 14 Oct 2024 09:16:33 +0000 Received: from mail-db8eur05on2062f.outbound.protection.outlook.com ([2a01:111:f403:2614::62f] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0GsT-00000004O7t-0syW for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2024 08:56:35 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=vIDd13cr9k4dt+8vCPwvH9Lm8cKktfZBe80zFKC2ZhxYMYcidm3U1R/97Jkhk7ufLcRmCWyz4aKvdzKnsds1K0Hk7r3EwuhjN5WfgfagbzxAYhjEL4de3LCDjrZnNVhn+OLHpwa8OWUIHaBXpIVpN1dnTOkSEGCwTo23wkbYxhJALMy+k7LW1is8LCleP1wxYvNzClgGKqfur9igGFL5Ecx7Q3OszkjGRm7dRh9d/24W8Yhzn2F28vBkDk2kutAh+L11kF+BClNZwHThWgKiId2VbqqsGPn7PgDHzVgg4A/fS4Z1IHgqmV5o2iVGP0zllbmOzlJb1ylm1NP+gE/1nw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Hj9ulef/ECGcrazQrOsCM2HA8rJXxjA+D3YADl+rRpc=; b=qm/YHO7y/3tEV23ddjkWUGjAqCfLmMG04BkiKcmqXoPThcKNe2I3tduyheOw4J0tQtp6aKpvvRA9h/8RdtlDpxzVUyD3W6ZZeSinbo0czGYquaZX5pxqaZjKd8/h+9TPwnkrrUJ01HyRmxO4N79pFkVH5WYgKBC6jbmHlwk+ghA6hG+fB6cvGrvQaZs+l/GBWMb0Lcju6XOJyizm5EYObUNiMYinBeAjaVE/v5ZZq5HslVGmaAYECcw5yeZEGHqOu7F0Y+shB9PHgHx0eHYDAFya8iRhfHndDk1fZfNw+ygiuAecXXGvbV+3OgefY4J9rk3/TD7x8EQJIlNos2OZvQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hj9ulef/ECGcrazQrOsCM2HA8rJXxjA+D3YADl+rRpc=; b=rqMJRPT5EZx2QuzL4Yv5JpE0/astDsMZ9ifWGxF57SqRajpOGKCw9fCYF6PrNs4a0yKXqwr/7g65Fy92aPcIDF3LXe4S8bj28ywxJr5QlgaxrBCbeL1LzP3U1/YNk81QTgWhg14Ye8vLyKhrHRAWqBhudXOuh47nrhyNQDCy3dw= Received: from DU2P251CA0004.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:230::14) by AS8PR08MB9020.eurprd08.prod.outlook.com (2603:10a6:20b:5c0::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.21; Mon, 14 Oct 2024 08:56:24 +0000 Received: from DB5PEPF00014B8E.eurprd02.prod.outlook.com (2603:10a6:10:230:cafe::57) by DU2P251CA0004.outlook.office365.com (2603:10a6:10:230::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27 via Frontend Transport; Mon, 14 Oct 2024 08:56:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5PEPF00014B8E.mail.protection.outlook.com (10.167.8.202) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Mon, 14 Oct 2024 08:56:24 +0000 Received: ("Tessian outbound cd6aa7fa963a:v473"); Mon, 14 Oct 2024 08:56:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5604085107f330c0 X-TessianGatewayMetadata: W6TcyfcGyEb/Vei9lv8HJAMQDmox2ER3Xj/Q7v5gcGrudAF4tophR2DDHYk4E6jgVVNIlXoPhPV/+dWEfjKObt1KDzMDejO3FdOAh6NXlXzi9I06h/kh78ZIQqqHgmF4oMJIvLS2Mmh6DFpY3NgQn/CNty9XeonbYn1R2R1b4VU= X-CR-MTA-TID: 64aa7808 Received: from L7b83a0262f09.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5C623BA8-42A4-41E5-B140-CC887C14EC62.1; Mon, 14 Oct 2024 08:56:11 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L7b83a0262f09.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 14 Oct 2024 08:56:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yV2WQoR6LbK0ThR5Iiv1bo/S/tBCuPV+EE/kqW0CEk8qoGCtCQj7r60KP8cMGmlziO4uM0g1u0AC6TzaJ9YmFPlq8+8TreTV33G440xsMHF1gRyxX7DifWCAamanuTyU1fDCADAxRWWLWmgIacnUQDsRYerLRILoRgGKAEkoYDrp/caqPoE71PFzM2igjvn4F0X7O3Ukv4uzhHb9zK9QAKIOC2FTdMIy80ypWNrOS6cLMIiySIawJ0Gt+UXIy6Uong+CI4fV0Td0+ser5S2Yr8W5LkAmWxOSngSKVN5ZFvIJE2xE3rJH5j8ldpoR3GujviV9EiaKyRGO/n4u+EDkRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Hj9ulef/ECGcrazQrOsCM2HA8rJXxjA+D3YADl+rRpc=; b=vOOfVkOUWcavzruWP2vIUJCxzIIZP04ZfTnA624yscqa4BpUBXDAjNOTi02JPueerX3aLW/CJZC3jh9Fb1OjkxwlyNh2yTsk9j6sfDuYIyN+TCsGNIh+/Xbz/z5vZJdI28OsmJnp1r3cicqZwOAQbyuPmvq5EaFaTYwJV0u3HHV6d+XE2DTSj+eLX1a1jccIGkm/l+fdg+sj5exLQWe/GFPmdKvdnP9oc/E6ZvuY8eOz9ShPD0nTwhyhAOtI9Dk8/xLQJWEAnOuZTj50S+KsYnsLLawFoJ8q5cJAo/WlknmTEgRVMaBMY/di8bWX2+JSc337Bquct5eiqs6Ype4tbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hj9ulef/ECGcrazQrOsCM2HA8rJXxjA+D3YADl+rRpc=; b=rqMJRPT5EZx2QuzL4Yv5JpE0/astDsMZ9ifWGxF57SqRajpOGKCw9fCYF6PrNs4a0yKXqwr/7g65Fy92aPcIDF3LXe4S8bj28ywxJr5QlgaxrBCbeL1LzP3U1/YNk81QTgWhg14Ye8vLyKhrHRAWqBhudXOuh47nrhyNQDCy3dw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from GVXPR08MB7727.eurprd08.prod.outlook.com (2603:10a6:150:6b::6) by VI1PR08MB10297.eurprd08.prod.outlook.com (2603:10a6:800:1be::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.25; Mon, 14 Oct 2024 08:56:05 +0000 Received: from GVXPR08MB7727.eurprd08.prod.outlook.com ([fe80::9672:63f7:61b8:5469]) by GVXPR08MB7727.eurprd08.prod.outlook.com ([fe80::9672:63f7:61b8:5469%7]) with mapi id 15.20.8048.020; Mon, 14 Oct 2024 08:56:04 +0000 Message-ID: <11cff100-3406-4608-9993-c29caf3d086d@arm.com> Date: Mon, 14 Oct 2024 09:56:01 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 10/11] virt: arm-cca-guest: TSM_REPORT support for realms Content-Language: en-GB To: Gavin Shan , Steven Price , kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: Sami Mujawar , Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Shanker Donthineni , Alper Gun , Dan Williams , "Aneesh Kumar K . V" References: <20241004144307.66199-1-steven.price@arm.com> <20241004144307.66199-11-steven.price@arm.com> <5a3432d1-6a79-434c-bc93-6317c8c6435c@redhat.com> <6c306817-fbd7-402c-8425-a4523ed43114@arm.com> <7a83461d-40fd-4e61-8833-5dae2abaf82b@arm.com> <5999b021-0ae3-4d90-ae29-f18f187fd115@redhat.com> From: Suzuki K Poulose In-Reply-To: <5999b021-0ae3-4d90-ae29-f18f187fd115@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0197.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:318::13) To GVXPR08MB7727.eurprd08.prod.outlook.com (2603:10a6:150:6b::6) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: GVXPR08MB7727:EE_|VI1PR08MB10297:EE_|DB5PEPF00014B8E:EE_|AS8PR08MB9020:EE_ X-MS-Office365-Filtering-Correlation-Id: 936371c6-0711-42c5-0a07-08dcec2e14be x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|7416014|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?d2xIbC9oQkpQc3FKc0M1MEVuNWhUU3pGWmovS3d1UkxPcGJDb2t4ZVJ2ZXBk?= =?utf-8?B?K29SZzFtT3dFZFo5WGxIbG9IQ1NGR2U1M0NPYlgzZ1dKNnBNZktUTm1Tak1K?= =?utf-8?B?TFpqbXorWjVVOVVzelhvOEpCR3ZRYS9BOVl6SXRJSitlak11SXFhd1lQRG1M?= =?utf-8?B?OVlyZzVTc3h2cjlmOUhOSGgySzRsSHh6S0NURG5GbzNadlJsTnpadE03aWRV?= =?utf-8?B?NWtDN0JwOENpNGt0SU12MWJWZkprWDFwbElBb21qMnYrR0hhaDBFQnZpZkxM?= =?utf-8?B?aVFHOExzNWJydzY5NUc3R24zUGE2cDRiUEVFbVVSelBNMUtOdUl5REt6WnNG?= =?utf-8?B?MEdrdWswWXFESURkMDFYd2liZFFpd3VweW8wRTZaOFArNkh5SjA1TnFTRERC?= =?utf-8?B?VlEzY0syOVYzZDNsbU56UllRamYyUFh1ZDJxOGxxcEhLaHFkc2NMNU9VdlRR?= =?utf-8?B?a1dHTlJxOE0yZXN5d1ptem5NS1IzVy9xUkx5b2hUZmx1c1c0UGkrOEFVcDBw?= =?utf-8?B?WUF1cVhmVTdqOEJ6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RGZnhDdE5vdlU3TGFuQ3JWT3M5RGFJN3hsWFdwMHpDaXExMldPUUdtd1BZ?= =?utf-8?B?S3ZEc2RKUjlrbUxJdTlyMUVmb2pZTFhoWWlxbE1ldUNNelNkY010eFJXZmhL?= =?utf-8?B?b245bUE2SnpJQUt6d1M4NTZPcEZOK1NJRmFBOWJXT3pIRDJQRkllUlgrSG8w?= =?utf-8?B?ZjN6YXlVcDVqRUtGaUx0dFJ2bzlHK1p6a1JON056TTU4c3ZrUUFtZ1huSUdn?= =?utf-8?B?WG95TnFTOWgwQjNBUzNqTGdYMksvT3pEQWtNYUZxTWVXMHozU1B1dkRnPT0=?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GVXPR08MB7727.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10297 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:150:6b::6];domain=GVXPR08MB7727.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B8E.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c84eb775-37d5-4ef3-5296-08dcec2e08fc X-Microsoft-Antispam: BCL:0;ARA:13230040|35042699022|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OEF0RmJyK2oraWZ5MGZDZytESUNYeSszaFdmZ2s4V24xUExwSEVCZGIrRmt4?= =?utf-8?B?SWxvbzZ0QTVXa2tIaTFxR0xBQUpSa2d6Qkk4aE9mS04zZnlPMWxzLzFmdVQr?= =?utf-8?B?YkV6TnZNWkVpOGJrY2tJN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P:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230040)(35042699022)(82310400026)(376014)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 08:56:24.0261 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 936371c6-0711-42c5-0a07-08dcec2e14be X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B8E.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9020 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_015633_813010_7EEE0191 X-CRM114-Status: UNSURE ( 7.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/10/2024 07:06, Gavin Shan wrote: > On 10/12/24 2:22 AM, Suzuki K Poulose wrote: >> On 11/10/2024 15:14, Steven Price wrote: >>> On 08/10/2024 05:12, Gavin Shan wrote: >>>> On 10/5/24 12:43 AM, Steven Price wrote: >>>>> From: Sami Mujawar >>>>> >>>>> Introduce an arm-cca-guest driver that registers with >>>>> the configfs-tsm module to provide user interfaces for >>>>> retrieving an attestation token. >>>>> >>>>> When a new report is requested the arm-cca-guest driver >>>>> invokes the appropriate RSI interfaces to query an >>>>> attestation token. >>>>> >>>>> The steps to retrieve an attestation token are as follows: >>>>>     1. Mount the configfs filesystem if not already mounted >>>>>        mount -t configfs none /sys/kernel/config >>>>>     2. Generate an attestation token >>>>>        report=/sys/kernel/config/tsm/report/report0 >>>>>        mkdir $report >>>>>        dd if=/dev/urandom bs=64 count=1 > $report/inblob >>>>>        hexdump -C $report/outblob >>>>>        rmdir $report >>>>> >>>>> Signed-off-by: Sami Mujawar >>>>> Signed-off-by: Suzuki K Poulose >>>>> Signed-off-by: Steven Price >>>>> --- >>>>> v3: Minor improvements to comments and adapt to the renaming of >>>>> GRANULE_SIZE to RSI_GRANULE_SIZE. >>>>> --- >>>>>    drivers/virt/coco/Kconfig                     |   2 + >>>>>    drivers/virt/coco/Makefile                    |   1 + >>>>>    drivers/virt/coco/arm-cca-guest/Kconfig       |  11 + >>>>>    drivers/virt/coco/arm-cca-guest/Makefile      |   2 + >>>>>    .../virt/coco/arm-cca-guest/arm-cca-guest.c   | 211 ++++++++++++ >>>>> ++++++ >>>>>    5 files changed, 227 insertions(+) >>>>>    create mode 100644 drivers/virt/coco/arm-cca-guest/Kconfig >>>>>    create mode 100644 drivers/virt/coco/arm-cca-guest/Makefile >>>>>    create mode 100644 drivers/virt/coco/arm-cca-guest/arm-cca-guest.c > > [...] > >>>>> +/** >>>>> + * arm_cca_report_new - Generate a new attestation token. >>>>> + * >>>>> + * @report: pointer to the TSM report context information. >>>>> + * @data:  pointer to the context specific data for this module. >>>>> + * >>>>> + * Initialise the attestation token generation using the challenge >>>>> data >>>>> + * passed in the TSM descriptor. Allocate memory for the attestation >>>>> token >>>>> + * and schedule calls to retrieve the attestation token on the >>>>> same CPU >>>>> + * on which the attestation token generation was initialised. >>>>> + * >>>>> + * The challenge data must be at least 32 bytes and no more than 64 >>>>> bytes. If >>>>> + * less than 64 bytes are provided it will be zero padded to 64 >>>>> bytes. >>>>> + * >>>>> + * Return: >>>>> + * * %0        - Attestation token generated successfully. >>>>> + * * %-EINVAL  - A parameter was not valid. >>>>> + * * %-ENOMEM  - Out of memory. >>>>> + * * %-EFAULT  - Failed to get IPA for memory page(s). >>>>> + * * A negative status code as returned by >>>>> smp_call_function_single(). >>>>> + */ >>>>> +static int arm_cca_report_new(struct tsm_report *report, void *data) >>>>> +{ >>>>> +    int ret; >>>>> +    int cpu; >>>>> +    long max_size; >>>>> +    unsigned long token_size; >>>>> +    struct arm_cca_token_info info; >>>>> +    void *buf; >>>>> +    u8 *token __free(kvfree) = NULL; >>>>> +    struct tsm_desc *desc = &report->desc; >>>>> + >>>>> +    if (!report) >>>>> +        return -EINVAL; >>>>> + >>>> >>>> This check seems unnecessary and can be dropped. >>> >>> Ack >>> >>>>> +    if (desc->inblob_len < 32 || desc->inblob_len > 64) >>>>> +        return -EINVAL; >>>>> + >>>>> +    /* >>>>> +     * Get a CPU on which the attestation token generation will be >>>>> +     * scheduled and initialise the attestation token generation. >>>>> +     */ >>>>> +    cpu = get_cpu(); >>>>> +    max_size = rsi_attestation_token_init(desc->inblob, >>>>> desc->inblob_len); >>>>> +    put_cpu(); >>>>> + >>>> >>>> It seems that put_cpu() is called early, meaning the CPU can go away >>>> before >>>> the subsequent call to arm_cca_attestation_continue() ? >>> >>> Indeed, good spot. I'll move it to the end of the function and update >>> the error paths below. >> >> Actually this was on purpose, not to block the CPU hotplug. The >> attestation must be completed on the same CPU. >> >> We can detect the failure from "smp_call" further down and make sure >> we can safely complete the operation or restart it. >> > > Yes, It's fine to call put_cpu() early since we're tolerant to error > introduced > by CPU unplug. It's a bit confused that rsi_attestation_token_init() is > called > on the local CPU while arm_cca_attestation_continue() is called on same CPU > with help of smp_call_function_single(). Does it make sense to unify so > that > both will be invoked with the help of smp_call_function_single() ? > >     int cpu = smp_processor_id(); > >     /* >      * The calling and target CPU can be different after the calling > process >      * is migrated to another different CPU. It's guaranteed the > attestatation >      * always happen on the target CPU with smp_call_function_single(). >      */ >     ret = smp_call_function_single(cpu, > rsi_attestation_token_init_wrapper, >                                    (void *)&info, true); Well, we want to allocate sufficient size buffer (size returned from token_init()) outside an atomic context (thus not in smp_call_function()). May be we could make this "allocation" restriction in a comment to make it clear, why we do it this way. Suzuki >     if (ret) { >         ... >     } > > Thanks, > Gavin >