mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lin Ma" <linma@zju.edu.cn>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check
Date: Sun, 23 Jul 2023 17:48:46 +0800 (GMT+08:00)	[thread overview]
Message-ID: <8ecec51.e40ad.1898226c545.Coremail.linma@zju.edu.cn> (raw)
In-Reply-To: <729f5c17.e4079.18982192866.Coremail.linma@zju.edu.cn>


> Sure, that is another undergoing task I'm working on. If the nlattr is parsed with
> NL_VALIDATE_UNSPEC, any forgotten nlattr will be rejected, therefore (which is the default
> for modern nla_parse). 

For the general netlink interface, the deciding flag should be genl_ops.validate defined in 
each ops. The default validate flag is strict, while the developer can overwrite the flag 
with GENL_DONT_VALIDATE_STRICT to ease the validation. That is to say, safer code should 
enforce NL_VALIDATE_STRICT by not overwriting the validate flag.

Regrads
Lin

  reply	other threads:[~2023-07-23  9:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-23  8:05 Lin Ma
2023-07-23  9:22 ` Michael S. Tsirkin
2023-07-23  9:33   ` Lin Ma
2023-07-23  9:48     ` Lin Ma [this message]
2023-07-23 10:02       ` Michael S. Tsirkin
2023-07-24  7:11         ` Jason Wang
2023-07-24  8:38           ` Dragos Tatulea
2023-07-24  9:16             ` Michael S. Tsirkin
2023-07-24 11:42               ` Dragos Tatulea
2023-07-24 20:08                 ` Michael S. Tsirkin
2023-07-25  8:26                   ` Dragos Tatulea
2023-07-26 11:47                     ` Michael S. Tsirkin
2023-07-23  9:55     ` Michael S. Tsirkin

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=8ecec51.e40ad.1898226c545.Coremail.linma@zju.edu.cn \
    --to=linma@zju.edu.cn \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®