Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754616AbaBATgX (ORCPT ); Sat, 1 Feb 2014 14:36:23 -0500 Received: from terminus.zytor.com ([198.137.202.10]:32956 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752957AbaBATgV (ORCPT ); Sat, 1 Feb 2014 14:36:21 -0500 Message-ID: <52ED4C96.6020703@zytor.com> Date: Sat, 01 Feb 2014 11:35:50 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Linus Torvalds , Suresh Siddha CC: Nate Eldredge , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , stable , Linux Kernel Mailing List , Maarten Baert , Jan Kara , George Spelvin , Pekka Riikonen Subject: Re: [PATCH] Make math_state_restore() save and restore the interrupt flag References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/01/2014 11:27 AM, Linus Torvalds wrote: > > (a) "we don't want to restore at all, because once the kernel starts > using math, it might do so a lot, and saving/restoring is a bad idea": > > void __kernel_fpu_end(void) > { > stts(); > } > > *or* > > Quite frankly, I'd almost lean towards (a). Comments? Does anybody > have any loads where the kernel does a lot of fpu stuff (ie network > encryption using the hw engines or something)? I'd really like to hear > if it makes a difference.. > This will obviously not protect eageronly features (MPX, LWP, ...) so this means those features are permanently unavailable to the kernel, even inside kernel_fpu_begin/end. Now, currently I don't think we have any plans to use those in the kernel (at least not in a way where kernel_fpu_begin/end makes sense as bracketing), but it is something worth keeping in mind. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/