Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574AbbG3VW2 (ORCPT ); Thu, 30 Jul 2015 17:22:28 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:34407 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbbG3VW1 (ORCPT ); Thu, 30 Jul 2015 17:22:27 -0400 MIME-Version: 1.0 In-Reply-To: <55BA45A2.8050909@redhat.com> References: <20150724090342.6d11e16d@gandalf.local.home> <20150724132128.GA3612@1wt.eu> <20150724103127.3c3f4693@gandalf.local.home> <20150724145901.GB3612@1wt.eu> <20150724111621.34713023@gandalf.local.home> <20150724152637.GC3612@1wt.eu> <20150724153054.GK19282@twins.programming.kicks-ass.net> <20150724195509.GM2859@worktop.programming.kicks-ass.net> <20150724205119.GM19282@twins.programming.kicks-ass.net> <55BA45A2.8050909@redhat.com> From: Andy Lutomirski Date: Thu, 30 Jul 2015 14:22:06 -0700 Message-ID: Subject: Re: Dealing with the NMI mess To: Paolo Bonzini Cc: Peter Zijlstra , Linus Torvalds , Willy Tarreau , Steven Rostedt , X86 ML , "linux-kernel@vger.kernel.org" , Borislav Petkov , Thomas Gleixner , Brian Gerst Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1158 Lines: 29 On Thu, Jul 30, 2015 at 8:41 AM, Paolo Bonzini wrote: > > > On 24/07/2015 23:08, Andy Lutomirski wrote: >> user_icebp is set if int $0x01 happens, except it isn't because user >> code can't actually do that -- it'll cause #GP instead. >> >> user_icebp is also set if the user has a bloody in-circuit emulator, >> given the name. But who on Earth has one of those on a system new >> enough to run Linux and, even if they have one, why on Earth are they >> using it to send SIGTRAP. > > You do not need either "int $0x01" or an ICE to set user_icebp = 1. You > can use the 0xf1 opcode, which is kinda like 0xcc but generates #DB > instead of #BP. Great. There's an opcode that invokes an interrupt gate that's not marked as allowing unprivileged access, and that opcode doesn't appear in the SDM. It appears in the APM opcode map with no explanation at all. Thanks, CPU vendors. --Andy -- 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/