freebsd-dev/sys/dev/hwpmc
Mitchell Horne 8399d923a5 hwpmc_intel: assert for correct nclasses value
This variable is set based on the exact CPU model detected. If this
value is set too small, it could lead to a NULL-dereference from an
improperly initialized pmc_rowindex_to_classdep array.

Though it has been fixed, this was previously the case for Broadwell.
Add two asserts to catch this in DEBUG kernels, as it represents a
configuration error that may be hard to uncover otherwise.

PR:		253687
Reported by:	Zhenlei Huang <zlei.huang@gmail.com>
Sponsored by:	The FreeBSD Foundation
2021-08-04 15:23:22 -03:00
..
hwpmc_amd.c hwpmc: mostly clean up cc --analyze 2021-07-15 15:15:55 +00:00
hwpmc_amd.h hwpmc : fix AMD perf counter MSR access 2019-11-07 19:54:24 +00:00
hwpmc_arm64_md.c
hwpmc_arm64.c libpmc/hwpmc: fix issues with arm64 pmu-events support 2021-07-21 20:18:00 -03:00
hwpmc_arm64.h arm64: Fix finding the pmc event ID 2021-04-08 07:52:21 +00:00
hwpmc_arm.c
hwpmc_armv7.c Move the PMC overflow count to make it per-CPU 2021-01-08 14:24:43 +00:00
hwpmc_armv7.h
hwpmc_beri.c
hwpmc_beri.h
hwpmc_core.c hwpmc: mostly clean up cc --analyze 2021-07-15 15:15:55 +00:00
hwpmc_core.h
hwpmc_e500.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_intel.c hwpmc_intel: assert for correct nclasses value 2021-08-04 15:23:22 -03:00
hwpmc_logging.c hwpmc: mostly clean up cc --analyze 2021-07-15 15:15:55 +00:00
hwpmc_mips24k.c
hwpmc_mips74k.c
hwpmc_mips.c
hwpmc_mod.c hwpmc: mostly clean up cc --analyze 2021-07-15 15:15:55 +00:00
hwpmc_mpc7xxx.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_octeon.c
hwpmc_power8.c hwpmc: remove static POWER8 definitions 2021-07-29 14:52:00 -03:00
hwpmc_powerpc.c powerpc: change mfpvr return type to uint32_t 2021-07-28 14:08:19 -03:00
hwpmc_powerpc.h [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_ppc970.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_riscv.h
hwpmc_soft.c hwpmc: mostly clean up cc --analyze 2021-07-15 15:15:55 +00:00
hwpmc_soft.h
hwpmc_tsc.c hwpmc: mostly clean up cc --analyze 2021-07-15 15:15:55 +00:00
hwpmc_tsc.h
hwpmc_uncore.c hwpmc: mostly clean up cc --analyze 2021-07-15 15:15:55 +00:00
hwpmc_uncore.h
hwpmc_x86.c Annotate amd64 stack unwinders with __nomemorysanitize 2021-07-23 10:47:13 -04:00
pmc_events.h hwpmc: remove static POWER8 definitions 2021-07-29 14:52:00 -03:00