From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753507AbdKNHUi (ORCPT ); Tue, 14 Nov 2017 02:20:38 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:43266 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011AbdKNHU1 (ORCPT ); Tue, 14 Nov 2017 02:20:27 -0500 X-Google-Smtp-Source: AGs4zMZNqrgk8Bd3EJQX2axWdU/FAgU8W97YSMomNzjQIJm8hIFGvxz3HRzoryO7kVIhYNIN2FizDA== Date: Tue, 14 Nov 2017 08:20:23 +0100 From: Ingo Molnar To: Ricardo Neri Cc: Thomas Gleixner , "H. Peter Anvin" , Borislav Petkov , Andy Lutomirski , Tony Luck , Paolo Bonzini , "Ravi V. Shankar" , x86@kernel.org, ricardo.neri@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] x86/umip: Identify the str and sldt instructions Message-ID: <20171114072023.wefilw2d7ym2bdft@gmail.com> References: <1510541769-21064-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1510541769-21064-4-git-send-email-ricardo.neri-calderon@linux.intel.com> <20171113081203.qi54w55vwrmic4mw@gmail.com> <20171114022647.GA1444@voyager> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114022647.GA1444@voyager> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ricardo Neri wrote: > On Mon, Nov 13, 2017 at 09:12:03AM +0100, Ingo Molnar wrote: > > > > * Ricardo Neri wrote: > > > > > The instructions str and sldt are not emulated in any case. Thus, it made > > > sense to not implement functionality to identify them. However, a > > > subsequent commit will introduce functionality to warn about the use of > > > all the instructions that UMIP protect, not only those that are emulated. > > > A first step for that is the ability to identify them. > > > > > > Plus, now that str and sldt are identified, we need to explicitly avoid > > > their emulation (i.e., not rely on unsuccessful identification). Group > > > togehter all the cases that we do not want to emulate: str, sldt and user > > > long mode processes. > > > > Did you notice how in all your previous patches (both in the code and in the > > changelogs) I have manually fixed up the capitalization of these instruction > > mnenonics? > > I am sorry, I tried to see where you made these changes but I could not find > any. I did a git diff of arch/x86/kernel/umip.c between the branch rneri/umip_v11 > of my repository [1] and the master branch of the tip tree and I did not find > any differences. For example, I turned: [PATCH v11 12/12] selftests/x86: Add tests for instruction str and sldt The instructions str and sldt are not valid when running on virtual-8086 mode and generate an invalid operand exception. ... into: a9e017d5619e: selftests/x86: Add tests for the STR and SLDT instructions The STR and SLDT instructions are not valid when running on virtual-8086 mode and generate an invalid operand exception. ... I did not catch every case though. Thanks, Ingo