From: Leon Romanovsky <leon@kernel.org>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: linux-rdma@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mlx5: bound raw flow rule match parameter copies
Date: Mon, 23 Mar 2026 18:56:27 +0200 [thread overview]
Message-ID: <20260323165627.GI814676@unreal> (raw)
In-Reply-To: <20260322031922.57975-1-pengpeng@iscas.ac.cn>
On Sun, Mar 22, 2026 at 11:19:22AM +0800, Pengpeng Hou wrote:
> `_create_raw_flow_rule()` copies user-supplied match data and matcher
> mask bytes directly into the fixed `mlx5_flow_spec` arrays. The UAPI
> allows up to `MLX5_IB_DW_MATCH_PARAM` bytes for the input attributes,
> but the kernel object only allocates
> `MLX5_ST_SZ_DW(fte_match_param)` bytes for each buffer.
>
> Validate the sizes before copying so oversized verbs requests cannot
> corrupt the spec object.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
> drivers/infiniband/hw/mlx5/fs.c | 6 ++++++
> 1 file changed, 6 insertions(+)
I suggest you to simply change MLX5_IB_DW_MATCH_PARAM value from 0xA0 to
be 0x80.
Thanks
prev parent reply other threads:[~2026-03-23 16:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-22 3:19 [PATCH] mlx5: bound raw flow rule match parameter copies Pengpeng Hou
2026-03-23 16:56 ` Leon Romanovsky [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=20260323165627.GI814676@unreal \
--to=leon@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=pengpeng@iscas.ac.cn \
/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