* [PATCH] RDMA/uverbs: Fix typo of sizeof argument
@ 2023-09-05 10:10 Konstantin Meskhidze
2023-09-05 10:12 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Meskhidze @ 2023-09-05 10:10 UTC (permalink / raw)
To: jgg
Cc: leon, gregkh, benjamin.tissoires, linux-rdma, linux-kernel,
yusongping, artem.kuzin
Since size of 'hdr' pointer and '*hdr' structure is equal on 64-bit
machines issue probably didn't cause any wrong behavior. But anyway,
fixing of typo is required.
Fixes: da0f60df7bd5 ("RDMA/uverbs: Prohibit write() calls with too small buffers")
Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
---
drivers/infiniband/core/uverbs_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 7c9c79c13941..508d6712e14d 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -535,7 +535,7 @@ static ssize_t verify_hdr(struct ib_uverbs_cmd_hdr *hdr,
if (hdr->in_words * 4 != count)
return -EINVAL;
- if (count < method_elm->req_size + sizeof(hdr)) {
+ if (count < method_elm->req_size + sizeof(*hdr)) {
/*
* rdma-core v18 and v19 have a bug where they send DESTROY_CQ
* with a 16 byte write instead of 24. Old kernels didn't
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/uverbs: Fix typo of sizeof argument
2023-09-05 10:10 [PATCH] RDMA/uverbs: Fix typo of sizeof argument Konstantin Meskhidze
@ 2023-09-05 10:12 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2023-09-05 10:12 UTC (permalink / raw)
To: Konstantin Meskhidze
Cc: jgg, leon, benjamin.tissoires, linux-rdma, linux-kernel,
yusongping, artem.kuzin
On Tue, Sep 05, 2023 at 06:10:21PM +0800, Konstantin Meskhidze wrote:
> Since size of 'hdr' pointer and '*hdr' structure is equal on 64-bit
> machines issue probably didn't cause any wrong behavior. But anyway,
> fixing of typo is required.
>
> Fixes: da0f60df7bd5 ("RDMA/uverbs: Prohibit write() calls with too small buffers")
> Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Please read the documentation for how to use this tag properly (hint,
you didn't use it properly here...)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] RDMA/uverbs: Fix typo of sizeof argument
@ 2023-09-05 10:32 Konstantin Meskhidze
2023-09-05 10:39 ` Greg KH
2023-09-11 12:18 ` Leon Romanovsky
0 siblings, 2 replies; 5+ messages in thread
From: Konstantin Meskhidze @ 2023-09-05 10:32 UTC (permalink / raw)
To: jgg
Cc: leon, gregkh, benjamin.tissoires, linux-rdma, linux-kernel,
yusongping, artem.kuzin
Since size of 'hdr' pointer and '*hdr' structure is equal on 64-bit
machines issue probably didn't cause any wrong behavior. But anyway,
fixing of typo is required.
Fixes: da0f60df7bd5 ("RDMA/uverbs: Prohibit write() calls with too small buffers")
Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Signed-off-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
---
drivers/infiniband/core/uverbs_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 7c9c79c13941..508d6712e14d 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -535,7 +535,7 @@ static ssize_t verify_hdr(struct ib_uverbs_cmd_hdr *hdr,
if (hdr->in_words * 4 != count)
return -EINVAL;
- if (count < method_elm->req_size + sizeof(hdr)) {
+ if (count < method_elm->req_size + sizeof(*hdr)) {
/*
* rdma-core v18 and v19 have a bug where they send DESTROY_CQ
* with a 16 byte write instead of 24. Old kernels didn't
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/uverbs: Fix typo of sizeof argument
2023-09-05 10:32 Konstantin Meskhidze
@ 2023-09-05 10:39 ` Greg KH
2023-09-11 12:18 ` Leon Romanovsky
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2023-09-05 10:39 UTC (permalink / raw)
To: Konstantin Meskhidze
Cc: jgg, leon, benjamin.tissoires, linux-rdma, linux-kernel,
yusongping, artem.kuzin
On Tue, Sep 05, 2023 at 06:32:58PM +0800, Konstantin Meskhidze wrote:
> Since size of 'hdr' pointer and '*hdr' structure is equal on 64-bit
> machines issue probably didn't cause any wrong behavior. But anyway,
> fixing of typo is required.
>
> Fixes: da0f60df7bd5 ("RDMA/uverbs: Prohibit write() calls with too small buffers")
> Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
> Signed-off-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
> Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
> ---
> drivers/infiniband/core/uverbs_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
> index 7c9c79c13941..508d6712e14d 100644
> --- a/drivers/infiniband/core/uverbs_main.c
> +++ b/drivers/infiniband/core/uverbs_main.c
> @@ -535,7 +535,7 @@ static ssize_t verify_hdr(struct ib_uverbs_cmd_hdr *hdr,
> if (hdr->in_words * 4 != count)
> return -EINVAL;
>
> - if (count < method_elm->req_size + sizeof(hdr)) {
> + if (count < method_elm->req_size + sizeof(*hdr)) {
> /*
> * rdma-core v18 and v19 have a bug where they send DESTROY_CQ
> * with a 16 byte write instead of 24. Old kernels didn't
> --
> 2.34.1
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/uverbs: Fix typo of sizeof argument
2023-09-05 10:32 Konstantin Meskhidze
2023-09-05 10:39 ` Greg KH
@ 2023-09-11 12:18 ` Leon Romanovsky
1 sibling, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2023-09-11 12:18 UTC (permalink / raw)
To: jgg, Konstantin Meskhidze
Cc: gregkh, benjamin.tissoires, linux-rdma, linux-kernel, yusongping,
artem.kuzin
On Tue, 05 Sep 2023 18:32:58 +0800, Konstantin Meskhidze wrote:
> Since size of 'hdr' pointer and '*hdr' structure is equal on 64-bit
> machines issue probably didn't cause any wrong behavior. But anyway,
> fixing of typo is required.
>
>
Applied, thanks!
[1/1] RDMA/uverbs: Fix typo of sizeof argument
https://git.kernel.org/rdma/rdma/c/c489800e0d4809
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-09-11 22:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05 10:10 [PATCH] RDMA/uverbs: Fix typo of sizeof argument Konstantin Meskhidze
2023-09-05 10:12 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2023-09-05 10:32 Konstantin Meskhidze
2023-09-05 10:39 ` Greg KH
2023-09-11 12:18 ` Leon Romanovsky
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).