From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8501 invoked from network); 19 Jan 2021 20:18:13 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 19 Jan 2021 20:18:13 -0000 Received: (qmail 9856 invoked by uid 550); 19 Jan 2021 20:18:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9838 invoked from network); 19 Jan 2021 20:18:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=notion-se.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=jDzC3QNREXTRSVMeoS+6r89BPb8uWfPGJr/HkZWWCLE=; b=pNu+KYUBW+Vz7ZydqBfn5b1X4aRs/EyPG+pi8reMpE6gujjHbUmS4a+bXmIUjP7N44 t0LBG+RDnFiJ9cIjZSU5Tij7QIpcGC1rHDFn9q3utpk65FcKZcCbJxFoXX7GaVPPcQzZ jADvS5B+Y08UhDrYRkdYSD011GqRGs9iEimAHstIPa9EOqLfLC/4EHfJUjyaNjMTl/AB HJGcRC6pSfcPSss6OGJZ7gfPmJk4whDiVQpizuMV7jvZDUqdfHOpXUqeJfjqfUYKKGQK slbCVFogDH6Qb8TFQ72aRekEtzSIrVPalS10FMptYcAxTgNtwCBYfIwLrEGjD2eeM0Gn yhcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=jDzC3QNREXTRSVMeoS+6r89BPb8uWfPGJr/HkZWWCLE=; b=fLGQuJIEMZPlphhZaDd++ttzRS9k+P8cj/3xkz/Ej1c6uXwdAuIrT9kAz9GOnr0JM+ 4EOQ6EaIjKD6wv5ZXac4vtqfFBf8RdeSv+3GSiG5K1BrMvQYd4oqpaUdn4bF+Obh48fS RfBTBf5zaSoEBY51p1uWi9e5QiF6qf7WuXA093Jzl7wQkAoU1cPCVeXfduJD7dMXFvrE WpMvuCRHOVnxP73FAkCqg0I4ev5+LJpl64DQlSi7/a5Y8CWk+i4CPy0ZFMETK3AsQs4D TvrnXhlMAjSCa43ip7dOVrm0E7szCiuvTOBi9HZmeoAZmaWPzVEOymmwEAgBHOexTC8O nuRA== X-Gm-Message-State: AOAM531iKR9iyGLb9c2xH7COmjcooTz1b+6YZeD88iugCIm5HNPp6Pxm QmwTXeKHsgwyXxBOxQxfV6uuA+8FEj0AXu1/7dAGqnh66p0RUA== X-Google-Smtp-Source: ABdhPJyRynM3VwaB3+OGksqaksuOUKPDoBAjQmZOqq36+WEdFKkh7gkFJtYeGvkMo0CPM0ABTatLlBuPBqDC70jo9Ss= X-Received: by 2002:a63:e4a:: with SMTP id 10mr6012674pgo.45.1611087478791; Tue, 19 Jan 2021 12:17:58 -0800 (PST) MIME-Version: 1.0 References: <20210119193337.GB2006@voyager> In-Reply-To: <20210119193337.GB2006@voyager> From: Rasmus Andersson Date: Tue, 19 Jan 2021 12:17:48 -0800 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] waitpid (wait4) on Linux 5 returns invalid values On Tue, Jan 19, 2021 at 11:33 AM Markus Wichmann 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!