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: <20160906193925.GC4218@mwanda>
Date:   Tue, 6 Sep 2016 22:39:25 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Martyn Welch <martyn@...chs.me.uk>,
        Manohar Vanga <manohar.vanga@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vme: fake: fix build for 64-bit dma_addr_t

On Tue, Sep 06, 2016 at 02:59:41PM +0200, Arnd Bergmann wrote:
> casting between dma_addr_t and a pointer is generally tricky,
> as they might not be the same size and almost never point into
> the same address space. With 32-bit ARM systems and LPAE, we
> get this warning for the vme_fake driver that stores a pointer
> in a dma_addr_t variable:
> 
> drivers/vme/bridges/vme_fake.c: In function 'fake_slave_set':
> drivers/vme/bridges/vme_fake.c:204:29: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
> 
> To make this clearer while fixing the warning, I'm adding
> a set of helper functions for the type conversion.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/vme/bridges/vme_fake.c | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/vme/bridges/vme_fake.c b/drivers/vme/bridges/vme_fake.c
> index 7ef298b289f4..ebf35d305321 100644
> --- a/drivers/vme/bridges/vme_fake.c
> +++ b/drivers/vme/bridges/vme_fake.c
> @@ -48,7 +48,7 @@ struct fake_slave_window {
>  	int enabled;
>  	unsigned long long vme_base;
>  	unsigned long long size;
> -	dma_addr_t buf_base;
> +	void *buf_base;

This shouldn't be u64?  (I don't know the answer).

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ