From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754165Ab1HWAHl (ORCPT ); Mon, 22 Aug 2011 20:07:41 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:34880 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204Ab1HWAHi (ORCPT ); Mon, 22 Aug 2011 20:07:38 -0400 Date: Tue, 23 Aug 2011 01:07:05 +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: <20110823000705.GX2203@ZenIV.linux.org.uk> References: <20110822095336.GB25949@kernel.org> <20110822144051.GD2946@aftab> <20110822151305.GV2203@ZenIV.linux.org.uk> <4E52B7F8.3050002@zytor.com> <4E52D280.3010107@zytor.com> <20110823000314.GW2203@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110823000314.GW2203@ZenIV.linux.org.uk> 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 01:03:14AM +0100, Al Viro wrote: > On Mon, Aug 22, 2011 at 04:27:51PM -0700, Linus Torvalds wrote: > > > So I think the "let's fix the vdso case for sysenter" + "let's remove > > the 32-bit syscall vdso" is the right solution. If somebody has > > hardcoded syscall instructions, or generates them dynamically with > > some JIT, that's their problem. We'll continue to support it as well > > as we ever have (read: "almost nobody will ever notice"). > > Umm... Maybe, but I really wonder if it would be better to do this: > * check if %ecx is the right one for vdso32 entry. If it isn't, > act as we act now (and possibly warn). If it is, increment it by 4. > * slap 0x90, 0x90, 0xcd, 0x80 right after that syscall insn - > i.e. nop/nop/int 0x80. Followed by what we currently do there. > > Those who do syscall insn in 32bit mode outside of vdso will get > what they currently get. __kernel_vsyscall() will keep working and do > that without restart problems. And the price is comparison + branch not > taken + addition for that path... s/whine/set your "don't restart that one" flag/, even... 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-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QveWk-0004hq-Md for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 00:07:34 +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 1QveWj-0004Js-Gu for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 00:07:34 +0000 Date: Tue, 23 Aug 2011 01:07:05 +0100 From: Al Viro Message-ID: <20110823000705.GX2203@ZenIV.linux.org.uk> References: <20110822095336.GB25949@kernel.org> <20110822144051.GD2946@aftab> <20110822151305.GV2203@ZenIV.linux.org.uk> <4E52B7F8.3050002@zytor.com> <4E52D280.3010107@zytor.com> <20110823000314.GW2203@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110823000314.GW2203@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: 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 01:03:14AM +0100, Al Viro wrote: > On Mon, Aug 22, 2011 at 04:27:51PM -0700, Linus Torvalds wrote: > > > So I think the "let's fix the vdso case for sysenter" + "let's remove > > the 32-bit syscall vdso" is the right solution. If somebody has > > hardcoded syscall instructions, or generates them dynamically with > > some JIT, that's their problem. We'll continue to support it as well > > as we ever have (read: "almost nobody will ever notice"). > > Umm... Maybe, but I really wonder if it would be better to do this: > * check if %ecx is the right one for vdso32 entry. If it isn't, > act as we act now (and possibly warn). If it is, increment it by 4. > * slap 0x90, 0x90, 0xcd, 0x80 right after that syscall insn - > i.e. nop/nop/int 0x80. Followed by what we currently do there. > > Those who do syscall insn in 32bit mode outside of vdso will get > what they currently get. __kernel_vsyscall() will keep working and do > that without restart problems. And the price is comparison + branch not > taken + addition for that path... s/whine/set your "don't restart that one" flag/, even... ------------------------------------------------------------------------------ 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