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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90D48C433EF for ; Wed, 20 Apr 2022 05:23:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3CA688343B; Wed, 20 Apr 2022 07:23:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="lzlSNIZB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C218583968; Wed, 20 Apr 2022 07:23:13 +0200 (CEST) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3EDA980A4E for ; Wed, 20 Apr 2022 07:23:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wr1-x433.google.com with SMTP id t1so647509wra.4 for ; Tue, 19 Apr 2022 22:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pEfQyfB7InCfIAoNqKBpLmjjS4qWjTnHR5OmBmfhODU=; b=lzlSNIZBOC2S282A3YU1XxTnQE5YbcuWtr1efwYMcfvl9AlCGw7PIN63ZOqjN7h0Qf 2LbvZDGDyT0+rN+lGIxuVak/Su3toJKXwk3gEqIum/jtBxdXgKVaiksa8jLbxcYvDxya CKTDkvxnvyPTmQcTHCH6ZI1Cea41nIVeiRacPpQsovChJrH08Ocu+3oOM+Nci9EkbW18 g9YS/1IRRjKBQgXr8Gm65rY4x6qPkCAKksWF7mrNjac6bcUGMs4inMsZBvzmL2zCGxWN jjJzzzvi2x29bKJgUX76WCmUTDS9F1uDq2K412q+f8OoppyYywOYSXH0L5qwc4U4R8O+ 8e4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pEfQyfB7InCfIAoNqKBpLmjjS4qWjTnHR5OmBmfhODU=; b=qMLzywniOfD9x/FpGXEijZKXejyACYRNEOJMn0L055VVjmU2cFnRwuNZpZSlET5cfs DuEA8X/vKWM/PWPnQBox20gt3PJ50xZ19nd4/QQ2IzwI+T9q8ZGiY8mfby0T+4k+XH6v 7sAad/TRTg3VpANmQevUxUgr0rU1rud37RMDRj3zwnrf9BKV5O8T9YiqKSDbP16J0OIe 23e1waUuCxAfNvyQdmSqn1LUFUg3+p+cTkeFfL2oDl+hDagFN0zQmSboXpcL3ZRVHEgM JsOmoVqfK1xAi94XJqFLsm5fb0a8vsqTyF0xFme4yYfA7DI9U67hz/gcA4gV93MvlzVy rLsw== X-Gm-Message-State: AOAM533qs06vYsVX3LyEH0hFOBw5HYJBoHYwD7VjaaKDFLL1qIHkC2+T 02SKEHOf+YnwQ998t4qVcfIdmw== X-Google-Smtp-Source: ABdhPJywB5rdTnz59riOhSk3/o5erm670Y8J3oWWPP0l9L038oTH30u1aaQ4HqMszs3ARkUn0Om4qg== X-Received: by 2002:adf:f781:0:b0:207:9c12:5bee with SMTP id q1-20020adff781000000b002079c125beemr13891501wrp.122.1650432190839; Tue, 19 Apr 2022 22:23:10 -0700 (PDT) Received: from trex (95.red-81-38-138.dynamicip.rima-tde.net. [81.38.138.95]) by smtp.gmail.com with ESMTPSA id r3-20020a1c2b03000000b00392a3e6280bsm4011598wmr.8.2022.04.19.22.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 22:23:09 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Wed, 20 Apr 2022 07:23:08 +0200 To: Jorge Ramirez-Ortiz Cc: michal.simek@xilinx.com, t.karthik.reddy@xilinx.com, ashok.reddy.soma@xilinx.com, u-boot@lists.denx.de Subject: Re: [PATCH v2] soc: xilinx: versal: fix out of bounds array access Message-ID: <20220420052308.GA3083280@trex> References: <20220416181530.2311155-1-jorge@foundries.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220416181530.2311155-1-jorge@foundries.io> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 16/04/22, Jorge Ramirez-Ortiz wrote: > The call to xilinx_pm_request requires an array of a larger size. > > Signed-off-by: Jorge Ramirez-Ortiz > --- > drivers/soc/soc_xilinx_versal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/soc_xilinx_versal.c b/drivers/soc/soc_xilinx_versal.c > index f8bcd9ab40..3d8c25c19b 100644 > --- a/drivers/soc/soc_xilinx_versal.c > +++ b/drivers/soc/soc_xilinx_versal.c > @@ -45,7 +45,7 @@ static const struct soc_ops soc_xilinx_versal_ops = { > static int soc_xilinx_versal_probe(struct udevice *dev) > { > struct soc_xilinx_versal_priv *priv = dev_get_priv(dev); > - u32 ret_payload[4]; > + u32 ret_payload[PAYLOAD_ARG_CNT]; all good? can this be merged? > int ret; > > priv->family = versal_family; > -- > 2.34.1 >