{"id":2229068,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229068/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-i2c/patch/20260427172817.417614-3-thorsten.blum@linux.dev/","project":{"id":35,"url":"http://patchwork.ozlabs.org/api/1.1/projects/35/?format=json","name":"Linux I2C development","link_name":"linux-i2c","list_id":"linux-i2c.vger.kernel.org","list_email":"linux-i2c@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260427172817.417614-3-thorsten.blum@linux.dev>","date":"2026-04-27T17:28:19","name":"i2c: atr: annotate i2c_atr_adap_desc->aliases with __counted_by_ptr","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ccaa1ed8afc62d825f1ac0f0001374b8f455fd47","submitter":{"id":89400,"url":"http://patchwork.ozlabs.org/api/1.1/people/89400/?format=json","name":"Thorsten Blum","email":"thorsten.blum@linux.dev"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-i2c/patch/20260427172817.417614-3-thorsten.blum@linux.dev/mbox/","series":[{"id":501696,"url":"http://patchwork.ozlabs.org/api/1.1/series/501696/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-i2c/list/?series=501696","date":"2026-04-27T17:28:19","name":"i2c: atr: annotate i2c_atr_adap_desc->aliases with __counted_by_ptr","version":1,"mbox":"http://patchwork.ozlabs.org/series/501696/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2229068/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2229068/checks/","tags":{},"headers":{"Return-Path":"\n <linux-i2c+bounces-17185-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-i2c@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256\n header.s=key1 header.b=snpqCeZ3;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-i2c+bounces-17185-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev\n header.b=\"snpqCeZ3\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=95.215.58.173","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.dev"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g49ZH5JX3z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 03:30:31 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id EFADC300D1D0\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 17:29:01 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1714ACA45;\n\tMon, 27 Apr 2026 17:28:59 +0000 (UTC)","from out-173.mta1.migadu.com (out-173.mta1.migadu.com\n [95.215.58.173])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F85D31B82B\n\tfor <linux-i2c@vger.kernel.org>; Mon, 27 Apr 2026 17:28:56 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777310938; cv=none;\n b=EIfqk+V5hS8VBH5cVAX3dWq4ETRe4AZNImTahwaxoutR1pZfwR6WJT2w4O5QCMF0LhcSEY5Xa21zn0Gdk+GKM4ukYwPi/7e7DfQQqa+37N1Vzq5aD7sScN7PRVZnhw/Bpr6MelGnIs4aXXnya8dEhGY7Gcc4rX73hpul4n/wTSw=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777310938; c=relaxed/simple;\n\tbh=2J8IvNBGpGcTobEzMhZ4xqVe6sViwCgHjDX081pccbI=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=DI9QeZ47/ZuGr1TzQgx9LxKVPSvaUquGqKgWFrQKXThjbhnRGGrp0R6WfIHpd/LMMruZQdgM25jqQlHGyZO/CotelwmSWxvwf2w2OTvRySk+MMhlvEIbY5j2mlgYES+qNH8hO0wOHOszwsClo1GjqG/Ppnn/MvgH9XZdqZBVUx4=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev;\n spf=pass smtp.mailfrom=linux.dev;\n dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev\n header.b=snpqCeZ3; arc=none smtp.client-ip=95.215.58.173","X-Report-Abuse":"Please report any abuse attempt to abuse@migadu.com and\n include these headers.","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;\n\tt=1777310923;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding;\n\tbh=TbJLCfa8V/+kmDfsDozd+eyS+MfmcSV9H15c3yTrp4E=;\n\tb=snpqCeZ37/1mW/pKVsnyLpgkirSuzTLjxOHcsIkY/1GAi5cghYHi8dneVoq+8zcVzoHR0o\n\tauRXCTtwrDP6BEGAFuBo3SDVl1UNvCFyikg+SGpPvGKTfevWdjnhwmZ9/a/1Ef6CqBSCth\n\tq0BvkwsyddJKKWzWWFolSBI/J/7IuFg=","From":"Thorsten Blum <thorsten.blum@linux.dev>","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,\n\tLuca Ceresoli <luca.ceresoli@bootlin.com>,\n\tKees Cook <kees@kernel.org>,\n\t\"Gustavo A. R. Silva\" <gustavoars@kernel.org>","Cc":"Thorsten Blum <thorsten.blum@linux.dev>,\n\tlinux-i2c@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-hardening@vger.kernel.org","Subject":"[PATCH] i2c: atr: annotate i2c_atr_adap_desc->aliases with\n __counted_by_ptr","Date":"Mon, 27 Apr 2026 19:28:19 +0200","Message-ID":"<20260427172817.417614-3-thorsten.blum@linux.dev>","Precedence":"bulk","X-Mailing-List":"linux-i2c@vger.kernel.org","List-Id":"<linux-i2c.vger.kernel.org>","List-Subscribe":"<mailto:linux-i2c+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-i2c+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-Developer-Signature":"v=1; a=openpgp-sha256; l=662;\n i=thorsten.blum@linux.dev; h=from:subject;\n bh=2J8IvNBGpGcTobEzMhZ4xqVe6sViwCgHjDX081pccbI=;\n b=owGbwMvMwCUWt7pQ4caZUj3G02pJDJnv52zUXL04StyqKURs5bX5c3ZaeD26e8NY62HD7k+75\n 12c9nba0o5SFgYxLgZZMUWWB7N+zPAtrancZBKxE2YOKxPIEAYuTgGYCDsfI8OJdfutrsotsT9y\n pUtzy1/fo19/dB7RW5Mlt7K68YuQq7wHI8O0fYXG01TXPPJNSZw25c+zRx9yI/ekVlXN3xFV80A\n 7T4YBAA==","X-Developer-Key":"i=thorsten.blum@linux.dev; a=openpgp;\n fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4","Content-Transfer-Encoding":"8bit","X-Migadu-Flow":"FLOW_OUT"},"content":"Add the __counted_by_ptr() compiler attribute to ->aliases to improve\nbounds checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.\n\nSigned-off-by: Thorsten Blum <thorsten.blum@linux.dev>\n---\n include/linux/i2c-atr.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/include/linux/i2c-atr.h b/include/linux/i2c-atr.h\nindex 2bb54dc87c8e..b52a7b9ec536 100644\n--- a/include/linux/i2c-atr.h\n+++ b/include/linux/i2c-atr.h\n@@ -71,7 +71,7 @@ struct i2c_atr_adap_desc {\n \tstruct device *parent;\n \tstruct fwnode_handle *bus_handle;\n \tsize_t num_aliases;\n-\tu16 *aliases;\n+\tu16 *aliases __counted_by_ptr(num_aliases);\n };\n \n /**\n","prefixes":[]}