b939d1e0 | 27-May-2024 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net/sched: taprio: extend minimum interval restriction to entire cycle too
[ Upstream commit fb66df20a7201e60f2b13d7f95d031b31a8831d3 ]
It is possible for syzbot to side-step the restriction impose
net/sched: taprio: extend minimum interval restriction to entire cycle too
[ Upstream commit fb66df20a7201e60f2b13d7f95d031b31a8831d3 ]
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: b5b73b26b3ca ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
29c298d2 | 07-Aug-2023 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
selftests/tc-testing: verify that a qdisc can be grafted onto a taprio class
The reason behind commit af7b29b1deaa ("Revert "net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child
selftests/tc-testing: verify that a qdisc can be grafted onto a taprio class
The reason behind commit af7b29b1deaa ("Revert "net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child qdiscs"") was that the patch it reverted caused a crash when attaching a CBS shaper to one of the taprio classes. Prevent that from happening again by adding a test case for it, which now passes correctly in both offload and software modes.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Pedro Tammela <pctammela@mojatatu.com> Link: https://lore.kernel.org/r/20230807193324.4128292-12-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
1890cf08 | 07-Aug-2023 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
selftests/tc-testing: test that taprio can only be attached as root
Check that the "Can only be attached as root qdisc" error message from taprio is effective by attempting to attach it to a class o
selftests/tc-testing: test that taprio can only be attached as root
Check that the "Can only be attached as root qdisc" error message from taprio is effective by attempting to attach it to a class of another taprio qdisc. That operation should fail.
In the bug that was squashed by change "net/sched: taprio: try again to report q->qdiscs[] to qdisc_leaf()", grafting a child taprio to a root software taprio would be misinterpreted as a change() to the root taprio. Catch this by looking at whether the base-time of the root taprio has changed to follow the base-time of the child taprio, something which should have absolutely never happened assuming correct semantics.
Vinicius points out that looking at "base_time" in the tc qdisc show output is unreliable because user space is in a race with the kernel applying the setting. So we create a helper bash script which waits while there is any pending schedule.
Link: https://lore.kernel.org/netdev/87il9w0xx7.fsf@intel.com/ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Pedro Tammela <pctammela@mojatatu.com> Link: https://lore.kernel.org/r/20230807193324.4128292-11-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
137f6219 | 11-Jul-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: add test for qfq with stab overhead
A packet with stab overhead greater than QFQ_MAX_LMAX should be dropped by the QFQ qdisc as it can't handle such lengths.
Signed-off-by: J
selftests: tc-testing: add test for qfq with stab overhead
A packet with stab overhead greater than QFQ_MAX_LMAX should be dropped by the QFQ qdisc as it can't handle such lengths.
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Tested-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
bbe77c14 | 14-Feb-2023 |
Jamal Hadi Salim <jhs@mojatatu.com> |
net/sched: Retire dsmark qdisc
The dsmark qdisc has served us well over the years for diffserv but has not been getting much attention due to other more popular approaches to do diffserv services. M
net/sched: Retire dsmark qdisc
The dsmark qdisc has served us well over the years for diffserv but has not been getting much attention due to other more popular approaches to do diffserv services. Most recently it has become a shooting target for syzkaller. For this reason, we are retiring it.
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
fb38306c | 14-Feb-2023 |
Jamal Hadi Salim <jhs@mojatatu.com> |
net/sched: Retire ATM qdisc
The ATM qdisc has served us well over the years but has not been getting much TLC due to lack of known users. Most recently it has become a shooting target for syzkaller.
net/sched: Retire ATM qdisc
The ATM qdisc has served us well over the years but has not been getting much TLC due to lack of known users. Most recently it has become a shooting target for syzkaller. For this reason, we are retiring it.
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
cc62fbe1 | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for teql qdisc
Test 84a0: Create TEQL with default setting Test 7734: Create TEQL with multiple device Test 34a9: Delete TEQL with valid handle Test 6289: Show TE
selftests/tc-testing: add selftests for teql qdisc
Test 84a0: Create TEQL with default setting Test 7734: Create TEQL with multiple device Test 34a9: Delete TEQL with valid handle Test 6289: Show TEQL stats
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
10835be3 | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for tbf qdisc
Test 6430: Create TBF with default setting Test 0518: Create TBF with mtu setting Test 320a: Create TBF with peakrate setting Test 239b: Create TBF
selftests/tc-testing: add selftests for tbf qdisc
Test 6430: Create TBF with default setting Test 0518: Create TBF with mtu setting Test 320a: Create TBF with peakrate setting Test 239b: Create TBF with latency setting Test c975: Create TBF with overhead setting Test 948c: Create TBF with linklayer setting Test 3549: Replace TBF with mtu Test f948: Change TBF with latency time Test 2348: Show TBF class
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
8a3b3667 | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for taprio qdisc
Test ba39: Add taprio Qdisc to multi-queue device (8 queues) Test 9462: Add taprio Qdisc with multiple sched-entry Test 8d92: Add taprio Qdisc wi
selftests/tc-testing: add selftests for taprio qdisc
Test ba39: Add taprio Qdisc to multi-queue device (8 queues) Test 9462: Add taprio Qdisc with multiple sched-entry Test 8d92: Add taprio Qdisc with txtime-delay Test d092: Delete taprio Qdisc with valid handle Test 8471: Show taprio class Test 0a85: Add taprio Qdisc to single-queue device
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
c5a2d86b | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for skbprio qdisc
Test 283e: Create skbprio with default setting Test c086: Create skbprio with limit setting Test 6733: Change skbprio with limit setting Test 29
selftests/tc-testing: add selftests for skbprio qdisc
Test 283e: Create skbprio with default setting Test c086: Create skbprio with limit setting Test 6733: Change skbprio with limit setting Test 2958: Show skbprio class
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
0158f65b | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for sfq qdisc
Test 7482: Create SFQ with default setting Test c186: Create SFQ with limit setting Test ae23: Create SFQ with perturb setting Test a430: Create SFQ
selftests/tc-testing: add selftests for sfq qdisc
Test 7482: Create SFQ with default setting Test c186: Create SFQ with limit setting Test ae23: Create SFQ with perturb setting Test a430: Create SFQ with quantum setting Test 4539: Create SFQ with divisor setting Test b089: Create SFQ with flows setting Test 99a0: Create SFQ with depth setting Test 7389: Create SFQ with headdrop setting Test 6472: Create SFQ with redflowlimit setting Test 8929: Show SFQ class
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
6ad92dc5 | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for sfb qdisc
Test 3294: Create SFB with default setting Test 430a: Create SFB with rehash setting Test 3410: Create SFB with db setting Test 49a0: Create SFB wit
selftests/tc-testing: add selftests for sfb qdisc
Test 3294: Create SFB with default setting Test 430a: Create SFB with rehash setting Test 3410: Create SFB with db setting Test 49a0: Create SFB with limit setting Test 1241: Create SFB with max setting Test 3249: Create SFB with target setting Test 30a9: Create SFB with increment setting Test 239a: Create SFB with decrement setting Test 9301: Create SFB with penalty_rate setting Test 2a01: Create SFB with penalty_burst setting Test 3209: Change SFB with rehash setting Test 5447: Show SFB class
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
7d0b4b0c | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for plug qdisc
Test 3289: Create PLUG with default setting Test 0917: Create PLUG with block setting Test 483b: Create PLUG with release setting Test 4995: Create
selftests/tc-testing: add selftests for plug qdisc
Test 3289: Create PLUG with default setting Test 0917: Create PLUG with block setting Test 483b: Create PLUG with release setting Test 4995: Create PLUG with release_indefinite setting Test 389c: Create PLUG with limit setting Test 384a: Delete PLUG with valid handle Test 439a: Replace PLUG with limit setting Test 9831: Change PLUG with limit setting
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
379a6509 | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for pfifo_fast qdisc
Test 900c: Create pfifo_fast with default setting Test 7470: Dump pfifo_fast stats Test b974: Replace pfifo_fast with different handle Test 3
selftests/tc-testing: add selftests for pfifo_fast qdisc
Test 900c: Create pfifo_fast with default setting Test 7470: Dump pfifo_fast stats Test b974: Replace pfifo_fast with different handle Test 3240: Delete pfifo_fast with valid handle Test 4385: Delete pfifo_fast with invalid handle
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
225aeb62 | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for hhf qdisc
Test 4812: Create HHF with default setting Test 8a92: Create HHF with limit setting Test 3491: Create HHF with quantum setting Test ba04: Create HHF
selftests/tc-testing: add selftests for hhf qdisc
Test 4812: Create HHF with default setting Test 8a92: Create HHF with limit setting Test 3491: Create HHF with quantum setting Test ba04: Create HHF with reset_timeout setting Test 4238: Create HHF with admit_bytes setting Test 839f: Create HHF with evict_timeout setting Test a044: Create HHF with non_hh_weight setting Test 32f9: Change HHF with limit setting Test 385e: Show HHF class
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
a4a8d356 | 23-Sep-2022 |
Zhengchao Shao <shaozhengchao@huawei.com> |
selftests/tc-testing: add selftests for gred qdisc
Test 8942: Create GRED with default setting Test 5783: Create GRED with grio setting Test 8a09: Create GRED with limit setting Test 48cb: Create GR
selftests/tc-testing: add selftests for gred qdisc
Test 8942: Create GRED with default setting Test 5783: Create GRED with grio setting Test 8a09: Create GRED with limit setting Test 48cb: Create GRED with ecn setting Test 763a: Change GRED setting Test 8309: Show GRED class
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|