From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] x86/alternatives: fix .init section reference in _apply_alternatives()
Date: Tue, 9 Apr 2024 13:56:16 +0100 [thread overview]
Message-ID: <c7d7452f-7a3c-4269-9e68-081e2c38aea1@citrix.com> (raw)
In-Reply-To: <20240409125046.60382-1-roger.pau@citrix.com>
On 09/04/2024 1:50 pm, Roger Pau Monne wrote:
> The code in _apply_alternatives() will unconditionally attempt to read
> __initdata_cf_clobber_{start,end} when called as part of applying alternatives
> to a livepatch payload.
When CET-IBT is active.
In practice this narrows the impact to ADL/RPL and SPR/EMR.
> That leads to a page-fault as
> __initdata_cf_clobber_{start,end} living in .init section will have been
> unmapped by the time a livepatch gets loaded.
>
> Fix by adding a check that limits the clobbering of endbr64 instructions to
> boot time only.
>
> Fixes: 37ed5da851b8 ('x86/altcall: Optimise away endbr64 instruction where possible')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
In hindsight I really should have tried livepatching when I was doing
the IBT work, but that was also done under an embargo deadline.
I'm happy to tweak the commit message on commit.
next prev parent reply other threads:[~2024-04-09 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 12:50 [PATCH] x86/alternatives: fix .init section reference in _apply_alternatives() Roger Pau Monne
2024-04-09 12:56 ` Andrew Cooper [this message]
2024-04-09 13:00 ` Roger Pau Monné
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=c7d7452f-7a3c-4269-9e68-081e2c38aea1@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--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.