From: Yu-cheng Yu <yu-cheng.yu@intel.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H.J. Lu" <hjl.tools@gmail.com>, Ingo Molnar <mingo@redhat.com>,
"Ravi V. Shankar" <ravi.v.shankar@intel.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Tony Luck <tony.luck@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Weijiang Yang <weijiang.yang@intel.com>
Subject: Re: Random shadow stack pointer corruption
Date: Sat, 18 Jul 2020 11:24:46 -0700 [thread overview]
Message-ID: <7653c6c74a4eee18b8bdc8262e0c0b5b95f9d771.camel@intel.com> (raw)
In-Reply-To: <CALCETrUBDUKTcmmYD7BpZkL3869ELvha1PqOcScw4M-B_DQdiA@mail.gmail.com>
On Sat, 2020-07-18 at 11:00 -0700, Andy Lutomirski wrote:
> On Sat, Jul 18, 2020 at 10:58 AM Yu-cheng Yu <yu-cheng.yu@intel.com> wrote:
> > Hi,
> >
> > My shadow stack tests start to have random shadow stack pointer corruption after
> > v5.7 (excluding). The symptom looks like some locking issue or the kernel is
> > confused about which CPU a task is on. In later tip/master, this can be
> > triggered by creating two tasks and each does continuous
> > pthread_create()/pthread_join(). If the kernel has max_cpus=1, the issue goes
> > away. I also checked XSAVES/XRSTORS, but this does not seem to be an issue
> > coming from there.
>
> What do you mean "shadow stack pointer corruption"? Is SSP itself
> corrupt while running in the kernel? Is one of the MSRs getting
> corrupted? Is the memory to which the shadow stack points getting
> corrupted? Is the CPU rejecting an attempt to change SSP?
What I see is, a new thread after ret_from_fork() and iret back to ring-3,
its shadow stack pointer (MSR_IA32_PL3_SSP) is corrupted.
next prev parent reply other threads:[~2020-07-18 18:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-18 17:57 Yu-cheng Yu
2020-07-18 18:00 ` Andy Lutomirski
2020-07-18 18:24 ` Yu-cheng Yu [this message]
2020-07-18 18:27 ` Andy Lutomirski
2020-07-18 22:41 ` Dave Hansen
2020-07-18 23:04 ` H.J. Lu
2020-07-18 23:34 ` Yu-cheng Yu
2020-07-29 0:35 ` H.J. Lu
2020-07-29 0:56 ` Andy Lutomirski
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=7653c6c74a4eee18b8bdc8262e0c0b5b95f9d771.camel@intel.com \
--to=yu-cheng.yu@intel.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hjl.tools@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=weijiang.yang@intel.com \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®