* [PATCH] crypto: qat: ratelimit invalid ioctl message and print the invalid cmd
@ 2021-06-22 15:16 Colin King
2021-06-23 14:08 ` Giovanni Cabiddu
2021-06-28 3:31 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-06-22 15:16 UTC (permalink / raw)
To: Giovanni Cabiddu, Herbert Xu, David S . Miller, Qinglang Miao,
qat-linux, linux-crypto
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently incorrect QAT ioctls can spam the kernel log with error messages
of the form "QAT: Invalid ioctl" if a userspace program uses the wrong
ioctl command. Quench the messages by ratelimiting them and also print
the invalid command being used as that is useful to know.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_common/adf_ctl_drv.c b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
index 96b437bfe3de..6f64aa693146 100644
--- a/drivers/crypto/qat/qat_common/adf_ctl_drv.c
+++ b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
@@ -406,7 +406,7 @@ static long adf_ctl_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
ret = adf_ctl_ioctl_get_status(fp, cmd, arg);
break;
default:
- pr_err("QAT: Invalid ioctl\n");
+ pr_err_ratelimited("QAT: Invalid ioctl %d\n", cmd);
ret = -EFAULT;
break;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: qat: ratelimit invalid ioctl message and print the invalid cmd
2021-06-22 15:16 [PATCH] crypto: qat: ratelimit invalid ioctl message and print the invalid cmd Colin King
@ 2021-06-23 14:08 ` Giovanni Cabiddu
2021-06-28 3:31 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Giovanni Cabiddu @ 2021-06-23 14:08 UTC (permalink / raw)
To: Colin King
Cc: Herbert Xu, David S . Miller, Qinglang Miao, qat-linux,
linux-crypto, kernel-janitors, linux-kernel
On Tue, Jun 22, 2021 at 04:16:08PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently incorrect QAT ioctls can spam the kernel log with error messages
> of the form "QAT: Invalid ioctl" if a userspace program uses the wrong
> ioctl command. Quench the messages by ratelimiting them and also print
> the invalid command being used as that is useful to know.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Just a minor comment on the commit message:
crypto: qat: ratelimit invalid ioctl message and print
^
Patches to the qat driver have the following headline:
crypto: qat -
not
crypto: qat:
Apart from that
Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Regards,
--
Giovanni
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: qat: ratelimit invalid ioctl message and print the invalid cmd
2021-06-22 15:16 [PATCH] crypto: qat: ratelimit invalid ioctl message and print the invalid cmd Colin King
2021-06-23 14:08 ` Giovanni Cabiddu
@ 2021-06-28 3:31 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2021-06-28 3:31 UTC (permalink / raw)
To: Colin King
Cc: Giovanni Cabiddu, David S . Miller, Qinglang Miao, qat-linux,
linux-crypto, kernel-janitors, linux-kernel
On Tue, Jun 22, 2021 at 04:16:08PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently incorrect QAT ioctls can spam the kernel log with error messages
> of the form "QAT: Invalid ioctl" if a userspace program uses the wrong
> ioctl command. Quench the messages by ratelimiting them and also print
> the invalid command being used as that is useful to know.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-28 3:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 15:16 [PATCH] crypto: qat: ratelimit invalid ioctl message and print the invalid cmd Colin King
2021-06-23 14:08 ` Giovanni Cabiddu
2021-06-28 3:31 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).