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]
Date:   Tue, 7 Jun 2022 19:11:31 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Sedat Dilek <sedat.dilek@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [PATCH v2] kbuild: fix build failure by
 scripts/check-local-export

On 2022/06/07 17:34, Masahiro Yamada wrote:
> This patch does not work because you did not avoid
> running the while-loop in a subshell.
> 
> It is well described in  this page:
> https://riptutorial.com/bash/example/26955/to-avoid-usage-of-a-sub-shell
> 

I didn't know that. Then, adding below diff will work.

@@ -24,7 +24,7 @@ exit_code=0
 # symbol_types is fine because export_symbols will remain empty.
 result=$(${NM} ${1} 2>&1) || die "${result}"

-echo "${result}" | while read value type name
+while read value type name
 do
        # Skip the line if the number of fields is less than 3.
        #
@@ -48,7 +48,9 @@ do
        if [[ ${name} == __ksymtab_* ]]; then
                export_symbols+=(${name#__ksymtab_})
        fi
-done
+done <<EOF
+"${result}"
+EOF

 for name in "${export_symbols[@]}"
 do

> 
> 
> I will send a working patch with a proper commit log.

OK. "[PATCH] scripts/check-local-export: avoid 'wait $!' for process substitution" works.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ