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: <88c8ede5-47c0-49ec-805d-161293eec679@roeck-us.net>
Date: Mon, 2 Dec 2024 09:48:49 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Dave Penkler <dpenkler@...il.com>, gregkh@...uxfoundation.org,
 linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: gpib: Fix i386 build issue

On 12/2/24 09:33, Dave Penkler wrote:
> Both drivers cast resource_type_t to void * causing the build to fail.
> 
> With CONFIG_X86_PAE enabled the resource_size_t type is a 64bit unsigned int
> which cannot be cast to a 32 bit pointer.
> 
> Use ioremap() instead of pci_resource_start()
> 
> Reported_by: Guenter Roeck <linux@...ck-us.net>
> Link: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
> Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver")
> Fixes: e1339245eba3 ("staging: gpib: Add Computer Equipment Corporation GPIB driver")
> 
> Signed-off-by: Dave Penkler <dpenkler@...il.com>
> ---
> v1 -> v2 changed pci_resource_start to pci_resource_len for second parameter of ioremap
> 
Sorry, there are some more.

drivers/staging/gpib/tnt4882/tnt4882_gpib.c: In function ‘ni_isa_attach_common’:
drivers/staging/gpib/tnt4882/tnt4882_gpib.c:1430:26: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

drivers/staging/gpib/cb7210/cb7210.c: In function 'cb_pci_attach':
drivers/staging/gpib/cb7210/cb7210.c:974:36: error: cast to pointer from integer of different size

Not sure if that really fixes the problem though, since there is other code
which maps the void * back to phys_addr_t (or, rather, to unsigned long).
It might be better to work around the problem for now by disabling support
for platforms where sizeof(phys_addr_t) > sizeof(void *).

Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ