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: <fbd0426c-fdd2-4b7f-a13e-072ed5f973de@app.fastmail.com>
Date: Mon, 19 Feb 2024 12:29:57 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: Christian König <christian.koenig@....com>,
 "Randy Dunlap" <rdunlap@...radead.org>, "Arnd Bergmann" <arnd@...nel.org>,
 "Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>,
 "Maxime Ripard" <mripard@...nel.org>,
 "Thomas Zimmermann" <tzimmermann@...e.de>
Cc: "Dave Airlie" <airlied@...il.com>, "Daniel Vetter" <daniel@...ll.ch>,
 "Arunpravin Paneer Selvam" <Arunpravin.PaneerSelvam@....com>,
 "David Gow" <davidgow@...gle.com>,
 Maíra Canal <mcanal@...lia.com>,
 "Matthew Auld" <matthew.auld@...el.com>, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/tests/drm_buddy: avoid 64-bit calculation

On Mon, Feb 19, 2024, at 12:22, Christian König wrote:
> Am 17.02.24 um 02:31 schrieb Randy Dunlap:
>> On 2/16/24 12:24, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd@...db.de>
>>>
>>> The newly added drm_test_buddy_alloc_contiguous() test fails to link on
>>> 32-bit targets because of inadvertent 64-bit calculations:
>>>
>>> ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined!
>>> ERROR: modpost: "__aeabi_ldivmod" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined!
>>>
>>> >From what I can tell, the numbers cannot possibly overflow a 32-bit size,
>>> so use different types for these.
>>>
>>> I noticed that the function has another possible flaw in that is mixes
>>> what it calls pages with 4KB units. This is a big confusing at best,
>>> or possibly broken when built on machines with larger pages.
>>>
>>> Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test")
>>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> Tested-by: Randy Dunlap <rdunlap@...radead.org>
>
> I've just pushed a similar patch Mathew came up a bit earlier to 
> drm-misc-fixes.
>
> Sorry for the noise, I have to catch up on picking up patches for 
> misc-fixes and misc-next.

Ok, thanks.

Have you looked at how this code works for larger values of PAGE_SIZE?
Is there any need to change other things or will this work with the
hardcoded 4KB chunks?

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ