From: Dragos Tatulea via Virtualization <virtualization@lists.linux-foundation.org>
To: "jasowang@redhat.com" <jasowang@redhat.com>,
"mst@redhat.com" <mst@redhat.com>
Cc: "xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
Eli Cohen <elic@nvidia.com>,
"linma@zju.edu.cn" <linma@zju.edu.cn>
Subject: Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check
Date: Mon, 24 Jul 2023 08:38:04 +0000 [thread overview]
Message-ID: <56aa7d5c6d5840aedef83d3dc39f0bb3162bbb58.camel@nvidia.com> (raw)
In-Reply-To: <CACGkMEuGHMu6te3jRfEhhwTrWR1mpqp3hbVhDKQiXK9tgwz3qw@mail.gmail.com>
On Mon, 2023-07-24 at 15:11 +0800, Jason Wang wrote:
> On Sun, Jul 23, 2023 at 6:02 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Sun, Jul 23, 2023 at 05:48:46PM +0800, Lin Ma wrote:
> > >
> > > > 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
> >
> >
> > Oh I see.
> >
> > It started here:
> >
> > commit 33b347503f014ebf76257327cbc7001c6b721956
> > Author: Parav Pandit <parav@nvidia.com>
> > Date: Tue Jan 5 12:32:00 2021 +0200
> >
> > vdpa: Define vdpa mgmt device, ops and a netlink interface
> >
> > which did:
> >
> > + .validate = GENL_DONT_VALIDATE_STRICT |
> > GENL_DONT_VALIDATE_DUMP,
> >
> >
> > which was most likely just a copy paste from somewhere, right Parav?
> >
> > and then everyone kept copying this around.
> >
> > Parav, Eli can we drop these? There's a tiny chance of breaking something
> > but I feel there aren't that many users outside mlx5 yet, so if you
> > guys can test on mlx5 and confirm no breakage, I think we are good.
>
> Adding Dragos.
>
I will check. Just to make sure I understand correctly: you want me to drop the
.validate flags all together in all vdpa ops and check, right?
Thanks,
Dragos
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2023-07-24 8:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230723080507.3716924-1-linma@zju.edu.cn>
2023-07-23 9:22 ` [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check Michael S. Tsirkin
[not found] ` <729f5c17.e4079.18982192866.Coremail.linma@zju.edu.cn>
2023-07-23 9:55 ` Michael S. Tsirkin
[not found] ` <8ecec51.e40ad.1898226c545.Coremail.linma@zju.edu.cn>
2023-07-23 10:02 ` Michael S. Tsirkin
2023-07-24 7:11 ` Jason Wang
2023-07-24 8:38 ` Dragos Tatulea via Virtualization [this message]
2023-07-24 9:16 ` Michael S. Tsirkin
2023-07-24 11:42 ` Dragos Tatulea via Virtualization
2023-07-24 20:08 ` Michael S. Tsirkin
2023-07-25 8:26 ` Dragos Tatulea via Virtualization
2023-07-26 11:47 ` 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=56aa7d5c6d5840aedef83d3dc39f0bb3162bbb58.camel@nvidia.com \
--to=virtualization@lists.linux-foundation.org \
--cc=dtatulea@nvidia.com \
--cc=elic@nvidia.com \
--cc=jasowang@redhat.com \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).