From owner-svn-src-stable-7@FreeBSD.ORG Fri Sep 18 14:12:40 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D57681065670; Fri, 18 Sep 2009 14:12:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C22AA8FC27; Fri, 18 Sep 2009 14:12:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8IECe11093025; Fri, 18 Sep 2009 14:12:40 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8IECecw093023; Fri, 18 Sep 2009 14:12:40 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200909181412.n8IECecw093023@svn.freebsd.org> From: Andriy Gapon Date: Fri, 18 Sep 2009 14:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197311 - in stable/7/sys: . contrib/pf dev/pci X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2009 14:12:40 -0000 Author: avg Date: Fri Sep 18 14:12:40 2009 New Revision: 197311 URL: http://svn.freebsd.org/changeset/base/197311 Log: MFC r197099: pci(4): don't perform maximum register number check Different sub-kinds of PCI buses may have different rules and thus it is up for the bus backends to do proper input checks. For example, PCIe allows configuration register numbers < 0x1000, while for PCI proper the limit is 0x100. And, in fact, the buses already do the checks. Reviewed by: jhb Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/pci/pci_user.c Modified: stable/7/sys/dev/pci/pci_user.c ============================================================================== --- stable/7/sys/dev/pci/pci_user.c Fri Sep 18 14:05:56 2009 (r197310) +++ stable/7/sys/dev/pci/pci_user.c Fri Sep 18 14:12:40 2009 (r197311) @@ -605,9 +605,8 @@ getconfexit: case 4: case 2: case 1: - /* Make sure register is in bounds and aligned. */ + /* Make sure register is not negative and aligned. */ if (io->pi_reg < 0 || - io->pi_reg + io->pi_width > PCI_REGMAX + 1 || io->pi_reg & (io->pi_width - 1)) { error = EINVAL; break;