From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935458Ab1JEWY5 (ORCPT ); Wed, 5 Oct 2011 18:24:57 -0400 Received: from filtteri6.pp.htv.fi ([213.243.153.189]:48509 "EHLO filtteri6.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757843Ab1JEWY4 (ORCPT ); Wed, 5 Oct 2011 18:24:56 -0400 Date: Thu, 6 Oct 2011 01:24:52 +0300 From: Adrian Bunk To: Andrew Lutomirski Cc: "H. Peter Anvin" , Linus Torvalds , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [3.1 patch] x86: default to vsyscall=native Message-ID: <20111005222452.GF14406@localhost.pp.htv.fi> References: <20111003090846.GA25136@localhost.pp.htv.fi> <20111003173359.GA3072@localhost.pp.htv.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Wed, Oct 05, 2011 at 03:13:51PM -0700, Andrew Lutomirski wrote: > On Mon, Oct 3, 2011 at 10:33 AM, Adrian Bunk wrote: > > On Mon, Oct 03, 2011 at 06:04:53AM -0700, Andrew Lutomirski wrote: > >> On Mon, Oct 3, 2011 at 2:08 AM, Adrian Bunk wrote: > >> > After upgrading a kernel the existing userspace should just work > >> > (assuming it did work before ;-) ), but when I upgraded my kernel > >> > from 3.0.4 to 3.1.0-rc8 a UML instance didn't come up properly. > >> > > >> > dmesg said: > >> >  linux-2.6.30.1[3800] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb9c498 ax:ffffffffff600000 si:0 di:606790 > >> >  linux-2.6.30.1[3856] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb13168 ax:ffffffffff600000 si:0 di:606790 > >> > > >> > Looking throught the changelog I ended up at commit 3ae36655 > >> > ("x86-64: Rework vsyscall emulation and add vsyscall= parameter"). > >> > > >> > Linus suggested in https://lkml.org/lkml/2011/8/9/376 to default to > >> > vsyscall=native. > >> > > >> > That sounds reasonable to me, and fixes the problem for me. > >> > >> At this point in the -rc cycle, this sounds fine. > >> > >> That being said, I'd like to fix it for real for 3.2.  This particular > >> failure is suspicious -- the "vsyscall fault" message means that > >> sys_gettimeofday returned EFAULT, which means that the old (3.0 and > >> before) vgettimeofday should *also* have segfaulted. > > > > This 2.6.30.1 UML kernel binary from 2009 worked for me for all host > > kernels from 2.6.30 to 3.0, and with 3.1.0-rc8 and vsyscall=native > > it also seems to run nicely. > > > > Looking deeper into "a UML instance didn't come up properly", > > the problem is that it comes up in a strange (readonly) state. > > > > There are "Using makefile-style concurrent boot in runlevel S." > > and "Using makefile-style concurrent boot in runlevel 2." in the > > logs with a Debian userspace, but no output from the init scripts > > in these broken bootups (normal messages are in non-broken bootups). > > > > Perhaps the two the messages I see in dmesg on the host are from the > > processes running rcS and rc2 failing early? > > > > In a working startup with a Debian userspace, I'm getting during rcS > >  Setting the system clock. > >  Cannot access the Hardware Clock via any known method. > >  Use the --debug option to see the details of our search for an access method. > >  Unable to set System Clock to: Mon Oct 3 17:01:35 UTC 2011 ... (warning). > > > >> We do have a bit > >> of a bug in that the new code doesn't report si_addr properly, but > >> that sounds unlikely as a culprit.  Did you try with the offending > >> commit reverted (i.e. fce8dc0)?  I bet that it also fails there. > > > > fce8dc0 is "x86-64: Wire up getcpu syscall", is that really the one you > > want me to revert? > > > >> What's the .config for your UML binary?  I'd like to see if I can > >> reproduce this. > > > > It's attached. > > > > I can't reproduce it. What distro is running inside the UML instance? Debian stable. > --Andy cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed