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] [day] [month] [year] [list]
Message-ID: <2c6c7e9d-ca10-47a9-82a7-a2e26b1f51ef@roeck-us.net>
Date: Tue, 10 Dec 2024 16:56:39 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Geert Uytterhoeven <geert@...ux-m68k.org>,
 Greg KH <gregkh@...uxfoundation.org>
Cc: Dave Penkler <dpenkler@...il.com>, linux-staging@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5] staging: gpib: Fix i386 build issue

On 12/10/24 01:02, Geert Uytterhoeven wrote:
> Hi Greg,
> 
> On Tue, Dec 10, 2024 at 9:39 AM Greg KH <gregkh@...uxfoundation.org> wrote:
>> On Tue, Dec 10, 2024 at 08:52:08AM +0100, Geert Uytterhoeven wrote:
>>> On Mon, Dec 9, 2024 at 5:18 PM Guenter Roeck <linux@...ck-us.net> wrote:
>>>> The underlying problem is that the code uses a pointer to store the physical
>>>> address. That doesn't work if sizeof(pointer) < sizeof(physical address),
>>>> which affects systems with X86_PAE enabled. I have not seen the problem
>>>> anywhere else.
>>>
>>> I could reproduce the build issue on ARM, with CONFIG_ARM_LPAE=y,
>>> which is not enabled by allmodconfig.

I think it may actually also affect mips (CPU_MIPS32_R5_XPA) and arc
(ARC_HAS_PAE40).

>>
>> So does that mean this patch is incorrect?
> 
> Purely from an arch-agnostic LPAE PoV, it should be:
> 
>      depends on 64BIT || !PHYS_ADDR_T_64BIT
> 

Dave, would you mind submitting another version of your patch with the above
dependencies ?

> However, that assumes the driver actually works on 64-bit or non-x86.
> Perhaps people keep an old i386 to control their GPIB gear?
> 
> The drivers do not use ioremap(), but just cast the PCI resource
> addresses to void * pointers. No idea if that works on x86_64.

I did wonder about that as well, but unfortunately it isn't easy
to change, and would most definitely require testing on real hardware.

> It will probably crash spectacularly on non-x86...
> 

I'd guess so. However, that isn't something we can address here.
All we can make sure is that the code compiles.

Thanks,
Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ