From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14756 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Joshua Hudson Newsgroups: gmane.linux.lib.musl.general Subject: Re: Hangup calling setuid() from vfork() child Date: Mon, 30 Sep 2019 12:57:34 -0700 Message-ID: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="237345"; mail-complaints-to="usenet@blaine.gmane.org" To: musl Original-X-From: musl-return-14772-gllmg-musl=m.gmane.org@lists.openwall.com Mon Sep 30 21:57:50 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iF1nq-000zcr-3W for gllmg-musl@m.gmane.org; Mon, 30 Sep 2019 21:57:50 +0200 Original-Received: (qmail 9800 invoked by uid 550); 30 Sep 2019 19:57:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 9768 invoked from network); 30 Sep 2019 19:57:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=PQZufclII4Hv6f135CoL3xk13yP7nqieYfqSERyqBaY=; b=qpj4k12Mv0FupUBoyYRDcDE4OscJar8W+q6kSACLl/UZDV8AgqD64lR8cS6hZBZWp+ AnhavPV7k+mm2iI0gSElfKr89GGQ4SKgdJ2J21sbvGxfzP78DF1MGlkTgQsC9vYmTh0c ULy8lDf48WRR/EYMOCJr8U7u5aoFDJKZkqgP7cwMoGlok8rh5refSdFSoUYncgzAtYIw Hrw9+1zGzvV2kuVeyOv73KBRDpXPsFoPpziMFroqMt4DH0gbF1fNaOGBTt11twgZf2qk bpRhbL8IzluYWKceiKPDsDN2BSMxAnbvRfhVKKajLCCCWRXZH2uQW/FAbnKbnyD51tWX Ak7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=PQZufclII4Hv6f135CoL3xk13yP7nqieYfqSERyqBaY=; b=j/CZWAMcyGI1G1zKm6krp8URUm3gyJySJoWwLa2HeLC+cYgeM7NgqicbeaIbiCtSSX YcvUFOBs+ijXkiqW9HSjSCoIKgfaYwvkCiKn6W6Xa3KgUk8NIwqIV5cb2Di761ZSEzHi jRoRZQ8+MvlstDREM2RjXafm0kr3d8oilyrJfxj42MGY3O3+b6sB6/6TxFdsFzWt6Y20 wieQkXKKUUYxKsZVE8Xdq84D9VA1j96m3q3aIlxFuqZWAgRpDQ26tSRbcM6X02cWtUP/ OfMonSMHU1U/V4wXWrfoM7QFTTg6F+1n1ANt09JhjWm/0WmuYLGWiMGMlR6Db2Ty3PLv uZpQ== X-Gm-Message-State: APjAAAVugZr3UsJhUZd3/RAa29Js6p5giJteEHqwxMPKlG3kLDvwVK1B MWAs8KMYYeR+uRBOVotymuprXApIIbSEE1RR9dLxwg== X-Google-Smtp-Source: APXvYqzjYQUUfrdJecjSTwjR02/YxnVlOcG/r3swsBpj+rXCHEmYOTl5wAfzVJLKmuJfPGZgnNPMFVgF8hDUJhFWTsM= X-Received: by 2002:a05:6102:516:: with SMTP id l22mr10408249vsa.168.1569873454530; Mon, 30 Sep 2019 12:57:34 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:14756 Archived-At: >It's simpler than that. The (retired) specification for vfork did not >allow anything but _exit or execve in the child after vfork, so the >issue doesn't arise and it works perfectly fine with threads as long >as you follow the requirement. I'm reading the man page for vfork and it says what it actually does, that is overlay the child process on the memory of the calling process. posix_spawn can't be used in the originating location, and fork() is hogging too much memory.