From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755611Ab1HWTlf (ORCPT ); Tue, 23 Aug 2011 15:41:35 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:55923 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070Ab1HWTl2 (ORCPT ); Tue, 23 Aug 2011 15:41:28 -0400 Date: Tue, 23 Aug 2011 20:41:03 +0100 From: Al Viro To: Linus Torvalds Cc: "H. Peter Anvin" , 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) Message-ID: <20110823194103.GK2203@ZenIV.linux.org.uk> References: <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> <4E53FCF7.7060703@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 23, 2011 at 12:24:22PM -0700, Linus Torvalds wrote: > On Tue, Aug 23, 2011 at 12:18 PM, H. Peter Anvin wrote: > > > > 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. > > Well, seriously, UML already looks at the word at "ip-2" for other > reasons. So it isn't like there is any point in adding more support to > just give you that information in another form. That is done only for task singlestepped in the guest: /* * This closes a way to execute a system call on the host. If * you set a breakpoint on a system call instruction and singlestep * from it, the tracing thread used to PTRACE_SINGLESTEP the process * rather than PTRACE_SYSCALL it, allowing the system call to execute * on the host. The tracing thread will check this flag and * PTRACE_SYSCALL if necessary. */ if (current->ptrace & PT_DTRACE) current->thread.singlestep_syscall = is_syscall(PT_REGS_IP(¤t->thread.regs)); with PT_DTRACE set by uml user_enable_single_step() And it's not cheap - doing that on each syscall will be unpleasant... Frankly, I'd rather stopped telling the uml userland about vdso in such setups. And anything that plays with SYSCALL outside of vdso... we already have a "don't run it native on 32bit", adding "don't run it on 32bit uml on amd64 host" is not too serious. At least for now... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Qvwqm-0001bj-4g for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 19:41:28 +0000 Received: from zeniv.linux.org.uk ([195.92.253.2]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Qvwqk-0002aN-T3 for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 19:41:28 +0000 Date: Tue, 23 Aug 2011 20:41:03 +0100 From: Al Viro Message-ID: <20110823194103.GK2203@ZenIV.linux.org.uk> References: <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> <4E53FCF7.7060703@zytor.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: Linus Torvalds Cc: Andrew Lutomirski , "user-mode-linux-devel@lists.sourceforge.net" , Richard Weinberger , "linux-kernel@vger.kernel.org" , Borislav Petkov , "mingo@redhat.com" , "H. Peter Anvin" , Ingo Molnar On Tue, Aug 23, 2011 at 12:24:22PM -0700, Linus Torvalds wrote: > On Tue, Aug 23, 2011 at 12:18 PM, H. Peter Anvin wrote: > > > > 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. > > Well, seriously, UML already looks at the word at "ip-2" for other > reasons. So it isn't like there is any point in adding more support to > just give you that information in another form. That is done only for task singlestepped in the guest: /* * This closes a way to execute a system call on the host. If * you set a breakpoint on a system call instruction and singlestep * from it, the tracing thread used to PTRACE_SINGLESTEP the process * rather than PTRACE_SYSCALL it, allowing the system call to execute * on the host. The tracing thread will check this flag and * PTRACE_SYSCALL if necessary. */ if (current->ptrace & PT_DTRACE) current->thread.singlestep_syscall = is_syscall(PT_REGS_IP(¤t->thread.regs)); with PT_DTRACE set by uml user_enable_single_step() And it's not cheap - doing that on each syscall will be unpleasant... Frankly, I'd rather stopped telling the uml userland about vdso in such setups. And anything that plays with SYSCALL outside of vdso... we already have a "don't run it native on 32bit", adding "don't run it on 32bit uml on amd64 host" is not too serious. At least for now... ------------------------------------------------------------------------------ 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