From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.tuxteam.de (mail.tuxteam.de [5.199.139.25]) by sourceware.org (Postfix) with ESMTPS id AB44C399C00F for ; Fri, 9 Apr 2021 17:32:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AB44C399C00F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tuxteam.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tomas@tuxteam.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=mwNQNdtkvUkDbTglc31miKAwMgPEsAXItztn4v5Y0AM=; b=eNr7P5nv5VLVi9tFdoZSk9qZ4MXABZEfntSVzO9kQu9D+AQPPHAC1B9785mmhuBEDML7Fkw4nSQNDIsVb2LvFNfG4At9t4ktX66yT/Pi6NorKC6Q2GzbXwLaXzpUaZWJTK6ESQTDKXKKTDVeyMOlvpFPFeNjWtDVPFc2ByNDTcXY/LjygnRW8fIjiLlmVLlk4TtxcovB6z+8vQVaRjsI2YmK/+n+KktRgdcQX/vinU985cBt4XIyg75npp+lh0eqJbxZCXYyIuoKvhXbV+ECkQKClpS+vluW+oz1CrKrAhNCgVPv46UxdhSltedmupF4d93uRtc0W/0Dn17kmnsLSQ==; Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1lUuzE-0004PU-NC; Fri, 09 Apr 2021 19:32:04 +0200 Date: Fri, 9 Apr 2021 19:32:04 +0200 From: tomas@tuxteam.de To: Peng Yu Cc: libc-help Subject: Re: When is it OK to pass NULLs to the 2nd and 3rd args of execve()? Message-ID: <20210409173204.GD13192@tuxteam.de> References: <20210409170317.GB13192@tuxteam.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gE7i1rD7pdK0Ng3j" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2021 17:32:06 -0000 --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Fri, Apr 09, 2021 at 12:20:50PM -0500, Peng Yu wrote: [man page] > The above paragraph also reads awkwardly. Why it first mentions `On > many other ... argv as NULL ... Some other UNIX ... envp==NULL`? It > seems to be contrasting two cases. But then it should be either argv > or envp but not mentioning both. So it is confusing. I don't know. I read it as "anything can happen, so don't do it", for any of argv and envp or both. > What systems have glibc been ported to? On all these systems, are > there specifics on what systems argv=NULL causes EFAULT? I don't know :-) > Does the above paragraph mean envp=NULL can also cause EFAULT? I don't > get what error could envp=NULL cause? Perhaps. It seems to be the kernel's realm and libc just passes things around, so you'd have to look into the respective kernel documentation. Cheers - t --gE7i1rD7pdK0Ng3j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmBwj5QACgkQBcgs9XrR2kalSgCfRMvw6eSAFQ8kGcprKayAYlEt ISAAn1S67T3+eEhsVSomNUDk6eptMeAM =ka9i -----END PGP SIGNATURE----- --gE7i1rD7pdK0Ng3j--