mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: linux-kbuild@vger.kernel.org, masahiroy@kernel.org,
	linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Zhen Lei <thunder.leizhen@huawei.com>,
	Miguel Ojeda <ojeda@kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	Nicolas Schier <n.schier@avm.de>
Subject: Re: [PATCH] scripts/kallsyms: Fix build failure by setting errno before calling getline()
Date: Tue, 25 Jul 2023 09:54:57 +0100	[thread overview]
Message-ID: <6c99392f-6189-1835-3090-d5c7f95edaf9@arm.com> (raw)
In-Reply-To: <CANiq72nJP+i10CZysua0QU=V=Cn=jdnLuV8KOqm6_NNFdg9S3w@mail.gmail.com>



On 25/07/2023 01:41, Miguel Ojeda wrote:
> On Mon, Jul 24, 2023 at 3:18 PM James Clark <james.clark@arm.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

  reply	other threads:[~2023-07-25  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 13:17 James Clark
2023-07-25  0:41 ` Miguel Ojeda
2023-07-25  8:54   ` James Clark [this message]
2023-07-25 10:33     ` Miguel Ojeda
2023-07-25 11:00       ` James Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c99392f-6189-1835-3090-d5c7f95edaf9@arm.com \
    --to=james.clark@arm.com \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=n.schier@avm.de \
    --cc=ojeda@kernel.org \
    --cc=thunder.leizhen@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®