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:   Thu, 2 May 2019 21:51:44 +0000
From:   "Elliott, Robert (Servers)" <elliott@....com>
To:     Marcos Paulo de Souza <marcos.souza.org@...il.com>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>
CC:     Jens Axboe <axboe@...nel.dk>, Hannes Reinecke <hare@...e.com>,
        "Omar Sandoval" <osandov@...com>, Ming Lei <ming.lei@...hat.com>,
        Damien Le Moal <damien.lemoal@....com>,
        Bart Van Assche <bvanassche@....org>,
        Greg Edwards <gedwards@....com>,
        open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function



> -----Original Message-----
> From: linux-kernel-owner@...r.kernel.org [mailto:linux-kernel-owner@...r.kernel.org] On Behalf Of
> Marcos Paulo de Souza
> Sent: Monday, April 29, 2019 8:32 PM
> Subject: [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function
> 
> This function takes an argument to specify the size of a block device,
> in bytes, and return the number of sectors of 512 bytes.
> 
...
> +static inline sector_t size_to_sectors(long long size)
> +{
> +	return size >> SECTOR_SHIFT;
> +}

At least one of the users in PATCH 2/2 passes an unsigned value that won't
fit in a signed argument:

-	blk_queue_max_discard_sectors(nullb->q, UINT_MAX >> 9);
+	blk_queue_max_discard_sectors(nullb->q, size_to_sectors(UINT_MAX));




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ