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 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 A9F85C43334 for ; Tue, 28 Jun 2022 00:44:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C1A1584462; Tue, 28 Jun 2022 02:44:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 9842A84478; Tue, 28 Jun 2022 02:44:43 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 11AD284456 for ; Tue, 28 Jun 2022 02:44:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C02B31691; Mon, 27 Jun 2022 17:44:39 -0700 (PDT) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A27C53F66F; Mon, 27 Jun 2022 17:44:34 -0700 (PDT) Date: Tue, 28 Jun 2022 01:40:29 +0100 From: Andre Przywara To: Samuel Holland Cc: u-boot@lists.denx.de, Jagan Teki , Lukasz Majewski , Sean Anderson , Bin Meng , Heinrich Schuchardt , Maxime Ripard Subject: Re: [PATCH 0/7] clk: sunxi: Out-of-bounds access fix and driver cleanup Message-ID: <20220628014029.26d54014@slackpad.lan> In-Reply-To: <20220509052937.42283-1-samuel@sholland.org> References: <20220509052937.42283-1-samuel@sholland.org> Organization: Arm Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.6 at phobos.denx.de X-Virus-Status: Clean On Mon, 9 May 2022 00:29:30 -0500 Samuel Holland wrote: Hi Samuel, > This series fixes an issue with out-of-bounds access to the gate array > (patches 1-2), uses the rearranged array size information to remove a > bunch of duplicate code (patches 3-4), and then simplifies how the reset > driver is bound (patches 5-7). > > The original motivation for these changes was adding a driver for the > legacy A31/A23/A33 PRCM binding (which I will send separately), and > trying to use OF_PLATDATA in SPL (which did not work out). But I think > at least some of the cleanup is worth applying on its own. > > Patch 4 is generally the same change I made between v1 and v2 of the > pinctrl series, using some #ifdefs to share a U_BOOT_DRIVER. It's not > quite as clean as the pinctrl case, because here the SoC-specific parts > are in different files, so all of the CCU descriptors have to be global. Many thanks for your work on this! So I am done with reviewing this series, and as mentioned quite like it and am fine with it. I added F1C100s support, which got added in U-Boot meanwhile, and pushed that to sunxi/next: https://source.denx.de/u-boot/custodians/u-boot-sunxi/-/commits/next/ Can you please have a look and confirm that this is fine? I will then send the PR in about two weeks time, if nothing breaks. Cheers, Andre > Samuel Holland (7): > clk: sunxi: Store the array sizes in the CCU descriptor > clk: sunxi: Prevent out-of-bounds gate array access > reset: sunxi: Get the reset count from the CCU descriptor > clk: sunxi: Use a single driver for all variants > clk: sunxi: Convert driver private data to platform data > reset: sunxi: Convert driver private data to platform data > reset: sunxi: Reuse the platform data from the clock driver > > drivers/clk/sunxi/clk_a10.c | 27 +----- > drivers/clk/sunxi/clk_a10s.c | 27 +----- > drivers/clk/sunxi/clk_a23.c | 27 +----- > drivers/clk/sunxi/clk_a31.c | 25 +---- > drivers/clk/sunxi/clk_a31_r.c | 29 +----- > drivers/clk/sunxi/clk_a64.c | 25 +---- > drivers/clk/sunxi/clk_a80.c | 36 ++------ > drivers/clk/sunxi/clk_a83t.c | 25 +---- > drivers/clk/sunxi/clk_h3.c | 27 +----- > drivers/clk/sunxi/clk_h6.c | 25 +---- > drivers/clk/sunxi/clk_h616.c | 25 +---- > drivers/clk/sunxi/clk_h6_r.c | 27 +----- > drivers/clk/sunxi/clk_r40.c | 25 +---- > drivers/clk/sunxi/clk_sunxi.c | 168 ++++++++++++++++++++++++++++++---- > drivers/clk/sunxi/clk_v3s.c | 27 +----- > drivers/reset/reset-sunxi.c | 55 ++--------- > include/clk/sunxi.h | 21 +---- > 17 files changed, 208 insertions(+), 413 deletions(-) >