linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Maxim Mikityanskiy" <maxtram95@gmail.com>,
	"Arnd Bergmann" <arnd@kernel.org>
Cc: "Saeed Mahameed" <saeedm@nvidia.com>,
	"Leon Romanovsky" <leon@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Tom Rix" <trix@redhat.com>, "Tariq Toukan" <tariqt@nvidia.com>,
	"Adham Faris" <afaris@nvidia.com>,
	Netdev <netdev@vger.kernel.org>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH] mlx5: avoid integer overflow warning for large page size
Date: Thu, 22 Jun 2023 13:28:25 +0200	[thread overview]
Message-ID: <a7b27541-0ebb-4f2d-bd06-270a4d404613@app.fastmail.com> (raw)
In-Reply-To: <ZJQvJZxZkYfqGAJu@mail.gmail.com>

On Thu, Jun 22, 2023, at 13:23, Maxim Mikityanskiy wrote:
> On Thu, 22 Jun 2023 at 12:15:02 +0200, Arnd Bergmann wrote:
>
> I recall you already sent a fix to silence this warning before:
>
> https://lore.kernel.org/netdev/20211015152056.2434853-1-arnd@kernel.org/
>
> I prefer that old one, as it's more future-proof to cast to size_t here
> in place (chunk_size won't be bigger than size_t for sure). With your
> new patch, if chunk_size is ever changed from u16 to u32, it's likely
> that this place will be unnoticed, and a bug will be introduced.
>
>>  		mlx5_core_err(mdev, "XSK chunk size %u out of bounds [%u, %lu]\n", xsk->chunk_size,
>>  			      MLX5E_MIN_XSK_CHUNK_SIZE, PAGE_SIZE);

Indeed, I don't know why I no longer had the old patch in my randconfig
tree, I completely forgot about that. The old patch is also ok.

   Arnd

      reply	other threads:[~2023-06-22 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 10:15 [PATCH] mlx5: avoid integer overflow warning for large page size Arnd Bergmann
2023-06-22 11:23 ` Maxim Mikityanskiy
2023-06-22 11:28   ` Arnd Bergmann [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=a7b27541-0ebb-4f2d-bd06-270a4d404613@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=afaris@nvidia.com \
    --cc=arnd@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=maxtram95@gmail.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=trix@redhat.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).