From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754806Ab1HWBTL (ORCPT ); Mon, 22 Aug 2011 21:19:11 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34462 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753535Ab1HWBTK (ORCPT ); Mon, 22 Aug 2011 21:19:10 -0400 Message-ID: <4E52FFD7.8080009@zytor.com> Date: Mon, 22 Aug 2011 18:18:15 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: Andrew Lutomirski CC: Al Viro , Linus Torvalds , Borislav Petkov , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , Richard Weinberger , Ingo Molnar , "user-mode-linux-devel@lists.sourceforge.net" Subject: Re: [uml-devel] SYSCALL, ptrace and syscall restart breakages (Re: [RFC] weird crap with vdso on uml/i386) References: <20110822144051.GD2946@aftab> <20110822151305.GV2203@ZenIV.linux.org.uk> <4E52B7F8.3050002@zytor.com> <4E52D280.3010107@zytor.com> <20110823000314.GW2203@ZenIV.linux.org.uk> <4E52EF2A.8060608@zytor.com> <20110823010146.GY2203@ZenIV.linux.org.uk> In-Reply-To: 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/22/2011 06:16 PM, Andrew Lutomirski wrote: > > I suspect that very few things care whether syscall arguments get > clobbered. The only way it would matter is if gcc reuses the argument > in the ecx slot after an inlined syscall later in the same function. > Any code that does that is already wrong if the syscall restarts with > changed ecx or if something like UML changes the syscall argument. > No, the glibc wrapper for the system call Al was looking at used %ecx to hold a copy of the PIC pointer (normally %ebx)! -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Qvfdt-0006tq-T5 for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 01:19:01 +0000 Received: from terminus.zytor.com ([198.137.202.10] helo=mail.zytor.com) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Qvfdt-0006WZ-67 for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 01:19:01 +0000 Message-ID: <4E52FFD7.8080009@zytor.com> Date: Mon, 22 Aug 2011 18:18:15 -0700 From: "H. Peter Anvin" MIME-Version: 1.0 References: <20110822144051.GD2946@aftab> <20110822151305.GV2203@ZenIV.linux.org.uk> <4E52B7F8.3050002@zytor.com> <4E52D280.3010107@zytor.com> <20110823000314.GW2203@ZenIV.linux.org.uk> <4E52EF2A.8060608@zytor.com> <20110823010146.GY2203@ZenIV.linux.org.uk> 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: Andrew Lutomirski Cc: "user-mode-linux-devel@lists.sourceforge.net" , Richard Weinberger , "linux-kernel@vger.kernel.org" , Borislav Petkov , "mingo@redhat.com" , Al Viro , Linus Torvalds , Ingo Molnar On 08/22/2011 06:16 PM, Andrew Lutomirski wrote: > > I suspect that very few things care whether syscall arguments get > clobbered. The only way it would matter is if gcc reuses the argument > in the ecx slot after an inlined syscall later in the same function. > Any code that does that is already wrong if the syscall restarts with > changed ecx or if something like UML changes the syscall argument. > No, the glibc wrapper for the system call Al was looking at used %ecx to hold a copy of the PIC pointer (normally %ebx)! -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