From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mkubecek-AlSwsSmVLrQ@public.gmane.org,
johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [RFC v2 1/2] netlink: add NLA_REJECT policy type
Date: Wed, 12 Sep 2018 11:15:55 -0700 (PDT) [thread overview]
Message-ID: <20180912.111555.1317690378514849083.davem@davemloft.net> (raw)
In-Reply-To: <20180912083610.20857-1-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Date: Wed, 12 Sep 2018 10:36:09 +0200
> From: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> In some situations some netlink attributes may be used for output
> only (kernel->userspace) or may be reserved for future use. It's
> then helpful to be able to prevent userspace from using them in
> messages sent to the kernel, since they'd otherwise be ignored and
> any future will become impossible if this happens.
>
> Add NLA_REJECT to the policy which does nothing but reject (with
> EINVAL) validation of any messages containing this attribute.
> Allow for returning a specific extended ACK error message in the
> validation_data pointer.
>
> While at it fix the indentation of NLA_BITFIELD32 and describe the
> validation_data pointer for it.
>
> The specific case I have in mind now is a shared nested attribute
> containing request/response data, and it would be pointless and
> potentially confusing to have userspace include response data in
> the messages that actually contain a request.
>
> Signed-off-by: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
This looks great, no objections to this idea or the facility.
It does, however, remind me about about the classic problem of how bad
we are at feature support detection because unrecognized attributes are
ignored.
I do really hope we can fully solve that problem some day.
next prev parent reply other threads:[~2018-09-12 18:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 8:36 [RFC v2 1/2] netlink: add NLA_REJECT policy type Johannes Berg
2018-09-12 8:38 ` Johannes Berg
[not found] ` <20180912083610.20857-1-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-09-12 8:36 ` [RFC v2 2/2] netlink: add ethernet address policy types Johannes Berg
2018-09-12 8:49 ` Arend van Spriel
2018-09-12 8:50 ` Johannes Berg
2018-09-12 18:15 ` David Miller [this message]
2018-09-12 18:34 ` [RFC v2 1/2] netlink: add NLA_REJECT policy type Johannes Berg
[not found] ` <1536777285.3678.28.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-09-12 19:29 ` Michal Kubecek
2018-09-12 19:37 ` 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=20180912.111555.1317690378514849083.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org \
--cc=johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mkubecek-AlSwsSmVLrQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).