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 for-4.16] x86/shstk: Fix use of shadow stacks with XPTI active
Date: Tue, 2 Nov 2021 16:14:19 +0100	[thread overview]
Message-ID: <29c59040-a2bc-69d3-db02-1345b5aa2b8b@suse.com> (raw)
In-Reply-To: <20211102143935.17473-1-andrew.cooper3@citrix.com>

On 02.11.2021 15:39, Andrew Cooper wrote:
> The call to setup_cpu_root_pgt(0) in smp_prepare_cpus() is too early.  It
> clones the BSP's stack while the .data mapping is still in use, causing all
> mappings to be fully read read/write (and with no guard pages either).  This
> ultimately causes #DF when trying to enter the dom0 kernel for the first time.
> 
> Defer setting up BSPs XPTI pagetable until reinit_bsp_stack() after we've set
> up proper shadow stack permissions.
> 
> Fixes: 60016604739b ("x86/shstk: Rework the stack layout to support shadow stacks")
> Fixes: b60ab42db2f0 ("x86/shstk: Activate Supervisor Shadow Stacks")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



  reply	other threads:[~2021-11-02 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 14:39 [PATCH for-4.16] x86/shstk: Fix use of shadow stacks with XPTI active Andrew Cooper
2021-11-02 15:14 ` Jan Beulich [this message]
2021-11-02 15:53   ` Ian Jackson

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=29c59040-a2bc-69d3-db02-1345b5aa2b8b@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.