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: <15532d64-6744-c8a5-184b-18358211d345@linuxfoundation.org>
Date:   Mon, 27 Jun 2022 10:54:39 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Muhammad Usama Anjum <usama.anjum@...labora.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Kieran Bingham <kbingham@...nel.org>
Cc:     kernel@...labora.com,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v1] kbuild: fix sub directory output build of kselftests

On 6/27/22 1:02 AM, Muhammad Usama Anjum wrote:
> Build of kselftests fail if kernel's top most Makefile is used for
> running or building kselftests with separate output directory which is
> sub-directory. srctree is set to .. erroneously.
> 
> make kselftest-all O=/linux_mainline/build
> Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory
> 
> make kselftest-all O=build
> Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory
> 
> Fix this by comparing abs_srctree with CURDIR instead of abs_objtree.
> CURDIR changes based on from where the command has been run and it sets
> the srctree correctly.
> 
> Fixes: 25b146c5b8cee("kbuild: allow Kbuild to start from any directory")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> ---
> Changes in V2:
> - Correct the bugfix instead of workaround
> 
> V1: https://lore.kernel.org/lkml/20220223191016.1658728-1-usama.anjum@collabora.com/
> ---
>   Makefile | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index e66358b64ede..4090d7afcda4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -238,12 +238,12 @@ ifeq ($(need-sub-make),)
>   # so that IDEs/editors are able to understand relative filenames.
>   MAKEFLAGS += --no-print-directory
>   
> -ifeq ($(abs_srctree),$(abs_objtree))
> +ifeq ($(abs_srctree),$(CURDIR))
>           # building in the source tree
>           srctree := .
>   	building_out_of_srctree :=
>   else
> -        ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
> +        ifeq ($(abs_srctree)/,$(dir $(CURDIR)))
>                   # building in a subdirectory of the source tree
>                   srctree := ..
>           else
> 

Please resend cc'ing linux-kselftest

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ