From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19187606A32C for ; Wed, 2 Dec 2026 21:56:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=eBUWD4qU; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bfCcY0CB DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:Subject:References:Cc:To:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=sw6KKTAcyb12U7tOig3ybOsepTtfDMS4wTfSqLwElkM=; b=eBUWD4qUJVcqIp d9S9OBAJH2mVGVzZCz+haGEpPRoIOHJ9e3w1PjESmNwLNSeSbMOF03Q9Yj6kn+kz5lSYFW26/jOT1 RBv6fxCgqcvgc/egyRgjqb0AfNKOKxTfKtzq7QvD78r2T8TetxYQexx1RuZrzH4FEgqT8nkj0TVR+ hlb0yUuQG/O1Z4JRv/hj3HUQ77VevQwvkga0UZMhVAVd3+gMLXXDUakYM48zdu1c3FT5RRZ5CzvIE q5hT5lLQeldSy+QzAniZEcuGzo1bCEAm2YIfbIayfxnb9puHKz1jxglLIpyWOw93JuzXVxnu8N+Ht 3Rgm0mLPJcUVY1i6lDpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYsJV-0000000Ct8n-3OP1; Wed, 02 Dec 2026 21:56:33 +0000 Received: from mail-oo2-x09.google.com ([2607:f8b0:4864:31::9]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYsJO-0000000Ct5n-1tT5 for linux-mediatek@lists.infradead.org; Wed, 02 Dec 2026 21:56:31 +0000 Received: by mail-oo2-x09.google.com with SMTP id 006d021491bc7-71bc47a6759so766247eaf.0 for ; Wed, 02 Dec 2026 13:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796248585; x=1796853385; darn=lists.infradead.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=sw6KKTAcyb12U7tOig3ybOsepTtfDMS4wTfSqLwElkM=; b=bfCcY0CB5Ue/3elofTM1IEVwxODAAL3Nb6LV7Boc/Vg87ygu8ai0zxr7ELhYW42lVC af52VsoOchz7Pen9U3NxAxZsfGKkUKAvfYunVDzF8S5Uwr6XGhkD4SdfClDLNmwuk6Cx Iwd25VJN01kVWK19abF8GlGUPhW3y/LiMAKds57B1YGLE2wwahqD8QwapLuVLaZa0/o2 Sl2t/92I53ffrzkw1Aq+fmgWFUKlwTvjSQMTy+XuWEkEElIgYsThqqo9PG9mTCxTnVpO Ey26shmxZMerpJSiiKnQUYESW0s1Wf9QxgM6Q6vvq1AIFzI/UHt02Q9zwcmO2MDVbPvE h6PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796248585; x=1796853385; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=sw6KKTAcy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/JehDqT+zGJH4 CS4jczktl9guPK8M6j2/nmV51i+WtYAAOJkaj9oYdN8r38GYsK2KpIlMSa5xFhTlXWvarZ0TE/Q QTor7OVND9exTd7UhzsZORUN4rLL9Rx9UJF7fcFYsTSA+nTivHeZh1MMllFV1FVosOX1VbWpahP Pn34UWP6CFtPKN6vqRBHU/To608n32O2EQbMZPdVY0V+Vl5prneKAKUWwUi+IlE2KAxFEKu2rsJ HsE52fPnjlWA+yvaLFA== X-Received: by 2002:a05:6820:1c93:b0:71b:d05d:6a43 with SMTP id 006d021491bc7-71bd05d7e58mr4195659eaf.7.1796248585352; Wed, 02 Dec 2026 13:56:25 -0800 (PST) Received: from [10.10.18.223] (wsip-64-207-253-118.tu.ok.cox.net. [64.207.253.118]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4bc5b07d57csm35672249fac.1.2026.12.02.13.56.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2026 13:56:23 -0800 (PST) Message-ID: Date: Wed, 2 Dec 2026 15:56:21 -0600 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: akkun11.open@gmail.com Cc: angelogioacchino.delregno@collabora.com, bmasney+clk@redhat.com, conor+dt@kernel.org, devicetree@vger.kernel.org, jbrunet+clk@baylibre.com, krzk+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, miles.chen@mediatek.com, robh@kernel.org, sboyd@kernel.org, wenst@chromium.org References: <20261129014745.3375923-15-akkun11.open@gmail.com> Subject: Re: [PATCH linux-next 14/33] clk: mediatek: Fix MT8173 onecell IDs after common probe migration Content-Language: en-US From: Ryan Brue In-Reply-To: <20261129014745.3375923-15-akkun11.open@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_135629_863340_1CE5C09D X-CRM114-Status: UNSURE ( 7.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.4 (/) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Sun, Nov 29, 2026 at 10:47:26AM +0900, Akari Tsuyukusa wrote: > Migrating the MT8173 infracfg clock driver to the common probe/remove > helpers stopped using CLK_*_NR for onecell data allocation, causing > a out-of-bounds registration due to an missing dummy slot for ID 0. Tested on MT8173 (Amazon Fire HD 10 2017): v7.4-rc5 with board patches and the mtk-clk-for-v7.5 tag merged in, KASAN on, two boots each way. Without this patch, KASAN reports an 8-byte out-of-bounds read and write in mtk_clk_register_cpumuxes() at boot, just past the 120-byte clk_data. The A72 clock can't be looked up ("of_clk_hw_onecell_get: invalid index 14"), so mtk-cpufreq fails to probe and there is no cpufreq on any CPU. The A72 cores stay at 851.5 MHz. With the patch there are no KASAN reports, both cpufreq policies come up, and the A72 cluster goes up to 1.807 GHz under load, the same as on 7.4-rc5 without the tag. 8c9dacbf42f1 is in the mtk-clk-for-v7.5 pull, so without this fix MT8173 boards will lose cpufreq in 7.5. Tested-by: Ryan Brue # MT8173, amazon-suez