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] [day] [month] [year] [list]
Date:   Tue, 13 Dec 2022 15:02:52 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     david.keisarschm@...l.huji.ac.il
Cc:     linux-kernel@...r.kernel.org, Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>, aksecurity@...il.com,
        ilay.bahat1@...il.com, linux-mm@...ck.org
Subject: Re: [PATCH v2 1/3] Replace invocation of weak PRNG in mm/slab.c

On Tue, Dec 13, 2022 at 12:34:57PM +0200, david.keisarschm@...l.huji.ac.il wrote:
> From: David <david.keisarschm@...l.huji.ac.il>

It's normal to include the surname in your sign-off, fwiw.

> @@ -2447,7 +2443,7 @@ static bool shuffle_freelist(struct kmem_cache *cachep, struct slab *slab)
>  
>  		/* Fisher-Yates shuffle */
>  		for (i = count - 1; i > 0; i--) {
> -			rand = prandom_u32_state(&state.rnd_state);
> +			rand = get_random_u32();
>  			rand %= (i + 1);

Shouldn't this be "rand = get_random_u32_below(i + 1)"?

>  			swap_free_obj(slab, i, rand);
>  		}
> -- 
> 2.38.0
> 
> 

Powered by blists - more mailing lists