All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 1/4] x86/altcall: Check and optimise altcall targets
Date: Wed, 1 Dec 2021 09:10:27 +0100	[thread overview]
Message-ID: <e3bee553-9443-2f3c-095b-4d6151a07c5d@suse.com> (raw)
In-Reply-To: <20211126212258.7550-2-andrew.cooper3@citrix.com>

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@suse.com>

Jan



  reply	other threads:[~2021-12-01  8:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 21:22 [PATCH 0/4] x86: Further harden function pointers Andrew Cooper
2021-11-26 21:22 ` [PATCH 1/4] x86/altcall: Check and optimise altcall targets Andrew Cooper
2021-12-01  8:10   ` Jan Beulich [this message]
2021-12-01 10:20     ` Andrew Cooper
2021-11-26 21:22 ` [PATCH 2/4] x86/altcall: Optimise away endbr64 instruction where possible Andrew Cooper
2021-12-01  8:20   ` Jan Beulich
2021-12-01 19:07     ` Andrew Cooper
2021-12-02  8:01       ` Jan Beulich
2021-12-03 18:41         ` Andrew Cooper
2021-11-26 21:22 ` [PATCH 3/4] xen/xsm: Use __init_data_cf_clobber for xsm_ops Andrew Cooper
2021-12-01  8:21   ` Jan Beulich
2021-12-03 10:32   ` Daniel P. Smith
2021-11-26 21:22 ` [PATCH 4/4] x86/ucode: Use altcall, and __initdata_cf_clobber Andrew Cooper
2021-12-01  8:23   ` Jan Beulich
2021-12-01 19:12     ` Andrew Cooper
2021-11-29  8:51 ` [PATCH 0/4] x86: Further harden function pointers Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3bee553-9443-2f3c-095b-4d6151a07c5d@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.