]> 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)
commit0f012f4951116e5822815561d630be2fd6f380d1
treeccbb694af447eefee9542bb568b3ccb0e428e9e0
parent56a13ccfde8fb2917524f21b09bd2e563d2f5319
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: 8f4b75febd0a ("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