From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753197Ab1JMGTj (ORCPT ); Thu, 13 Oct 2011 02:19:39 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:35893 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750918Ab1JMGTi convert rfc822-to-8bit (ORCPT ); Thu, 13 Oct 2011 02:19:38 -0400 MIME-Version: 1.0 In-Reply-To: <4E947BC9.7040805@mit.edu> References: <20111010114840.GC17079@elte.hu> <20111011062253.GA3589@elte.hu> <4E947BC9.7040805@mit.edu> From: Linus Torvalds Date: Thu, 13 Oct 2011 18:19:16 +1200 X-Google-Sender-Auth: wHXrb9drfzKyelmYDjOOVbCPHIs Message-ID: Subject: Re: [RFC] fixing the UML failure root cause To: Andrew Lutomirski Cc: Ingo Molnar , richard -rw- weinberger , Adrian Bunk , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 12, 2011 at 5:24 AM, Andrew Lutomirski wrote: > > So here's a different approach.  It's not perfect: it always blames > SEGV_MAPERR instead of SEGV_ACCERR.  I implemented it for vgettimeofday > but not the other two vsyscalls. > > What do you think of this approach?  If it seems good, I'll finish the > patch and submit it. I think the approach is valid, but you should *not* do this as some kind of crazy byte-by-byte copy_to_user() emulation. Do the "copy tz to user mode" as individual "put_user()" calls for tv_sec/tv_usec/timezone. IOW, there are three words being written to user mode, not "two memcpy's". Other than that, there doesn't seem to be anything wrong. Linus