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: <e203876fc20d4c7b932bbff35e8b5e1e@AcuMS.aculab.com>
Date:   Thu, 1 Jun 2023 10:28:45 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Christoph Hellwig' <hch@....de>,
        Daniel Gomez <da.gomez@...sung.com>
CC:     Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...nel.dk>,
        "Sagi Grimberg" <sagi@...mberg.me>,
        Pankaj Raghav <p.raghav@...sung.com>,
        "mcgrof@...nel.org" <mcgrof@...nel.org>,
        "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] nvme: Increase block size variable size to 32-bit

From: Christoph Hellwig
> Sent: 31 May 2023 14:03
> 
> > +	u32 bs = 1 << ns->lba_shift;
> 
> Make that 1 a 1U so that we're not going to run into sign extension
> issues when using up all bits in the u32 :)

Not 'sign extension' but obscure integer shift/conversion issues
that really only affect 1's compliment and sign-overpunch cpu.
I'm not even sure gcc/clang support any non 2's compliment systems.

> Otherwise looks good:

Probably improves the generated code as well.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ