Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752526AbbG3V6W (ORCPT ); Thu, 30 Jul 2015 17:58:22 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:34588 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbbG3V6V (ORCPT ); Thu, 30 Jul 2015 17:58:21 -0400 MIME-Version: 1.0 In-Reply-To: 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> Date: Thu, 30 Jul 2015 17:58:20 -0400 Message-ID: Subject: Re: Dealing with the NMI mess From: Brian Gerst To: Andy Lutomirski Cc: Paolo Bonzini , Peter Zijlstra , Linus Torvalds , Willy Tarreau , Steven Rostedt , X86 ML , "linux-kernel@vger.kernel.org" , Borislav Petkov , Thomas Gleixner 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: 1419 Lines: 37 On Thu, Jul 30, 2015 at 5:22 PM, Andy Lutomirski wrote: > 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 Some Windows programs (running in Wine) use this opcode for anti-debugging code. See commit a1e80fafc9f0742a1776a0490258cb64912411b0. -- Brian Gerst -- 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/