All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Sergey Naumov <sknaumov@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: iw: some stats are missing from nla_policy
Date: Fri, 25 Jun 2021 19:38:01 +0200	[thread overview]
Message-ID: <a83bfa3f88909706fe9055be28e3664b7d482627.camel@sipsolutions.net> (raw)
In-Reply-To: <CAH3pVZOevaoOJ1SOOdiuzajM72WiuZYwURNQ8ky4FyUXNFmqHw@mail.gmail.com> (sfid-20210625_121104_830287_B318C078)

Hi Sergey,
> 
> I noticed that not all parameters are added to nla_policy. For
> example, NL80211_STA_INFO_CONNECTED_TIME
> (https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git/commit/?id=087d778f6f82346debfd275ddbb8f646f9a1a167)
> is parsed, but absent from stats_policy.
> 
> The question is whether it is done accidentally or deliberately? Is
> there some hidden logic not to add attributes to policy? And then why
> to use policy at all if some attributes are not checked anyway?

No, there's no particular reason or policy (pun intended) to this ...

It's kind of just being a bit lazy, and we have to trust the kernel to
not kill the process anyway, in a sense. But I think the right way still
would be to have a policy so we can detect errors.

johannes


      reply	other threads:[~2021-06-25 17:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 10:10 iw: some stats are missing from nla_policy Sergey Naumov
2021-06-25 17:38 ` Johannes Berg [this message]

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=a83bfa3f88909706fe9055be28e3664b7d482627.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sknaumov@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.