From patchwork Thu Aug 17 23:58:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 13357149 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D00A5C71136 for ; Thu, 17 Aug 2023 23:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=JGW6Aiy2BbVtMaylJ2QC01edxuI2AIdOe1MGNp5kBfA=; b=j0H0+GJ8frQMJo 7n4DXi+ZROfYmCZZha4mq6qjwdpd19OpiMJbqEDfYX8bu8soGjJ5930l06r5bWn/47j2NjizIV3WP BpV/seHL83/LnUxiaqqLQOvQwly1+ht5QCH6xkHzOvbcqjlAxtJ3vyVO4QIzDr/fmgqFW7q9IoqQ2 Gv2oyEwbsDWa2f9ba09bFcw/YtHl5sx5M4YgPZp3d3jeKBJu8zEKiM0XiKJeTNF8qHSEI0EfcrS90 9X70FIvFCSEfgkNv+/efpCD9jPNYdXtWB4cpO4xD3kkFEZI3IDk+sfzU+VLg3lMHGHlzu8pKdgF9i 7nMjUV7SmwNCzebuKUBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWmtU-007M8T-1y; Thu, 17 Aug 2023 23:59:12 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWmtM-007M3S-2l for linux-arm-kernel@lists.infradead.org; Thu, 17 Aug 2023 23:59:06 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-564b8e60ce9so298000a12.2 for ; Thu, 17 Aug 2023 16:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1692316743; x=1692921543; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gLiCnBbyPzaic/GZ7z4G3P0cbvM2XGBwdo50oYhUApk=; b=P5Pp0wwT5nzP3n43DVWzU0GTRLBYDoDSQDfCmbHmbAyHke8vM3wJwLlQCndFTYZ7KE ZVi1VZoSjZdpJ+Cv7UQqBsqf+jX/87/JGb0fruxGutn29PXRZMDB9jPSZIrj3VxbaicZ bNJeGzg/zR8SLlYCw17rI+RJwBXQBpyTYDPlo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692316743; x=1692921543; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gLiCnBbyPzaic/GZ7z4G3P0cbvM2XGBwdo50oYhUApk=; b=d/wRL4h0+X+p6mftyJMxcQYrh0I5i3016uNnq/RwfJQUPbRkhqONHbD/snKxbP+fpx IEV3y22ULVTKFh9G6uirsxCZEATBRcsAgHO30dh29yFaQgtB62cPwDGIOOLEogDAO2eB /Cn8eGXuQG2EzlT84qbLQSqotPoK7qb7kmfzjfr1U+pOalj/k/LGMM5Uw+me2sZ5A687 5U1cDpsIPVS7dPLvB796rSrK84EE7MprCM87/XWB9aqMFB5fKvlN8efHYpzJgNyCjGX1 K55aKkQSN6CKqCv0TjxXBBP5V52yIZ2gTo5GPz048E4/JDiCziYepSmNMTlIqrQ4Po3v RB4w== X-Gm-Message-State: AOJu0Yz7pAg7+grXe7Mx5ThSn1zDh/bM+j1dIHR83A/f0QsCt4RIk0pL WP+RGmBx/GsynKTE3jJVhjR72g== X-Google-Smtp-Source: AGHT+IG7Ur7jvG1Cor78dTTxi94xoQ0HyBPagkNa35jw/ciTiPyRGRuVsIer724v3p+TKZGgt/zcZQ== X-Received: by 2002:a17:90a:7564:b0:262:d7db:2520 with SMTP id q91-20020a17090a756400b00262d7db2520mr994346pjk.26.1692316743403; Thu, 17 Aug 2023 16:59:03 -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 s10-20020a17090a948a00b00263cca08d95sm2101254pjo.55.2023.08.17.16.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 16:59:00 -0700 (PDT) From: Kees Cook To: Vinod Koul Cc: Kees Cook , Hector Martin , Sven Peter , Alyssa Rosenzweig , Ludovic Desroches , Tudor Ambarus , Lars-Peter Clausen , Zhou Wang , Jie Hai , Andy Gross , Bjorn Andersson , Konrad Dybcio , Green Wan , Orson Zhai , Baolin Wang , Chunyan Zhang , Patrice Chotard , Maxime Coquelin , Alexandre Torgue , Laxman Dewangan , Jon Hunter , Thierry Reding , Peter Ujfalusi , Kunihiko Hayashi , Masami Hiramatsu , Yu Kuai , Greg Kroah-Hartman , Jordy Zomer , Jernej Skrabec , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-tegra@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: [PATCH 00/21] dmaengine: Annotate with __counted_by Date: Thu, 17 Aug 2023 16:58:37 -0700 Message-Id: <20230817235428.never.111-kees@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2707; i=keescook@chromium.org; h=from:subject:message-id; bh=X+13aptrkzlZofkuldd+d07374jzvU5KMGSMFeBiQiA=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBk3rQ/Y/4ffzo1IbZvWMUH7ld52PtnkCTORxyHK CIS35jFSfGJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCZN60PwAKCRCJcvTf3G3A Jmk6D/91xaM88OIg15Z+90cr21kEhBomkBw2kzWyeOFGSeWZfWBT9v5HW3rrVN64Q7kDB9XAJal nI4M0KHJ8cUO6Y8Oww5+x4tmVhFS+/yiSYyxDNbGtiEP8zwAJazWBFG/VAIXoqJgr65f9N5MrMB tpMNT5QDBa+NOdvwfEWIqptgdiUfftpp3/JCQpoUJZ4170WFUNdylNkOKOPlZWzpB/Z7GOnXskj Y1F1IK0F8spqaHu/QGQTnrZa1o6gGjKYuxFrbZ4zlMZRP6cXwRZ0m6mDTeTaaItw3X13J97fgUo +KCUF1tsNSs50HZwRVPdXjSJj7iidcnHdBsGgUJixBqnHI+eUuwI/fXIEDWrZi5f6nl8i+4okPg VnbPoCI4gD1g9nfDtXklxQcCpgY6Jz519HM0b2UWNjQi8Nwc4DAovAEsCwLNvgdZtD+p832lPfn YSpjXkaDWrfN2tgUC/YmPkkuGyybh/vqVuNhp78qD1aXxmydmnU5+5WL2AyRzmP6Y/xlHa5wO4g b/PSScMBx7nKATYBufXnhc8uQfrucLW4+GkmubGiNp03RUxPh5cKo2hoJtIZWTZCsuMKQhS8gdD YLlNjS9qafx1FicrUpVmxB5pFplJDCN/02onKYItefjjDduHSTMCC4tIJ//0yRQN+DfP5lzceR4 h6gsvBD jioTUffw== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230817_165904_893724_92D81ABA X-CRM114-Status: UNSURE ( 8.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This annotates several structures with the coming __counted_by attribute for bounds checking of flexible arrays at run-time. For more details, see commit dd06e72e68bc ("Compiler Attributes: Add __counted_by macro"). Thanks! -Kees Kees Cook (21): dmaengine: apple-admac: Annotate struct admac_data with __counted_by dmaengine: at_hdmac: Annotate struct at_desc with __counted_by dmaengine: axi-dmac: Annotate struct axi_dmac_desc with __counted_by dmaengine: fsl-edma: Annotate struct fsl_edma_desc with __counted_by dmaengine: hisilicon: Annotate struct hisi_dma_dev with __counted_by dmaengine: moxart-dma: Annotate struct moxart_desc with __counted_by dmaengine: qcom: bam_dma: Annotate struct bam_async_desc with __counted_by dmaengine: sa11x0: Annotate struct sa11x0_dma_desc with __counted_by dmaengine: sf-pdma: Annotate struct sf_pdma with __counted_by dmaengine: sprd: Annotate struct sprd_dma_dev with __counted_by dmaengine: st_fdma: Annotate struct st_fdma_desc with __counted_by dmaengine: stm32-dma: Annotate struct stm32_dma_desc with __counted_by dmaengine: stm32-mdma: Annotate struct stm32_mdma_desc with __counted_by dmaengine: stm32-mdma: Annotate struct stm32_mdma_device with __counted_by dmaengine: tegra: Annotate struct tegra_dma_desc with __counted_by dmaengine: tegra210-adma: Annotate struct tegra_adma with __counted_by dmaengine: ti: edma: Annotate struct edma_desc with __counted_by dmaengine: ti: omap-dma: Annotate struct omap_desc with __counted_by dmaengine: uniphier-xdmac: Annotate struct uniphier_xdmac_desc with __counted_by dmaengine: uniphier-xdmac: Annotate struct uniphier_xdmac_device with __counted_by dmaengine: usb-dmac: Annotate struct usb_dmac_desc with __counted_by drivers/dma/apple-admac.c | 2 +- drivers/dma/at_hdmac.c | 2 +- drivers/dma/dma-axi-dmac.c | 5 ++--- drivers/dma/fsl-edma-common.h | 2 +- drivers/dma/hisi_dma.c | 2 +- drivers/dma/moxart-dma.c | 5 ++--- drivers/dma/qcom/bam_dma.c | 2 +- drivers/dma/sa11x0-dma.c | 6 +++--- drivers/dma/sf-pdma/sf-pdma.h | 2 +- drivers/dma/sh/usb-dmac.c | 2 +- drivers/dma/sprd-dma.c | 2 +- drivers/dma/st_fdma.h | 2 +- drivers/dma/stm32-dma.c | 11 ++++------- drivers/dma/stm32-mdma.c | 9 ++++----- drivers/dma/tegra186-gpc-dma.c | 2 +- drivers/dma/tegra210-adma.c | 2 +- drivers/dma/ti/edma.c | 2 +- drivers/dma/ti/omap-dma.c | 5 ++--- drivers/dma/uniphier-xdmac.c | 8 ++++---- 19 files changed, 33 insertions(+), 40 deletions(-)