From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:32:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BABE4106564A; Mon, 13 Sep 2010 19:32:19 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABFB8FC14; Mon, 13 Sep 2010 19:32:19 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0L8P00506A9U3O00@smtpauth3.wiscmail.wisc.edu>; Mon, 13 Sep 2010 14:32:19 -0500 (CDT) Received: from anacreon.physics.wisc.edu (anacreon.physics.wisc.edu [128.104.160.176]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0L8P000PCA9QQ560@smtpauth3.wiscmail.wisc.edu>; Mon, 13 Sep 2010 14:32:14 -0500 (CDT) Date: Mon, 13 Sep 2010 14:32:13 -0500 From: Nathan Whitehorn In-reply-to: <201009131518.38829.jhb@freebsd.org> To: John Baldwin Message-id: <20100913143213.420ec5c6@anacreon.physics.wisc.edu> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; powerpc64-portbld-freebsd9.0) X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.160.176 X-Spam-PmxInfo: Server=avs-14, Version=5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2010.9.13.192414, SenderIP=128.104.160.176 References: <201009131848.o8DImNU6024992@svn.freebsd.org> <201009131518.38829.jhb@freebsd.org> Cc: svn-src-head@freebsd.org, Matthew D Fleming , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212572 - in head/sys: dev/cxgb kern sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:32:19 -0000 On Mon, 13 Sep 2010 15:18:38 -0400 John Baldwin wrote: > On Monday, September 13, 2010 2:48:23 pm Matthew D Fleming wrote: > > Author: mdf > > Date: Mon Sep 13 18:48:23 2010 > > New Revision: 212572 > > URL: http://svn.freebsd.org/changeset/base/212572 > > > > Log: > > Revert r212370, as it causes a LOR on powerpc. powerpc does a few > > unexpected things in copyout(9) and so wiring the user buffer is > > not sufficient to perform a copyout(9) while holding a random mutex. > > > > Requested by: nwhitehorn > > Hmmm, that is going to break several other sysctls as well then. > Many sysctls use sysctl_wire_old_buffer() explicitly so that they can > then call SYSCTL_OUT() without dropping a lock. The pcblist sysctls > do this for example I think. In general code in the kernel assumes > that copyout(9) to/from a wired buffer is safe while holding mutexes > or rwlocks. > Yes. The issue here is that powerpc64 copyin/out() needs to acquire the PMAP lock, so holding normal mutexes is fine, but calling into copyout() with non-sleepable locks like this code did is not. Matthew and I are working on a better solution that fixes this on the powerpc copyout() side, but it is tricky for a variety of reasons and will take a little while. In the meantime, this keeps powerpc64 systems bootable. -Nathan