From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754602AbbCYO2w (ORCPT ); Wed, 25 Mar 2015 10:28:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:52080 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753323AbbCYO2s (ORCPT ); Wed, 25 Mar 2015 10:28:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,465,1422950400"; d="scan'208";a="670412939" Message-ID: <5512C61E.3080308@intel.com> Date: Wed, 25 Mar 2015 07:28:46 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Oleg Nesterov , Andy Lutomirski CC: Thomas Gleixner , "linux-kernel@vger.kernel.org" , X86 ML , Dave Hansen , Rik van Riel , Suresh Siddha , Ingo Molnar , "H. Peter Anvin" , Fenghua Yu Subject: Re: [PATCH 01/17] x86, fpu: wrap get_xsave_addr() to make it safer References: <1427235664-25318-1-git-send-email-dave.hansen@intel.com> <1427235664-25318-2-git-send-email-dave.hansen@intel.com> <5511F65A.5020505@intel.com> <5511FD59.3040503@intel.com> <20150325124533.GA17191@redhat.com> In-Reply-To: <20150325124533.GA17191@redhat.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 03/25/2015 05:45 AM, Oleg Nesterov wrote: > So far I do not understand this discussion ;) I didn't see the patches > and other emails... Hi Oleg, My patch set apparently didn't make it to LKML, but here are the two relevant ones. We're essentially replacing the MPX use of fpu_save_init(). CPUs with MPX should entirely have eager FPU mode on. But, the edges of the MPX code (do_bounds()) will call this to distinguish a plain #BR exception from a #BR caused by MPX. It may get called on CPUs without eager FPU mode on. > http://git.kernel.org/cgit/linux/kernel/git/daveh/x86-mpx.git/commit/?h=mpx-v16&id=92d3e7c1664f766142904904e27e126888adb8a7 > http://git.kernel.org/cgit/linux/kernel/git/daveh/x86-mpx.git/commit/?h=mpx-v16&id=18049953ae43a7ffa084a01613c1684bdf24dd2e All that the MPX code wants here is to read the in-memory copy of the MPX registers, or error out. So, for the purposes of this series: With the (so far unmerged to Linus's tree) changes to unlazy_fpu(), does tsk_get_xsave_field()'s use of unlazy_fpu() look correct? Should we also be renaming tsk_get_xsave_field() to something more appropriate?