diff options
author | Nathan Chancellor <nathan@kernel.org> | 2021-04-14 17:11:11 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-04-16 18:58:52 +0200 |
commit | de5bc7b425d4c27ae5faa00ea7eb6b9780b9a355 (patch) | |
tree | 37cfb1463674f7b98ca6127055fc94021d3b668a /tools/perf/scripts/python/export-to-sqlite.py | |
parent | d0d1dd628527c77db2391ce0293c1ed344b2365f (diff) |
x86/events/amd/iommu: Fix sysfs type mismatch
dev_attr_show() calls _iommu_event_show() via an indirect call but
_iommu_event_show()'s type does not currently match the type of the
show() member in 'struct device_attribute', resulting in a Control Flow
Integrity violation.
$ cat /sys/devices/amd_iommu_1/events/mem_dte_hit
csource=0x0a
$ dmesg | grep "CFI failure"
[ 3526.735140] CFI failure (target: _iommu_event_show...):
Change _iommu_event_show() and 'struct amd_iommu_event_desc' to
'struct device_attribute' so that there is no more CFI violation.
Fixes: 7be6296fdd75 ("perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210415001112.3024673-1-nathan@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions