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-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QvyDo-0005kc-HP for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 21:09:20 +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 1QvyDn-0005Gz-UP for user-mode-linux-devel@lists.sourceforge.net; Tue, 23 Aug 2011 21:09:20 +0000 Message-ID: <4E5416CB.7050604@zytor.com> Date: Tue, 23 Aug 2011 14:08:27 -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: 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" , Al Viro , Ingo Molnar On 08/23/2011 10:33 AM, Linus Torvalds wrote: > > It would be *nice* if we did the swizzling automatically at setregs() > time too, but we simply don't have enough information in the kernel to > do that. Again, exactly because pt_regs doesn't have a "state" > variable, when user-space does the SETREGS call, we simply don't know > whether we are in "normal" code or in some system call entry or exit > state. So the kernel does the swizzling at GETREGS time (by virtue of > always having the registers in a "canonical" state for system call > entry), but we fundamentally *cannot* to do the unswizzle, because we > don't know what the SETREGS caller actually did. > Again, can we steal one of the padding fields to use for that state variable? We have two 16-bit padding fields; one for cs and one for ss. For UML, I agree, let's just not expose the vdso assuming that is possible, but for other -- possibly future -- users. -hpa ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755491Ab1HWVJd (ORCPT ); Tue, 23 Aug 2011 17:09:33 -0400 Received: from terminus.zytor.com ([198.137.202.10]:60831 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534Ab1HWVJ2 (ORCPT ); Tue, 23 Aug 2011 17:09:28 -0400 Message-ID: <4E5416CB.7050604@zytor.com> Date: Tue, 23 Aug 2011 14:08:27 -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: Linus Torvalds CC: Al Viro , 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: 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 10:33 AM, Linus Torvalds wrote: > > It would be *nice* if we did the swizzling automatically at setregs() > time too, but we simply don't have enough information in the kernel to > do that. Again, exactly because pt_regs doesn't have a "state" > variable, when user-space does the SETREGS call, we simply don't know > whether we are in "normal" code or in some system call entry or exit > state. So the kernel does the swizzling at GETREGS time (by virtue of > always having the registers in a "canonical" state for system call > entry), but we fundamentally *cannot* to do the unswizzle, because we > don't know what the SETREGS caller actually did. > Again, can we steal one of the padding fields to use for that state variable? We have two 16-bit padding fields; one for cs and one for ss. For UML, I agree, let's just not expose the vdso assuming that is possible, but for other -- possibly future -- users. -hpa