From owner-cvs-src@FreeBSD.ORG Sat Feb 11 19:19:30 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 F1A9016A420; Sat, 11 Feb 2006 19:19:29 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C629443D45; Sat, 11 Feb 2006 19:19:29 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1BJJTL9085930; Sat, 11 Feb 2006 19:19:29 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1BJJTEm085929; Sat, 11 Feb 2006 19:19:29 GMT (envelope-from rwatson) Message-Id: <200602111919.k1BJJTEm085929@repoman.freebsd.org> From: Robert Watson Date: Sat, 11 Feb 2006 19:19:29 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libmemstat memstat_uma.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: Sat, 11 Feb 2006 19:19:30 -0000 rwatson 2006-02-11 19:19:29 UTC FreeBSD src repository Modified files: lib/libmemstat memstat_uma.c Log: The uma_zone data structure defines the size of its uz_cpu[] array as 1, but then sizes the containing data structure at run-time to make room for per-cpu cache data. Modify libmemstat to separately allocate a buffer to hold per-cpu cache data, sized based on the run-time mp_maxid variable when using libkvm to access UMA data. This avoids reading invalid cache data from beyond the end of the uma_zone data structure on the stack, which can result in invalid statistics and/or reads from invalid kernel addresses. Foot target practice by: ps MFC after: 3 days Revision Changes Path 1.16 +24 -2 src/lib/libmemstat/memstat_uma.c