From: Matthias Schiffer <mschiffer@universe-factory.net>
To: Sven Eckelmann <sven@narfation.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API
Date: Fri, 18 Mar 2016 12:53:37 +0100 [thread overview]
Message-ID: <56EBEC41.4090404@universe-factory.net> (raw)
In-Reply-To: <4945319.BvQuBs3oU8@sven-edge>
[-- Attachment #1.1: Type: text/plain, Size: 1973 bytes --]
On 03/18/2016 08:09 AM, Sven Eckelmann wrote:
> On Thursday 17 March 2016 18:04:56 Matthias Schiffer wrote:
>> And here is the new version of the PoC userspace tool.
>> Build with:
>>
>> gcc -o batnl batnl.c $$(pkg-config --cflags --libs libnl-1) -Wall
>
> Thanks for the patches.
>
> I've only looked at the test querier for a second and I am a little bit
> confused that you access things like attrs[BATADV_ATTR_ALGO_NAME] without
> checking if this is available or that the received message is valid (according
> to the nla_parse policy).
>
> I know that this is only a PoC but wanted to mention it in case somebody wants
> to use it as reference for a batctl/alfred implementation.
>
> I like that the netlink interface doesn't introduce complex structs at the
> moment (but I have to think a little bit about it). The unnamed enums freak me
> out a little bit (names would be nice so it is easier to write kernel-doc for
> it).
>
> I just ran the build_test stuff through your branch so you get an early
> feedback about some common problems. See the attached mail (the unused symbols
> seem to be only symptoms of the build failures with old kernels < 3.12).
>
> Kind regards,
> Sven
>
Hi,
regarding the first issue: I guess I should just add validation, as doing
so is simple and can only improve robustness. One line of thought that
seems to be common when dealing with such ABIs is that the kernel would
break its ABI contract by sending invalid messages, and that userspace
behaviour would be unspecified anyways if the kernel misbehaves.
I guess we can just give the enums names. Looking through the other UAPI
files, some enums have names, others don't.
Thanks for the build testing, I haven't put too much thought into the
compat issues yet. The genl_register_family_with_ops error should be easy
to fix, the struct netlink_skb_parms differences might be more problematic.
Regards,
Matthias
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-18 11:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 16:45 [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API Matthias Schiffer
2016-03-17 16:45 ` [B.A.T.M.A.N.] [RFC v2 1/5] batman-adv: add generic netlink query API to replace debugfs files Matthias Schiffer
2016-03-17 16:45 ` [B.A.T.M.A.N.] [RFC v2 2/5] batman-adv: netlink: add translation table query Matthias Schiffer
2016-03-17 16:45 ` [B.A.T.M.A.N.] [RFC v2 3/5] batman-adv: netlink: add originator and neighbor table queries Matthias Schiffer
2016-03-17 16:45 ` [B.A.T.M.A.N.] [RFC v2 4/5] batman-adv: add B.A.T.M.A.N. IV bat_{orig, neigh}_dump implementations Matthias Schiffer
2016-03-17 16:45 ` [B.A.T.M.A.N.] [RFC v2 5/5] batman-adv: add B.A.T.M.A.N. V " Matthias Schiffer
2016-03-17 17:04 ` [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API Matthias Schiffer
2016-03-18 7:09 ` Sven Eckelmann
2016-03-18 11:53 ` Matthias Schiffer [this message]
2016-04-18 10:59 ` Sven Eckelmann
2016-03-18 11:23 ` Sven Eckelmann
2016-03-18 12:00 ` Matthias Schiffer
2016-03-18 12:04 ` Sven Eckelmann
2016-03-19 8:49 ` Antonio Quartulli
2016-03-19 9:19 ` Sven Eckelmann
2016-04-18 11:10 ` Sven Eckelmann
2016-04-18 14:50 ` Simon Wunderlich
2016-04-20 2:31 ` Andrew Lunn
2016-04-20 11:39 ` Simon Wunderlich
2016-04-20 7:32 ` Matthias Schiffer
2016-04-20 7:39 ` Sven Eckelmann
2016-04-20 7:49 ` Matthias Schiffer
2016-04-20 7:53 ` Sven Eckelmann
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=56EBEC41.4090404@universe-factory.net \
--to=mschiffer@universe-factory.net \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sven@narfation.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