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-next>] [day] [month] [year] [list]
Message-ID: <4306359.Sd6orIF4zo@tuxracer.localdomain>
Date:	Wed, 27 Mar 2013 15:00:06 +0200
From:	Sergey Popovich <popovich_sergei@...l.ru>
To:	netdev <netdev@...r.kernel.org>
Subject: sch_generic: missing u64 in psched_ratecfg_precompute()?

Hello!

It seems that commit

  commit 292f1c7ff6cc10516076ceeea45ed11833bb71c7                                                                                             
  Author: Jiri Pirko <jiri@...nulli.us>                                                                                                       
  Date:   Tue Feb 12 00:12:03 2013 +0000                                                                                                      
                                                                                                                                            
      sch: make htb_rate_cfg and functions around that generic

adds little regression.

Before
----
# tc qdisc add dev eth0 root handle 1: htb default ffff
# tc class add dev eth0 classid 1:ffff htb rate 5Gbit
# tc -s class show dev eth0
class htb 1:ffff root prio 0 rate 5000Mbit ceil 5000Mbit burst 625b cburst 
625b 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 rate 0bit 0pps backlog 0b 0p requeues 0 
 lended: 0 borrowed: 0 giants: 0
 tokens: 31 ctokens: 31

After
----
# tc qdisc add dev eth0 root handle 1: htb default ffff
# tc class add dev eth0 classid 1:ffff htb rate 5Gbit
# tc -s class show dev eth0
class htb 1:ffff root prio 0 rate 1544Mbit ceil 1544Mbit burst 625b cburst 
625b
 Sent 5073 bytes 41 pkt (dropped 0, overlimits 0 requeues 0)
 rate 1976bit 2pps backlog 0b 0p requeues 0
 lended: 41 borrowed: 0 giants: 0
 tokens: 1802 ctokens: 1802

This probably due to lost u64 cast of rate parameter in 
psched_ratecfg_precompute() (net/sched/sch_generic.c).

Simple patch attached. Tested and found working for me at least
on amd64.

-- 
SP5474-RIPE
Sergey Popovich

View attachment "sch_generic-add-missing-u64-cast.patch" of type "text/x-patch" (379 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ