Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 30CCC4F21D for ; Wed, 23 Oct 2024 03:33:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729654412; cv=none; b=n1SMfe1EroLTh+mUR6BT6rSLlbKO3pkJgDWXIpftVlH3y0h715/cN02fxN1GET06GeUmcQC7qVMOkkv4AdkY7VciPjNqnTRCZNxKKABmpt0J8YczqdP7FikswSAn/wZxi43/r+Lceu+/2Y1iwxgK1uU1QObCcicBAxlCW8iEwDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729654412; c=relaxed/simple; bh=ho6or0E3n/jVuK9PYenxCW+3VsheSIP0c4OklGmN1BI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iTtNuzddBJmE9VgdUPO1jlG/wTA/d5fir+3aMGK8pYBP7bjb5cgSw1EDD5Z3MY0TTaKFVYs40Lz3i95OKxiOyAk1Hl90TzU0Vs6yNalcANn5dOlDOrXhsGyH5N7Nu9+G1XaP0dMXZ2hqrGAf7HeAKbE21uMpeSgn7Hq1clDvz70= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KqQg6jnp; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KqQg6jnp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729654409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mRZWBQ8JLM/V4cYvC4juoQOMsBXfCfkszQvB4MEwP7s=; b=KqQg6jnpUDKAWaZFVXB7xGz7BCVu/WuqX7gUUSR7wEcHtS0fLaOp7lYebEpJe8Xj4HIpmN JspYAIHbLsYcLlfhFSSFQllXJiOO0J8DTcmcAR5Us9cQ//hXiAuLn4c7vZYtIjCb1y4ERX bJ9yU1dpXLuhhh3aqRSKoRfhuQh8w2k= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-486-pz812kQVN5aO0q0h7NTQsw-1; Tue, 22 Oct 2024 23:33:27 -0400 X-MC-Unique: pz812kQVN5aO0q0h7NTQsw-1 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2e2eba0efc6so6756862a91.3 for ; Tue, 22 Oct 2024 20:33:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729654406; x=1730259206; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mRZWBQ8JLM/V4cYvC4juoQOMsBXfCfkszQvB4MEwP7s=; b=B4BUuaL389H/wieHNdnrgkP26KC9KvixYi0OLgoVgRhv4gbTFmrWvLmA0DqC3REEp+ Ohq9R+WU2NpZMjYtFL+hvkU3fdiShekays+Zk5/qyW9bSAspn9YXKjuj7XwA7dNS022c Y/7DSpSA2zXZrRou99R1wX0oIou1efIWHNU87PT297Zez6DR8BdUO5VM6A4FCKLHV8WP JsrIw0o+7OhxaT26kg1ADnVz1MLsJtY7Nt4ALg1emV4AvTYLwbKK0NELR1toKiiisliN iag7RRQbnv1bGx7tmNjhcctOEz03nXfW/kcSqCzwAa/HZMhHEgqzObdxDsCRF/jasTIR shHg== X-Forwarded-Encrypted: i=1; AJvYcCWv2ZFTpiAXd0cuV2EmhWQLH4MwMll3yOrJ1X9vgSWdzCDP/BdcxhxKMxmLJvb/g5649YMsY6Y=@lists.linux.dev X-Gm-Message-State: AOJu0YxUwTATbHqqToqNAt167UFv+Bmgellq3vPDouip1YsCzEPzhTYy 0r9GTeMVBCH+j6Syy7WREyllmft+vUpSP7eZIuinmh6almebJnIXMsFtlNwwPIu3Fq6sMKoZjSX wuteOZ1SdhLbZJKI7Lacc48jTCInW9r+vawbuSjSSQJUVKfrHooSvZg== X-Received: by 2002:a17:90a:6284:b0:2e2:b45f:53b4 with SMTP id 98e67ed59e1d1-2e76b6e4998mr1205473a91.25.1729654406468; Tue, 22 Oct 2024 20:33:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEA0P1K9f5Kn6IEIXY9a0xjVIiT7iFfcbST/Ja7UAXbM4WNgnC2BgET2XvmKkP3UopQjPao7w== X-Received: by 2002:a17:90a:6284:b0:2e2:b45f:53b4 with SMTP id 98e67ed59e1d1-2e76b6e4998mr1205454a91.25.1729654406070; Tue, 22 Oct 2024 20:33:26 -0700 (PDT) Received: from [192.168.68.54] ([180.233.125.129]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e76dfb9b85sm278871a91.45.2024.10.22.20.33.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Oct 2024 20:33:25 -0700 (PDT) Message-ID: <2030d927-2c2d-4bbf-9228-34234ea935c0@redhat.com> Date: Wed, 23 Oct 2024 13:33:15 +1000 Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 10/11] virt: arm-cca-guest: TSM_REPORT support for realms To: Catalin Marinas , Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Sami Mujawar , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , 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: <20241017131434.40935-1-steven.price@arm.com> <20241017131434.40935-11-steven.price@arm.com> From: Gavin Shan In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/22/24 9:06 PM, Catalin Marinas wrote: > On Thu, Oct 17, 2024 at 02:14:33PM +0100, 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 >> --- >> Changes since v6: >> * Avoid get_cpu() and instead make the init attestation call using >> smp_call_function_single(). Improve comments to explain the logic. >> * Minor code reorgnisation and comment cleanup following Gavin's review >> (thanks!) > > Gavin, since most changes in v7 are based on your feedback, do you have > any more comments on this patch? I plan to push this series into -next > fairly soon. > Catalin, The series looks good to me and I don't have more comments. Thanks, Gavin