From: Andy Lutomirski <luto@amacapital.net>
To: Borislav Petkov <bp@alien8.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
X86 ML <x86@kernel.org>
Subject: Re: WARNING: CPU: 0 PID: 3031 at ./arch/x86/include/asm/fpu/internal.h:530 fpu__restore+0x90/0x130()
Date: Mon, 15 Feb 2016 18:25:10 -0800 [thread overview]
Message-ID: <CALCETrW3r89hbU3u2xG2u+ZDrk-WzwmicL9ZL-L1GVGZfH-sdQ@mail.gmail.com> (raw)
In-Reply-To: <20160215191422.GB32716@pd.tnic>
On Feb 15, 2016 12:14 PM, "Borislav Petkov" <bp@alien8.de> wrote:
>
> ---
> From: Borislav Petkov <bp@suse.de>
> Date: Mon, 15 Feb 2016 19:50:33 +0100
> Subject: [RFC PATCH] x86/FPU: Fix double FPU regs activation
>
> On the entry_INT80_32->do_syscall_32_irqs_on path on 32-bit we run with
> interrupts enabled.
I would change this a little bit.
sys_sigreturn calls fpu__restore_sig with interrupts enabled. When
restoring a 32-bit signal frame, it can happen that...
> And it can happen that we get preempted right after
> setting ->fpstate_active in a task's FPU.
>
> After we get preempted, we switch between tasks merrily and eventually
> are about to switch to that task above whose ->fpstate_active we
> set. We enter __switch_to() and do switch_fpu_prepare(). Our task gets
> ->fpregs_active set, we find ourselves back on the call stack below and
> especially in __fpu__restore_sig() which sets ->fpregs_active again.
>
> Leading to that whoops below.
--Andy
next prev parent reply other threads:[~2016-02-16 2:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 19:27 WARNING: CPU: 0 PID: 3031 at ./arch/x86/include/asm/fpu/internal.h:530 fpu__restore+0x90/0x130() Borislav Petkov
2016-02-11 23:47 ` Andy Lutomirski
2016-02-12 1:16 ` Andy Lutomirski
2016-02-12 17:00 ` Borislav Petkov
2016-02-15 19:14 ` Borislav Petkov
2016-02-16 2:25 ` Andy Lutomirski [this message]
2016-02-17 8:16 ` Ingo Molnar
2016-02-17 9:29 ` Borislav Petkov
2016-02-17 9:35 ` Ingo Molnar
2016-02-17 10:31 ` Borislav Petkov
2016-02-17 11:06 ` Ingo Molnar
2016-02-17 11:41 ` Borislav Petkov
2016-02-17 17:52 ` Andy Lutomirski
2016-02-15 19:05 ` Borislav Petkov
2016-02-12 11:17 ` Borislav Petkov
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=CALCETrW3r89hbU3u2xG2u+ZDrk-WzwmicL9ZL-L1GVGZfH-sdQ@mail.gmail.com \
--to=luto@amacapital.net \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).