B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: sw@simonwunderlich.de, netdev-bot+sashiko@kernel.org
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	b.a.t.m.a.n@lists.open-mesh.org, sashiko-bot@kernel.org
Subject: Re: [PATCH net 10/10] batman-adv: tt: limit local table to single TVLV response size
Date: Tue, 27 Oct 2026 13:35:33 +0100	[thread overview]
Message-ID: <2934231.BEx9A2HvPv@ripper> (raw)
In-Reply-To: <179309132480.3134.3568656714789779480@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]

On Tuesday, 27 October 2026 09:55:24 CET netdev-bot+sashiko@kernel.org wrote:
> [Severity: Low]
> 
> Does this Fixes: tag point at the commit that introduced the problem?
> 
> 85fb027f611b removed a check from batadv_tt_local_create() that already
> limited the table by packet_size_max only:
> 
> -       /* Ignore the client if we cannot send it in a full table response. 
*/
> -       table_size = batadv_tt_local_table_transmit_size(bat_priv);
> -       table_size += batadv_tt_len(1);
> -       packet_size_max = READ_ONCE(bat_priv->packet_size_max);
> -       if (table_size > packet_size_max) {
> 
> That older check had no cap at the 16-bit tvlv_len either. So the missing
> limit seems to predate 85fb027f611b.
> 
> Blame on the parent of 85fb027f611b points at defa87f5ce75fe
> ("batman-adv: tt: extract allocation of new local entries"). That commit
> only moved this code, so the check is older still. The original commit
> was not identified.
> 
> Kernels without 85fb027f611b can still let the local table grow past what
> one unicast TVLV full table response can carry. This happens with
> fragmentation disabled and a hard interface MTU above
> sizeof(struct batadv_unicast_tvlv_packet) + U16_MAX. In that case,
> batadv_tt_prepare_tvlv_local_data() hits its check_add_overflow() path and
> returns 0, so no response is sent.
> 
> With the current tag, stable tooling would only pick this fix for trees
> that contain 85fb027f611b. Could the tag name the commit that first added
> the packet_size_max-only check? Or could the commit message say that
> older trees are affected too?
> 

The code only does it job partially after this commit. All of the previous 
commits would need a big revamp of the TT code - which is not backport-able 
via stable.

The really relevant part is in batadv_tt_local_reserve() and this was only 
introduced with this specific commit. And only for this commit, Sashiko 
pointed this out.

Regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-10-27 12:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  8:52 [PATCH net 00/10] pull request: batman-adv 2026-10-26 Simon Wunderlich
2026-10-26  8:53 ` [PATCH net 01/10] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure Simon Wunderlich
2026-10-26  8:56   ` netdev-bot+sinfo
2026-10-26  8:53 ` [PATCH net 02/10] batman-adv: Close OGM aggregation before transmission Simon Wunderlich
2026-10-27  8:55   ` netdev-bot+sashiko
2026-10-27 12:19     ` Sven Eckelmann
2026-10-26  8:53 ` [PATCH net 03/10] batman-adv: tpmeter: fix u32 truncation of reported bytes Simon Wunderlich
2026-10-26  8:53 ` [PATCH net 04/10] batman-adv: dat: initialize orig_node of unfilled candidate slots Simon Wunderlich
2026-10-26  8:53 ` [PATCH net 05/10] batman-adv: fix skb leak when hard_iface is being released Simon Wunderlich
2026-10-26  8:53 ` [PATCH net 06/10] batman-adv: stop originator purge worker before freeing TT Simon Wunderlich
2026-10-26  8:53 ` [PATCH net 07/10] batman-adv: tt: only transmit local ROAM flag together with DEL Simon Wunderlich
2026-10-27  8:55   ` netdev-bot+sashiko
2026-10-27 12:11     ` Sven Eckelmann
2026-10-26  8:53 ` [PATCH net 08/10] batman-adv: tt: only update flags for TT events Simon Wunderlich
2026-10-29  0:46   ` Jakub Kicinski
2026-10-26  8:53 ` [PATCH net 09/10] batman-adv: tt: don't drop local events queued during TVLV update Simon Wunderlich
2026-10-27  8:55   ` netdev-bot+sashiko
2026-10-27 13:31     ` Sven Eckelmann
2026-10-26  8:53 ` [PATCH net 10/10] batman-adv: tt: limit local table to single TVLV response size Simon Wunderlich
2026-10-27  8:55   ` netdev-bot+sashiko
2026-10-27 12:35     ` Sven Eckelmann [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=2934231.BEx9A2HvPv@ripper \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sashiko-bot@kernel.org \
    --cc=sw@simonwunderlich.de \
    /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