From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755988Ab1HWTSw (ORCPT ); Tue, 23 Aug 2011 15:18:52 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49429 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755102Ab1HWTSs (ORCPT ); Tue, 23 Aug 2011 15:18:48 -0400 Message-ID: <4E53FCF7.7060703@zytor.com> Date: Tue, 23 Aug 2011 12:18:15 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Al Viro CC: Linus Torvalds , Andrew Lutomirski , Borislav Petkov , Ingo Molnar , "user-mode-linux-devel@lists.sourceforge.net" , Richard Weinberger , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" Subject: Re: [uml-devel] SYSCALL, ptrace and syscall restart breakages (Re: [RFC] weird crap with vdso on uml/i386) References: <4E52D280.3010107@zytor.com> <20110823000314.GW2203@ZenIV.linux.org.uk> <4E52EF2A.8060608@zytor.com> <20110823010146.GY2203@ZenIV.linux.org.uk> <20110823011312.GZ2203@ZenIV.linux.org.uk> <20110823021717.GA2203@ZenIV.linux.org.uk> <20110823061531.GC2203@ZenIV.linux.org.uk> <20110823164849.GF2203@ZenIV.linux.org.uk> In-Reply-To: <20110823164849.GF2203@ZenIV.linux.org.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/23/2011 09:48 AM, Al Viro wrote: > > Um... How would it know which syscall variant had that been, to start > with? For int 0x80 it would need to use registers as-is. For SYSENTER > it also could use them as-is - ebp will differ from what we put there > when entering the sucker, but not critically so; on the way out of > syscall we'll overwrite it anyway immediately (either by pop or mov). > For SYSCALL... we don't really care about ecx contents prior to entering > the kernel (and it'll be blown out anyway), and ebp one could be found in > regs.ecx. So yes, we can do it that way, but... how to tell what variant > had been triggered? Examining two bytes prior to user eip? Sounds bloody > brittle... We could drop that information in a metaregister. It's not backward compatible, but at least it will be obvious when that information is available and not. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QvwUi-0000DG-8J for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 19:18:40 +0000 Received: from terminus.zytor.com ([198.137.202.10] helo=mail.zytor.com) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1QvwUh-0001zH-Kv for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 19:18:40 +0000 Message-ID: <4E53FCF7.7060703@zytor.com> Date: Tue, 23 Aug 2011 12:18:15 -0700 From: "H. Peter Anvin" MIME-Version: 1.0 References: <4E52D280.3010107@zytor.com> <20110823000314.GW2203@ZenIV.linux.org.uk> <4E52EF2A.8060608@zytor.com> <20110823010146.GY2203@ZenIV.linux.org.uk> <20110823011312.GZ2203@ZenIV.linux.org.uk> <20110823021717.GA2203@ZenIV.linux.org.uk> <20110823061531.GC2203@ZenIV.linux.org.uk> <20110823164849.GF2203@ZenIV.linux.org.uk> In-Reply-To: <20110823164849.GF2203@ZenIV.linux.org.uk> List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net Subject: Re: [uml-devel] SYSCALL, ptrace and syscall restart breakages (Re: [RFC] weird crap with vdso on uml/i386) To: Al Viro Cc: Andrew Lutomirski , "user-mode-linux-devel@lists.sourceforge.net" , Richard Weinberger , "linux-kernel@vger.kernel.org" , Borislav Petkov , "mingo@redhat.com" , Linus Torvalds , Ingo Molnar On 08/23/2011 09:48 AM, Al Viro wrote: > > Um... How would it know which syscall variant had that been, to start > with? For int 0x80 it would need to use registers as-is. For SYSENTER > it also could use them as-is - ebp will differ from what we put there > when entering the sucker, but not critically so; on the way out of > syscall we'll overwrite it anyway immediately (either by pop or mov). > For SYSCALL... we don't really care about ecx contents prior to entering > the kernel (and it'll be blown out anyway), and ebp one could be found in > regs.ecx. So yes, we can do it that way, but... how to tell what variant > had been triggered? Examining two bytes prior to user eip? Sounds bloody > brittle... We could drop that information in a metaregister. It's not backward compatible, but at least it will be obvious when that information is available and not. -hpa ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel