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-next>] [day] [month] [year] [list]
Message-Id: <20170419173931.3902058-1-arnd@arndb.de>
Date:   Wed, 19 Apr 2017 19:39:13 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Matias Bjorling <mb@...htnvm.io>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Matias Bjørling <matias@...xlabs.com>,
        Javier González <jg@...htnvm.io>,
        Jens Axboe <axboe@...com>, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] lightnvm: assume 64-bit lba numbers

The driver uses both u64 and sector_t to refer to offsets, and assigns between the
two. This causes one harmless warning when sector_t is 32-bit:

drivers/lightnvm/pblk-rb.c: In function 'pblk_rb_write_entry_gc':
include/linux/lightnvm.h:215:20: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
drivers/lightnvm/pblk-rb.c:324:22: note: in expansion of macro 'ADDR_EMPTY'

As the driver is already doing this inconsistently, changing the type
won't make it worse and is an easy way to avoid the warning.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/lightnvm/pblk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index c82120ce3be5..11ed7d83f572 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -119,7 +119,7 @@ struct pblk_w_ctx {
 	struct bio_list bios;		/* Original bios - used for completion
 					 * in REQ_FUA, REQ_FLUSH case
 					 */
-	sector_t lba;			/* Logic addr. associated with entry */
+	u64 lba;			/* Logic addr. associated with entry */
 	struct ppa_addr ppa;		/* Physic addr. associated with entry */
 	int flags;			/* Write context flags */
 };
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ