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:   Wed, 8 Apr 2020 04:21:52 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Tetsuhiro Kohada <Kohada.Tetsuhiro@...mitsubishielectric.co.jp>
Cc:     Mori.Takahiro@...mitsubishielectric.co.jp,
        motai.hirotaka@...mitsubishielectric.co.jp,
        Namjae Jeon <namjae.jeon@...sung.com>,
        Sungjong Seo <sj1557.seo@...sung.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] exfat: replace 'time_ms' with 'time_10ms'

Please leave at least 24 hours between sending new versions so that
you can collect all feedback relating to your change, and we don't see
discussion fragment between different threads.

> @@ -84,10 +84,10 @@ void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
>  			      t >> 11, (t >> 5) & 0x003F, (t & 0x001F) << 1);
>  
>  
> -	/* time_ms field represent 0 ~ 199(1990 ms) */
> -	if (time_ms) {
> -		ts->tv_sec += time_ms / 100;
> -		ts->tv_nsec = (time_ms % 100) * 10 * NSEC_PER_MSEC;
> +	/* time_10ms field represent 0 ~ 199cs(1990 ms) */
> +	if (time_10ms) {
> +		ts->tv_sec += (time_10ms * 10) / 1000;
> +		ts->tv_nsec = (time_10ms * 10) % 1000 * NSEC_PER_MSEC;

I find this more confusing than the original.

		ts->tv_sec += time_10ms / 100;
		ts->tv_nsec = (time_10ms % 100) * 10 * NSEC_PER_MSEC;

is easier to understand for me, not least because I don't need to worry
about the operator precedence between % and *.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ