From owner-freebsd-drivers@FreeBSD.ORG Sun Jul 29 21:28:13 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AB5816A41A for ; Sun, 29 Jul 2007 21:28:13 +0000 (UTC) (envelope-from freebsdworld@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.186]) by mx1.freebsd.org (Postfix) with ESMTP id B9C1F13C494 for ; Sun, 29 Jul 2007 21:28:12 +0000 (UTC) (envelope-from freebsdworld@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so1477361mue for ; Sun, 29 Jul 2007 14:28:11 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=EkdXkyBE5loTnXOuTjdwW5XUtTNKxCy6YQFTmkHLfKhKPNMpQkoyrbvw4wUnhsSAYc62/r+lw0DlQwmhT9aQ7SBmOd0ITbRefaLJYGQgZLtJuy2Nso9PVu9HqiR0gGhnshlq5QtWGtos2lxBbfqjHdD1vJt5B19+ZFOtgmKgX+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=tDOvOyDO6CAt100ztdPJcigMAjcNfLhjeRrHGHxIYndbdLTPnyGrpurPbvdfSU7FVmI/wzc4xmO0/MTtSIzspirT0d5L+R6e+tuWHSZay3h+2lVUVW+1SxILhGU90BDpwLnFPv3RYFW9wUO52m97HSeg2/LLZQGBVECpN7ofeM8= Received: by 10.82.151.14 with SMTP id y14mr3639153bud.1185742757201; Sun, 29 Jul 2007 13:59:17 -0700 (PDT) Received: by 10.82.170.8 with HTTP; Sun, 29 Jul 2007 13:59:17 -0700 (PDT) Message-ID: <6199c3dc0707291359s5ae0f031w77b999159ebcdd80@mail.gmail.com> Date: Sun, 29 Jul 2007 16:59:17 -0400 From: "Benjamin Adams" To: freebsd-current@freebsd.org, freebsd-drivers@freebsd.org, freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Network card msk0 problems X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2007 21:28:13 -0000 Looks like a problem with the network card. 7.0-CURRENT-200706 FreeBSD 7.0-CURRENT-200706 #0: Thu Jun 7 21:38:42 UTC 2007 root@stiles.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Jul 29 16:01:55 Desktop kernel: msk0: link state changed to UP Jul 29 16:01:58 Desktop kernel: Memory modified after free 0xffffff0052429800(2048) val=1900c0de @ 0xffffff0052429800 Jul 29 16:02:00 Desktop kernel: Memory modified after free 0xffffff0052428800(2048) val=1900c0de @ 0xffffff0052428800 Jul 29 16:02:03 Desktop kernel: Memory modified after free 0xffffff0052428000(2048) val=1900c0de @ 0xffffff0052428000 Jul 29 16:02:04 Desktop kernel: Memory modified after free 0xffffff0052427800(2048) val=1900c0de @ 0xffffff0052427800 Jul 29 16:02:05 Desktop kernel: Memory modified after free 0xffffff0052427000(2048) val=1900c0de @ 0xffffff0052427000 This only happens sometimes: Jul 29 16:20:00 Desktop kernel: msk0: link state changed to UP Jul 29 16:20:17 Desktop su: adamsbd to root on /dev/ttyv0 Jul 29 16:20:38 Desktop kernel: Memory modified after free 0xffffff0053e70000(2048) val=ffffc0de @ 0xffffff0053e70000 Jul 29 16:20:38 Desktop kernel: Memory modified after free 0xffffff0053e71800(2048) val=ffffc0de @ 0xffffff0053e71800 Jul 29 16:20:38 Desktop kernel: Memory modified after free 0xffffff0053e71000(2048) val=ffffc0de @ 0xffffff0053e71000 Jul 29 16:20:38 Desktop kernel: Memory modified after free 0xffffff0053e72800(2048) val=1900c0de @ 0xffffff0053e72800 Jul 29 16:20:38 Desktop kernel: Memory modified after free 0xffffff0053e72000(2048) val=1900c0de @ 0xffffff0053e72000 Jul 29 16:20:38 Desktop kernel: Memory modified after free 0xffffff0053e73800(2048) val=1900c0de @ 0xffffff0053e73800 Jul 29 16:20:38 Desktop kernel: Memory modified after free 0xffffff0053e73000(2048) val=1900c0de @ 0xffffff0053e73000 Jul 29 16:20:38 Desktop kernel: msk0: link state changed to DOWN Jul 29 16:20:42 Desktop kernel: msk0: link state changed to UP Jul 29 16:20:42 Desktop kernel: msk0: link state changed to DOWN Jul 29 16:20:46 Desktop kernel: msk0: link state changed to UP Jul 29 16:20:49 Desktop dhclient[1092]: connection closed Jul 29 16:20:49 Desktop dhclient[1092]: exiting. Jul 29 16:20:49 Desktop kernel: msk0: link state changed to DOWN Jul 29 16:20:53 Desktop kernel: msk0: link state changed to UP Jul 29 16:20:57 Desktop kernel: msk0: link state changed to DOWN Jul 29 16:20:57 Desktop dhclient: New IP Address (msk0): 192.168.1.4 Jul 29 16:20:57 Desktop dhclient: New Subnet Mask (msk0): 255.255.255.0 Jul 29 16:20:57 Desktop dhclient: New Broadcast Address (msk0): 192.168.1.255 Jul 29 16:20:57 Desktop dhclient: New Routers (msk0): 192.168.1.1 Jul 29 16:21:01 Desktop kernel: msk0: link state changed to UP Jul 29 16:21:07 Desktop dhclient[1126]: connection closed Jul 29 16:21:07 Desktop dhclient[1126]: exiting. Jul 29 16:21:18 Desktop kernel: msk0: link state changed to DOWN Jul 29 16:21:21 Desktop kernel: msk0: link state changed to UP Jul 29 16:21:21 Desktop kernel: msk0: link state changed to DOWN Jul 29 16:21:26 Desktop kernel: msk0: link state changed to UP Jul 29 16:21:29 Desktop kernel: msk0: link state changed to DOWN Jul 29 16:21:29 Desktop dhclient: New IP Address (msk0): 192.168.1.4 Jul 29 16:21:29 Desktop dhclient: New Subnet Mask (msk0): 255.255.255.0 Jul 29 16:21:29 Desktop dhclient: New Broadcast Address (msk0): 192.168.1.255 Jul 29 16:21:29 Desktop dhclient: New Routers (msk0): 192.168.1.1 Jul 29 16:21:33 Desktop kernel: msk0: link state changed to UP Network card: kernel: mskc0: port 0x9c00-0x9cff mem 0xfdcfc000-0xfdcfffff irq 16 at device 0.0 on pci3 kerrnel: msk0: on mskc0 Ben Adams From owner-freebsd-drivers@FreeBSD.ORG Mon Jul 30 06:03:23 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E03816A41F for ; Mon, 30 Jul 2007 06:03:23 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.190]) by mx1.freebsd.org (Postfix) with ESMTP id E913B13C48D for ; Mon, 30 Jul 2007 06:03:22 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0910.google.com with SMTP id f1so297422rvb for ; Sun, 29 Jul 2007 23:03:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=GfA2LRgg6atDGtuFl+Dhf+TBsmJBxKScTjVsp5MVxaByDUKDz+paXa7s2IKO8sWKRoffVb0pcpq6effVgHw4WF/aX+IaBuk61QEd/wXGwfYJalvl21IkpVxX09wI5GHReoTNPCfVYWyd/VoAyKX/9kYJS8xNy0aimOECW3lHjYE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=Bp0R4velUzt7gpXZ5CYTxDAZ4qYMK+GkKOY9Soq3V/BtWXHdsNW+prl1MVVjJVC4tvHSI/v/IeGkOk5fpZGTecktVL7A0oY2IAOnoe4YYPrBRyIZs9wRwd7PTZeOIZvATC5oIXnyKqnL2PldSieu1YK5wZVIrSBplyw6qh4oKOM= Received: by 10.114.199.1 with SMTP id w1mr5235406waf.1185773706429; Sun, 29 Jul 2007 22:35:06 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id k26sm3528338waf.2007.07.29.22.35.02 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Jul 2007 22:35:04 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id l6U5YspL089586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Jul 2007 14:34:54 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l6U5Ysrd089585; Mon, 30 Jul 2007 14:34:54 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Mon, 30 Jul 2007 14:34:54 +0900 From: Pyun YongHyeon To: Benjamin Adams Message-ID: <20070730053454.GD88265@cdnetworks.co.kr> References: <6199c3dc0707291359s5ae0f031w77b999159ebcdd80@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6199c3dc0707291359s5ae0f031w77b999159ebcdd80@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, freebsd-drivers@freebsd.org Subject: Re: Network card msk0 problems X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2007 06:03:23 -0000 On Sun, Jul 29, 2007 at 04:59:17PM -0400, Benjamin Adams wrote: > Looks like a problem with the network card. > > 7.0-CURRENT-200706 FreeBSD 7.0-CURRENT-200706 #0: Thu Jun 7 21:38:42 UTC > 2007 root@stiles.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 > > Jul 29 16:01:55 Desktop kernel: msk0: link state changed to UP > Jul 29 16:01:58 Desktop kernel: Memory modified after free > 0xffffff0052429800(2048) val=1900c0de @ 0xffffff0052429800 > Jul 29 16:02:00 Desktop kernel: Memory modified after free > 0xffffff0052428800(2048) val=1900c0de @ 0xffffff0052428800 > Jul 29 16:02:03 Desktop kernel: Memory modified after free > 0xffffff0052428000(2048) val=1900c0de @ 0xffffff0052428000 > Jul 29 16:02:04 Desktop kernel: Memory modified after free > 0xffffff0052427800(2048) val=1900c0de @ 0xffffff0052427800 > Jul 29 16:02:05 Desktop kernel: Memory modified after free > 0xffffff0052427000(2048) val=1900c0de @ 0xffffff0052427000 > > > This only happens sometimes: > Jul 29 16:20:00 Desktop kernel: msk0: link state changed to UP > Jul 29 16:20:17 Desktop su: adamsbd to root on /dev/ttyv0 > Jul 29 16:20:38 Desktop kernel: Memory modified after free > 0xffffff0053e70000(2048) val=ffffc0de @ 0xffffff0053e70000 > Jul 29 16:20:38 Desktop kernel: Memory modified after free > 0xffffff0053e71800(2048) val=ffffc0de @ 0xffffff0053e71800 > Jul 29 16:20:38 Desktop kernel: Memory modified after free > 0xffffff0053e71000(2048) val=ffffc0de @ 0xffffff0053e71000 > Jul 29 16:20:38 Desktop kernel: Memory modified after free > 0xffffff0053e72800(2048) val=1900c0de @ 0xffffff0053e72800 > Jul 29 16:20:38 Desktop kernel: Memory modified after free > 0xffffff0053e72000(2048) val=1900c0de @ 0xffffff0053e72000 > Jul 29 16:20:38 Desktop kernel: Memory modified after free > 0xffffff0053e73800(2048) val=1900c0de @ 0xffffff0053e73800 > Jul 29 16:20:38 Desktop kernel: Memory modified after free > 0xffffff0053e73000(2048) val=1900c0de @ 0xffffff0053e73000 > Jul 29 16:20:38 Desktop kernel: msk0: link state changed to DOWN > Jul 29 16:20:42 Desktop kernel: msk0: link state changed to UP > Jul 29 16:20:42 Desktop kernel: msk0: link state changed to DOWN > Jul 29 16:20:46 Desktop kernel: msk0: link state changed to UP > Jul 29 16:20:49 Desktop dhclient[1092]: connection closed > Jul 29 16:20:49 Desktop dhclient[1092]: exiting. > Jul 29 16:20:49 Desktop kernel: msk0: link state changed to DOWN > Jul 29 16:20:53 Desktop kernel: msk0: link state changed to UP > Jul 29 16:20:57 Desktop kernel: msk0: link state changed to DOWN > Jul 29 16:20:57 Desktop dhclient: New IP Address (msk0): 192.168.1.4 > Jul 29 16:20:57 Desktop dhclient: New Subnet Mask (msk0): 255.255.255.0 > Jul 29 16:20:57 Desktop dhclient: New Broadcast Address (msk0): > 192.168.1.255 > Jul 29 16:20:57 Desktop dhclient: New Routers (msk0): 192.168.1.1 > Jul 29 16:21:01 Desktop kernel: msk0: link state changed to UP > Jul 29 16:21:07 Desktop dhclient[1126]: connection closed > Jul 29 16:21:07 Desktop dhclient[1126]: exiting. > Jul 29 16:21:18 Desktop kernel: msk0: link state changed to DOWN > Jul 29 16:21:21 Desktop kernel: msk0: link state changed to UP > Jul 29 16:21:21 Desktop kernel: msk0: link state changed to DOWN > Jul 29 16:21:26 Desktop kernel: msk0: link state changed to UP > Jul 29 16:21:29 Desktop kernel: msk0: link state changed to DOWN > Jul 29 16:21:29 Desktop dhclient: New IP Address (msk0): 192.168.1.4 > Jul 29 16:21:29 Desktop dhclient: New Subnet Mask (msk0): 255.255.255.0 > Jul 29 16:21:29 Desktop dhclient: New Broadcast Address (msk0): > 192.168.1.255 > Jul 29 16:21:29 Desktop dhclient: New Routers (msk0): 192.168.1.1 > Jul 29 16:21:33 Desktop kernel: msk0: link state changed to UP > > Network card: > kernel: mskc0: port 0x9c00-0x9cff > mem 0xfdcfc000-0xfdcfffff irq 16 at device 0.0 on pci3 > kerrnel: msk0: 0x02> on mskc0 > I guess you're the first one reported 'memory modified free' issue. I've never seen these warnings except inital driver development stage. Would you show me verbosed boot messages related with msk(4) and phy drivers? -- Regards, Pyun YongHyeon From owner-freebsd-drivers@FreeBSD.ORG Mon Jul 30 21:37:50 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F87A16A41A for ; Mon, 30 Jul 2007 21:37:50 +0000 (UTC) (envelope-from ar3s@sapo.pt) Received: from sapo.pt (relay3.ptmail.sapo.pt [212.55.154.23]) by mx1.freebsd.org (Postfix) with SMTP id AD6C813C45A for ; Mon, 30 Jul 2007 21:37:49 +0000 (UTC) (envelope-from ar3s@sapo.pt) Received: (qmail 6780 invoked from network); 30 Jul 2007 21:11:08 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.208) by relay3 with SMTP; 30 Jul 2007 21:11:08 -0000 Received: (qmail 12526 invoked from network); 30 Jul 2007 21:11:08 -0000 X-AntiVirus: PTMail-AV 0.3-0.90.3 X-Virus-Status: Clean (0.04035 seconds) Received: from unknown (HELO Lusitania) (Ar3s@sapo.pt@[82.154.117.84]) (envelope-sender ) by mta13 (qmail-ldap-1.03) with SMTP for ; 30 Jul 2007 21:11:07 -0000 Message-ID: <001001c7d2ee$283f8790$54759a52@Lusitania> From: "Ar3s" To: Date: Mon, 30 Jul 2007 22:11:11 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000C_01C7D2F6.8998AAA0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Simple driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2007 21:37:50 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C7D2F6.8998AAA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello everyone,=20 Im not sure if this is the right list for my question. I'm trying to = make a simple module that will echo some information of a given pid. But = the problem is that it causes the kernel to panic, and I have no idea = why. I have attached the source. cheers, Bruno ------=_NextPart_000_000C_01C7D2F6.8998AAA0 Content-Type: application/octet-stream; name="info.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="info.zip" UEsDBBQAAAAIAISw/jaAjhyxLAAAAC8AAAAIAAAATWFrZWZpbGXz9vV3seXMzEvLDw5yDoaw9JK5 uPQy85JzSlNSFWySilP0snPzU/Rys+24AFBLAwQUAAAACADCsP42VDdXmPoAAAChAQAABgAAAGNh bGwuY22OwW6DMBBEzyDxD1uiRnaFaNJjSPIXPTUosrBJLIFB9oKaVv337lqozSEH26vZ8ZtZWdd0 kzawD6jtUF6PWbr6127hlU6juu7BBm+jCQ/0ftBTZ+IiS61D6JV1ggflL00BzVV5eKF5/qhlln5n acLLJejspr4iKaCfGvobYeeAihx0VQxNbAuCYfB0gDcJjEhGT5RW5O9BXczu5J4D7EerjyeXFxDT NrVkcmI+LYpNnH8YF9MUlrPxwQ4ODhDslxlawWq0UQueBb2tdVrkaALmsoD1n+WuPgOYpxWqkkrN qquWHG9w8k4sZnH3iTriYEUsuq2lZCi1+wVQSwMEFAAAAAgAubD+NrBnrc4XAgAAFQUAAAYAAABp bmZvLmOdU9tq20AQfbbB/zBNaFCMXCevSWMwtgumimTi+KEgEOpqVQtLK3UvaUPwv3d2dbGCt1Aq Y2mYnXPmzNndy4yRXCUUPotXMZWvFRWf9rPR8PJdvop5XNjyvCSWdFEmKqeWBfxTJi0LB8oZze0I aev8U1Fl65CX5GBTpCT9bclzKkrFCX2JuQ0V53kzoP4JGcuMQMYklGkqqIQH8INo+227mHve/bsC SYV0hOSKYLznNE5gLBMXXsoMIyQnyB3F/Ie4RqDJZiwtW4g2FsaVXtO0NQ1SGgS8jYYD3aTKEiw4 3vfENbW10TWkiR8M7NbFl063uP9VPRpqujNpYxVXyDvAD3Z0ztev+yxGwUBVHJunzsVmvbyDj1nI LlxAgskMB9QWDIw1VZqxxOnyZoFTqTiDG22D5vqrkbXc6XTzFCwiL1h8dYy5p95r/0sAk1nIQtnJ CKU/f1xhLEK2eFotV/7zeu5tO41aSYRamoiURdGEinCaTGaER1w1MzS9d/6p+7HegLNtyEs0vp2g vkwwrr+uKSBFtyloox4OmiNBOS85On9jrAV8xK9Mkj04iMHCwVudJbGg8Bgs0Yv58g7zJyc87E6T Dzih1gjN8x1Pw6Ej7eB6HEPQ1nU0O5b/A1FC01jlskfQTrAKNn7wvN1tNhawjo8tR30IHAPs2drc ywhl7ryVo8+gC1f1zcWgdzdc47gL/s7zNMEfUEsBAhQAFAAAAAgAhLD+NoCOHLEsAAAALwAAAAgA AAAAAAAAAQAgAAAAAAAAAE1ha2VmaWxlUEsBAhQAFAAAAAgAwrD+NlQ3V5j6AAAAoQEAAAYAAAAA AAAAAQAgAAAAUgAAAGNhbGwuY1BLAQIUABQAAAAIALmw/jawZ63OFwIAABUFAAAGAAAAAAAAAAEA IAAAAHABAABpbmZvLmNQSwUGAAAAAAMAAwCeAAAAqwMAAAAA ------=_NextPart_000_000C_01C7D2F6.8998AAA0-- From owner-freebsd-drivers@FreeBSD.ORG Tue Jul 31 12:34:17 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89CBA16A417 for ; Tue, 31 Jul 2007 12:34:17 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 3E61313C465 for ; Tue, 31 Jul 2007 12:34:17 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so438319anc for ; Tue, 31 Jul 2007 05:34:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=maMlTJzjPvJFLAHKr5UYvSoxDXA4pc5Ri8YlfGbdPpbfWKrLbhoqEutXKdxUZF2JzZIQdZ9zjbgoCX8UG2CGRGM7Um4Of2EzM69RNlosEFutMC5bwvGPKsObbqxBrL2Rz3XC2iMv+m3G2n8h0OZoPpgbOc5N//Xoi/K9AFX4GWE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UowsPjc/IJwkaHm0W9oqY/Sb2OiQqqsoI3YpxDpWKaM6JEYPuOkgR1E9pZBCr6OnFIX/JGa5yGhrwFeZbl90xJN6LxnaMp9daj0OPGbWtjCwwrNDduAKeb+7cMJgtjI+7Pw9SwQk/hc2H/yiblimMmUuKAOzHemJYyvNCXFnAKw= Received: by 10.100.110.16 with SMTP id i16mr5200747anc.1185883632769; Tue, 31 Jul 2007 05:07:12 -0700 (PDT) Received: by 10.100.96.15 with HTTP; Tue, 31 Jul 2007 05:07:12 -0700 (PDT) Message-ID: <5bf3e10d0707310507p1c2bd7dbx381e2c96bce39f10@mail.gmail.com> Date: Tue, 31 Jul 2007 14:07:12 +0200 From: "Die Gestalt" To: freebsd-drivers@freebsd.org In-Reply-To: <001001c7d2ee$283f8790$54759a52@Lusitania> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001001c7d2ee$283f8790$54759a52@Lusitania> Subject: Re: Simple driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2007 12:34:17 -0000 That's because when you program a driver you really don't need to check the input values. You can cast values and dereference them and hope it will work, that's no problem. Oh no wait, that's exactly the other way around. Read this: http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/book.html Work on the examples, spend some time and if you still have a problem feel free to ask. By the way I think you can do what you want without writing a driver. Which brings me to some rules regarding driver development: 1 - You don't need to write a driver. 2 - If you really need to write a driver, see rule #1 3 - If you absolutely need to write a driver and the sake of humanity depends on this very driver you are about to write then OMG A THREE HEADED MONKEY!!! On 7/30/07, Ar3s wrote: > Hello everyone, > Im not sure if this is the right list for my question. I'm trying to make a simple module that will echo some information of a given pid. But the problem is that it causes the kernel to panic, and I have no idea why. I have attached the source. > > cheers, > Bruno > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" > > >