Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2809767pxa; Tue, 25 Aug 2020 04:05:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypqTQLNEaeiHXt9sR/+hRA2GPghEfirCovZjVNeWPpal9CIfZGypb0DoJUWRRIhxO/S0Es X-Received: by 2002:aa7:ccd5:: with SMTP id y21mr9364672edt.91.1598353548191; Tue, 25 Aug 2020 04:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598353548; cv=none; d=google.com; s=arc-20160816; b=CledaYrDch4d/0vEM6i5I3MKRsXMVQNi3Fv8D2cGaXdjMblrDqz0rXhNONP4ZDua7/ Jo16HGGOsxrcEJHeH8zRLEbGc29478O+NI7gAE+N1mXL4PumVaWvRIegyS3oFDc9uJfS 5AzvlwIpT+B2s1xWS7WUVLWwsjUsLlsK47KA91lak4w587Js7oltRzIZEcu949okUi9l BEkGLZjsOvXcUhq91ZQDlHtOXQFp0edpkLUSCFMNtwAKkA5l4q47CelRXxZJ98W51GWF fdpFSZXHKfYffLRZCsdVgy5RxBXLslPFz46bWhZn1UbMhO6lFkVdC6EjsZEzOUNdmJYI 5IhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=M3DtE2HDJMaftMHgyeELlhmPqaW7/VgBKsyLltgJBkY=; b=ZV0NGfgN4FShxSql2O/r+HsijVaQxavC2pGx03Y3UL6sb8L+CqlFCbWEQXh7PBOBxh kvU7C7u939K6va/c/yt+6yudTGuYW6/hxMTpRGw5uU2oV3wZZzq+FMqC5baelMHCxT+2 Kv7mTZMFQZ7ArobLbXgGtNlHdV/Omi/NNnghca1cEh8mQPyItXl7gnBOhkb4+6Z+q1hi 2HcZIlaZTi9zotJynZ7D38JUpTbn1CB5UwDGH+r7Hz/Aa1y6YWz/+3DfTu3EOy3YQsUQ eDhCfaHjU4jXkFaXms3Ffx6qg+xotrtMmmhQLPSgU3GLNc04r2HK20sY3lds/aB7vNgm WzOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bLUbdTQq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv22si3930047ejb.382.2020.08.25.04.05.23; Tue, 25 Aug 2020 04:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bLUbdTQq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729902AbgHYLEt (ORCPT + 99 others); Tue, 25 Aug 2020 07:04:49 -0400 Received: from mail.skyhub.de ([5.9.137.197]:54788 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729529AbgHYLEr (ORCPT ); Tue, 25 Aug 2020 07:04:47 -0400 Received: from zn.tnic (p200300ec2f0c5a0001535c65a93122e2.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:5a00:153:5c65:a931:22e2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id AEAED1EC0299; Tue, 25 Aug 2020 13:04:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1598353485; 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:in-reply-to:in-reply-to: references:references; bh=M3DtE2HDJMaftMHgyeELlhmPqaW7/VgBKsyLltgJBkY=; b=bLUbdTQqHXoJunltKk2lQ/8OSisXCWByt7CjiA/EG6fD8SiJ5w8owNkA/vwdkjt0o4JFdA hGvlX4TGZXnuGdSGbqcreYTAKxVCmwrnxnfiD+buOP9AE9EAlLGjP+eSW+W3udaoPbTYYn Xst5bBJiQsVyCEm46KyE3CCo0pkdJqA= Date: Tue, 25 Aug 2020 13:04:46 +0200 From: Borislav Petkov To: Joerg Roedel Cc: x86@kernel.org, Joerg Roedel , Tom Lendacky , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions Message-ID: <20200825110446.GC12107@zn.tnic> References: <20200824085511.7553-1-joro@8bytes.org> <20200824085511.7553-3-joro@8bytes.org> <20200824104451.GA4732@zn.tnic> <20200825092224.GF3319@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200825092224.GF3319@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2020 at 11:22:24AM +0200, Joerg Roedel wrote: > I don't think so, if I look at the history of these checks their whole > purpose seems to be to alert the developer/maintainer when their size > changes and that they might not fit on the stack anymore. But that is > taken care of in patch 1. Why? What's wrong with: BUILD_BUG_ON(sizeof(struct vmcb_save_area) != VMCB_SAVE_AREA_SIZE); BUILD_BUG_ON(sizeof(struct vmcb_control_area) != VMCB_CONTROL_AREA_SIZE); BUILD_BUG_ON(sizeof(struct ghcb) != PAGE_SIZE); ? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette