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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A9A7EB64D7 for ; Fri, 30 Jun 2023 05:13:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230046AbjF3FNx (ORCPT ); Fri, 30 Jun 2023 01:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbjF3FNw (ORCPT ); Fri, 30 Jun 2023 01:13:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E71319AF for ; Thu, 29 Jun 2023 22:13:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9270A61646 for ; Fri, 30 Jun 2023 05:13:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BEEBC433C0; Fri, 30 Jun 2023 05:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688102030; bh=ygsfnNvkDPOnp5olYNMlXhLplV7waio0+Vt0yiqXPz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gvGMFTXYOIjE/svvhgW2v0e5qYy7qgpejgYVpiGz/VKT1isnJQfy4de/DQqQGjf1a KBWWQF2+gw/tugTxG2lW9NVQ47V//EDr2Lv988FJJBgIRYytaX+frdJOoAf4rhlduJ eHcja9Pa0y4lSBi7FMtkHe7N3iWInf5BCQpf1aB98fqAhw46eOvSmZ6oSGZNj5SgcT +m1EC2xuUol70ZwEC0q2G2uK/tcMX/xFVpP/G5fmYml2yl+X2/zcqP5a1Otk82jwXt 6kHrjo9jjhOzMV65sTVRrdazD+JwJaeOTtDdw57nPHBqJVuJaM53NprHbLm1oUMRtO BoG/jgKcTSvZw== Date: Fri, 30 Jun 2023 13:13:46 +0800 From: Tzung-Bi Shih To: Yiyuan Guo Cc: jic23@kernel.org, lars@metafoo.de, bleung@chromium.org, groeck@chromium.org, dianders@chromium.org, mazziesaccount@gmail.com, gwendal@chromium.org, linux-iio@vger.kernel.org, chrome-platform@lists.linux.dev Subject: Re: [PATCH] iio: Fix the allocation size for cros_ec_command Message-ID: References: <20230629132405.1237292-1-yguoaz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230629132405.1237292-1-yguoaz@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Thu, Jun 29, 2023 at 09:24:05PM +0800, Yiyuan Guo wrote: > The struct cros_ec_command contains several integer fields and a > trailing array. An allocation size neglecting the integer fields can > lead to buffer overrun. > > Signed-off-by: Yiyuan Guo Better prefix the commit title with "iio: cros_ec:". With that: Reviewed-by: Tzung-Bi Shih