public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave@sr71.net>
To: linux-kernel@vger.kernel.org
Cc: dave.hansen@linux.intel.com, x86@kernel.org, luto@kernel.org,
	fenghua.yu@intel.com, yu-cheng.yu@intel.com
Subject: Re: [PATCH] x86, fpu: fix 32-bit signal frame handling
Date: Thu, 12 Nov 2015 14:50:50 -0800	[thread overview]
Message-ID: <564517CA.7090600@sr71.net> (raw)
In-Reply-To: <20151111002354.A0799571@viggo.jf.intel.com>

On 11/10/2015 04:23 PM, Dave Hansen wrote:
> For MPX, this leads to the most permissive state and means we
> silently lose bounds violations.  I think this would also mean
> that we could lose *ANY* FPU/SSE/AVX state.  I'm not sure why
> no one has spotted this bug.

FWIW, I looked at this a little more today.

We lose all extended state for our "extended xfeatures", also known as
state component numbers >=2 (AVX, MPX, AVX-512, PKEYs)...  But we retain
the state for FP/SSE state.  So we lose the top half of the AVX
registers (the bottom half are SSE state).

I also did a little objdump'ing and grep'ing in a 32-bit distro.
There's no sign of actual use of the ymm registers.

Basically, it appears nobody has taken a 64-bit Sandybridge or later
CPU, put a 32-bit distro on it that had a >=3.7 kernel on it and tried
to use AVX instructions.  Or, if they did, they got random corruption
and gave up before actually diagnosing the problem. :)

  parent reply	other threads:[~2015-11-12 22:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11  0:23 [PATCH] x86, fpu: fix 32-bit signal frame handling Dave Hansen
2015-11-12 13:28 ` [tip:x86/urgent] x86/fpu: Fix " tip-bot for Dave Hansen
2015-11-12 22:50 ` Dave Hansen [this message]
2015-11-27 10:06   ` [PATCH] x86, fpu: fix " Ingo Molnar

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=564517CA.7090600@sr71.net \
    --to=dave@sr71.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=x86@kernel.org \
    --cc=yu-cheng.yu@intel.com \
    /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