linux-yocto/tools/testing/selftests/tc-testing/tc-tests/qdiscs
Vladimir Oltean fb66df20a7 net/sched: taprio: extend minimum interval restriction to entire cycle too
It is possible for syzbot to side-step the restriction imposed by the
blamed commit in the Fixes: tag, because the taprio UAPI permits a
cycle-time different from (and potentially shorter than) the sum of
entry intervals.

We need one more restriction, which is that the cycle time itself must
be larger than N * ETH_ZLEN bit times, where N is the number of schedule
entries. This restriction needs to apply regardless of whether the cycle
time came from the user or was the implicit, auto-calculated value, so
we move the existing "cycle == 0" check outside the "if "(!new->cycle_time)"
branch. This way covers both conditions and scenarios.

Add a selftest which illustrates the issue triggered by syzbot.

Fixes: b5b73b26b3 ("taprio: Fix allowing too small intervals")
Reported-by: syzbot+a7d2b1d5d1af83035567@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/0000000000007d66bc06196e7c66@google.com/
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20240527153955.553333-2-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-05-28 19:46:41 -07:00
..
cake.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
cbs.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
choke.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
codel.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
drr.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
etf.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
ets.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
fifo.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
fq_codel.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
fq_pie.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
fq.json selftests: tc-testing: adjust fq test to latest iproute2 2024-01-25 16:38:16 -08:00
gred.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
hfsc.json selftests: tc-testing: add test for 'rt' upgrade on hfsc 2023-10-21 11:46:41 +01:00
hhf.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
htb.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
ingress.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
mq.json selftests/tc-testing: replace mq with invalid parent ID 2023-06-01 21:40:28 -07:00
mqprio.json selftests/tc-testing: add selftests for mqprio qdisc 2022-09-22 17:34:12 -07:00
multiq.json selftests/tc-testing: add selftests for multiq qdisc 2022-09-22 17:34:12 -07:00
netem.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
pfifo_fast.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
plug.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
prio.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
qfq.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
red.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
sfb.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
sfq.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
skbprio.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
taprio.json net/sched: taprio: extend minimum interval restriction to entire cycle too 2024-05-28 19:46:41 -07:00
tbf.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00
teql.json selftests/tc-testing: update test definitions for local resources 2023-09-28 09:51:07 +02:00