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:	Fri, 18 Jan 2008 20:18:20 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Stephen Hemminger <stephen.hemminger@...tta.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] SFQ: use net_random

On Fri, Jan 18, 2008 at 02:47:30PM -0800, Stephen Hemminger wrote:
> SFQ doesn't need true random numbers, it is only using them to salt
> a hash. Therefore it is better to use net_random() and avoid any possible
> problems with depleting the entropy pool.

The random-number algorithm used by net_random() certainly does appear
to be considerably stronger than the one I used to generate the results
in the 1990 paper.  ;-)

Acked-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

> Signed-off-by: Stephen Hemminger <stephen.hemminger@...tta.com>
> 
> 
> --- a/net/sched/sch_sfq.c	2008-01-17 09:00:58.000000000 -0800
> +++ b/net/sched/sch_sfq.c	2008-01-17 09:03:26.000000000 -0800
> @@ -386,7 +386,7 @@ static void sfq_perturbation(unsigned lo
>  	struct Qdisc *sch = (struct Qdisc*)arg;
>  	struct sfq_sched_data *q = qdisc_priv(sch);
> 
> -	get_random_bytes(&q->perturbation, 4);
> +	q->perturbation = net_random();
> 
>  	if (q->perturb_period)
>  		mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
> @@ -415,7 +415,7 @@ static int sfq_change(struct Qdisc *sch,
>  	del_timer(&q->perturb_timer);
>  	if (q->perturb_period) {
>  		mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
> -		get_random_bytes(&q->perturbation, 4);
> +		q->perturbation = net_random();
>  	}
>  	sch_tree_unlock(sch);
>  	return 0;
> @@ -443,7 +443,7 @@ static int sfq_init(struct Qdisc *sch, s
>  	if (opt == NULL) {
>  		q->quantum = psched_mtu(sch->dev);
>  		q->perturb_period = 0;
> -		get_random_bytes(&q->perturbation, 4);
> +		q->perturbation = net_random();
>  	} else {
>  		int err = sfq_change(sch, opt);
>  		if (err)
--
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