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:	Fri, 9 Oct 2015 07:42:21 -0700
From:	Christoph Hellwig <hch@...radead.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Matthew Wilcox <willy@...ux.intel.com>, Jens Axboe <axboe@...com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-nvme@...ts.infradead.org, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] nvme: fix 32-bit build warning

On Tue, Oct 06, 2015 at 10:37:11PM +0200, Arnd Bergmann wrote:
> Compiling the nvme driver on 32-bit warns about a cast from a __u64
> variable to a pointer:
> 
> drivers/block/nvme-core.c: In function 'nvme_submit_io':
> drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>     (void __user *)io.addr, length, NULL, 0);
> 
> The cast here is intentional and safe, so we can shut up the
> gcc warning by adding an intermediate cast to 'unsigned long'.

It really should be a uintptr_t, which would also avoid the > 80
character lines.  I wonder if we need a u64_to_ptr helper given these
ioctl ABIs that pass pointers as a u64 seems to be everywhere these
days.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ