All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: "Cen Zhang (Microsoft)" <blbllhy@gmail.com>
Cc: AutonomousCodeSecurity@microsoft.com, davem@davemloft.net,
	edumazet@google.com, horms@kernel.org, jmaloy@redhat.com,
	kuba@kernel.org, kys@microsoft.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com,
	tgopinath@linux.microsoft.com,
	tipc-discussion@lists.sourceforge.net,
	tung.quang.nguyen@est.tech
Subject: Re: [PATCH net v3] tipc: fix u16 MTU truncation in media and bearer MTU validation
Date: Thu, 9 Jul 2026 10:29:46 +0100	[thread overview]
Message-ID: <9e1d71b5-f3c8-4b96-a2e0-cc83ef7f38cf@linux.dev> (raw)
In-Reply-To: <20260708224129.3722-1-blbllhy@gmail.com>

On 08/07/2026 23:41, Cen Zhang (Microsoft) wrote:
> Sadly NLA_POLICY_MAX() cannot be used here -- its .max field
> is s16 instead of u16 in struct nla_policy, which will
> overflow to -1 during my testing.
> 
> Please let me know if we have any other better choices.
> Otherwise, I'll prepare a patch adding .min check (
> TIPC_MIN_BEARER_MTU).

Ah, yeah, you are right, let's keep full range check

  reply	other threads:[~2026-07-09  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 18:02 [PATCH net v3] tipc: fix u16 MTU truncation in media and bearer MTU validation Cen Zhang (Microsoft)
2026-07-08 19:00 ` Vadim Fedorenko
2026-07-08 22:41   ` Cen Zhang (Microsoft)
2026-07-09  9:29     ` Vadim Fedorenko [this message]
2026-07-10 10:41 ` Vadim Fedorenko

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=9e1d71b5-f3c8-4b96-a2e0-cc83ef7f38cf@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=AutonomousCodeSecurity@microsoft.com \
    --cc=blbllhy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jmaloy@redhat.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tgopinath@linux.microsoft.com \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=tung.quang.nguyen@est.tech \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.