Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2733970rwd; Fri, 26 May 2023 10:22:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6mr9ycJ3QT+8w5FuCtHeKUlxZIjliwhMltQGH3oGsY+eOP3NY97iKKJ86Kddb742kaUrxt X-Received: by 2002:a17:90b:157:b0:256:4207:5041 with SMTP id em23-20020a17090b015700b0025642075041mr941614pjb.28.1685121747093; Fri, 26 May 2023 10:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685121747; cv=none; d=google.com; s=arc-20160816; b=cEh9Iu8RQ0357qKOdIDMR7/e71pFtk1V6avAsryNYt4ylEdI2DlcPJf43/O8XQIkQa BCJYf136ch32zj2KGv8u7SHbIiQtAsSP2rWwOs+yQ8oBXLESzo7lU89wEr9MgMXFcocn XLANtPyFnx4E6f4StLmK0dO7eQuMMKx8xafaYIWAl6m5AgxblXvQ99OwHJm3ontWhT9R +49PrXOCmjS9UjLMO1J6h0wIm8QAy4PY3Pv4C33GK2O1qc9p9arlh3JyxUS3qn/12HeU 8xnxmf338ngxryy2eg0VwXSZtk/cgoL8a7QAUlOpvkjArMIxQZ1wx2kU7c0lrwzawjWd +PAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tt/68vR6SyeC2sLBcDQmwXBv1ANp28ndmxJPUsWE9hM=; b=eagIX0RQxUoU/A8WHxcf+xbXTuduTFJuY9UvojBJpypBsD7H08HY1Cicf2IoOR/u5j 66IgWl3zKaNDegEEQ9ZMq4FqEn6sLiTuA80Mjru6kcIKWKNfICvtWfO4/370+MG/vLUj wS6xNe9dTMDQq1o2Z2ULq6uny4se9/7jKXT6yg3yY8CPfuI5TP5Jpi1aToaGyTH7kcc7 9vbQjRsnxRCBIpW0kWF1blcgMaaymKl6yDiTmH0VTjrcZzj32VYPJXq1mOy/uVv4/Gt/ +8LiT2ZwuAnt6sn23ZQWsLSMfVLlLkKO8l98xIAFrMnn4j13eLz2cT5/cvJ8k9NS9tzu PRQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LnkvrIlQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z24-20020a637e18000000b005347d6bd7eesi4312512pgc.141.2023.05.26.10.22.14; Fri, 26 May 2023 10:22:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LnkvrIlQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbjEZRQu (ORCPT + 99 others); Fri, 26 May 2023 13:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbjEZRQt (ORCPT ); Fri, 26 May 2023 13:16:49 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B386F2 for ; Fri, 26 May 2023 10:16:47 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-64d3fdcadb8so907400b3a.3 for ; Fri, 26 May 2023 10:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685121407; x=1687713407; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tt/68vR6SyeC2sLBcDQmwXBv1ANp28ndmxJPUsWE9hM=; b=LnkvrIlQ8Tok1eY3MzXaVX3kUwG4iQ/TiKFyN8pB9xmQgyIk1TWe7Rhr0DTtyZlcDs eVfyKux69riINbAJ3ut36H1rVoRrwRJT4yCWqFMFjVVbBMYEs2dxvwSjolS7rd4aewK5 xwaoXlV1TqZNJcLRm1EvoAdemOvEOa/ETWhKc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685121407; x=1687713407; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tt/68vR6SyeC2sLBcDQmwXBv1ANp28ndmxJPUsWE9hM=; b=XOmAAv1nNh/qENxBncZlCTslj56OVbiBRC2/MUXSVWaccDrz4EzfQrjs4beiFTFHB1 VslhJGt5lQOXP7+eD+rAd7cKKo20+uSd/v7HdnQieyifx/mpgcyzNCDG8u1MVDxiEroQ aGuG1ya1dNiHdIEibZ6ETGAIUj6hVwqP0K/QJwVV71Id2+ddra9ACxd72HgQFJzXmu3S JSSlbhhMbCpL+amAvvcP4oaVfdDLvfU6egFuHOAfFW/RPiSmabi7N51+p4VKquiUQIxA SlTo2BKiLtfnzz3EiWHO+2dDNtmSIuFbYxIkWn4xk64E+Onk3dEh7awKTujsxFYYLXJN fI+w== X-Gm-Message-State: AC+VfDyo97GrcllsoIXfx+vtCQAv87md0bhesEm++HjPahJjZST5cKSZ NSh7ab4VtQttQeE4uCDIs/XCwQ== X-Received: by 2002:a17:903:10c:b0:1ac:8062:4f0b with SMTP id y12-20020a170903010c00b001ac80624f0bmr2720843plc.59.1685121407089; Fri, 26 May 2023 10:16:47 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id p23-20020a170902a41700b001aaecc0b6ffsm3490147plq.160.2023.05.26.10.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 10:16:46 -0700 (PDT) From: Kees Cook To: ojeda@kernel.org, keescook@chromium.org Cc: qing.zhao@oracle.com, morbo@google.com, llvm@lists.linux.dev, trix@redhat.com, linux-kernel@vger.kernel.org, nathan@kernel.org, linux-hardening@vger.kernel.org, gustavoars@kernel.org, ndesaulniers@google.com Subject: Re: [PATCH v2] Compiler Attributes: Add __counted_by macro Date: Fri, 26 May 2023 10:16:29 -0700 Message-Id: <168512138720.187005.8346289423859319616.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230517190841.gonna.796-kees@kernel.org> References: <20230517190841.gonna.796-kees@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 May 2023 12:08:44 -0700, Kees Cook wrote: > In an effort to annotate all flexible array members with their run-time > size information, the "element_count" attribute is being introduced by > Clang[1] and GCC[2] in future releases. This annotation will provide > the CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE features the ability > to perform run-time bounds checking on otherwise unknown-size flexible > arrays. > > [...] FYI, applied to for-next/hardening: [1/1] Compiler Attributes: Add __counted_by macro https://git.kernel.org/kees/c/86a76e91cbab -- Kees Cook