From mboxrd@z Thu Jan 1 00:00:00 1970 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 C624AC433EF for ; Mon, 13 Dec 2021 05:55:42 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HDNkGnyxafm+ffrAA24MdvJJQZid9MdHxJFcHhHee8Y=; b=F5MaZTqQwYC2zt nu9Q65MWLd25S4KPSZhHllxlVq03OM2lgZqG+GgcnWa3UhU6PGE3ZuKpKlMYx+yHjTUdY1fDPK5vl qU6NxoNr1zLnbeftptnIzZncwgvJYs/m1CBj9R/BJAnfkn4t4lAww459DkbGs+TiAsmDqTR7ni+r2 FDXOac9rFjUix8GvqkwcChdizdnzrpYFu5Sh91+kz9JB7fH9vCIpXIeKS4ul5nmDaljwJb0bVHjjv +IEhZNVvqKPSfuwbIb/FqaGJK8efJMgskjK5hrAcMSmcBGKBfiTdAaIQS83Imx9ImdALArdRKUGmu MLoJ3xp/6zj8jJGqGb1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mweI6-007tMf-Ke; Mon, 13 Dec 2021 05:54:26 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mweI3-007tMB-0M for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 05:54:24 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9208DB8076B; Mon, 13 Dec 2021 05:54:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AF09C00446; Mon, 13 Dec 2021 05:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639374860; bh=uMp9Frd+ytv1peiXkZhsAEN3vAJFoufdiK8l9LTVF4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DpAN9ESTmomOMLZF463CcYmVDDL/Yv2Efy9kGayFIEFXmgyh86EL8sZ42qUVBPwHj wqkP6WzozokHkCI0PBlkxy5zaidJ9IBQL1Q9pCGCmo5IdceGlfxIM8ZIK9qxAltOuB wj0tOKTe8lNG8GKoC1BD9vj8DpWZsSmWXJNSay24TZTGR+8GFVl8B08TqM6gi1OyRi 81VHRPAmNkfKIw3KWT7qiR2qs+IOKVY0Va4iWVHp3KQOlFQMD7gUsG/w5hXSOSzGx3 uK4lyDgiCIWFcBcG/tOab6tNicnAQ6OVGfjiU7SzCvALcr624SqVGUOnKFWQjVfmUV Rh64KWxtJjDZw== Date: Mon, 13 Dec 2021 11:24:16 +0530 From: Vinod Koul To: "Gustavo A. R. Silva" Cc: Ludovic Desroches , Tudor Ambarus , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] dmaengine: at_xdmac: Use struct_size() in devm_kzalloc() Message-ID: References: <20211208001013.GA62330@embeddedor> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211208001013.GA62330@embeddedor> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211212_215423_207022_97398B20 X-CRM114-Status: UNSURE ( 7.60 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07-12-21, 18:10, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version, in > order to avoid any potential type mistakes or integer overflows that, in > the worst scenario, could lead to heap overflows. Applied, thanks -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel