netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "jakub.kicinski@netronome.com" <jakub.kicinski@netronome.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Tariq Toukan <tariqt@mellanox.com>,
	Maxim Mikityanskiy <maximmi@mellanox.com>
Subject: Re: [net 01/12] net/mlx5e: Use flow keys dissector to parse packets for ARFS
Date: Fri, 9 Aug 2019 18:49:50 +0000	[thread overview]
Message-ID: <02ebed305b6bb50f272c7f3decfa204dc72311f0.camel@mellanox.com> (raw)
In-Reply-To: <20190808181514.4cd68a37@cakuba.netronome.com>

On Thu, 2019-08-08 at 18:15 -0700, Jakub Kicinski wrote:
> On Thu, 8 Aug 2019 20:22:00 +0000, Saeed Mahameed wrote:
> > From: Maxim Mikityanskiy <maximmi@mellanox.com>
> > 
> > The current ARFS code relies on certain fields to be set in the SKB
> > (e.g. transport_header) and extracts IP addresses and ports by
> > custom
> > code that parses the packet. The necessary SKB fields, however, are
> > not
> > always set at that point, which leads to an out-of-bounds access.
> > Use
> > skb_flow_dissect_flow_keys() to get the necessary information
> > reliably,
> > fix the out-of-bounds access and reuse the code.
> 
> The whole series LGTM, FWIW.
> 
> I'd be curious to hear which path does not have the skb fully 
> set up, could you elaborate? (I'm certainly no aRFC expert this
> is pure curiosity).

In our regression we found two use cases that might lead aRFS using un-
initialized values.
1) GRO Disabled, Usually GRO fills the necessary fields.
2) Raw socket type of tests.

And i am sure there are many other use cases. So drivers must use
skb_flow_dissect_flow_keys() for aRFS parsing and eliminate all
uncertainties. 


  reply	other threads:[~2019-08-09 18:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 20:21 [pull request][net 00/12] Mellanox, mlx5 fixes 2019-08-08 Saeed Mahameed
2019-08-08 20:22 ` [net 01/12] net/mlx5e: Use flow keys dissector to parse packets for ARFS Saeed Mahameed
2019-08-09  1:15   ` Jakub Kicinski
2019-08-09 18:49     ` Saeed Mahameed [this message]
2019-08-09 19:01       ` Jakub Kicinski
2019-08-08 20:22 ` [net 02/12] net/mlx5: Support inner header match criteria for non decap flow action Saeed Mahameed
2019-08-08 20:22 ` [net 03/12] net/mlx5e: Only support tx/rx pause setting for port owner Saeed Mahameed
2019-08-08 20:22 ` [net 04/12] net/mlx5e: ethtool, Avoid setting speed to 56GBASE when autoneg off Saeed Mahameed
2019-08-08 20:22 ` [net 05/12] net/mlx5: crypto, Fix wrong offset in encryption key command Saeed Mahameed
2019-08-08 20:22 ` [net 06/12] net/mlx5: kTLS, Fix wrong TIS opmod constants Saeed Mahameed
2019-08-08 20:22 ` [net 07/12] net/mlx5e: kTLS, Fix progress params context WQE layout Saeed Mahameed
2019-08-08 20:22 ` [net 08/12] net/mlx5e: kTLS, Fix tisn field name Saeed Mahameed
2019-08-08 20:22 ` [net 09/12] net/mlx5e: kTLS, Fix tisn field placement Saeed Mahameed
2019-08-08 20:22 ` [net 10/12] net/mlx5e: Fix false negative indication on tx reporter CQE recovery Saeed Mahameed
2019-08-08 20:22 ` [net 11/12] net/mlx5e: Fix error flow of CQE recovery on tx reporter Saeed Mahameed
2019-08-08 20:22 ` [net 12/12] net/mlx5e: Remove redundant check in CQE recovery flow of " Saeed Mahameed
2019-08-09 20:37 ` [pull request][net 00/12] Mellanox, mlx5 fixes 2019-08-08 David Miller

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=02ebed305b6bb50f272c7f3decfa204dc72311f0.camel@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=maximmi@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@mellanox.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).