From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id 61eb5a0f for ; Thu, 13 Feb 2020 20:11:22 +0000 (UTC) Received: (qmail 5148 invoked by uid 550); 13 Feb 2020 20:11:16 -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 5130 invoked from network); 13 Feb 2020 20:11:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581624664; bh=sSJly2/t/1P9CW3XTZG/Qo66SDqMWvWiuwLFurVSOYk=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=ZOtshyHIwfRNDt/jb8pxHinIs42aO/2ZlaEP1SpGSBBT8XhjRD92bogHVu+x2IGuz 6Kf49b7Pqh4lLewP9cTjMLJn6Z/mpRt5ZF3/drHp6mMN1JoGk3fkKp8wgHd4y53Rwh wmhNe3phrfOWrMJ1QoBngbY58jIhiOh38U4UsGN8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Date: Thu, 13 Feb 2020 21:11:03 +0100 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: <20200213201103.GB3383@voyager> References: <6ead5f7b-d645-5df0-cb06-a99178471a96@bell-sw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ead5f7b-d645-5df0-cb06-a99178471a96@bell-sw.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Provags-ID: V03:K1:feQqvR/wfE7KwJzmEf3aPXzaVgjzlH4yofJ1RfiwUYB7PH02/jF Nd2FpSBgELZsASxf/gYlz5YydfNZ6lKjQ4CHevnQNTmzMAEokL9KKW+vRNHaCRUKFqco054 RtCMSf8ScoUw4dl6j3oV76SZ1NhwsGuXYba/Pdd2nT8x26biPYxISrnWREAbBSD3l+ZXAQp hpUCK3oegYmAmLv3TgJUQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:uyoAFGiAXq0=:+NLA4XAvKuZ8X1QKfUbhlm 3ze45I77mebUamkX90+5i50OzBNmfzatS/gNRIxKDc5VZELyRXrrcBWJttKtJxOfAUZgmTfb2 MH2xunuIWBQNv4Kq2fgehAhygJqHGk3FmPXXd2K6n5uv4XQCPPs+y5UKRlLXC77gativtaolB JkJrU0o3ySog9mAG6kIZ0VhnYcCWVouRc45Q3L0uURr24vajk3KjBd+T7AFX3qVOza51fmRpH pkawz0SmYdCbpEw4kuQ4qi1XU5QSyRNrwp6YSiqcC5oHwopMC30G6PzMfl7Hgjo/InfU6X44M tzMhEY0FpJwuuCc9Ih/NdNMG0mcIsyhWZadRsvcrvzgaLHn8xR8kLbsPjBcopxvXUkm+gsttM PSXS/Io8vjETyNfRNU0s9ey6t2oldloRwU4TOzP0ZUfbgbefrNdK0imjhQ8zucMrSXRBlXYZJ yWeu90AIyqOwFMDktKm83g/V5H1CxHgPxXfDB3DVL+BCPG426klW+4P9tDTxbTfO6UuTKTmGB O+TLjihVQUiK6cdLS13o1RF2I7gKgdKDFr8vfl/ge+o5wKY62HdI8FJ7kmoYiIwy4gvKXVOyd GkIMpPrH6M4v703HINvmW9M0uCNVHQWjxRTnW5wxb3UTeQIkRx2FX3jyPZ2/5RCRGdG924WRs GLPX6WX2MLS7AU/nyKePHOjAFVPQrTl84EfxgfKu3ChawG9WOptQnjy3md7V+slAnWe6thps3 BOmm1GXk0/ufKSpBUUjVGGtTqua7Z4MIu/ynb8iBEF7EmZEjcIBQwX6fWxNSmx8DmyiYVjciC EM2Gw48LOL+Q4A2iQk9IJCq1iTy2xG/apH8P4/vHt9Twcbdaj5HwTO34rMb4hVebmXbyP+/uJ mg+crdi6JRPMOAe4A8vBMILQT5FI8hBfTCKeQJQEYN0CCW8h4kKrFhbKccgfLguwT/8bqtpjw 3TWNXtcVJ9VwRiuXYt+Saiuyq/QIohYodYD5j6jnxpW/Wx0tMG60yEApmR1meR7aCsWEbyvk1 MTyU7HsyGe+T3a3xAaZgPdkrO8zYdHEyDnoh8J4dpRf/i90qinlUI05xLahk/xmKyf6+0gSB9 HtJNLxkZegUsP4dt9HXa0jzFFE60QZKw9INPxsVmNtOLHGKJCaX33AAMI+3G7q+9BfR5pei7j MTfi5HWrxWdqPFhBXZAcXi4tbN5DhlryuLx45b8aq8MWUO/uWJOp6LhH1LnCRKq8CtI6189Ky 5tsetqn4ujEpaMLdO Subject: Re: [musl] execvp() behaviour with unrecognized file header Hi all, so I had a look around at other implementations, since I thought the problem might be a solved one, and here's what I found: newlib does not support this behavior at all. bionic uses a VLA for the new argv[]. I didn't even know C++ had VLAs, so at least I learned something from this. glibc also uses a VLA. klibc also does not support this behavior. uclibc-ng is an interesting one. On architectures with MMU they allocate the necessary space with alloca(), but without an MMU, they will use mmap() directly to try and minimize the memory leak, as a comment directly before the code responsible tells us. So yeah, the competition appears to either not bother or just use VLAs. I guess it is not a huge problem in practice? Ciao, Markus