]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
s390/pai: Prevent invalid event number for pai_crypto PMU
authorThomas Richter <tmricht@linux.ibm.com>
Tue, 14 Jun 2022 10:40:46 +0000 (12:40 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Thu, 23 Jun 2022 15:23:59 +0000 (17:23 +0200)
commit541a496644512ebed429b33f19a3fadfb19c6ee7
treeccbb694af447eefee9542bb568b3ccb0e428e9e0
parentbe857b7f77d130dbbd47c91fc35198b040f35865
s390/pai: Prevent invalid event number for pai_crypto PMU

The pai_crypto PMU has to check the event number. It has to be in
the supported range. This is not the case, the lower limit is not
checked. Fix this and obey the lower limit.

Fixes: 39d62336f5c1 ("s390/pai: add support for cryptography counters")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Suggested-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/perf_pai_crypto.c