From owner-svn-src-stable-8@FreeBSD.ORG Fri Dec 31 12:48:43 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E8231065674; Fri, 31 Dec 2010 12:48:43 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE6E8FC1D; Fri, 31 Dec 2010 12:48:43 +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 oBVCmhC7073192; Fri, 31 Dec 2010 12:48:43 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBVCmhTp073190; Fri, 31 Dec 2010 12:48:43 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201012311248.oBVCmhTp073190@svn.freebsd.org> From: Bernhard Schmidt Date: Fri, 31 Dec 2010 12:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216837 - stable/8/sys/compat/ndis X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2010 12:48:43 -0000 Author: bschmidt Date: Fri Dec 31 12:48:43 2010 New Revision: 216837 URL: http://svn.freebsd.org/changeset/base/216837 Log: MFC r216049: Some drivers rely on the existence of certain keys. The Atheros 9xxx driver for example requests the NetCfgInstanceId but doesn't check the returned status code and will happily access random memory instead. Submitted by: Paul B Mahol Modified: stable/8/sys/compat/ndis/kern_ndis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/ndis/kern_ndis.c ============================================================================== --- stable/8/sys/compat/ndis/kern_ndis.c Fri Dec 31 11:55:39 2010 (r216836) +++ stable/8/sys/compat/ndis/kern_ndis.c Fri Dec 31 12:48:43 2010 (r216837) @@ -331,6 +331,16 @@ ndis_create_sysctls(arg) ndis_add_sysctl(sc, "NdisVersion", "NDIS API Version", "0x00050001", CTLFLAG_RD); + /* + * Some miniport drivers rely on the existence of the SlotNumber, + * NetCfgInstanceId and DriverDesc keys. + */ + ndis_add_sysctl(sc, "SlotNumber", "Slot Numer", "01", CTLFLAG_RD); + ndis_add_sysctl(sc, "NetCfgInstanceId", "NetCfgInstanceId", + "{12345678-1234-5678-CAFE0-123456789ABC}", CTLFLAG_RD); + ndis_add_sysctl(sc, "DriverDesc", "Driver Description", + "NDIS Network Adapter", CTLFLAG_RD); + /* Bus type (PCI, PCMCIA, etc...) */ sprintf(buf, "%d", (int)sc->ndis_iftype); ndis_add_sysctl(sc, "BusType", "Bus Type", buf, CTLFLAG_RD);