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]
Date:	Thu, 12 Dec 2013 14:29:35 +0000
From:	Qais Yousef <Qais.Yousef@...tec.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	Yang Yingliang <yangyingliang@...wei.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	"David S. Miller" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>
Subject: RE: [PATCH] net/sched/sch_tbf.c: fix linking error

> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@...il.com]
> Sent: 12 December 2013 14:18
> To: Qais Yousef
> Cc: Yang Yingliang; Eric Dumazet; Jamal Hadi Salim; David S. Miller;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org; linux-
> next@...r.kernel.org
> Subject: Re: [PATCH] net/sched/sch_tbf.c: fix linking error
> 
> On Thu, 2013-12-12 at 12:38 +0000, Qais Yousef wrote:
> > ERROR: "__udivdi3" [net/sched/sch_tbf.ko] undefined!
> >
> > introduced by: cc106e441a63 (net: sched: tbf: fix the calculation of
> > max_size)
> >
> > which adds a 64 by 32 bit division without using do_div().
> > Fix it by using do_div(len/ 53) instead of len/53.
> >
> > Signed-off-by: Qais Yousef <qais.yousef@...tec.com>
> > Cc: Eric Dumazet <edumazet@...gle.com>
> > Cc: Jamal Hadi Salim <jhs@...atatu.com>
> > Cc: "David S. Miller" <davem@...emloft.net>
> > Cc: netdev@...r.kernel.org
> > Cc: linux-kernel@...r.kernel.org
> > Cc: linux-next@...r.kernel.org
> > ---
> > We caught this error on linux-next today. This is my quick attemp of a fix.
> > If it's not appropriate or doesn't make sense my apologies and feel
> > free to resend a better fix :)
> >
> >  net/sched/sch_tbf.c |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index
> > a44928c..771cbec 100644
> > --- a/net/sched/sch_tbf.c
> > +++ b/net/sched/sch_tbf.c
> > @@ -131,8 +131,10 @@ static u64 psched_ns_t2l(const struct
> > psched_ratecfg *r,
> >
> >  	do_div(len, NSEC_PER_SEC);
> >
> > -	if (unlikely(r->linklayer == TC_LINKLAYER_ATM))
> > -		len = (len / 53) * 48;
> > +	if (unlikely(r->linklayer == TC_LINKLAYER_ATM)) {
> > +		do_div(len, 53);
> > +		len *= 48;
> > +	}
> >
> >  	if (len > r->overhead)
> >  		len -= r->overhead;
> 
> This looks like this was already fixed yesterday in David net tree :
> 
> http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=d55d282e6
> af88120ad90e93a88f70e3116dc0e3d
> 

Ah, ok. Thanks for checking this and sorry about the noise.

Qais

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ