From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbdKHRYr (ORCPT ); Wed, 8 Nov 2017 12:24:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbdKHRYq (ORCPT ); Wed, 8 Nov 2017 12:24:46 -0500 Subject: Re: [tip:x86/asm] x86/umip: Add emulation code for UMIP instructions To: Paolo Bonzini , Linus Torvalds Cc: Peter Anvin , Borislav Petkov , Vlastimil Babka , Tony Luck , Fenghua Yu , Josh Poimboeuf , Borislav Petkov , Brian Gerst , Jonathan Corbet , "Ravi V. Shankar" , ricardo.neri-calderon@linux.intel.com, Chris Metcalf , Andrew Morton , Paul Gortmaker , Masami Hiramatsu , Andrew Lutomirski , Dave Hansen , ray.huang@amd.com, "Michael S. Tsirkin" , Linux Kernel Mailing List , Peter Zijlstra , Chen Yucong , Ingo Molnar , Jiri Slaby , Shuah Khan , Thomas Gleixner , "linux-tip-commits@vger.kernel.org" References: <1509935277-22138-8-git-send-email-ricardo.neri-calderon@linux.intel.com> <3cdde8ac-500c-ddad-5ea5-a733e2c98d84@redhat.com> <68c11f7a-cd26-0fdc-0ac5-939a72c22227@redhat.com> From: Denys Vlasenko Message-ID: <1f471c85-dcda-ed3f-299e-8baf68fb55fd@redhat.com> Date: Wed, 8 Nov 2017 18:24:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 08 Nov 2017 17:24:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/08/2017 06:14 PM, Paolo Bonzini wrote: > On 08/11/2017 18:09, Denys Vlasenko wrote: >> On 11/08/2017 05:57 PM, Linus Torvalds wrote: >>> On Wed, Nov 8, 2017 at 8:53 AM, Denys Vlasenko >>> wrote: >>>> We can postpone enabling UMIP by default by a year or so. >>>> By this time, new Wine will be on majority of users' machines. >>> >>> So you are suggesting we run unnecessarily insecure, only in order to >>> not do the emulation that we already have the code for and that the >>> patch implements? >> >> We ran insecure in this way for ~25 years. >> >>> Why? >> >> To avoid having to maintain more obscure, rarely executed code. > > As a start, you could propose a patch to disable the emulation code > through a sysctl or Kconfig symbol. This way, the emulation code will still be in the kernel, and still need to be maintained. In my opinion, if we do emulate these insns, then adding even more code to disable that emulation is not worth doing. > I would be surprised if it takes > more time than what you've spent writing emails in this thread. Yes, I not only f**ing retarded, I'm also lazy. Thanks guys...