]> git.ipfire.org Git - people/arne_f/kernel.git/commit
s390/zcrypt: fix card and queue total counter wrap
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 20 Dec 2019 15:02:54 +0000 (16:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:42:13 +0000 (16:42 +0100)
commitb73162295bcee06fa383b33c55f096b06fb769fc
tree741ed18c2385433ba6b41e0bb14ae6c60c22e99e
parenta8531cf81da41967ec338cd308468d97f6bbe3dc
s390/zcrypt: fix card and queue total counter wrap

[ Upstream commit fcd98d4002539f1e381916fc1b6648938c1eac76 ]

The internal statistic counters for the total number of
requests processed per card and per queue used integers. So they do
wrap after a rather huge amount of crypto requests processed. This
patch introduces uint64 counters which should hold much longer but
still may wrap. The sysfs attributes request_count for card and queue
also used only %ld and now display the counter value with %llu.

This is not a security relevant fix. The int overflow which happened
is not in any way exploitable as a security breach.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/ap_card.c
drivers/s390/crypto/ap_queue.c
drivers/s390/crypto/zcrypt_api.c