Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1142172rwr; Thu, 27 Apr 2023 13:01:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7FhrJMhHNAabnM/9T6GTRu7fBwRZen3vWo6b63+nRGcumw9PJwXJOAA7hbULSmcDiJ5Vpe X-Received: by 2002:a05:6a20:32a9:b0:f2:ad27:f98a with SMTP id g41-20020a056a2032a900b000f2ad27f98amr2538966pzd.14.1682625672686; Thu, 27 Apr 2023 13:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682625672; cv=none; d=google.com; s=arc-20160816; b=QpmIDbfZOEA1ssczosJVR7hrzMflsdaN1X1WcK5nuewVi86pWfo3XeWNgbPcVvepZc 28lpxAlTLQn6gDGX997GeytErto3Un/OsBvYPK9fBfbD+GVBFdw8aayEp7cIwXKxSxDq as1k8UaX3cKFVkpD8M1GaFe93buoZ9DrohpPXgoUWu3r/aV5wey4UMsgehRqElTmLzNd mpIoCEYb5tHhi8JfUN3WlURGbteUnc9eGQO3f/N9SaXBHZd2X020L90i77QoKxt2/zMA 8G61Sxj91knPiMfPcp2vHv8Q4EJSBwm8TLJjl4xLus6ejMe8cciCQSuHdnnttbPeoycg dqCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=jTenkZlfDHYMjhA4EnoiO96K/n00c9OrPi7z9/YnYPY=; b=oRMiHHWEqazwZzIWvRKJDjfFT8jf9EZ/IeBmjPeNlWyjJVl6FsPTeKkynrUHByAI1D BeVgwLwXtawpTYMVqFZ2Pd23oj8WVegU0zc9K2jof3ydgtMnMtVnJHt/B46zryiy7NEd gfZp6USjLWv7BDrahDec0go+k+pagcav9NZLQNnHEbD+fofK4qNdleVW2U1Be9EqIk35 q69gqqvOI4xpCV7S3W46Rbswv0w6gHIxEuCXRyrwKcfh1q8Q6HP/Rgj9Ys4ceD8dt+P9 gSzLVcEjcmiGKnTe3gYTXTld4XyC0n+lg5dag0A5D7FqU/61a2dwZuk0xoFu72THQYVK fusg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N47z1GSY; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h186-20020a636cc3000000b00524b02cbbc9si19161873pgc.835.2023.04.27.13.00.58; Thu, 27 Apr 2023 13:01:12 -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=@intel.com header.s=Intel header.b=N47z1GSY; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344056AbjD0TyC (ORCPT + 99 others); Thu, 27 Apr 2023 15:54:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjD0TyB (ORCPT ); Thu, 27 Apr 2023 15:54:01 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F2CC1FD0; Thu, 27 Apr 2023 12:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682625240; x=1714161240; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=xrpkglXBXdbRV9vHfNaD13CAR/JYQfpf3YtjUI/QnLs=; b=N47z1GSYJfe1JwaHTEQ95lZBZ5PvUXVVLW4faM3mnNVDB36zA0e5/7mR 7eoTgaKrGUS3Y+tZQITNVIqnvSvu/2ZvKVpqLL6ZLkW4sOAxjY1c77MGY EkorYG1laZPAd1yN/0qwWkSNqhl2gwetx69YtM5v7Oidx7jr8uKzWipfS zCHvDvuPra5407EZdUEr7ZPIeuD8KddJjpnQ9RSwqbAft43BbrnMubbVK rf06vHKvyBnHrcagZ3x7Vgpi40RJMLXAfLqGh2Fkrgk7GeEZ0pT5c/9mx /2Tne53rNIg38+dvJSd6OMc/cSKuN5VXKGNvHjk0BT8dCVWWG/IfWuw9G Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="410614059" X-IronPort-AV: E=Sophos;i="5.99,232,1677571200"; d="scan'208";a="410614059" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 12:53:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="725068190" X-IronPort-AV: E=Sophos;i="5.99,232,1677571200"; d="scan'208";a="725068190" Received: from jonnaman-mobl2.amr.corp.intel.com (HELO [10.212.24.30]) ([10.212.24.30]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 12:53:58 -0700 Message-ID: <10248ba6-c5d4-47dd-03e0-0500d4c4a621@intel.com> Date: Thu, 27 Apr 2023 12:53:52 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 3/3] selftests/tdx: Test GetQuote TDX attestation feature Content-Language: en-US To: Dionna Amalie Glaze , Kuppuswamy Sathyanarayanan Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan , Jonathan Corbet , "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Wander Lairson Costa , Erdem Aktas , Chong Cai , Qinkun Bao , Guorui Yu , Du Fan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org References: <20230413034108.1902712-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20230413034108.1902712-4-sathyanarayanan.kuppuswamy@linux.intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 4/26/23 08:47, Dionna Amalie Glaze wrote: >> +/* Helper function to get TDREPORT */ >> +long get_tdreport0(int devfd, struct tdx_report_req *req) >> +{ >> + int i; >> + >> + /* Generate sample report data */ >> + for (i = 0; i < TDX_REPORTDATA_LEN; i++) >> + req->reportdata[i] = i; >> + > Shouldn't req be zeroed before populating reportdata? We wouldn't want > uninitialized memory to leave the guest. I know this is just a test, > but it's best to model good practices for anyone that might > copy/paste. It's leaving the guest and going to the TDX module. What's the problem there?