From: Greg KH <gregkh@linuxfoundation.org>
To: Dragos Tatulea <dtatulea@nvidia.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Lin Ma <linma@zju.edu.cn>
Subject: Re: [PATCH 2/2] vdpa: Enable strict validation for netlinks ops
Date: Wed, 26 Jul 2023 21:27:55 +0200 [thread overview]
Message-ID: <2023072650-flight-reshuffle-65a0@gregkh> (raw)
In-Reply-To: <20230726185104.12479-3-dtatulea@nvidia.com>
On Wed, Jul 26, 2023 at 09:49:44PM +0300, Dragos Tatulea wrote:
> The previous patch added the missing nla policies that were required for
> validation to work.
>
> Now strict validation on netlink ops can be enabled. This patch does it.
>
> Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
> ---
> drivers/vdpa/vdpa.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
> index f2f654fd84e5..a7612e0783b3 100644
> --- a/drivers/vdpa/vdpa.c
> +++ b/drivers/vdpa/vdpa.c
> @@ -1257,37 +1257,31 @@ static const struct nla_policy vdpa_nl_policy[VDPA_ATTR_MAX + 1] = {
> static const struct genl_ops vdpa_nl_ops[] = {
> {
> .cmd = VDPA_CMD_MGMTDEV_GET,
> - .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> .doit = vdpa_nl_cmd_mgmtdev_get_doit,
> .dumpit = vdpa_nl_cmd_mgmtdev_get_dumpit,
> },
> {
> .cmd = VDPA_CMD_DEV_NEW,
> - .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> .doit = vdpa_nl_cmd_dev_add_set_doit,
> .flags = GENL_ADMIN_PERM,
> },
> {
> .cmd = VDPA_CMD_DEV_DEL,
> - .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> .doit = vdpa_nl_cmd_dev_del_set_doit,
> .flags = GENL_ADMIN_PERM,
> },
> {
> .cmd = VDPA_CMD_DEV_GET,
> - .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> .doit = vdpa_nl_cmd_dev_get_doit,
> .dumpit = vdpa_nl_cmd_dev_get_dumpit,
> },
> {
> .cmd = VDPA_CMD_DEV_CONFIG_GET,
> - .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> .doit = vdpa_nl_cmd_dev_config_get_doit,
> .dumpit = vdpa_nl_cmd_dev_config_get_dumpit,
> },
> {
> .cmd = VDPA_CMD_DEV_VSTATS_GET,
> - .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> .doit = vdpa_nl_cmd_dev_stats_get_doit,
> .flags = GENL_ADMIN_PERM,
> },
> --
> 2.41.0
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2023-07-26 19:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 18:49 [PATCH v2 0/2] vdpa: Enable strict validation for netlink ops Dragos Tatulea via Virtualization
2023-07-26 18:49 ` [PATCH 1/2] vdpa: Complement vdpa_nl_policy for nlattr length check Dragos Tatulea via Virtualization
2023-07-26 18:49 ` [PATCH 2/2] vdpa: Enable strict validation for netlinks ops Dragos Tatulea via Virtualization
2023-07-26 19:27 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-26 18:30 [PATCH 0/2] vdpa: Enable strict validation for netlink ops Dragos Tatulea via Virtualization
2023-07-26 18:30 ` [PATCH 2/2] vdpa: Enable strict validation for netlinks ops Dragos Tatulea via Virtualization
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=2023072650-flight-reshuffle-65a0@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dtatulea@nvidia.com \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=stable@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).