From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 8CC593B8BD7 for ; Thu, 3 Sep 2026 06:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788415562; cv=none; b=MdIq47afenEm0GBgzH+hWYeA51g7Kv+qw1+U+aCt4egmfwTlWXJqRf5UTeTnc2+IICBvtWTuyCA3wkcR28W07FEfvFJ7M8NpexVV++8dFoRCa8FlgzSPA55udHRznGfOtAwqeGl/bdhYCeaz9oiDmLvkk1Wfqaxdj50dI/xyWXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788415562; c=relaxed/simple; bh=B70DJXAyrZs3n8KEV4Ve18c1Zr60DkbgGI/KipnMe8U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jzPmgUt1DqkiRzIyWkC+kKhOhaKwZXBdm3FMut6p1Tjeauum+EVLXZyFVqO8lZ/TQ2i8Ha1T38kob4HxiWsBWW9Cp60oh41Cy7imJi7O1NT95AylUlZup4H0fAAlfEowjPDxsI8jYpr43tejqD/rWW0WnD15tKNuXsPSLFhX5wE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=W6Uxi8RB; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="W6Uxi8RB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788415562; x=1819951562; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=B70DJXAyrZs3n8KEV4Ve18c1Zr60DkbgGI/KipnMe8U=; b=W6Uxi8RBxzsk1HKOZrcN8jxh40VRQP9206D5Pckx/X78SCt+2Rfj4Uwk eTvwonyUYUn4JWBJ2ble/a7ptgvuAIxx3YXLYzQ4NF2NbhJeoPO+KK4w8 DWk2m89HNc7FFvz/uKptQ2kwQ0aFdaVZus958kSevt0hSWq5PjWfGP9ra 08jO9LhdTRgsi98QoI2+WeFOB5eIq26gy5zQyVNgUkM22fWHrd5GbWf3j 3+mfMh1LpSjp7KSq5PF+BLh+sy/MdcoItVrXppnEPup8sj4ZLyT/yH4lj 8smv8VnZHfRAj888Oe+CdgTnFOkV6n5PAjrqHN8YIim8IUOovh+HTDr8O A==; X-CSE-ConnectionGUID: NwQ0LyCHT6Cbrssw0gpzzA== X-CSE-MsgGUID: xyRqqXlHTYeXwlmly4mkZw== X-IronPort-AV: E=McAfee;i="6800,10657,11894"; a="99483707" X-IronPort-AV: E=Sophos;i="6.25,258,1779174000"; d="scan'208";a="99483707" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2026 23:06:01 -0700 X-CSE-ConnectionGUID: UwGkrInBSUq2k7MaOXY8bQ== X-CSE-MsgGUID: ir/k+9IvS4yDnkpFJvHuOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,258,1779174000"; d="scan'208";a="266372074" Received: from mjarzebo-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.231]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2026 23:05:56 -0700 Date: Thu, 3 Sep 2026 09:05:53 +0300 From: Tony Lindgren To: Peter Fang Cc: Dave Hansen , Kiryl Shutsemau , Rick Edgecombe , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org, Xiaoyao Li , Binbin Wu Subject: Re: [PATCH v3 2/4] virt: tdx-guest: Calculate the Quote buffer size safely Message-ID: References: <20260729122939.1340412-1-peter.fang@intel.com> <20260729122939.1340412-3-peter.fang@intel.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260729122939.1340412-3-peter.fang@intel.com> On Wed, Jul 29, 2026 at 05:29:32AM -0700, Peter Fang wrote: > struct tdx_quote_buf has a trailing flexible array member. > struct_size_t() calculates the size of this kind of struct safely. It > handles overflow, which is an important property since the Quote size > comes from the host. > > Use it in place of the fixed length limit. Reviewed-by: Tony Lindgren