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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Feb 2019 17:53:16 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Leslie Monis <lesliemonis@...il.com>, davem@...emloft.net
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: sched: pie: fix 64-bit division

On 2/26/19 5:00 PM, Leslie Monis wrote:
> Use div_u64() to resolve build failures on 32-bit platforms.
> 
> Fixes: 3f7ae5f3dc52 ("net: sched: pie: add more cases to auto-tune alpha and beta")
> Signed-off-by: Leslie Monis <lesliemonis@...il.com>

Reported-by: Randy Dunlap <rdunlap@...radead.org>
Tested-by: Randy Dunlap <rdunlap@...radead.org>

Thanks.

[https://lore.kernel.org/lkml/6ecd1bde-c15b-0568-2b72-6e0796a87864@infradead.org/]

> ---
>  net/sched/sch_pie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c
> index 4c0670b6aec1..f93cfe034c72 100644
> --- a/net/sched/sch_pie.c
> +++ b/net/sched/sch_pie.c
> @@ -429,7 +429,7 @@ static void calculate_probability(struct Qdisc *sch)
>  	 */
>  
>  	if (qdelay == 0 && qdelay_old == 0 && update_prob)
> -		q->vars.prob = (q->vars.prob * 98) / 100;
> +		q->vars.prob = 98 * div_u64(q->vars.prob, 100);
>  
>  	q->vars.qdelay = qdelay;
>  	q->vars.qlen_old = qlen;
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ