Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 20 Aug 2002 15:21:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 20 Aug 2002 15:21:25 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:58635 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Tue, 20 Aug 2002 15:21:24 -0400 Date: Tue, 20 Aug 2002 12:29:48 -0700 (PDT) From: Linus Torvalds To: Luca Barbieri cc: Rusty Russell , Linux-Kernel ML Subject: Re: [PATCH] (re-xmit): kprobes for i386 In-Reply-To: <1029844464.1745.49.camel@ldb> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 683 Lines: 23 On 20 Aug 2002, Luca Barbieri wrote: > How about checking %cs in assembly and branching off for the kernel-mode > case? > > Something like this: > ENTRY(debug) > testl $0x3, 4(%esp) > jz handle_kernel_mode_debug That's not correct, you can have the low bits of CS clear even from user mode if the thing is in vm86 mode. See the full test at the top of "ret_from_intr" (the "mix EFLAGS and CS" thing - it's a bit funky). Linus - 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/