xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH 3/4] x86: drop ASM_{CL,ST}AC
Date: Tue, 28 Jul 2020 15:51:09 +0100	[thread overview]
Message-ID: <07750e83-6b9d-a88d-856b-20db4f63fd11@citrix.com> (raw)
In-Reply-To: <048c3702-f0b0-6f8e-341e-bec6cfaded27@suse.com>

On 15/07/2020 11:49, Jan Beulich wrote:
> Use ALTERNATIVE directly, such that at the use sites it is visible that
> alternative code patching is in use. Similarly avoid hiding the fact in
> SAVE_ALL.
>
> No change to generated code.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Definitely +1 to not hiding the STAC/CLAC in SAVE_ALL.  I've been
meaning to undo that mistake for ages.

OOI, what made you change your mind?  I'm pleased that you have.

>
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -2165,9 +2165,9 @@ void activate_debugregs(const struct vcp
>  void asm_domain_crash_synchronous(unsigned long addr)
>  {
>      /*
> -     * We need clear AC bit here because in entry.S AC is set
> -     * by ASM_STAC to temporarily allow accesses to user pages
> -     * which is prevented by SMAP by default.
> +     * We need to clear AC bit here because in entry.S it gets set to
> +     * temporarily allow accesses to user pages which is prevented by
> +     * SMAP by default.

As you're adjusting the text, It should read "We need to clear the AC
bit ..."

But I also think it would be clearer to say that exception fixup may
leave user access enabled, which we fix up here by unconditionally
disabling user access.

Preferably with this rewritten, Reviewed-by: Andrew Cooper
<andrew.cooper3@citrix.com>


  parent reply	other threads:[~2020-07-28 14:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 10:47 [PATCH 0/4] x86: some assembler macro rework Jan Beulich
2020-07-15 10:48 ` [PATCH 1/4] x86: replace __ASM_{CL,ST}AC Jan Beulich
2020-07-27 14:55   ` Roger Pau Monné
2020-07-27 19:47     ` Jan Beulich
2020-07-28  9:06       ` Roger Pau Monné
2020-07-31  8:05         ` Jan Beulich
2020-07-31  8:12           ` Roger Pau Monné
2020-07-28 13:59       ` Andrew Cooper
2020-07-28 19:24         ` Jan Beulich
2020-07-28 13:55   ` Andrew Cooper
2020-07-28 19:18     ` Jan Beulich
2020-07-31  8:00     ` Jan Beulich
2020-07-15 10:48 ` [PATCH 2/4] x86: reduce CET-SS related #ifdef-ary Jan Beulich
2020-07-27 15:00   ` Roger Pau Monné
2020-07-27 19:50     ` Jan Beulich
2020-07-28  8:36       ` Roger Pau Monné
2020-07-28 14:29   ` Andrew Cooper
2020-07-28 19:33     ` Jan Beulich
2020-07-15 10:49 ` [PATCH 3/4] x86: drop ASM_{CL,ST}AC Jan Beulich
2020-07-27 15:10   ` Roger Pau Monné
2020-07-28 14:51   ` Andrew Cooper [this message]
2020-07-28 19:41     ` Jan Beulich
2020-07-15 10:49 ` [PATCH 4/4] x86: fold indirect_thunk_asm.h into asm-defns.h Jan Beulich
2020-07-27 15:16   ` 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=07750e83-6b9d-a88d-856b-20db4f63fd11@citrix.com \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).