From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756434Ab1HVBTy (ORCPT ); Sun, 21 Aug 2011 21:19:54 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47529 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756253Ab1HVBTx (ORCPT ); Sun, 21 Aug 2011 21:19:53 -0400 Date: Mon, 22 Aug 2011 02:19:39 +0100 From: Al Viro To: Linus Torvalds Cc: Andrew Lutomirski , "H. Peter Anvin" , mingo@redhat.com, Richard Weinberger , user-mode-linux-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: SYSCALL, ptrace and syscall restart breakages (Re: [RFC] weird crap with vdso on uml/i386) Message-ID: <20110822011939.GN2203@ZenIV.linux.org.uk> References: <4E501F51.9060905@nod.at> <20110821063443.GH2203@ZenIV.linux.org.uk> <20110821084230.GI2203@ZenIV.linux.org.uk> <20110821144352.GJ2203@ZenIV.linux.org.uk> <20110821164124.GL2203@ZenIV.linux.org.uk> 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 Sun, Aug 21, 2011 at 06:09:00PM -0700, Linus Torvalds wrote: > On Sun, Aug 21, 2011 at 5:44 PM, Andrew Lutomirski wrote: > > > > Which suggests an easy-ish fix: if sysenter is used or if syscall is > > entered from the EIP is is supposed to be entered from, then just > > change ip in the argument save to point to the int 0x80 instruction. > > Indeed. Just add an "int 0x80" instruction to the vsyscall thing, and > you'd be done. > > In fact, just replace the > > jmp .Lenter_kernel > > with > > int 0x80 > > and you'd be pretty much all done, no? In case of sysenter - almost, in case of syscall - nope...