From owner-freebsd-bugs Tue Dec 11 8: 0:12 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7FED937B41C for ; Tue, 11 Dec 2001 08:00:06 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBBG06S59877; Tue, 11 Dec 2001 08:00:06 -0800 (PST) (envelope-from gnats) Date: Tue, 11 Dec 2001 08:00:06 -0800 (PST) Message-Id: <200112111600.fBBG06S59877@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Brooks Davis Subject: Re: kern/32677: pciconf -l opens /dev/pci for O_RDWR Reply-To: Brooks Davis Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/32677; it has been noted by GNATS. From: Brooks Davis To: Seth Cc: FreeBSD-gnats-submit@freebsd.org, msmith@freebsd.org Subject: Re: kern/32677: pciconf -l opens /dev/pci for O_RDWR Date: Tue, 11 Dec 2001 07:59:37 -0800 On Tue, Dec 11, 2001 at 07:13:07AM -0500, Seth wrote: > Mike/Brooks, > > Thanks for the update & explanation. I guess this means that stock pciconf > will remain unusable on systems where securelevel > 0 until the Alpha > code can be tweaked? > > If I were to patch my own code to open O_RDONLY (I'm on Intel/AMD), do you > anticipate that I would experience any problems such as you describe below? I tried it before looking at the kernel code and it actually doesn't work due to the way the kernel is configured. You would need to do that (it's quite easy) and then modify pci_ioctl() at sys/pci/pci.c:752 moving the "if (!(flag & FWRITE))" check into PCIOCWRITE. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message