From owner-freebsd-stable@FreeBSD.ORG Sat Sep 11 11:55:48 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D7C8106564A for ; Sat, 11 Sep 2010 11:55:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3CA8FC0A for ; Sat, 11 Sep 2010 11:55:48 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DBE7946B37; Sat, 11 Sep 2010 07:55:47 -0400 (EDT) Received: from John-Baldwins-Macbook-Pro.local (c-68-45-19-154.hsd1.nj.comcast.net [68.45.19.154]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5DA468A03C; Sat, 11 Sep 2010 07:55:36 -0400 (EDT) Message-ID: <4C8B6E38.7030303@FreeBSD.org> Date: Sat, 11 Sep 2010 07:55:36 -0400 From: John Baldwin User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: perryh@pluto.rain.com References: <20100909150012.GA27370@lordcow.org> <4c89d653.UyUz1Sv9zPckJnig%perryh@pluto.rain.com> <201009100757.49777.jhb@freebsd.org> <4c8b3777.A5l69BLBx5dsBnNl%perryh@pluto.rain.com> In-Reply-To: <4c8b3777.A5l69BLBx5dsBnNl%perryh@pluto.rain.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Sat, 11 Sep 2010 07:55:36 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-stable@freebsd.org Subject: Re: MSIX failure X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2010 11:55:48 -0000 perryh@pluto.rain.com wrote: > John Baldwin wrote: >> On Friday, September 10, 2010 2:55:15 am perryh@pluto.rain.com wrote: >>> ... >>> It is arguably a bug to open O_RDWR when only examining things. >> You have to have RDWR permission to issue the ioctl to read config >> registers which pciconf does when examining capabilities. > > So much for avoiding a reboot for (or whatever the > correct address is -- that one bounced), but now it is beginning to > look as if there may be a POLA violation at a lower level. Unless > there are devices out there whose state can be changed by merely > _reading_ (not writing) their configuration registers, I would not > expect to need RDWR permission just to read them. Umm, not all config registers are standardized and devices are free to define device-specific registers with device-specific behavior (many do). Given that, it is quite possible for a device to implement a register that takes action when read (e.g. resets to 0 or clears status bits, etc.). pciconf -l itself does not require RDWR permissions, only -c which does a good bit more work. -- John Baldwin