Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: jhs@mojatatu.com
Cc: netdev@vger.kernel.org, jiri@resnulli.us, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, victor@mojatatu.com, p@1g4.org
Subject: Re: [PATCH net-next v3 3/5] net/sched: act_gate: cap the number of scheduling entries
Date: Wed, 14 Oct 2026 09:15:41 +0000	[thread overview]
Message-ID: <179196934128.434549.15511109301116224136@kernel.org> (raw)
In-Reply-To: <QDISC-H19Z.v3.r0.20261012193813-3@mojatatu.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Concern (rejected after checking): the commit message relies on
  "net/sched: act_api: report an oversized action dump instead of…

--

net/sched: act_gate: cap the number of scheduling entries

This commit caps the number of TCA_GATE_ONE_ENTRY elements that
parse_gate_list() accepts at GATE_ENTRIES_MAX (1024). Larger lists are
rejected with -E2BIG and an extack message. The limit is based on the
SJA1105 schedule-table capacity and on the 16-bit nla_len limit of a
nested attribute.

Link: https://lore.kernel.org/netdev/QDISC-H19Z.v1.20261001053234@mojatatu.com/

> Why 1024 despite the dump budget:
> 1024 is a SJA1105 schedule-table capacity, not a dump-budget value. The
> kernel clamps a dump skb to SKB_WITH_OVERHEAD(32768), so only ~800-890
> entries of this list fit "tc actions ls"; the top of the admitted band
> therefore installs but is not listed. That is accepted deliberately:
> a unicast RTM_GETACTION reply is pre-sized from the action's advertised
> size (budgeted per entry since the parent fix), so "tc actions get"
> enumerates the whole band, and "net/sched: act_api: report an oversized
> action dump instead of silently truncating it" makes the list view fail
> loudly with -EMSGSIZE and an extack rather than silently truncating.

[Severity: Low]
This is a minor point about the commit message, not about the code.

The paragraph reads as if the -EMSGSIZE behaviour is already in place.
The referenced commit is the last patch of this series, though. At this
commit, tcf_dump_walker() in net/sched/act_api.c still drops an action
that does not fit:

net/sched/act_api.c:tcf_dump_walker() {
    ...
		if (err < 0) {
			index--;
			nlmsg_trim(skb, nest);
			goto done;
		}
    ...
}

So at this bisect point, a gate with roughly 890-1024 entries is still
silently left out of "tc actions ls". That is not a regression: the
truncation already happened before this patch, when gates of any size
were allowed. This patch only narrows the range that triggers it, and
the final patch of the series makes it fail loudly.

Could the message say that the act_api change comes later in this
series?

Could "the parent fix" also name the commit it means, presumably
cfa165cbfbed, which added the per-entry get_fill_size budget?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/QDISC-H19Z.v3.r0.20261012193813%40mojatatu.com

  reply	other threads:[~2026-10-14  9:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  8:54 [PATCH net-next v3 0/5] net/sched: reject oversized action dumps and cap unbounded entry lists Jamal Hadi Salim
2026-10-13  8:54 ` [PATCH net-next v3 1/5] net/sched: act_gate: reject oversized dumps instead of wrapping them Jamal Hadi Salim
2026-10-14  9:15   ` netdev-bot+sashiko
2026-10-13  8:54 ` [PATCH net-next v3 2/5] net/sched: act_api: keep an add that created its actions from failing Jamal Hadi Salim
2026-10-14  9:15   ` netdev-bot+sashiko
2026-10-13  8:54 ` [PATCH net-next v3 3/5] net/sched: act_gate: cap the number of scheduling entries Jamal Hadi Salim
2026-10-14  9:15   ` netdev-bot+sashiko [this message]
2026-10-13  8:54 ` [PATCH net-next v3 4/5] net/sched: sch_taprio: cap the number of schedule entries Jamal Hadi Salim
2026-10-14  9:15   ` netdev-bot+sashiko
2026-10-13  8:54 ` [PATCH net-next v3 5/5] net/sched: act_api: report an oversized action dump instead of silently truncating it Jamal Hadi Salim
2026-10-14  9:15   ` netdev-bot+sashiko
2026-10-14 10:02     ` Jamal Hadi Salim

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=179196934128.434549.15511109301116224136@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p@1g4.org \
    --cc=pabeni@redhat.com \
    --cc=victor@mojatatu.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