iaa_crypto bugfix and maintainer change
Subsystems (2)
cover iaa_crypto bugfix and maintainer change
Hi Herbert,
The first patch here fixes a bug seen on some systems with broken IAA hardware; it doesn't fix the hardware issue itself but exposes an issue with trusting the hardware to either send a completion or trigger a timeout - if neither happens, it shouldn't spin endlessly.
The second patch hands over iaa_crypto maintainership, since I'll be retiring from Intel and won't have access to IAA hardware myself.
Thanks,
Tom
Tom Zanussi (2):
crypto: iaa - Remove potential infinite loop in check_completion()
MAINTAINERS: Make Kristen Accardi the IAA crypto driver maintainer
MAINTAINERS | 2 +- drivers/crypto/intel/iaa/iaa_crypto_main.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
Signature · 1 line
2.38.1
PATCH 1/2 crypto: iaa - Remove potential infinite loop in check_completion()
For iaa_crypto operations, it's assumed that if an operation doesn't make progress, the IAA watchdog timer will kick in and set the completion status bit to failure and the reason to completion timeout.
Some systems may have broken hardware that doesn't even do that, which can result in an infinite status-checking loop. Add a check for that in the loop, and disable the driver if it occurs.
--- drivers/crypto/intel/iaa/iaa_crypto_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/crypto/intel/iaa/iaa_crypto_main.c +10 -0
@@ -945,12 +945,22 @@ static inline int check_completion(struct device *dev, bool only_once) {char *op_str = compress ?"compress" :"decompress" ; +int status_checks =0 ;int ret =0 ;while (!comp->status) {if (only_once)return -EAGAIN ;cpu_relax (); +if (status_checks++ >=IAA_COMPLETION_TIMEOUT ) { +/* Something is wrong with the hw, disable it. */ +dev_err (dev,"%s completion timed out - " +"assuming broken hw, iaa_crypto now DISABLED\n" , + op_str); + iaa_crypto_enabled = false; + ret = -ETIMEDOUT ; + goto out; + } }if (comp->status !=IAX_COMP_SUCCESS ) {
Signature · 1 line
2.38.1
PATCH 2/2 MAINTAINERS: Make Kristen Accardi the IAA crypto driver maintainer
In reply to Zanussi, TomSince I'll be retiring from Intel and will no longer have access to hardware, Kristen Accardi will be taking over as the iaa_crypto maintainer.
--- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -11300,7 +11300,7 @@ Q: https://patchwork.kernel.org/project/linux-dmaengine/list/ F: drivers/dma/ioat* INTEL IAA CRYPTO DRIVER -M: Tom Zanussi <[email protected]> +M: Kristen Accardi <[email protected]> L: [email protected] S: Supported F: Documentation/driver-api/crypto/iaa/iaa-crypto.rst
Signature · 1 line
2.38.1
Herbert Xu
maintainerQuoted 14 lines · Tom
Hi Herbert,
The first patch here fixes a bug seen on some systems with broken IAA hardware; it doesn't fix the hardware issue itself but exposes an issue with trusting the hardware to either send a completion or trigger a timeout - if neither happens, it shouldn't spin endlessly.
The second patch hands over
iaa_cryptomaintainership, since I'll be retiring from Intel and won't have access to IAA hardware myself.Thanks,
Tom
Quoted 10 lines
Tom Zanussi (2):
crypto: iaa - Remove potential infinite loop incheck_completion()
MAINTAINERS: Make Kristen Accardi the IAA crypto driver maintainerMAINTAINERS | 2 +- drivers/crypto/intel/iaa/iaa_crypto_main.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)Signature · 1 line
2.38.1
All applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt