From owner-cvs-src@FreeBSD.ORG Fri Oct 6 13:24:17 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C59B516A403; Fri, 6 Oct 2006 13:24:17 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 597FF43D49; Fri, 6 Oct 2006 13:24:17 +0000 (GMT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k96DOHO5005419; Fri, 6 Oct 2006 13:24:17 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k96DOHpI005418; Fri, 6 Oct 2006 13:24:17 GMT (envelope-from bde) Message-Id: <200610061324.k96DOHpI005418@repoman.freebsd.org> From: Bruce Evans Date: Fri, 6 Oct 2006 13:24:17 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_4 Cc: Subject: cvs commit: src/sys/i386/isa clock.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2006 13:24:17 -0000 bde 2006-10-06 13:24:17 UTC FreeBSD src repository Modified files: (Branch: RELENG_4) sys/i386/isa clock.c Log: Fixed overflow at 2G for writing clock frequencies using sysctls. Reads worked correctly using the IU format. Writes only supported signed integers using the CTLTYPE_INT flag. sysctl(1) parses args for CTLTYPE_INT using (int)strtol() and has no range checking of course, so read-write of frequencies larger than INT_MAX always blindly corrupts the frequency to INT_MAX (2G-1). This keeps writing of TSC frequencies working up to 4GHz. Revision Changes Path 1.149.2.8 +2 -2 src/sys/i386/isa/clock.c