All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <amc96@srcf.net>
To: Jan Beulich <jbeulich@suse.com>,
	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 10:20:06 +0000	[thread overview]
Message-ID: <f1a7edd8-c46a-b857-fe5d-b4eaf962808f@srcf.net> (raw)
In-Reply-To: <e3bee553-9443-2f3c-095b-4d6151a07c5d@suse.com>

On 01/12/2021 08:10, Jan Beulich wrote:
> 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>

Oh sorry - this series is based on the CET-IBT series, which adds
CONFIG_HAS_CC_CET_IBT and is_endbr64().

~Andrew


  reply	other threads:[~2021-12-01 10:20 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
2021-12-01 10:20     ` Andrew Cooper [this message]
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=f1a7edd8-c46a-b857-fe5d-b4eaf962808f@srcf.net \
    --to=amc96@srcf.net \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.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.