From patchwork Sat Apr 16 18:15:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jorge Ramirez-Ortiz, Foundries" X-Patchwork-Id: 1618070 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=d1uT8JBD; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KghG15H3wz9sFv for ; Sun, 17 Apr 2022 04:15:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 34AF883AEB; Sat, 16 Apr 2022 20:15:40 +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="d1uT8JBD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4A07F83B1B; Sat, 16 Apr 2022 20:15:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 C6ED483AB2 for ; Sat, 16 Apr 2022 20:15:35 +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-wm1-x32f.google.com with SMTP id n126-20020a1c2784000000b0038e8af3e788so6672407wmn.1 for ; Sat, 16 Apr 2022 11:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BMTanU9act5oI3gWW/kiOLNABytM6MR8o1w8Ax6NB7c=; b=d1uT8JBDcOxp0mnCh4H4IoAW1y4b5s03IQqiIEL1iC/3iPpjD8fLuBuLXfkntYN4XV 3jJD2+eIXSJWeNTwNbip56yPHwH6UH8GCKPdR7v/892deZ1Hcn/+mVSmc8fLYtNYG1Db 6SSW6agVIaecp3qT4hswTTg2G/13LTqpZN+T6f9tmdbNTtQ2uUr4AyUgFortfiFyyaQf 5QRKpbSp455DnumGamscij5R1qifsla9V2Lx/0mrqJA7FShjDFWvth8iA6YimjisI4cL 6KC5i/fMMaYTxHcsb2xLtyMkVwVr9bgnizlZGwO0POP0RA1gU/RgtQ39bv1n+IRsp9wv 4Zsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BMTanU9act5oI3gWW/kiOLNABytM6MR8o1w8Ax6NB7c=; b=XXxM2IZxa+m5DswR5WBbqrQy7w4U3pJdOV4LnyPCTsYfQR6K+PDZuHvZ7gUVkrle9W O0ao17rCGAmuKnzclyhs0YKXNCA6w1f7Zos3Q0URS9kd05Mz4F7sCR/misDWRIwiBJXt mE1MWMs3ALcslqarJd1VCeiSLVu0hEq1l7CHPyw20a5rbuG02D4wIZxEtU/nh/d5pOet otfui2Bj4vic1eEPfsi+0IWxsCRdOoBg98mfxq1T0TlZFMLnVSbHneXQad3wBOPg5Nkh uMqaNVZXzxJS5Jmt5NQPYLBtN6BODaL94xY47dCOu/njoQ7cbm7x8FMYcSFQ0Qy3IliU 271A== X-Gm-Message-State: AOAM53238NFnM2Mni+9I+LnF/WbWuSF5hYKlt/dffzGsb2JGoPNmE0UT /D5HEYpa6AzF1tfRCK+ZCcHwjaKgQDpBlg== X-Google-Smtp-Source: ABdhPJyzuGEDJKYjJGQvo4xTlDPQbuITBwGEBLyrjq+YkZNzGB1jjWdFMO3ildQi32xlgc8FhgDxfA== X-Received: by 2002:a7b:cb56:0:b0:38e:7e24:33ab with SMTP id v22-20020a7bcb56000000b0038e7e2433abmr8270356wmj.182.1650132935266; Sat, 16 Apr 2022 11:15:35 -0700 (PDT) Received: from localhost.localdomain (95.red-81-38-138.dynamicip.rima-tde.net. [81.38.138.95]) by smtp.gmail.com with ESMTPSA id b3-20020a05600018a300b0020a8b2341f9sm1544045wri.18.2022.04.16.11.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Apr 2022 11:15:34 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge@foundries.io, michal.simek@xilinx.com, t.karthik.reddy@xilinx.com, ashok.reddy.soma@xilinx.com Cc: u-boot@lists.denx.de Subject: [PATCH v2] soc: xilinx: versal: fix out of bounds array access Date: Sat, 16 Apr 2022 20:15:30 +0200 Message-Id: <20220416181530.2311155-1-jorge@foundries.io> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 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]; int ret; priv->family = versal_family;