From owner-cvs-all@FreeBSD.ORG Mon Sep 17 21:55:28 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D368616A420; Mon, 17 Sep 2007 21:55:28 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DB81613C45B; Mon, 17 Sep 2007 21:55:28 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HLtS4g015354; Mon, 17 Sep 2007 21:55:28 GMT (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HLtSJ1015353; Mon, 17 Sep 2007 21:55:28 GMT (envelope-from peter) Message-Id: <200709172155.l8HLtSJ1015353@repoman.freebsd.org> From: Peter Wemm Date: Mon, 17 Sep 2007 21:55:28 +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/sys/i386/i386 genassym.c src/sys/amd64/amd64 genassym.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 21:55:28 -0000 peter 2007-09-17 21:55:28 UTC FreeBSD src repository Modified files: sys/i386/i386 genassym.c sys/amd64/amd64 genassym.c Log: Fix an undefined symbol that as/ld neglected to flag as a problem. It was used in assembler code in such a way that no unresolved relocation records were generated, so ld didn't flag the problem. You can see this with an 'nm' of the kernel. There will be 'U MAXCPU' on SMP systems. The impact of this is that the intrcount/intrnames arrays do not have the intended amount of space reserved. This could lead to interesting problems due to the arrays being present in the middle of kernel code. An overflow would be rather interesting as executable code would be used as per-cpu incrementing interrupt counters. This fixes it for now by exporting MAXCPU to the assembler. A better fix might be to define these data structures in C - they're only referenced in the kernel from C code these days anyway. Approved by: re (kensmith) Revision Changes Path 1.165 +1 -0 src/sys/amd64/amd64/genassym.c 1.160 +1 -0 src/sys/i386/i386/genassym.c