From nobody@FreeBSD.org  Mon Feb 11 17:14:56 2008
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 4F98016A475
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Feb 2008 17:14:56 +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 29A0113C4F6
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Feb 2008 17:14:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m1BHCgrQ034385
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Feb 2008 17:12:42 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m1BHCgQQ034384;
	Mon, 11 Feb 2008 17:12:42 GMT
	(envelope-from nobody)
Message-Id: <200802111712.m1BHCgQQ034384@www.freebsd.org>
Date: Mon, 11 Feb 2008 17:12:42 GMT
From: Bruce Becker <hostmaster@gts.infra-service.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: coretemp causes kernel panic on pentium III
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         120541
>Category:       i386
>Synopsis:       coretemp causes kernel panic on pentium III
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    rpaulo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 11 17:20:00 UTC 2008
>Closed-Date:    Thu Feb 14 14:16:45 UTC 2008
>Last-Modified:  Thu Feb 21 00:00:11 UTC 2008
>Originator:     Bruce Becker
>Release:        7.0-PRERELEASE
>Organization:
InfraService
>Environment:
FreeBSD twain 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #6: Sun Feb 10 20:43:49 EST 2008     root@twain:/usr/obj/usr/src/sys/TWAIN  i386

>Description:

When "device coretemp" is included into the /sys/i386/conf config file, the kernel panics with a general protection fault when "/etc/rc.d/initrandom" executes "sysctl -a"

>How-To-Repeat:

On a pentium III system:

kldload coretemp.ko; sysctl -a

>Fix:


>Release-Note:
>Audit-Trail:

From: Rui Paulo <rpaulo@fnop.net>
To: Bruce Becker <hostmaster@gts.infra-service.ca>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: i386/120541: coretemp causes kernel panic on pentium III
Date: Mon, 11 Feb 2008 20:25:55 +0000

 On Feb 11, 2008, at 5:12 PM, Bruce Becker wrote:
 
 >
 >> Number:         120541
 >> Category:       i386
 >> Synopsis:       coretemp causes kernel panic on pentium III
 >> Confidential:   no
 >> Severity:       critical
 >> Priority:       medium
 >> Responsible:    freebsd-i386
 >> State:          open
 >> Quarter:
 >> Keywords:
 >> Date-Required:
 >> Class:          sw-bug
 >> Submitter-Id:   current-users
 >> Arrival-Date:   Mon Feb 11 17:20:00 UTC 2008
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Bruce Becker
 >> Release:        7.0-PRERELEASE
 >> Organization:
 > InfraService
 >> Environment:
 > FreeBSD twain 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #6: Sun Feb 10  
 > 20:43:49 EST 2008     root@twain:/usr/obj/usr/src/sys/TWAIN  i386
 >
 >> Description:
 >
 > When "device coretemp" is included into the /sys/i386/conf config  
 > file, the kernel panics with a general protection fault when "/etc/ 
 > rc.d/initrandom" executes "sysctl -a"
 >
 >> How-To-Repeat:
 >
 > On a pentium III system:
 >
 > kldload coretemp.ko; sysctl -a
 >
 >> Fix:
 >
 >
 >> Release-Note:
 >> Audit-Trail:
 >> Unformatted:
 > _______________________________________________
 > freebsd-i386@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-i386
 > To unsubscribe, send any mail to "freebsd-i386- 
 > unsubscribe@freebsd.org"
 
 
 
 This is a known issue and we can't do much about it unless try to  
 reject module initialization if the CPU model is lower than a Pentium  
 4. It's Intel's fault that querying Thermal sensors on a PIII returns  
 true.
 
 Can you test this patch?
 
 Index: coretemp.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/coretemp/coretemp.c,v
 retrieving revision 1.5
 diff -u -p -r1.5 coretemp.c
 --- coretemp.c	10 Jan 2008 16:09:22 -0000	1.5
 +++ coretemp.c	11 Feb 2008 07:23:45 -0000
 @@ -143,6 +143,9 @@ coretemp_attach(device_t dev)
   	cpu_model += ((cpu_id >> 16) & 0xf) << 4;
   	cpu_mask = cpu_id & 15;
 
 +	if (cpu_model < 0xe)
 +		return (ENXIO);
 +	
   #if 0 /*
          * XXXrpaulo: I have this CPU model and when it returns from C3
          * coretemp continues to function properly.
 
 
 Regards.
 --
 Rui Paulo
 
 
 
 
State-Changed-From-To: open->analyzed 
State-Changed-By: rpaulo 
State-Changed-When: Tue Feb 12 10:36:09 UTC 2008 
State-Changed-Why:  
I have a fix. 


Responsible-Changed-From-To: freebsd-i386->rpaulo 
Responsible-Changed-By: rpaulo 
Responsible-Changed-When: Tue Feb 12 10:36:09 UTC 2008 
Responsible-Changed-Why:  
I have a fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120541 
State-Changed-From-To: analyzed->closed 
State-Changed-By: rpaulo 
State-Changed-When: Thu Feb 14 14:16:24 UTC 2008 
State-Changed-Why:  
Patch committed. Thanks. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/120541: commit references a PR
Date: Thu, 14 Feb 2008 14:15:06 +0000 (UTC)

 rpaulo      2008-02-14 14:15:00 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/coretemp     coretemp.c 
   Log:
   Don't attach to non Core CPUs. This is needed because on the PIII,
   querying the number of sensors returns > 0.
   
   PR:             120541
   Approved by:    njl (mentor)
   
   Revision  Changes    Path
   1.6       +9 -0      src/sys/dev/coretemp/coretemp.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/120541: commit references a PR
Date: Wed, 20 Feb 2008 23:51:53 +0000 (UTC)

 rpaulo      2008-02-20 23:51:48 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     sys/dev/coretemp     coretemp.c 
   Log:
   MFC r1.6
    Don't attach to non Core CPUs. This is needed because on the PIII,
    querying the number of sensors returns > 0.
   
   PR:             120541
   Approved by:    njl (mentor)
   
   Revision  Changes    Path
   1.2.4.1   +9 -0      src/sys/dev/coretemp/coretemp.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/120541: commit references a PR
Date: Wed, 20 Feb 2008 23:52:11 +0000 (UTC)

 rpaulo      2008-02-20 23:52:04 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/dev/coretemp     coretemp.c 
   Log:
   MFC r1.6
    Don't attach to non Core CPUs. This is needed because on the PIII,
    querying the number of sensors returns > 0.
   
   PR:             120541
   Approved by:    njl (mentor)
   
   Revision  Changes    Path
   1.2.2.2   +9 -0      src/sys/dev/coretemp/coretemp.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
