perf/x86/intel/uncore: Validate MMIO address before accessing
authorKan Liang <kan.liang@linux.intel.com>
Thu, 28 May 2020 15:19:29 +0000 (08:19 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 15 Jun 2020 12:09:50 +0000 (14:09 +0200)
commitf01719730bbe04b90ae60c7e9d2b6d3533308502
treece4a492b4a9cf7963cfe13175ed83a66d5c5ca16
parent1b94d31de422399421422af0e63c9685e7485901
perf/x86/intel/uncore: Validate MMIO address before accessing

An oops will be triggered, if perf tries to access an invalid address
which exceeds the mapped area.

Check the address before the actual access to MMIO sapce of an uncore
unit.

Suggested-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/1590679169-61823-3-git-send-email-kan.liang@linux.intel.com
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore.h
arch/x86/events/intel/uncore_snbep.c