From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 532AFCDB483 for ; Wed, 11 Oct 2023 20:53:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235247AbjJKUxm convert rfc822-to-8bit (ORCPT ); Wed, 11 Oct 2023 16:53:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233487AbjJKUxl (ORCPT ); Wed, 11 Oct 2023 16:53:41 -0400 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2948A9; Wed, 11 Oct 2023 13:53:39 -0700 (PDT) Received: from imladris.home.surriel.com ([10.0.13.28] helo=imladris.surriel.com) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1qqgCn-0006PR-08; Wed, 11 Oct 2023 16:53:21 -0400 Message-ID: Subject: Re: [PATCH v4] execve.2: execve also returns E2BIG if a string is too long From: Rik van Riel To: Alejandro Colomar Cc: linux-man@vger.kernel.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, Matthew House , Eric Biederman Date: Wed, 11 Oct 2023 16:53:20 -0400 In-Reply-To: References: <20231011124301.4d93ea72@imladris.surriel.com> <20231011125330.13dfe148@imladris.surriel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 Sender: riel@surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2023-10-11 at 22:14 +0200, Alejandro Colomar wrote: > Hi Rik, > > On Wed, Oct 11, 2023 at 12:53:30PM -0400, Rik van Riel wrote: > > Sigh, once again I did a git commit --amend without the latest file > > change being > > included. The change below should be good. Working with both git > > and hg gets me sometimes :/ > > ---8<--- > > > > The execve syscall returns -E2BIG in 3 cases: > > - The total length of the command line arguments and environment is > > too large. > > - An argument or environment string is longer than MAX_ARG_STRLEN. > > I'm still concerned by the wording of this sentence (and the next > one). > When I (and any user-space programmer, I think) read "string is > longer > than FOO", I read `strlen(string) > FOO`.  Since it's rather > `strlen(string) >= FOO`, I think you should clarify.  How about this? > > -  An argument or environment string is longer (including the null > byte) >    than MAX_ARG_STRLEN. That works. Would you like me to re-send a v5, or do you want to massage the changelog when you apply the patch? I must admit I paid more attention to the wording in the man page than the wording in the changelog :) -- All Rights Reversed.