Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADFzTtcDTEy-Z7npnG=_BFBoFDfr_02tUn9apmvySSSVX69yLQ@mail.gmail.com>
Date: Tue, 19 Jan 2021 12:17:48 -0800
From: Rasmus Andersson <rasmus@...ion.se>
To: musl@...ts.openwall.com
Subject: Re: waitpid (wait4) on Linux 5 returns invalid values

On Tue, Jan 19, 2021 at 11:33 AM Markus Wichmann <nullplan@....net> wrote:
>
> On Tue, Jan 19, 2021 at 10:18:04AM -0800, Rasmus Andersson wrote:
> > However the wait4 syscall[3] in Linux 5 returns other values,
> > specifically it returns errors as negative values. The error that
> > trips up programs like runit's runsv is ECHILD (-10) which wait4
> > returns when there are no children (i.e. they have exited.)
> >
>
> Hmm... that is very weird. That should not happen. Because the
> syscall_cp macro already contains a call to __syscall_ret(), which does
> exactly what you propose. So that means, there is something else going
> on in your copy of the code. Did you change anything about the source
> code? Or can you disassemble the function to see what it does?
>
Strange! You are right of course; looking at src/internal/syscall.h I
indeed see that syscall_cp calls __syscall_ret(__syscall_cp(args))
The musl I'm building with comes from https://musl.cc/#binaries which
is created from these scripts according to the author:
https://git.zv.io/xstatic/mcm It doesn't seem to apply any patches.
Anyhow, I'm currently building musl & gcc myself using
musl-cross-make. I will see how that pans out and report back.
Thank you for your quick response Markus!

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.