lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM0EoMmTZon=nFmLsDPKhDEzHruw701iV9=mq92At9oKo0LGpA@mail.gmail.com>
Date: Mon, 21 Jul 2025 10:00:30 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: netdev@...r.kernel.org, will@...lsroot.io, stephen@...workplumber.org
Subject: Re: [Patch v4 net 0/6] netem: Fix skb duplication logic and prevent
 infinite loops

On Sat, Jul 19, 2025 at 6:04 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> This patchset fixes the infinite loops due to duplication in netem, the
> real root cause of this problem is enqueuing to the root qdisc, which is
> now changed to enqueuing to the same qdisc. This is more reasonable,
> more predictable from users' perspective, less error-proone and more elegant.
>
> Please see more details in patch 1/6 which contains two pages of detailed
> explanation including why it is safe and better.
>
> This replaces the patches from William, with much less code and without
> any workaround. More importantly, this does not break any use case.
>

Cong, you are changing user expected behavior.
So instead of sending to the root qdisc, you are looping on the same
qdisc. I dont recall what the history is for the decision to go back
to the root qdisc - but one reason that sounds sensible is we want to
iterate through the tree hierarchy again. Stephen may remember.
The fact that the qfq issue is hit indicates the change has
consequences - and given the check a few lines above, more than likely
you are affecting the qlen by what you did.

cheers,
jamal
> All the test cases pass with this patchset.
>
> ---
> v4: Added a fix for qfq qdisc (2/6)
>     Updated 1/6 patch description
>     Added a patch to update the enqueue reentrant behaviour tests
>
> v3: Fixed the root cause of enqueuing to root
>     Switched back to netem_skb_cb safely
>     Added two more test cases
>
> v2: Fixed a typo
>     Improved tdc selftest to check sent bytes
>
>
> Cong Wang (6):
>   net_sched: Implement the right netem duplication behavior
>   net_sched: Check the return value of qfq_choose_next_agg()
>   selftests/tc-testing: Add a nested netem duplicate test
>   selftests/tc-testing: Add a test case for piro with netem duplicate
>   selftests/tc-testing: Add a test case for mq with netem duplicate
>   selftests/tc-testing: Update test cases with netem duplicate
>
>  net/sched/sch_netem.c                         |  26 ++--
>  net/sched/sch_qfq.c                           |   2 +
>  .../tc-testing/tc-tests/infra/qdiscs.json     | 114 +++++++++++++-----
>  .../tc-testing/tc-tests/qdiscs/netem.json     |  25 ++++
>  4 files changed, 127 insertions(+), 40 deletions(-)
>
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ