From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62F81C433E1 for ; Tue, 14 Jul 2020 10:25:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30B51217A0 for ; Tue, 14 Jul 2020 10:25:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="D/FtVt7M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30B51217A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jvI7U-0006mY-7O; Tue, 14 Jul 2020 10:25:04 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jvI7S-0006mT-QD for xen-devel@lists.xenproject.org; Tue, 14 Jul 2020 10:25:02 +0000 X-Inumbo-ID: 4638e6cc-c5bc-11ea-8496-bc764e2007e4 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4638e6cc-c5bc-11ea-8496-bc764e2007e4; Tue, 14 Jul 2020 10:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1594722302; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=EKq76JGCpX9JyuiBmD1RFZqcz2aaCNExo1bFMJfbehY=; b=D/FtVt7MOXBW7J2wbQM5HXhb5ZS2C+0RyxVNYa7K3RI3lgVd4M56UzNb bIlNAUix+182K5kKGDILbf+7640YUS1Xbqc5KeuAFbS1OYx6hoNXqqkRx cp+yy2ixQv1Py3Z8RU3L+ONFiE0q4P5GQ32UTjKiHDAfcTqLKOUulLmQ4 A=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: hRnzf6DI4KKkJSoRozZQ7nLmEmjCFGKgNJGqkc2ENhFFjm4CKsl4YzXWqDgQFfRFS3NnKPmz1D BU5ZfVEt7aWYlfWvWqQUdHOSKOgS8BdTDlTn/FcBt9G+1m4bFq3kW+4bGIcEdMWafGI0mqcdoe OIECEMFCT7hZ8osW1prnkM55uousRj3hP4FZ3I/kHx8MwINGTHcieb46u5r4xW9vpa3Tg7tmEE BKtu+RNP7bNGtxdxUA8ElveA2KCW+6nuThjq0H9DzPXO6JWR5S54qnwH9+trkiqCVRDx06k3e3 eRs= X-SBRS: 2.7 X-MesageID: 22313854 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,350,1589256000"; d="scan'208";a="22313854" Date: Tue, 14 Jul 2020 12:24:48 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Jan Beulich Subject: Re: [PATCH v2 2/7] x86/mce: add compat struct checking for XEN_MC_inject_v2 Message-ID: <20200714102448.GH7191@Air-de-Roger> References: <007679c8-84d5-2e91-e48e-68746741fb45@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <007679c8-84d5-2e91-e48e-68746741fb45@suse.com> X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Paul Durrant , George Dunlap , Andrew Cooper , Ian Jackson , "xen-devel@lists.xenproject.org" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wed, Jul 01, 2020 at 12:25:48PM +0200, Jan Beulich wrote: > 84e364f2eda2 ("x86: add CMCI software injection interface") merely made > sure things would build, without any concern about things actually > working: > - despite the addition of xenctl_bitmap to xlat.lst, the resulting macro > wasn't invoked anywhere (which would have lead to recognizing that the > structure appeared to have no fully compatible layout, despite the use > of a 64-bit handle), > - the interface struct itself was neither added to xlat.lst (and the > resulting macro then invoked) nor was any manual checking of > individual fields added. > > Adjust compat header generation logic to retain XEN_GUEST_HANDLE_64(), > which is intentionally layed out to be compatible between different size > guests. Invoke the missing checking (implicitly through CHECK_mc). > > No change in the resulting generated code. > > Fixes: 84e364f2eda2 ("x86: add CMCI software injection interface") > Signed-off-by: Jan Beulich LGTM, just one question below. > --- a/xen/tools/compat-build-header.py > +++ b/xen/tools/compat-build-header.py > @@ -19,6 +19,7 @@ pats = [ > [ r"(^|[^\w])xen_?(\w*)_compat_t([^\w]|$$)", r"\1compat_\2_t\3" ], > [ r"(^|[^\w])XEN_?", r"\1COMPAT_" ], > [ r"(^|[^\w])Xen_?", r"\1Compat_" ], > + [ r"(^|[^\w])COMPAT_HANDLE_64\(", r"\1XEN_GUEST_HANDLE_64(" ], Why do you need to match with the opening parenthesis? Is this for the #ifndef XEN_GUEST_HANDLE_64 instances? Don't they need to also be replaced with the compat types? Thanks, Roger.