]> git.baikalelectronics.ru Git - kernel.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)
commit2b0d508ac24e5a81150eb8ba2e35d1edee43d4a1
treeccbb694af447eefee9542bb568b3ccb0e428e9e0
parent6f6ab50fa4360650a57d8f3e5d536f7949208308
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: 985b5cf480a7 ("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