Module Name: src Committed By: njoly Date: Mon Jan 18 21:55:40 UTC 2010
Modified Files: src/sys/arch/amd64/amd64: procfs_machdep.c Log Message: Do not check more than 32 bits against ci_feature_flags, to avoid printing bogus data on /proc/cpuinfo flags line. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/amd64/procfs_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/amd64/procfs_machdep.c diff -u src/sys/arch/amd64/amd64/procfs_machdep.c:1.12 src/sys/arch/amd64/amd64/procfs_machdep.c:1.13 --- src/sys/arch/amd64/amd64/procfs_machdep.c:1.12 Sun Aug 16 11:04:48 2009 +++ src/sys/arch/amd64/amd64/procfs_machdep.c Mon Jan 18 21:55:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -151,7 +151,7 @@ p = featurebuf; left = sizeof featurebuf; - for (i = 0; i < sizeof(i386_features)/sizeof(*i386_features); i++) { + for (i = 0; i < 32; i++) { if ((ci->ci_feature_flags & (1 << i)) && (i386_features[i] != NULL)) { l = snprintf(p, left, "%s ", i386_features[i]);