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: <87msjxu9qr.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Tue, 24 Sep 2024 09:21:48 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,  Andrew Morton
 <akpm@...ux-foundation.org>,  linux-kernel@...r.kernel.org, Linus Torvalds
 <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] resource, kunit: add dependency on SPARSEMEM

Guenter Roeck <linux@...ck-us.net> writes:

> On 9/23/24 05:58, Geert Uytterhoeven wrote:
>> Hi Günter,
>> On Mon, Sep 23, 2024 at 12:50 AM Guenter Roeck <linux@...ck-us.net>
>> wrote:
>>> Building allmodconfig images on systems with SPARSEMEM=n results in
>>> the following message.
>>>
>>> WARNING: unmet direct dependencies detected for GET_FREE_REGION
>>>    Depends on [n]: SPARSEMEM [=n]
>>>    Selected by [m]:
>>>    - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
>>>
>>> and the build ultimately fails.
>> Really? What's the build error?
>
> I saw it on hexagon, and I didn't bother writing down the actual build error
> message. But it turns out you are correct, the m68k machine does build with
> CONFIG_RESOURCE_KUNIT_TEST=y even though SPARSEMEM and with it GET_FREE_REGION
> are not set. Never mind, I don't really want or have time to argue. I'll just
> disable CONFIG_RESOURCE_KUNIT_TEST when building hexagon images and wherever
> else I see the problem.
>
>> It does build for me on m68k, after fixing:
>>      --- a/include/linux/mm.h
>>      +++ b/include/linux/mm.h
>>      @@ -101,7 +101,7 @@ extern int mmap_rnd_compat_bits __read_mostly;
>>       # ifdef MAX_PHYSMEM_BITS
>>       # define PHYSMEM_END   ((1ULL << MAX_PHYSMEM_BITS) - 1)
>>       # else
>>      -# define PHYSMEM_END   (-1ULL)
>>     +# define PHYSMEM_END   ((phys_addr_t)-1)
>>       # endif
>>       #endif

After Linus' fix for PHYSMEM_END, GET_FREE_REGION doesn't need to depend
on SPARSEMEM anymore.  So, I think we can remove the dependency.  Can
you check whether the following patch work for you on top of latest
upstream kernel (with Linus' fix).

------------------------8<-------------------------------
>From ce1a930f74192a4a85c20564098470356f8c2ed4 Mon Sep 17 00:00:00 2001
From: Huang Ying <ying.huang@...el.com>
Date: Mon, 23 Sep 2024 09:24:03 +0800
Subject: [PATCH] resource: Remove dependency on SPARSEMEM from GET_FREE_REGION

We want to use the functions configured via GET_FREE_REGION in
resource kunit tests.  However, GET_FREE_REGION depends on SPARSEMEM.
This makes resource kunit tests cannot be built on some architectures
lacking SPARSEMEM.  In fact, these functions doesn't depend on
SPARSEMEM now.  So, remove dependency on SPARSEMEM from
GET_FREE_REGION.

Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
Cc: Guenter Roeck <linux@...ck-us.net>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Nathan Chancellor <nathan@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>
---
 mm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index b72e7d040f78..f287b0d1c5fc 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -1060,7 +1060,6 @@ config HMM_MIRROR
 	depends on MMU
 
 config GET_FREE_REGION
-	depends on SPARSEMEM
 	bool
 
 config DEVICE_PRIVATE
-- 
2.39.2




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ