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: <20230827070909.6999-1-falcon@tinylab.org>
Date:   Sun, 27 Aug 2023 15:09:09 +0800
From:   Zhangjin Wu <falcon@...ylab.org>
To:     tanyuan@...ylab.org
Cc:     arnd@...db.de, falcon@...ylab.org, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org, linux@...ssschuh.net,
        thomas@...ch.de, w@....eu
Subject: Re: [PATCH v2 3/3] selftests/nolibc: fix up O= option support

Hi, Yuan

> Hi Zhangjin and Willy,
> 
> On 8/26/2023 12:30 PM, Zhangjin Wu wrote:
[...]
> >
> >      ubuntu@...ux-lab:/labs/linux-lab/src/linux-stable/tools/testing/selftests/nolibc$ find sysroot/ -name "errno.h"
> >      sysroot/i386/include/errno.h
> >      sysroot/i386/include/asm-generic/errno.h
> >      sysroot/i386/include/asm/errno.h             --> here it is
> >      sysroot/i386/include/linux/errno.h
> >      sysroot/x86/include/errno.h
> >      sysroot/x86/include/asm-generic/errno.h
> >      sysroot/x86/include/asm/errno.h              --> here it is
> >      sysroot/x86/include/linux/errno.h
> >
> > That also means, to use O=out for run-user, we also need to use O=out for
> > defconfig (and kernel ...) too, otherwise, the top-level source code tree will
> > be polluated.
> >
> > Seems a manual mrproper on top-level source code tree is always required for a
> > new iteration, so, it may be ok to pick this patch with a note on the potential
> > error.
> 
> There are two potential solutions for addressing this issue.
> 
> The first option involves copying 
> 'linux/arch/x86/include/generated/uapi/asm/' to 'sysroot/x86/include/' 
> during the make of target headers_standalone.
>

Will this work when linux/arch/x86/include/generated/uapi/asm/ is stale?
for example, when linux/arch/x86/include/generated/uapi/asm/ is there
for v6.1, but we are installing v6.5 sysroot?

> The second approach entails displaying an error message when the code 
> tree is not clean and prompting users to manually execute 'make 
> mrproper'. In this case, we can utilize the target 'outputmakefile' from 
> the root makefile directly.
>

A question is, without O= option, will this 'outputmakefile' always
require to do mrproper (when we have already done defconfig, kernel or
run without O=)? but currently, seems we don't require to do so. 

Currently, the asm/errno.h is installed whenever the source code tree is
clean or not, the issue is asm/errno.h will not be installed only when
O= specified. The root solution may be the generic-y (or generated-y?) in
scripts/Makefile.asm-generic should be corrected to work with O= option?
but this common code want us to be more careful.

> Willy, which method do you prefer? Do you have any alternative 
> suggestions? :)
> 
> 
> Besides. using x86_64-linux-gnu- won't reproduce this issue. It searched 
> and found 'asm/errno.h' in '/usr/include/x86_64-linux-gnu', whereas 
> 'x86_64-linux' lacks these libraries.
>

So, the -gnu- toolchain may hide some issues in
scripts/Makefile.asm-generic for O= option.

Thanks,
Zhangjin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ