netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Subbaraya Sundeep <sbhatta@marvell.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	sgoutham@marvell.com, hkelam@marvell.com, gakula@marvell.com
Subject: Re: [net-next PATCH 1/5] octeontx2-af: cn10k: Bandwidth profiles config support
Date: Fri, 18 Jun 2021 09:07:54 -0700	[thread overview]
Message-ID: <202106180903.E89363BB@keescook> (raw)
In-Reply-To: <1623756871-12524-2-git-send-email-sbhatta@marvell.com>

On Tue, Jun 15, 2021 at 05:04:27PM +0530, Subbaraya Sundeep wrote:
> [...]
> @@ -885,6 +906,9 @@ static int rvu_nix_blk_aq_enq_inst(struct rvu *rvu, struct nix_hw *nix_hw,
>  			else if (req->ctype == NIX_AQ_CTYPE_MCE)
>  				memcpy(&rsp->mce, ctx,
>  				       sizeof(struct nix_rx_mce_s));
> +			else if (req->ctype == NIX_AQ_CTYPE_BANDPROF)
> +				memcpy(&rsp->prof, ctx,
> +				       sizeof(struct nix_bandprof_s));

rsp->prof is u64 not struct nix_bandprof_s, so the compiler thinks this
memcpy() is overflowing the "prof" field.

Can you please fix this up?

-- 
Kees Cook

  reply	other threads:[~2021-06-18 16:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 11:34 [net-next PATCH 0/6] Add ingress ratelimit offload Subbaraya Sundeep
2021-06-15 11:34 ` [net-next PATCH 1/5] octeontx2-af: cn10k: Bandwidth profiles config support Subbaraya Sundeep
2021-06-18 16:07   ` Kees Cook [this message]
2021-06-21 10:19     ` [EXT] " Subbaraya Sundeep Bhatta
2021-06-15 11:34 ` [net-next PATCH 2/5] octeontx2-af: cn10k: Debugfs support for bandwidth profiles Subbaraya Sundeep
2021-06-15 11:34 ` [net-next PATCH 3/5] octeontx2-pf: TC_MATCHALL ingress ratelimiting offload Subbaraya Sundeep
2021-06-15 11:34 ` [net-next PATCH 4/5] octeontx2-pf: Use NL_SET_ERR_MSG_MOD for TC Subbaraya Sundeep
2021-06-15 11:34 ` [net-next PATCH 5/5] octeontx2-pf: Add police action for TC flower Subbaraya Sundeep
2021-06-15 18:20 ` [net-next PATCH 0/6] Add ingress ratelimit offload patchwork-bot+netdevbpf

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=202106180903.E89363BB@keescook \
    --to=keescook@chromium.org \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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;
as well as URLs for NNTP newsgroup(s).