From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754150AbbKLWux (ORCPT ); Thu, 12 Nov 2015 17:50:53 -0500 Received: from www.sr71.net ([198.145.64.142]:48415 "EHLO blackbird.sr71.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752917AbbKLWuw (ORCPT ); Thu, 12 Nov 2015 17:50:52 -0500 Subject: Re: [PATCH] x86, fpu: fix 32-bit signal frame handling To: linux-kernel@vger.kernel.org References: <20151111002354.A0799571@viggo.jf.intel.com> Cc: dave.hansen@linux.intel.com, x86@kernel.org, luto@kernel.org, fenghua.yu@intel.com, yu-cheng.yu@intel.com From: Dave Hansen Message-ID: <564517CA.7090600@sr71.net> Date: Thu, 12 Nov 2015 14:50:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151111002354.A0799571@viggo.jf.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. :)