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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4558815-f400-41c9-973d-90680ceb3ede@linuxfoundation.org>
Date: Thu, 8 May 2025 16:14:41 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
 Anton Ivanov <anton.ivanov@...bridgegreys.com>,
 Johannes Berg <johannes@...solutions.net>,
 Richard Weinberger <richard@....at>, linux-um@...ts.infradead.org,
 David Gow <davidgow@...gle.com>, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] um: let 'make clean' properly clean underlying SUBARCH as
 well

On 5/7/25 17:49, Masahiro Yamada wrote:
> On Thu, May 8, 2025 at 6:38 AM Shuah Khan <skhan@...uxfoundation.org> wrote:
>>
>> On 5/7/25 01:49, Masahiro Yamada wrote:
>>> Building the kernel with O= is affected by stale in-tree build artifacts.
>>>
>>> So, if the source tree is not clean, Kbuild displays the following:
>>>
>>>     $ make ARCH=um O=build defconfig
>>>     make[1]: Entering directory '/.../linux/build'
>>>     ***
>>>     *** The source tree is not clean, please run 'make ARCH=um mrproper'
>>>     *** in /.../linux
>>>     ***
>>>     make[2]: *** [/.../linux/Makefile:673: outputmakefile] Error 1
>>>     make[1]: *** [/.../linux/Makefile:248: __sub-make] Error 2
>>>     make[1]: Leaving directory '/.../linux/build'
>>>     make: *** [Makefile:248: __sub-make] Error 2
>>>
>>> Usually, running 'make mrproper' is sufficient for cleaning the source
>>> tree for out-of-tree builds.
>>>
>>> However, building UML generates build artifacts not only in arch/um/,
>>> but also in the SUBARCH directory (i.e., arch/x86/). If in-tree stale
>>> files remain under arch/x86/, Kbuild will reuse them instead of creating
>>> new ones under the specified build directory.
>>>
>>> This commit makes 'make ARCH=um clean' recurse into the SUBARCH directory.
>>>
>>> Reported-by: Shuah Khan <skhan@...uxfoundation.org>
>>> Closes: https://lore.kernel.org/lkml/20250502172459.14175-1-skhan@linuxfoundation.org/
>>> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
>>
>> It doesn't solve the problem. I still see arch/x86/realmode/rm/pasyms.h
>> after running make ARCH=um mrproper
> 
> 
> Why not?
> 
> This patch allows 'make ARCH=um mrproper'
> to clean up both arch/um and arch/x86/.
> 
> It is really simple to test the behavior.
> 
> 
> [Without this patch]
> 
> masahiro@zoe:~/workspace/linux-kbuild(master)$ touch
> arch/x86/realmode/rm/pasyms.h
> masahiro@zoe:~/workspace/linux-kbuild(master)$ make ARCH=um mrproper
> masahiro@zoe:~/workspace/linux-kbuild(master)$ ls arch/x86/realmode/rm/pasyms.h
> arch/x86/realmode/rm/pasyms.h
> 
> [With this patch]
> 
> masahiro@zoe:~/workspace/linux-kbuild(kbuild)$ touch
> arch/x86/realmode/rm/pasyms.h
> masahiro@zoe:~/workspace/linux-kbuild(kbuild)$ make ARCH=um mrproper
>    CLEAN   arch/x86/realmode/rm
> masahiro@zoe:~/workspace/linux-kbuild(kbuild)$ ls arch/x86/realmode/rm/pasyms.h
> ls: cannot access 'arch/x86/realmode/rm/pasyms.h': No such file or directory
> 

I ran another controlled test starting from a totally clean repo
and the building - looks good to me.

Reviewed-by: Shuah Khan <skhan@...uxfoundation.org>

thanks,
-- Shuah


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ