All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ethtool: strset: account for nesting in reply size
Date: Tue, 22 Jun 2021 14:32:48 -0700	[thread overview]
Message-ID: <1076d165f30e09e9e1fdbd75d32bdb3170a2b37e.camel@kernel.org> (raw)
In-Reply-To: <20210618233720.js4sk2xtgvf4ssn2@lion.mk-sys.cz>

On Sat, 2021-06-19 at 01:37 +0200, Michal Kubecek wrote:
> On Fri, Jun 18, 2021 at 03:55:02PM -0700, Saeed Mahameed wrote:
> > From: Saeed Mahameed <saeedm@nvidia.com>
> > 
> > The cited patch revealed a bug in strset reply size where the
> > calculation didn't include the 1st nla_nest_start(), a size of 4
> > Bytes in
> > strset_fill_reply().
> > 
> > To fix the issue we account for the missing nla_nest 4Bytes by
> > reporting
> > them in strset_reply_size()
> > 
> > Before this patch issuing "ethtool -k" command will produce the
> > following call trace:
[...]
> 
> Out of the three fixes, personally I liked most the one which applied
> nla_total_len() to calculated length of the nest contents as it IMHO
> reflects the message structure best; but adding nla_total_size(0)
> also
> provides the same result so either does the trick.
> 
> Michal

will go with the net fix, thanks for taking a look !




      reply	other threads:[~2021-06-22 21:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 22:55 [PATCH net-next] ethtool: strset: account for nesting in reply size Saeed Mahameed
2021-06-18 23:37 ` Michal Kubecek
2021-06-22 21:32   ` Saeed Mahameed [this message]

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=1076d165f30e09e9e1fdbd75d32bdb3170a2b37e.camel@kernel.org \
    --to=saeed@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.