netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: pablo@netfilter.org, Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Benc <jbenc@redhat.com>,
	David Ahern <dsa@cumulusnetworks.com>,
	jiri@resnulli.us, David Miller <davem@davemloft.net>
Subject: Re: [PATCH v3 0/5] netlink extended ACK reporting
Date: Mon, 10 Apr 2017 13:20:42 +0200	[thread overview]
Message-ID: <1491823242.2455.9.camel@sipsolutions.net> (raw)
In-Reply-To: <20170408202434.12018-1-johannes@sipsolutions.net> (sfid-20170408_222447_224133_39B19566)

I thought a little bit more about the part of reporting the broken and
missing attributes, and I'm not sure I'm entirely happy with that part.

For reporting broken attributes, I think the pointer is really the best
thing we can do - adding the attribute number in addition to that would
seem to be easy to misuse in userspace, and there's no information
about nesting at that point and the "malformed attribute" ID will not
make any sense without knowing the nesting level. So I think we
shouldn't add the attribute ID there. The userspace app can disentangle
the nesting, or it can know that it never used nesting, for example.

Similarly, the "missing attribute" ID - which I did add an attribute
for but didn't use it yet - can result in similar interpretation
problems. I'm not really sure what to do with this one - technically
one could report back the entire nesting chain, but having that kind of
state might be really difficult.

Did anyone already have any plans for the "missing attribute"
functionality?


And another thought regarding the strict checking: we might also want
to extend that to strictly check the *size* of attributes as well. For
example, right now, if the kernel wants a u8 attribute but userspace
uses a u16 or u32, this will work on little-endian and be accepted but
wrongly be 0 on big endian.

johannes

  parent reply	other threads:[~2017-04-10 11:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08 20:24 [PATCH v3 0/5] netlink extended ACK reporting Johannes Berg
     [not found] ` <20170408202434.12018-1-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2017-04-08 20:24   ` [PATCH v3 1/5] netlink: " Johannes Berg
2017-04-10 15:26     ` David Ahern
     [not found]       ` <fddba2c8-3b85-d5df-81c4-ef31c459e40c-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2017-04-10 15:30         ` Johannes Berg
2017-04-10 15:35           ` David Ahern
     [not found]             ` <029e6587-c0e8-bdb0-49e9-2abe2946a7ff-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2017-04-10 15:40               ` Johannes Berg
2017-04-10 18:38                 ` Johannes Berg
2017-04-11  6:59             ` Pablo Neira Ayuso
2017-04-11  7:02               ` Johannes Berg
     [not found]                 ` <1491894172.31620.2.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2017-04-11 14:25                   ` David Ahern
     [not found]                     ` <9a68aa01-474c-7054-30c2-473ee1250abe-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2017-04-11 17:31                       ` Pablo Neira Ayuso
2017-04-11 17:42                         ` David Miller
2017-04-11 18:57                           ` David Ahern
2017-04-11 19:05                             ` David Miller
     [not found]                               ` <20170411.150527.283014710949232666.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2017-04-11 19:12                                 ` David Ahern
2017-04-11 19:43                           ` Johannes Berg
2017-04-08 20:24   ` [PATCH v3 2/5] genetlink: pass extended ACK report down Johannes Berg
2017-04-08 20:24 ` [PATCH v3 3/5] netlink: allow sending extended ACK with cookie on success Johannes Berg
2017-04-08 20:24 ` [PATCH v3 4/5] netlink: pass extended ACK struct to parsing functions Johannes Berg
2017-04-08 20:24 ` [PATCH v3 5/5] netlink: pass extended ACK struct where available Johannes Berg
2017-04-10 11:20 ` Johannes Berg [this message]
2017-04-10 11:38 ` [PATCH v3 0/5] netlink extended ACK reporting Johannes Berg

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=1491823242.2455.9.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=jbenc@redhat.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.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).