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]
Message-ID: <ZC0J6I1pYNZBB30y@infradead.org>
Date:   Tue, 4 Apr 2023 22:40:56 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     wuchi <wuchi.zero@...il.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca, ojaswin@...ux.ibm.com,
        ritesh.list@...il.com, linux-ext4@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: simplify 32bit calculation of lblk

On Mon, Apr 03, 2023 at 09:53:04PM +0800, wuchi wrote:
> -			if (block > ext_block)
> -				return ext_pblk + (block - ext_block);
> -			else
> -				return ext_pblk - (ext_block - block);
> +			return ext_pblk + ((signed long long)block - (signed long long)ext_block);

And what exactly is the value add here, except for turning an easy
to parse statement into a complex expression using casts?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ