Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1517430rwn; Thu, 8 Sep 2022 22:38:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6/Hvyl4VAQn7xYChEA9ek5JwpsNxaDxjVPc94mUT08Vfiyb6Ti0JZ7ZrKMbesc7P9SEhFZ X-Received: by 2002:a05:6512:1392:b0:48d:a6b7:caff with SMTP id p18-20020a056512139200b0048da6b7caffmr3961133lfa.154.1662701914006; Thu, 08 Sep 2022 22:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662701914; cv=none; d=google.com; s=arc-20160816; b=WBNT2h+fSUJaqyZMKIf+IfLWB6X+9a1T39EB2CrH29EAFFx7HT38+fRGMVmtrKhH+F Gtd7aU55SyrBPZKj7qtkCy7ksMhM13nGNPheItixWLMR9Zd/ywGzrCN9+NIkpGcLWmBf xpsUzYToUNHNOK/eYAqR3xAoG2lSOueRU9tlfGU35CWg6siFLmiaV81pXOa4Rhw+5O+I KFWpuaxahVfknFzxOVOr5WgY8HPwYPWfuhj/akLXpW9NVu0Rx2lZ0kcTpRg7waPz7a1+ EKB1skE9/LNTz37zRPatf6Pjj7p4NIMyrbEi0JpO0GwZr+IWNTkl049pxrw4yNzO0JBI 4q3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/ORMUduBR3U4g92bWvN6Igi54QWFMX6kF5mjXqV84qo=; b=lfPxTg6IruJdArMwP0abBgVxthSl9vy+5tC30KjlIuLwSvSpTeUEfkLbDdvQo9/AVV ZiPLO4iznmf3Mb23pzbz60n8AcNgO41LetcOEHfJXVtCuf/N+mqjkqd4SfA/NI6ekHZW gxX47ZKWDB0Vv7fPk9QkGwgGUv8Le3F6POrfk7p0vgFx0Z3pL0u6k4BtnK+56kToFrZ6 NVRACKiQHj0ED6FSly5I72N1nCF8p/5gPYXVTPU48e9yLFEaKUPpL+IpwztK7Hbwo5ha Vmv/XsrQgay7qUKbb+T90F1DZav1W0uyiMopq1tTt7suenD260+vySEZWVoct5cBvMvk Ghog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T8+KLjZ4; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t26-20020a2e781a000000b0026bda5b2462si405034ljc.119.2022.09.08.22.38.05; Thu, 08 Sep 2022 22:38:33 -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=@linuxfoundation.org header.s=korg header.b=T8+KLjZ4; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230218AbiIIFZe (ORCPT + 99 others); Fri, 9 Sep 2022 01:25:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229765AbiIIFZb (ORCPT ); Fri, 9 Sep 2022 01:25:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2486C11B768; Thu, 8 Sep 2022 22:25:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B6D7060E73; Fri, 9 Sep 2022 05:25:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96C6EC433D6; Fri, 9 Sep 2022 05:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662701127; bh=5ucUGip+DuD7iH3WnYKRFd1earxVUc3d4+Vs7Qq1gho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T8+KLjZ4ExVBBh2HkIR5lmVDmr+zJwSD3kOC1eOcKi684sRhK/GHAnCBjpnQ0lcZ3 qvsu4+sRjQZW7DFZAGWE/t3MQOE73jX3htBrZqP0DFs+N63OjMkOEWN/Tp2e15OnYU BOHr+DD1q9WRaHIK9K9d8VpskSEJ/W0BTYuistkI= Date: Fri, 9 Sep 2022 07:25:24 +0200 From: Greg Kroah-Hartman To: Sathyanarayanan Kuppuswamy Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan , "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , Kai Huang , Wander Lairson Costa , Isaku Yamahata , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v12 1/3] x86/tdx: Add TDX Guest attestation interface driver Message-ID: References: <20220908002723.923241-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220908002723.923241-2-sathyanarayanan.kuppuswamy@linux.intel.com> <49f7bb67-2f4f-8e06-5420-5b279fdf3199@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49f7bb67-2f4f-8e06-5420-5b279fdf3199@linux.intel.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 Thu, Sep 08, 2022 at 04:53:18PM -0700, Sathyanarayanan Kuppuswamy wrote: > Hi Dave/Greg, > > On 9/7/22 10:31 PM, Greg Kroah-Hartman wrote: > > On Wed, Sep 07, 2022 at 05:27:20PM -0700, Kuppuswamy Sathyanarayanan wrote: > >> + /* > >> + * Per TDX Module 1.0 specification, section titled > >> + * "TDG.MR.REPORT", REPORTDATA length is fixed as > >> + * TDX_REPORTDATA_LEN, TDREPORT length is fixed as > >> + * TDX_REPORT_LEN, and TDREPORT subtype is fixed as > >> + * 0. Also check for valid user pointers. > >> + */ > >> + if (!req.reportdata || !req.tdreport || req.subtype || > >> + req.rpd_len != TDX_REPORTDATA_LEN || > >> + req.tdr_len != TDX_REPORT_LEN) > >> + return -EINVAL; > > > > You never verify that your reserved[7] fields are actually set to 0, > > which means you can never use them in the future :( > > > > Please fix that up, thanks. > > Would you prefer a new posting (v12.1 or v13) with this change, or do you > want to continue the review in the same version? What would you want to see happen if you were a reviewer? (hint, new version...)