[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] x86/altcall: Check and optimise altcall targets


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 1 Dec 2021 09:10:27 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eH/WZPnoCVjz/Y0ISwhQODDksANkbevXxED+MVLmilc=; b=oOO93rmjFlszZTkfQMNnFfjANvcPMVbBvCIpBpjYo0YK6QJkVkfiLUEFbruKlrLKSXkXTs+tHlGEScFNoCpwLolLn4BVEnrzF8IlpZzpSp+d7O72w3wNCRblstMmanwyRHZtuHFB3LrY2AXhkItISmnXEJZ+osVm8hDy5BH/1RKbVVsu2jrP4OMeABJg+aA1DGFTsWboFpNP4Hqp95uFNDH15OrFFNjyINJRooDwYX5pdmw6wLk2WKWW1KlITFC6h/T/3BBasUIjOQJ94ZgXCXsWjzSEKQFyjun9/tHvUCi2QhwEabtiiv3O5kkCcpm71nXlY4NqAMdh7jiymPeTDw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q1OQatTMRxjrJId4RtKwT7QQYXv0p91ypJauCbdYUlu+h2aiX7xpIu8rUPXRoLv4mKVIfYsTdyHn0Ryvs4l2sFQ+kXn2qci8olCUcX9tFvdML+NPyPuB/05a/tkuBTDap0P4HcY3nwjE0Vak2bBLy0veMjzLQ/sC296jhxJ0LKwKBX+oeniwJIwvcPBFcadJ9OJf7riHPlyQVSKftTq8RWOFF15LdasxXvDmcFpILo6adKaR+bu9BdmSCrN6ub4pacY2/RIzq3H+KPCgTEs8wTy5XOyARMIF9eGIybgoTlijTrX4fLzVGKnaxU4/xaIfYVObVrSpsFGb2bmTpBHG4Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 01 Dec 2021 08:10:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.11.2021 22:22, Andrew Cooper wrote:
> @@ -279,6 +280,27 @@ static void init_or_livepatch _apply_alternatives(struct 
> alt_instr *start,
>  
>                  if ( dest )
>                  {
> +                    /*
> +                     * When building for CET-IBT, all function pointer 
> targets
> +                     * should have an endbr64 instruction.
> +                     *
> +                     * If this is not the case, leave a warning because
> +                     * something is wrong with the build.
> +                     *
> +                     * Otherwise, skip the endbr64 instruction.  This is a
> +                     * marginal perf improvement which saves on instruction
> +                     * decode bandwidth.
> +                     */
> +                    if ( IS_ENABLED(CONFIG_HAS_CC_CET_IBT) )
> +                    {
> +                        if ( is_endbr64(dest) )

I would have given my R-b, but I don't see where is_endbr64() is coming
from, and you don't list any prereqs here or in the cover letter. I'm
afraid I don't fancy going hunt for it in the many other pending patches.
Hence only on the assumption that the helper has got introduced before:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.