From owner-freebsd-bugs@FreeBSD.ORG Wed Mar 8 19:50:10 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8756816A420 for ; Wed, 8 Mar 2006 19:50:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D34443D48 for ; Wed, 8 Mar 2006 19:50:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k28Jo9A4056738 for ; Wed, 8 Mar 2006 19:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k28Jo9ul056737; Wed, 8 Mar 2006 19:50:09 GMT (envelope-from gnats) Resent-Date: Wed, 8 Mar 2006 19:50:09 GMT Resent-Message-Id: <200603081950.k28Jo9ul056737@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tim Kuik Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76B1316A420 for ; Wed, 8 Mar 2006 19:44:27 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4640643D46 for ; Wed, 8 Mar 2006 19:44:27 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k28JiRrv006674 for ; Wed, 8 Mar 2006 19:44:27 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k28JiQGr006673; Wed, 8 Mar 2006 19:44:27 GMT (envelope-from nobody) Message-Id: <200603081944.k28JiQGr006673@www.freebsd.org> Date: Wed, 8 Mar 2006 19:44:27 GMT From: Tim Kuik To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/94238: 32 bit overflow prevents proper setting of base in tc_cpu_ticks() X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 19:50:10 -0000 >Number: 94238 >Category: kern >Synopsis: 32 bit overflow prevents proper setting of base in tc_cpu_ticks() >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 08 19:50:09 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Tim Kuik >Release: current >Organization: Cisco >Environment: FreeBSD tkuik-freebsd.cisco 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Mon Mar 6 12:49:57 CST 2006 root@tkuik-freebsd.cisco:/usr/obj/usr/src/sys/GENERIC i386 >Description: in kern_tc.c: tc_cpu_ticks(), the line base += tc->tc_counter_mask + 1; will cause a 32 bit overflow if the tc_counter_mask is 0xffffffff, resulting in base not being incremented. >How-To-Repeat: As long as the mask is set to 0xffffffff, it will always happen. >Fix: Change the line to: base += (uint64_t)(tc->tc_counter_mask) + 1; >Release-Note: >Audit-Trail: >Unformatted: