Skip to content

netem: bug fixes

Stephen Hemminger lkml netdev 8 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest6 patches 8 repliesApplied 6/6
  2. v75 patches 1 replySuperseded
  3. v65 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v58 patches2 repliesSuperseded
v48 patches3 repliesSuperseded
v37 patches10 repliesSuperseded
v27 patches0 repliesSuperseded
v15 patches1 replySuperseded

Patches in v8 All 6 applied

#Subject and filesSizeRepliesApplied
1/6net/sched: netem: fix probability gaps in 4-state loss modelnet/sched/sch_netem.c+4 -40 repliesApplied
2/6net/sched: netem: fix queue limit check to include reordered packetsnet/sched/sch_netem.c+1 -11 replyApplied
3/6net/sched: netem: only reseed PRNG when seed is explicitly providednet/sched/sch_netem.c+6 -40 repliesApplied
4/6net/sched: netem: validate slot configurationnet/sched/sch_netem.c+29 -06 repliesApplied
5/6net/sched: netem: fix slot delay calculation overflownet/sched/sch_netem.c+2 -30 repliesApplied
6/6net/sched: netem: check for negative latency and jitternet/sched/sch_netem.c+22 -01 replyApplied

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchSimon Horman
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 net 0/6] netem: bug fixes

These bugs were found when doing AI-assisted review of sch_netem.c during investigation of the packet duplication recursion problem addressed in Jamal's series.

The fixes cover:

- probability gaps in the 4-state Markov loss model
- queue limit not accounting for reordered packets
- PRNG reseeded on every tc change, breaking reproducibility
- slot configuration not validated (inverted ranges, negative delays, negative limits)
- slot delay arithmetic overflow for ranges above ~2.1 seconds
- negative latency and jitter wrapping to huge time_to_send values via u64 arithmetic

v8 - added check for negative TCA_NETEM_LATENCY64 and TCA_NETEM_JITTER64
- extended slot validation to cover dist_delay, dist_jitter, max_packets and max_bytes

Stephen Hemminger (6):
net/sched: netem: fix probability gaps in 4-state loss model net/sched: netem: fix queue limit check to include reordered packets net/sched: netem: only reseed PRNG when seed is explicitly provided net/sched: netem: validate slot configuration
net/sched: netem: fix slot delay calculation overflow net/sched: netem: check for negative latency and jitter

 net/sched/sch_netem.c | 76 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 64 insertions(+), 12 deletions(-)
Signature · 1 line
2.53.0