From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756365Ab1HVBJZ (ORCPT ); Sun, 21 Aug 2011 21:09:25 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35673 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709Ab1HVBJY (ORCPT ); Sun, 21 Aug 2011 21:09:24 -0400 MIME-Version: 1.0 In-Reply-To: References: <20110820011845.GC2203@ZenIV.linux.org.uk> <4E4FD12F.70508@nod.at> <20110820201406.GF2203@ZenIV.linux.org.uk> <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> From: Linus Torvalds Date: Sun, 21 Aug 2011 18:09:00 -0700 Message-ID: Subject: Re: SYSCALL, ptrace and syscall restart breakages (Re: [RFC] weird crap with vdso on uml/i386) To: Andrew Lutomirski Cc: Al Viro , "H. Peter Anvin" , mingo@redhat.com, Richard Weinberger , user-mode-linux-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? (Ok, that's probably a huge over-simplification, but perhaps "close enough" to true that it would be workable) Linus