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:	Mon, 10 Feb 2014 13:23:31 +0200
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	David Herrmann <dh.herrmann@...il.com>,
	<linux-fbdev@...r.kernel.org>
CC:	<linux-kernel@...r.kernel.org>, "H. Peter Anvin" <hpa@...or.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Ondrej Zajicek <santiago@...reenet.org>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore
 base

Hi David,

On 04/08/13 20:25, David Herrmann wrote:
> If drivers use "struct resource" objects to retrieve the vga-base, they
> must correctly cast the integer to pointer. With x86+PAE we have 32bit
> pointers but 64bit resource_size_t. Hence, cast it to "unsigned long"
> before casting to "void*" to suppress warnings due to size differences.
> 
> As IO addresses are always low addresses, we can safely drop the higher
> part of the address. This is what these drivers did before, anyway.
> 
> Signed-off-by: David Herrmann <dh.herrmann@...il.com>
> Reported-by: H. Peter Anvin <hpa@...or.com>
> ---
> Hi
> 
> hpa reported build-warnings on i386+PAE:
> /home/hpa/kernel/distwork/drivers/video/arkfb.c:1019:23: warning: cast to
>     pointer from integer of different size [-Wint-to-pointer-cast]
>     par->state.vgabase = (void __iomem *) vga_res.start;
>                          ^
> /home/hpa/kernel/distwork/drivers/video/s3fb.c: In function ‘s3_pci_probe’:
> /home/hpa/kernel/distwork/drivers/video/s3fb.c:1186:23: warning: cast to pointer
>     from integer of different size [-Wint-to-pointer-cast]
>     par->state.vgabase = (void __iomem *) vga_res.start;
>                          ^
> 
> This is due to resource_size_t being 64bit but "void*" 32bit. This patch tries
> to suppress these warnings but I am not really comfortable fixing this. I have
> no idea whether my assumption (IO address are 32bit) is right. Please verify.
> 
>  @David: The following 3 commits of yours presumably introduced the warnings. I
> would be glad if you could review this:

What was the conclusion on this patch? Should I apply for 3.14 fixes?

 Tomi



Download attachment "signature.asc" of type "application/pgp-signature" (902 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ