From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75B622DCF41 for ; Wed, 28 Jan 2026 10:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769595269; cv=none; b=V2xWaPkqPcU7SNz0I60nHh83PF1LQS33zdPVlJoJME+QaB3N9VHulPH6gZNEBt+d9LsuQIDzMonR6KYe3rceZFcnh9+sypip5TpNsRWbNbS1LihPIhPZLtshIiWudnNPAj5/P7XnbR2OOhYVgFP65DNvL7hZUwgKRF+k/PLvgD4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769595269; c=relaxed/simple; bh=oV8iSm8BWcJOZYezgVOeeocMcoEsadZBLrXLhvXRJQE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KBtK4vnpXwQvi370mbgCCez01ptP8pCaY6C/ctHD1teXyNR0sYJ9F8uWtFfpEje+6uBxu0O15Z65DuVkWHcwnpvFrDJ5s2Y61sxGnE0WzwXn3rOUegOTSD0zRISQkDab+sA79IlqjpKd1+Y3GHDIquc8a6hoP3iQiVKehhhduqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b=Q9pkdaI8; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b="Q9pkdaI8" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-48069a48629so16178895e9.0 for ; Wed, 28 Jan 2026 02:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1769595267; x=1770200067; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/gpDAs4ZPhBjtHhMqCjkQ/XQcL21PGpv3nXXx+ufdJs=; b=Q9pkdaI8ebkblVWGdfVQiUZbQVF1VkwX8cPHRByRig+wj2QcNZa6+tBduAUWTgR3Y2 JSsOwM9ofh/Lch2ciQp/ZTByVz8wTr0qP303hoq77KmlYj8ozq3ZrLACllNqeBMbPQic cdj8SUngp25inNe5kHru3rQY0itpbaB3EOHTbTQcuJQ3BV2ewBHXvx0IdxVHRC0NWtX/ egFw+F/2CKY1HVUfmktI9sSQZ7i/+4Jpf5PqzmTn8ZjlGftlYX6k3aLnx7e4tqDNbm0T +arY2n7tYm1CGZRAvpwzfdjSWwalxF4uog6XSsj0kT2/8GwMBpQftMKjoC4tv0NafNUL PlaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769595267; x=1770200067; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/gpDAs4ZPhBjtHhMqCjkQ/XQcL21PGpv3nXXx+ufdJs=; b=cUZKkMFs9xXd8saqFWA6lsSiKlDW9KVHfxX+bZx2AHYz6gR2skLl+cx7X2T2q7iwdo hFTr4cpJJLWanG/u2VlJc0CEwaZn+erjcHR9TePwGYvIco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59BNS70ZYkk15yce9KPREA X-Received: by 2002:a05:600c:524a:b0:479:1ac2:f9b8 with SMTP id 5b1f17b1804b1-48069c556b7mr54749985e9.21.1769595265936; Wed, 28 Jan 2026 02:14:25 -0800 (PST) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4806d2585c6sm6410195e9.0.2026.01.28.02.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 02:14:25 -0800 (PST) Date: Wed, 28 Jan 2026 10:14:23 +0000 From: Daniel Thompson To: Alejandro Colomar Cc: Martin Uecker , Christopher Bazley , Alex Celeste , Joseph Myers , Aaron Ballman , Douglas McIlroy , Bruno Haible , Paul Eggert , Florian Weimer , Jonathan Corbet , Kees Cook , Eric Biggers , Ard Biesheuvel , Daniel Thompson , Daniel Lundin , "Valentin V. Bartenev" , Andrew Clayton , "Brian W. Kernighan" , "G. Branden Robinson" , "Basil L. Contovounesios" , "Jason A. Donenfeld" , Linus Torvalds , onf , Rich Felker , linux-hardening@vger.kernel.org Subject: Re: [RFC v3 5/6] alx-0081r2 - array parameters of 0 elements Message-ID: References: Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jan 26, 2026 at 01:49:16PM +0100, Alejandro Colomar wrote: > Proposed wording > Based on N3685. > > 6.7.7.3 Array declarators > @@ Constraints, p1 > In addition to optional type qualifiers and the keyword static, > the [ and ] can delimit an expression or *. > If they delimit an expression, > called the array length expression, > the expression shall have an integer type. > If the expression is a constant expression, > -it shall have a value greater than zero. > +it shall have a nonnegative value. > +An array length expression > +that is a constant expression with value zero > +shall appear only in > +a declaration of a function parameter with an array type, > +and then only in the outermost array type derivation. This change did not have any motivating example within the discussion. Providing a motivational example showing why it is useful to allow array parameters whose constant length is zero would be good. Daniel.