Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1490707rdh; Mon, 25 Sep 2023 14:39:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFU39Iwijw0XcVca3fkkPhCPI57g1JF2rfUYbDaqM4PsKImay2/1PaOawFUOosriBxLI5nP X-Received: by 2002:a17:90a:fd10:b0:273:dfb1:2439 with SMTP id cv16-20020a17090afd1000b00273dfb12439mr1099159pjb.21.1695677957385; Mon, 25 Sep 2023 14:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695677957; cv=none; d=google.com; s=arc-20160816; b=BRQgvJndNhtoRkB7XQpUb24Cbd04P69dZCFVUHzmqexewcp99i+V8OTdyOMzfMrQJg 2ySbyY+M9yoVGp3KjpZNFDHmRC2KEcVqnRp+oSKIMAycbHO614FnJiWgu0aO1nLwr3Rh RP3kr85VH0TI59Aqv2z0DTg5NKGVoJ23Jie032VHY55FDkvgXmFQf5OmnDsZnfNfwmms qpIdsTEqv2h+Y7dBBivoh6GtXNh78Jh+c4R22OIWe6kbVE48zWDRSE05AEQRsHWzqIr5 Q2d47lRyWnP5iYTfHIMNLfCkgDW5SFTr33FH4bUsi//qyrFBB/7bRpNIBViwrPQHghjG y0pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zyQR+FXwt/TZA0WIxWRqOGY3Y73PyOWlb1rrHXXeJg8=; fh=AZX/fQwR9qWVKedhlOT1EGVt2kuEW8LVZMeMpPx23mw=; b=y/7yWnnmZfma0Q5fAOX4+1BHP9+wrauEVd64YIq0Zc41D8y3wUa+nOVrDaT/Y2ZK3b 4EN9MbmlkygLX/slPkCQOP52Xra45suRG97/G6dl161gHduIaMJaFU+2OMvkHLnv0f2N RMFPz9hIAKwvQy4NdDYuN4nYtxprHpfO9EdIfwIHshUh1LemUsKkHDVNE4sdZDF0zwFl NwtM3yjfB5uxraqONc7waCcsrBnW5v5CH7M7II0ZOrXM90U7ytIzUxOZVRZ8XhcdB1gj r7M3CLBTf25L04Om6KSHeXIZlf4f3QTu99vMIsAYyb/1E/mIutHSC1UYqt6mZLcu+k6O 9sEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hOsheLCc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id x186-20020a6386c3000000b0057ab7d43d5fsi10738373pgd.57.2023.09.25.14.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 14:39:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hOsheLCc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A90F180CBDE5; Mon, 25 Sep 2023 14:37:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233427AbjIYVhF (ORCPT + 99 others); Mon, 25 Sep 2023 17:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233476AbjIYVhA (ORCPT ); Mon, 25 Sep 2023 17:37:00 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85D1E194; Mon, 25 Sep 2023 14:36:51 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 294D2C0004; Mon, 25 Sep 2023 21:36:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695677809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zyQR+FXwt/TZA0WIxWRqOGY3Y73PyOWlb1rrHXXeJg8=; b=hOsheLCcmIbbRpIhtLk8Tn0xYBPqRaRyuqd5SuV2DUbZiI36ESAPCBmPbP7DtOWE5JJpQb mpo2Kz1i+D3Sor48ukixPNGN+YvI5us9uoALnqlhqeLORQsZ1uMOEN7dny8iqnvQ1zjgOG n48jUAdmP8o0MtO3GyUYxkIZg5MM47kc6nhyv70VJ75Yu3/hnaWM56Iu9BQsEweUFpZsIB EMz8ivgBNg2cj2y2lEtZW/bRS31nBkve1M2W10qo8zbHHLFEJo8bFmzbItI/28BZxdpNrB 3gUKz5ekq92iVLRe+0cwaLuxseQ6tNqGD0R0+Q60LRYwIyGbjPrykTzPl4FfUw== Date: Mon, 25 Sep 2023 23:36:46 +0200 From: Alexandre Belloni To: Kees Cook Cc: Jeremy Kerr , Joel Stanley , linux-i3c@lists.infradead.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Matt Johnston , Krzysztof Kozlowski , Jack Chen , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: Re: [PATCH] i3c: dw: Annotate struct dw_i3c_xfer with __counted_by Message-ID: <169567773737.243402.14069734796583624800.b4-ty@bootlin.com> References: <20230922175011.work.800-kees@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230922175011.work.800-kees@kernel.org> X-GND-Sasl: alexandre.belloni@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 25 Sep 2023 14:37:03 -0700 (PDT) On Fri, 22 Sep 2023 10:50:11 -0700, Kees Cook wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > As found with Coccinelle[1], add __counted_by for struct dw_i3c_xfer. > > [...] Applied, thanks! [1/1] i3c: dw: Annotate struct dw_i3c_xfer with __counted_by commit: 014c9a0e6f9ff573099051e1e2ff6efc3470d02d Best regards, -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com