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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE148C433FE for ; Fri, 1 Oct 2021 12:00:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B7BE261A85 for ; Fri, 1 Oct 2021 12:00:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B7BE261A85 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=xdSrWXagpcmHm2KayraF1vvyC/yHsu1RAUKPbUcrxts=; b=t1I6kGC81xC+Wu 4yypEve7i3RBtie5IDCh8zUXMqw0aV3qA1rjZMWnKHp+5rSvZ+7waM7i8i8T+X+ArkXmGCkXR6hzt AM0j83uYgl1t/toliFsqDMWUVawp8MdfsQK/G0g2S6JgC22J2W32lG2zFa05Po7xKPLZ/sKrS0n81 NGC2j5Oyyi7WTcDrc8DKEpOvqubJip1yf72gjTPfppOKVQEQlbqQkA5BAd4V3N5mgTtt8PGDVSupH OOYCS1jHDGa+7F+N9r0ei2/Dh5CgfUIEGcTF9je0hk5gVZzSDKCWczCzPSt0tz1UdEkt4j77nCIQ/ fIIL9KvCTjn3qzhhOqfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWHAu-0003g7-Jx; Fri, 01 Oct 2021 11:58:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWHAq-0003fB-KY for linux-arm-kernel@lists.infradead.org; Fri, 01 Oct 2021 11:57:57 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 868EF61A6F; Fri, 1 Oct 2021 11:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633089476; bh=Vjg+dy9vAItiQLb0Oo9y0H4LZgIlPk1bRan5HVpoMuk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IitrVAZnOU4Uo+Ex9E30ZIidfe6/9XfmwIeYentyjgXVa+pusXNob5qilym+i5fLk zD1180QRkSemZpWEZhOYzBb8PCF4fNtCKV3MMqLi+GHgTwgAkD2Ycn1ClslVu58M88 +oo5JaY1742r8E8UzGME4tL+D/44FzeBPufS4veMDHGDGPiVZQOpKTHIBwjKcKSFqq ZPDWQE1IPkWlSyiLa7vJBHy+FO4Mf3yaR3KXVQMiVwcse96GLsh2f+5WSQZWlWqZdR zUESFd8AYy9cq+gu2SjE25hFJI+PAdxNCKRMOL8wZEqlPnUXh4H5BIOEvQV3qrD5E6 0iIApfM2vAZGA== Date: Fri, 1 Oct 2021 17:27:52 +0530 From: Vinod Koul To: "Gustavo A. R. Silva" Cc: Maxime Coquelin , Alexandre Torgue , dmaengine@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] dmaengine: stm32-mdma: Use struct_size() helper in devm_kzalloc() Message-ID: References: <20210929222922.GA357509@embeddedor> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210929222922.GA357509@embeddedor> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211001_045756_721773_797AC292 X-CRM114-Status: UNSURE ( 5.76 ) 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 29-09-21, 17:29, 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 worse 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