From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: Compat 32-bit syscall entry from 64-bit task!? Date: Thu, 19 Jan 2012 11:37:50 -0800 Message-ID: References: <49017bd7edab7010cd9ac767e39d99e4.squirrel@webmail.greenhost.nl> <20120118015013.GR11715@one.firstfloor.org> <20120118020453.GL7180@jl-vm1.vm.bytemark.co.uk> <20120118022217.GS11715@one.firstfloor.org> <20120119160113.GN7180@jl-vm1.vm.bytemark.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jamie Lokier , Indan Zupancic , Andi Kleen , Oleg Nesterov , Will Drewry , linux-kernel@vger.kernel.org, keescook@chromium.org, john.johansen@canonical.com, serge.hallyn@canonical.com, coreyb@linux.vnet.ibm.com, pmoore@redhat.com, eparis@redhat.com, djm@mindrot.org, segoon@openwall.com, rostedt@goodmis.org, jmorris@namei.org, scarybeasts@gmail.com, avi@redhat.com, penberg@cs.helsinki.fi, viro@zeniv.linux.org.uk, mingo@elte.hu, akpm@linux-foundation.org, khilman@ti.com, borislav.petkov@amd.com, amwang@redhat.com, ak@linux.intel.com, eric.dumazet@gmail.com, gregkh@suse.de, dhowells@redhat.com, daniel.lezcano@free.fr, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, olofj@chromium.org, mhalcrow@google.com, dlaor@redhat.com, Roland McGrath Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:64051 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932675Ab2ASTiN convert rfc822-to-8bit (ORCPT ); Thu, 19 Jan 2012 14:38:13 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jan 19, 2012 at 11:30 AM, Andrew Lutomirski wrot= e: > > Unless you're writing a debugger and you want to disassemble the code > that's being executed (i.e. normal code, not a system call). =A0I won= der > how gdb guesses whether the cpu is in long mode. Yes, if you need to disassemble user space you would need to figure out the mode. I would suggest looking at 'rip/rsp' first, though, and just say that if it's >32-bit, it's flat mode. Only if both rsp and rip fit in 32 bits should you even bother start guessing. Because technically I suspect you really do need to look it up in the segment descriptors, and I don't think we have that kind of interface (nor do I think we really want to expose one). Linus -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html