All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH net-next] net: netlink: recommend policy range validation
Date: Fri, 27 Jan 2023 15:44:18 +0200	[thread overview]
Message-ID: <Y9PVMrxPS8Wx7irE@shredder> (raw)
In-Reply-To: <20230127084506.09f280619d64.I5dece85f06efa8ab0f474ca77df9e26d3553d4ab@changeid>

On Fri, Jan 27, 2023 at 08:45:06AM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> For large ranges (outside of s16) the documentation currently
> recommends open-coding the validation, but it's better to use
> the NLA_POLICY_FULL_RANGE() or NLA_POLICY_FULL_RANGE_SIGNED()
> policy validation instead; recommend that.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

I followed the current comment in code I'm currently working on to
validate VXLAN VNI ([0, 16M - 1]). Adjusted to use
NLA_POLICY_FULL_RANGE() following your patch, so thanks for that.

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

  reply	other threads:[~2023-01-27 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  7:45 [PATCH net-next] net: netlink: recommend policy range validation Johannes Berg
2023-01-27 13:44 ` Ido Schimmel [this message]
2023-01-28  8:40 ` patchwork-bot+netdevbpf

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=Y9PVMrxPS8Wx7irE@shredder \
    --to=idosch@idosch.org \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=netdev@vger.kernel.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 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.