netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: "Duyck, Alexander H" <alexander.h.duyck@intel.com>
Cc: David Miller <davem@davemloft.net>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"jeff@garzik.org" <jeff@garzik.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"shemminger@osdl.org" <shemminger@osdl.org>,
	"kaber@trash.net" <kaber@trash.net>
Subject: Re: [PATCH 2/3] netlink: nla_parse_nested_compat was not parsing nested attributes
Date: Wed, 27 Aug 2008 16:52:42 +0200	[thread overview]
Message-ID: <20080827145242.GU20815@postel.suug.ch> (raw)
In-Reply-To: <80769D7B14936844A23C0C43D9FBCF0F14E9B94A@orsmsx501.amr.corp.intel.com>

* Duyck, Alexander H <alexander.h.duyck@intel.com> 2008-08-22 10:40
> I figured I would CC Stephen Hemminger and Patrick McHardy since they also will likely have an interest in this.
> 
> Just to put together a quick history on this issue I will list off how things got to where they are:
> 
> 1.  "[NET_SCHED]: sch_netem: use nla_parse_nested_compat" (http://marc.info/?l=linux-netdev&m=120110639320780&w=2) from Patrick McHardy.  After this patch netem started reporting "bytes leftover after parsing attributes" errors as it wasn't actually receiving a nested compat attribute.  This patch was added around 2.6.25-rc1.
> 
> 2.  "[NETLINK]: Fix nla_parse_nested_compat() to call nla_parse() directly" (http://marc.info/?l=linux-netdev&m=121145625328370&w=2) from Thomas Graf.  This resolved the errors but in turn any netlink messages that generated correct nested netlink attributes would have those attributes ignored as they would be automatically parsed out as one attribute with a length of all the nested attributes.  This patch was added around 2.6.26-rc4.

This patch was necessary as patch 1 broke the kernel ABI. It not only
resulted in leftover warnings, it resulted in the interpreation of
data with a 4 bytes offset which caused random configuration mess.

"Correct" nested netlink attributes are not supposed to be parsed
using nla_parse_nested_compat(), nla_parse_nested_compat() is
exclusively for attributes which contain a list of nested attributes
without a container attribute.

> Patches 3 & 4 haven't been applied yet and are under review:
> 
> 3.  "[PATCH 2/3] netlink: nla_parse_nested_compat was not parsing nested attributes" (http://marc.info/?l=linux-netdev&m=121936623112195&w=2) from me.  This reverts patch 2.
> 
> 4.  "[PATCH] IPROUTE: correct nla nested message generated by netem_parse_opt" (http://marc.info/?l=linux-netdev&m=121936623112195&w=2) from me.  This patch changes iproute2 netem_parse_opt to generate a correctly formatted set of nested compat attributes that can be parsed after the introduction of patch 1.

You can't change ABI! What your patches do is to generate new style nested
attributes and change nla_parse_nested_compat() to follow the same
semantisc as nla_parse_nested(). The _compat() is there for a reason.

  reply	other threads:[~2008-08-27 14:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22  0:51 [PATCH 1/3] LRO: fix return code propogation Jeff Kirsher
2008-08-22  0:51 ` [PATCH 2/3] netlink: nal_parse_nested_compat was not parsing nested attributes Jeff Kirsher
2008-08-22 10:18   ` David Miller
2008-08-22 17:40     ` [PATCH 2/3] netlink: nla_parse_nested_compat " Duyck, Alexander H
2008-08-27 14:52       ` Thomas Graf [this message]
2008-08-27 18:09         ` Duyck, Alexander H
2008-08-22  0:51 ` [PATCH 3/3] pkt_sched: restore multiqueue prio scheduler Jeff Kirsher
2008-08-22 10:16   ` David Miller
2008-08-22 14:30     ` jamal
2008-08-22 22:19       ` Jarek Poplawski
2008-08-23  0:01         ` Alexander Duyck
2008-08-23  0:40           ` David Miller
2008-08-23  1:37             ` Alexander Duyck
2008-08-23  5:12               ` Herbert Xu
2008-08-23  6:35                 ` Alexander Duyck
2008-08-23  7:07                   ` Herbert Xu
2008-08-23  8:23                   ` David Miller
2008-08-23  8:15               ` David Miller
2008-08-23  0:33         ` David Miller
2008-08-23  8:47           ` Jarek Poplawski
2008-08-23 16:31             ` Alexander Duyck
2008-08-23 16:49               ` jamal
2008-08-23 19:09                 ` Alexander Duyck
2008-08-24  7:53                   ` Jarek Poplawski
2008-08-24 13:39                     ` jamal
2008-08-24 19:19                       ` Jarek Poplawski
2008-08-24 19:27                         ` Jarek Poplawski
2008-08-24 19:59                           ` Jarek Poplawski
2008-08-24 20:18                             ` Jarek Poplawski
2008-08-25  0:50                           ` David Miller
2008-08-25  3:03                             ` Alexander Duyck
2008-08-25  6:16                               ` Jarek Poplawski
2008-08-25  9:36                                 ` Jarek Poplawski
2008-08-25  0:49                         ` David Miller
2008-08-25  6:06                           ` Jarek Poplawski
2008-08-25  7:48                             ` David Miller
2008-08-25  7:57                               ` Jarek Poplawski
2008-08-25  8:02                                 ` David Miller
2008-08-25  8:25                                   ` Jarek Poplawski
2008-08-25  8:35                                     ` Jarek Poplawski
2008-08-22 10:20 ` [PATCH 1/3] LRO: fix return code propogation David Miller

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=20080827145242.GU20815@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.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 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).