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:41:03 -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 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]:35391 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932675Ab2ASTl0 (ORCPT ); Thu, 19 Jan 2012 14:41:26 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jan 19, 2012 at 11:37 AM, Linus Torvalds wrote: > > 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. Oh, there's a few other hints you can look at. If 'ds' is zero, you might technically be in 32-bit mode, but realistically nothing really would work, so you might as well assume you're in long mode. So you can have a lot of heuristics (including just looking at what the disassembly itself looks like) if you really want to.. Linus