opnsense-src/sys/dev/hwpmc
Bojan Novković 6e8233df18 hwpmc_x86: Fix NULL deref when loading on unsupported hardware
The pmc_md_{intialize, finalize} routines rely on a machine-dependent
structure to register the appropriate PMC interrupt handler. However,
the vendor-specific routines that allocate this structure may return
NULL for unsupported hardware, leading to a panic when the hwpmc module
gets loaded. This patch adds additional checks that fix this issue.

Reported by:	Michael Butler (imb@protected-networks.net)
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D48168
2024-12-23 11:00:57 +01:00
..
hwpmc_amd.c hwpmc_amd: remove an unused variable 2023-10-19 11:00:31 -03:00
hwpmc_amd.h hwpmc_amd: kill off k7 support bits 2023-10-18 15:05:45 -03:00
hwpmc_arm.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_arm64.c hwpmc/arm64: Support the kernel booting to VHE 2024-06-25 09:07:19 +00:00
hwpmc_arm64.h hwpmc/arm64: fix the type for pm_arm64_evsel 2024-06-25 09:07:19 +00:00
hwpmc_arm64_md.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_armv7.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_armv7.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_cmn600.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_cmn600.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_core.c x86: Allow sharing of perfomance counter interrupts 2024-12-15 16:39:36 +01:00
hwpmc_core.h hwpmc_core: remove two non-existent function prototypes 2023-10-18 15:05:44 -03:00
hwpmc_dmc620.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_dmc620.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_e500.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_intel.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_logging.c hwpmc: Restore line lost in previous commit 2024-11-28 11:53:24 -05:00
hwpmc_mod.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_mpc7xxx.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_power8.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_powerpc.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_powerpc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_ppc970.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_riscv.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_soft.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_soft.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_tsc.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_tsc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_uncore.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_uncore.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_x86.c hwpmc_x86: Fix NULL deref when loading on unsupported hardware 2024-12-23 11:00:57 +01:00
pmc_events.h pmc: remove last bits of AMD K7 CPU support 2023-10-18 15:05:45 -03:00
pmu_dmc620.c dev/hwpmc: Fix the dmc620 MD4 macro 2024-05-22 08:19:49 +00:00
pmu_dmc620_reg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00