Received: by 10.213.65.68 with SMTP id h4csp612632imn; Fri, 16 Mar 2018 13:13:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELs9xOCxejrojrfrwUBPj6y1yMBQ+Mk9ZZlHkdAHTsm+EzWm6DbJtBm/vBQR5tfdIZB1VyZI X-Received: by 2002:a17:902:9a8d:: with SMTP id w13-v6mr3447588plp.136.1521231233571; Fri, 16 Mar 2018 13:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521231233; cv=none; d=google.com; s=arc-20160816; b=XbojMhOx0/t9PkbdVfof/hEXoyiQPVrb6qkJ1qyxpvPKkstqySn5+F/Hhkh9ubL0qA EszkZ9NgDL3BSk4pcY/dK0N/cVCz9LjyOA9ucetrnYXpBSlBZ34fzrvdYLpNLCTST+9I Hu128qg0xW/V8KvCeOq+cDQXrZiju8qPjRZJdLGmlm+IK9WmJEMIGshjGTDeReZXlRuk eiKyj3Q4vjNELeARkUbtky+Y41HElWLsrWTArsXm2AoFvxmCsHlWh2ovulWpdy2UQf6c cm0TMyTZKGc5DJgHBPOZShsHDPcDSqOkNIURmqjDvcusx6Be+AFOb/mmqL1iHGKSk7SZ 3yNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=nH8KNmMkFHa8evlmWJ3rCG8FeeVjIvPqpZsmckvI3Ag=; b=qgkJx1/Cs+UbwTxUrtYbkEAVn/QP8hrSX1QUhEfUosCrlZ6Vi7A95fFmqugEgz71WX Gp+/ljAgiE/CzfE2plkMqcbsDYlKtOV7Q0AYr/w0Pwu+eK6QMu7f3rG49WtPMSyoMqMJ CZG2pQ3P1nlWoVW1QfK+pwYerQUvPH6DpgYSUc7AoPc9mg3IQxm9U8gn8uoLPnK4DGLN xlEJS5jAbPWqEs2ajRocG+4mV047QAGpJJZhsky8ZdoZuSQ2VYq549nt8KP3o8Q54IUX Y6fwCDY/K8Ug2ohqdQRt7PcAAn/C88iesSWr20wshDMgKnxDTXbooQWSPfz8LMEwpKem LGnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67-v6si6946071pla.612.2018.03.16.13.13.38; Fri, 16 Mar 2018 13:13:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242AbeCPUMc (ORCPT + 99 others); Fri, 16 Mar 2018 16:12:32 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:60076 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413AbeCPUMb (ORCPT ); Fri, 16 Mar 2018 16:12:31 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1ewvi3-0001Xl-Po; Fri, 16 Mar 2018 20:12:15 +0000 Date: Fri, 16 Mar 2018 20:12:15 +0000 From: Al Viro To: Linus Torvalds Cc: Florian Weimer , Kees Cook , Andrew Morton , Josh Poimboeuf , Rasmus Villemoes , Randy Dunlap , Miguel Ojeda , Ingo Molnar , David Laight , Ian Abbott , linux-input , linux-btrfs , Network Development , Linux Kernel Mailing List , Kernel Hardening Subject: Re: [PATCH v5 0/2] Remove false-positive VLAs when using max() Message-ID: <20180316201215.GG30522@ZenIV.linux.org.uk> References: <1521174359-46392-1-git-send-email-keescook@chromium.org> <20180316175502.GE30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 12:27:23PM -0700, Linus Torvalds wrote: > But it sure isn't "variable" either as far as the standard is > concerned, because the standard doesn't even have that concept (it > uses "variable" for argument numbers and for variables). Huh? 6.7.5.2p4: If the size is not present, the array type is an incomplete type. If the size is * instead of being an expression, the array type is a variable length array type of unspecified size, which can only be used in declarations with function prototype scope [footnote]; such arrays are nonetheless complete types. If the size is an integer constant expression and the element type has a known constant size, the array type is not a variable length array type; otherwise, the array type is a variable length array type. footnote: Thus, * can be used only in function declarations that are not definitions (see 6.7.5.3). That's C99, straight from N1256.pdf (C99-TC3)...