From nobody@FreeBSD.org  Sun Mar 15 18:27:08 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A2CE10656C5
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 Mar 2009 18:27:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 17EB38FC1B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 Mar 2009 18:27:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2FIR75k071131
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 Mar 2009 18:27:07 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2FIR6A2071130;
	Sun, 15 Mar 2009 18:27:06 GMT
	(envelope-from nobody)
Message-Id: <200903151827.n2FIR6A2071130@www.freebsd.org>
Date: Sun, 15 Mar 2009 18:27:06 GMT
From: Gennady Kudryashoff <lothlorien@pvu.msk.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ndis with rt2860.sys causes kernel panic in CURRENT-amd64
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132672
>Category:       kern
>Synopsis:       [ndis] [panic] ndis with rt2860.sys causes kernel panic in CURRENT-amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 15 18:30:04 UTC 2009
>Closed-Date:    
>Last-Modified:  Sun Mar 15 22:20:00 UTC 2009
>Originator:     Gennady Kudryashoff
>Release:        8.0-CURRENT
>Organization:
Federal Migration Service, Moscow branch
>Environment:
FreeBSD wmcurrent.home 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sun Mar 15 17:40:29 MSK 2009      root@wmcurrent.home:/usr/obj/usr/src/sys/GENERIC   amd64
>Description:
rt2860_sys.ko, generated from rt2860.inf and rt2860.sys driver for WinXP64 from
http://dlcdnet.asus.com/pub/ASUS/DigitalHome/DAV/B202/AWNE766_V1100.zip
(eeeBox 202)

causes kernel panic in FreeBSD 8.0-CURRENT (as well in 7.1-STABLE) with GENERIC kernel, here is console output after kldload ./rt2860_sys.ko:

=== [cut here] ===
no match for ZwWriteFile
no match for ZwCreateFile
no match for ZwReadFile

Fatal trap 12: page fault while in kernel mode
cpuid=1; apic id = 01
fault virtual address    = 0xfffff78000000320
fault code               = supervisor read data, page not present
instruction pointer      = 0x8:0xffffffff810de2dc
stack pointer            = 0x10:0xffffffffe524ed540
frame pointer            = 0x10:0xffffffffe524ed6f0
code segment             = base 0x0, limit 0xfffff, type 0x1b
                         = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags         = interrupt enabled, resume, IOPL = 0
current process          = 1048 (kldload)
[thread pid 1048 tid 100055 ]
Stopped at      0x0xffffffff810de2dc:     movq         (%rax),%rax
=== [cut here] ===

Any other valuable information can be provided by request.

>How-To-Repeat:
1. Get http://dlcdnet.asus.com/pub/ASUS/DigitalHome/DAV/B202/AWNE766_V1100.zip
2. do ndisgen ./rt2860.inf ./rt2860.sys
3. kldload ./rt2860_sys.ko

>Fix:


>Release-Note:
>Audit-Trail:

From: Scot Hetzel <swhetzel@gmail.com>
To: Gennady Kudryashoff <lothlorien@pvu.msk.ru>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: amd64/132672: ndis with rt2860.sys causes kernel panic in 
	CURRENT-amd64
Date: Sun, 15 Mar 2009 14:53:45 -0500

 On Sun, Mar 15, 2009 at 1:27 PM, Gennady Kudryashoff
 > rt2860_sys.ko, generated from rt2860.inf and rt2860.sys driver for WinXP64 from
 > http://dlcdnet.asus.com/pub/ASUS/DigitalHome/DAV/B202/AWNE766_V1100.zip
 > (eeeBox 202)
 >
 > causes kernel panic in FreeBSD 8.0-CURRENT (as well in 7.1-STABLE) with GENERIC kernel, here is console output after kldload ./rt2860_sys.ko:
 >
 > === [cut here] ===
 > no match for ZwWriteFile
 > no match for ZwCreateFile
 > no match for ZwReadFile
 >
 This is the cause of your kernel panic.  This Windows NDIS Driver
 wants 3 functions that are not currently implemented in the FreeBSD
 NDIS Driver.
 
 You'll need to either look for an older Windows NDIS Driver, or
 attempt to implement these missing functions.
 
 Scot
Responsible-Changed-From-To: freebsd-amd64->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Mar 15 21:59:47 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132672 

From: Gennady Kudryashoff <lothlorien@pvu.msk.ru>
To: Scot Hetzel <swhetzel@gmail.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re[2]: amd64/132672: ndis with rt2860.sys causes kernel panic in  CURRENT-amd64
Date: Mon, 16 Mar 2009 00:15:32 +0300

 Hello Scot,
 
 Sunday, March 15, 2009, 10:53:45 PM, you wrote:
 
 
 >> === [cut here] ===
 >> no match for ZwWriteFile
 >> no match for ZwCreateFile
 >> no match for ZwReadFile
 >>
 SH> This is the cause of your kernel panic.  This Windows NDIS Driver
 SH> wants 3 functions that are not currently implemented in the FreeBSD
 SH> NDIS Driver.
 
 I'm afraid it isn't. :(
 
 If it was right there is no need to write a PR. There is no panic in
 i386 version of 8-CURRENT (and 7-STABLE) with i386 drivers from the
 same archive when I make an attempt to kldload it, however, strings
 
 >> no match for ZwWriteFile
 >> no match for ZwCreateFile
 >> no match for ZwReadFile
 
 are present in console output and driver works (I can attach module).
 
 SH> You'll need to either look for an older Windows NDIS Driver, or
 SH> attempt to implement these missing functions.
 
 Unfortunately, I'm not a programmer :( From the other side, porting
 new features of ral driver from OpenBSD side (with rt2860 support)
 will be more promising here.
 
 
 -- 
 Best regards,
  Gennady
 
 Passport & Visa Dept of Moscow Police /
 -   . 
 
>Unformatted:
