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]
Message-ID: <Yhjkwg6s8BP7xdaR@owl.dominikbrodowski.net>
Date:   Fri, 25 Feb 2022 15:16:34 +0100
From:   Dominik Brodowski <linux@...inikbrodowski.net>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org, Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH v3] random: unify cycles_t and jiffies usage and types

Am Fri, Feb 25, 2022 at 02:44:08PM +0100 schrieb Jason A. Donenfeld:
> random_get_entropy() returns a cycles_t, not an unsigned long, which is
> sometimes 64 bits on various 32-bit platforms, including x86.
> Conversely, jiffies is always unsigned long. This commit fixes things to
> use cycles_t for fields that use random_get_entropy(), named "cycles",
> and unsigned long for fields that use jiffies, named "now". It's also
> good to mix in a cycles_t and a jiffies in the same way for both
> add_device_randomness and add_timer_randomness, rather than using xor in
> one case. Finally, we unify the order of these volatile reads, always
> reading the more precise cycles counter, and then jiffies, so that the
> cycle counter is as close to the event as possible.
> 
> Cc: Theodore Ts'o <tytso@....edu>
> Cc: Dominik Brodowski <linux@...inikbrodowski.net>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>

	Reviewed-by: Dominik Brodowski <linux@...inikbrodowski.net>

Thanks,
	Dominik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ