From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: Compat 32-bit syscall entry from 64-bit task!? Date: Wed, 18 Jan 2012 13:47:01 -0800 Message-ID: <4F173DD5.9000308@zytor.com> References: <20120116183730.GB21112@redhat.com> <49017bd7edab7010cd9ac767e39d99e4.squirrel@webmail.greenhost.nl> <20120118015013.GR11715@one.firstfloor.org> <20120118020453.GL7180@jl-vm1.vm.bytemark.co.uk> <20120118022217.GS11715@one.firstfloor.org> <4F1731C1.4050007@zytor.com> <4F1733DF.7040905@zytor.com> <4F1739F1.2070902@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Indan Zupancic , Andi Kleen , Jamie Lokier , Andrew Lutomirski , 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, Ro To: Linus Torvalds Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 01/18/2012 01:42 PM, Linus Torvalds wrote: > On Wed, Jan 18, 2012 at 1:30 PM, H. Peter Anvin wrote: >> >> I would have assumed it would be a new register set (which could be >> expanded in the future if we have additional system information to provide.) > > Well, I really don't think we want to expose much. In fact, I'd argue > we should expose as little as humanly possible. > > Which at this point is literally just a single bit (and effectively > another bit to say "we support the new feature"). > > So... > I actually think we need to also have a bit for some of the 32-bit entry point differences, since the registers have different meanings for them. We have kluges in place for them, but those kluges cause their own problems when registers are modified. So that means at least four states (SYSCALL64, SYSENTER, SYSCALL32, INT 80) plus the presence bit. Furthermore, three out of those states apply even to pure 32-bit kernels. -hpa