From: Alexander Lobakin <alexandr.lobakin@intel.com>
To: Saeed Mahameed <saeed@kernel.org>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Mark Bloch <mbloch@nvidia.com>, Maor Gottlieb <maorg@nvidia.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net/mlx5: fix invalid structure access
Date: Mon, 30 May 2022 11:53:53 +0200 [thread overview]
Message-ID: <20220530095353.1237458-1-alexandr.lobakin@intel.com> (raw)
In-Reply-To: <20220527222905.chagmk4wfresegfg@sx1>
From: Saeed Mahameed <saeed@kernel.org>
Date: Fri, 27 May 2022 15:29:05 -0700
> On 27 May 13:01, Alexander Lobakin wrote:
> >After pulling latest bpf-next, I started catching the following:
[...]
> We have a similar patch that is being reviewed internally.
> I don't like comparing strings to match devices. Also this could cause mlx5
> unwanted aux devices to be matched, e.g mlx5e, mlx5_ib, mlx5v, etc .., since
> they all share the same prefix ? yes, no ?
>
> We also have another patch/approach that is comparing drivers:
>
> if (dev->driver != curr->device->driver)
> return NULL;
>
> But also this is under discussion.
Ok, I spotted that implementation in your repo at korg, hope it will
hit mainline trees soon.
>
> I think the whole design of this function is wrong, it's being used to match
> devices of type mlx5_core_dev which are pci devices, but it is using aux class
> to lookup! It works since we always have some aux devices hanging on top of
> mlx5_core pci devs and since all of them share the same wrapper structure
> "mlx5_adev" we find the corresponding mdev "mlx5_core_dev" sort of correctly.
[...]
> >--
> >2.36.1
Thanks,
Al
prev parent reply other threads:[~2022-05-30 9:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 11:01 Alexander Lobakin
2022-05-27 22:29 ` Saeed Mahameed
2022-05-30 9:53 ` Alexander Lobakin [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=20220530095353.1237458-1-alexandr.lobakin@intel.com \
--to=alexandr.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeed@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 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®