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: <6c99392f-6189-1835-3090-d5c7f95edaf9@arm.com>
Date:   Tue, 25 Jul 2023 09:54:57 +0100
From:   James Clark <james.clark@....com>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:     linux-kbuild@...r.kernel.org, masahiroy@...nel.org,
        linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Zhen Lei <thunder.leizhen@...wei.com>,
        Miguel Ojeda <ojeda@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>,
        Arnd Bergmann <arnd@...db.de>, Nicolas Schier <n.schier@....de>
Subject: Re: [PATCH] scripts/kallsyms: Fix build failure by setting errno
 before calling getline()



On 25/07/2023 01:41, Miguel Ojeda wrote:
> On Mon, Jul 24, 2023 at 3:18 PM James Clark <james.clark@....com> wrote:
>>
>> This fixes the following build failure if scripts/kallsyms launches with
>> a non-zero errno value:
> 
> The code change sounds good to me, but could you please describe the
> situation where you found the build failure?
> 
> Cheers,
> Miguel

I assumed it was something to do with one of the wrappers I'm using but
didn't get to the bottom of it because I'm using quite a few.

But I just checked now and it's just bear [1] that causes the issue.
Maybe it sets errno before forking and that persists in the child
processes? Not 100% sure how it works. I did debug scripts/kallsyms and
errno was already set on the first line of main(), so it's not some
other library call in kallsyms that is setting it but not being checked.

The minimal reproducer for me looks like this:

  bear -- make ARCH=arm64 LLVM=1 O=../build/

[1]: https://manpages.ubuntu.com/manpages/focal/en/man1/bear.1.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ