From: Ido Schimmel <idosch@nvidia.com>
To: Zihan Xi <zihanx@nebusec.ai>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
David Ahern <dsahern@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Patrick McHardy <kaber@trash.net>,
stable@vger.kernel.org, Vega <vega@nebusec.ai>
Subject: Re: [PATCH net v2 1/1] ipv4: fib: bound automatic table ID allocation
Date: Tue, 1 Sep 2026 12:21:35 +0300 [thread overview]
Message-ID: <20260901092135.GA3402711@shredder> (raw)
In-Reply-To: <7b6bd9bb1bf6bd43db18156f42b2d7f83789a673.1788223735.git.zihanx@nebusec.ai>
On Tue, Sep 01, 2026 at 03:00:01AM +0000, Zihan Xi wrote:
> fib_empty_table() probes every table ID from 1 until it finds a
> free one. IPv4 tables are stored in a 256-bucket hash table, so a
> dense set of IDs makes each probe walk a growing hash chain while
> RTNL is held.
>
> Automatic table assignment ("ip rule ... table 0") is an IPv4-only
> legacy path. Bound the automatically allocated ID to 4096 so the
> RTNL hold stays bounded, without changing lookups of explicitly
> specified table IDs.
>
> Fixes: b801f54917b7 ("[NET]: Increate RT_TABLE_MAX to 2^32")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Suggested-by: Ido Schimmel <idosch@nvidia.com>
> Assisted-by: Codex:gpt-5.4
> Signed-off-by: Zihan Xi <zihanx@nebusec.ai>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
The bots will likely complain about the change in behavior because the
commit message doesn't spell it out. I explained why I think it's safe
in [1]. In addition, I checked, and both NetworkManager [2] and systemd
[3][4] explicitly forbid "table 0".
[1] https://lore.kernel.org/all/20260831110647.GA3202627@shredder/
[2] https://github.com/NetworkManager/NetworkManager/blob/2e83a4082b223499c4f1bba156998d0171071967/src/libnm-core-impl/nm-setting-ip-config.c#L2747-L2758
[3] https://github.com/systemd/systemd/blob/9b62fd169e06d14cbab801c66f2f9c2006edb75c/src/network/networkd-route-util.c#L456-L457
[4] https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#Table=
next prev parent reply other threads:[~2026-09-01 9:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 3:00 [PATCH net v2 0/1] ipv4: fib: bound automatic table ID allocation Zihan Xi
2026-09-01 3:00 ` [PATCH net v2 1/1] " Zihan Xi
2026-09-01 9:21 ` Ido Schimmel [this message]
2026-09-01 9:34 ` zihan xi
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=20260901092135.GA3402711@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kaber@trash.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=vega@nebusec.ai \
--cc=zihanx@nebusec.ai \
/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