[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1076d165f30e09e9e1fdbd75d32bdb3170a2b37e.camel@kernel.org>
Date: Tue, 22 Jun 2021 14:32:48 -0700
From: Saeed Mahameed <saeed@...nel.org>
To: Michal Kubecek <mkubecek@...e.cz>
Cc: Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ethtool: strset: account for nesting in reply
size
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@...dia.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 !
Powered by blists - more mailing lists