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]
Date:	Thu, 5 Jan 2012 19:30:56 +0000
From:	"Yalagandula, Praveen" <praveen.yalagandula@...com>
To:	Alexey Kuznetsov <kuznet@....inr.ac.ru>
CC:	"Yalagandula, Praveen" <praveen.yalagandula@...com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: bug in qavg calculation in include/net/red.h (resending as
 plain-text email)

(Resending as plain text)

Dear Alexey,

The code (see below) for computing the queue average for RED implementation in Linux kernel has a bug. The return line should be "return p->qavg + ((backlog - p->qavg) >> p->Wlog);". 

qavg = qavg*(1-W) + backlog*W

     = qavg + (backlog-qavg)*W

The current buggy code applies right shift to only the previous qavg, where as it should be applied to (backlog - qavg). Hope you can get this bug corrected.

Thanks,
Praveen Yalagandula
Senior Researcher, HP Labs, Palo Alto, CA

-------------------------------------

static inline unsigned long red_calc_qavg_no_idle_time(struct red_parms *p, unsigned int backlog)
{
     /*
     * NOTE: p->qavg is fixed point number with point at Wlog.
     * The formula below is equvalent to floating point
     * version:
     *
     *   qavg = qavg*(1-W) + backlog*W;
     *
     * --ANK (980924)
     */
     return p->qavg + (backlog - (p->qavg >> p->Wlog));
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ