From: Jason Gunthorpe <jgg@ziepe.ca>
To: Selvin Xavier <selvin.xavier@broadcom.com>
Cc: dledford@redhat.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-rc] RDMA/bnxt_re: Fix stack-out-of-bounds in bnxt_qplib_rcfw_send_message
Date: Thu, 15 Aug 2019 10:07:40 -0300 [thread overview]
Message-ID: <20190815130740.GE21596@ziepe.ca> (raw)
In-Reply-To: <1565869477-19306-1-git-send-email-selvin.xavier@broadcom.com>
On Thu, Aug 15, 2019 at 04:44:37AM -0700, Selvin Xavier wrote:
> @@ -583,7 +584,7 @@ int bnxt_qplib_create_srq(struct bnxt_qplib_res *res,
> req.eventq_id = cpu_to_le16(srq->eventq_hw_ring_id);
>
> rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req,
> - (void *)&resp, NULL, 0);
> + (void *)&resp, sizeof(req), NULL, 0);
I really don't like seeing casts to void * in code. Why can't you
properly embed the header in the structs??
Jason
next prev parent reply other threads:[~2019-08-15 13:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 11:44 [PATCH for-rc] RDMA/bnxt_re: Fix stack-out-of-bounds in bnxt_qplib_rcfw_send_message Selvin Xavier
2019-08-15 13:07 ` Jason Gunthorpe [this message]
2019-08-16 4:52 ` Selvin Xavier
2019-08-16 12:00 ` Jason Gunthorpe
2019-08-19 8:12 ` Selvin Xavier
2019-08-20 17:13 ` Doug Ledford
2019-08-21 11:11 ` Selvin Xavier
2019-08-22 9:42 ` Selvin Xavier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190815130740.GE21596@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=dledford@redhat.com \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox