From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795917277; b=o6zqgFXk5A1YDYXVXEUYMUJJKINOpYnF95RJrZ+hpNEDE7n7YNxoQAJmDMUB2DiW8tPb a2tk1+t4ujoMdgE0Ks4seyrV2IybaAK/abCq0OkmNp5xq+iJwcac+7cPHnG6BG6Kjg/uw lKmJg2bqNG+S+fgOgOlFoVJ8cT0A/xJHb+Mod0grAAfbI672wOv0e+C086xagXBDS0Ct0 wrjei47GgoHl7Jn1WOcvfohvODeSPYRj8EeCGak2hzhFR9rfUaOReBJfvIrTr+fulVktl LXpZfaNiuuxYLI8wzYMSQVa9PJ4ruYAnUv7qDTTZibRlXepXIO8KfyttcsngU3K3nOg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795917277; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=qKC6hV2ckjhU1d+PMJbfXduXmXvRwG/kRnhUGTDuTEo=; b=Zkxs6ii9M3NpOd9fXDWNZLmCfQNWhp3NGK+4G6wVC+b+Y+BMYIigFmLfM8QRp2rgM5q3 4l1remMIT+ndfXnTT/4+tNeW9pI/UTq1jeMBpTtQWktU873hmmXbV2/lzWesGiTEFxVsa /B/j0ovTY5yIdHaALA4dsvgMrewZ0YQXFEZWQX4p+WgSiAQHAJr6nfxwjK6ggMO7mFniS WowLAkAtclRe+NoqzJYQEvqFCavWzyQz2hsMXN7TMFpoqs2Hhwai23yuIaanpDFNU3WjR ieV5Si++2O/PV/lZwj6uy5cVdGZq9TXOYj9G3Djj+DbQdgo7qDdvkfr+oCghpiy33Dg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="dLv1//ed"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E05A7606A31C; Sun, 29 Nov 2026 01:54:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=dLv1//ed Received: by smtp.kernel.org (Postfix) with ESMTPSA id 433031F00896; Sun, 29 Nov 2026 01:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795917276; bh=qKC6hV2ckjhU1d+PMJbfXduXmXvRwG/kRnhUGTDuTEo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=dLv1//edW6A6pxD5L03bf26tTmOSA5mf4tvZ9U7dvTuE5XYZtSg8abAuT+DZMak8t +PlYgDxoSIJ+FhChs84zBSnlucV7s3XWg8cS1ZfbN9y7ToVUHTI0V6ApCHfuxi9WBf PU2mVnUZwRHVhb31jiIlqne3Fj2tQVdVNmYxX3q+XCDmZrwKJC6YuGOyO284b/WJDO yD7vM3ZficMx3Xb17VOUo3AcElkceDpgPr9m7McdxgFyfdKxxZbwsc9ay0LFR53kCj WzYjxrxq+3lf4P/norphFbIe98DKTvk4yWORyPq/l6z3SRgxRw19Zg9pGuaEhClBS5 Oyrx8zT2/FyYQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH linux-next 08/33] clk: mediatek: mt8516: Keep clock descriptors alive Reply-To: sashiko-reviews@lists.linux.dev To: "Akari Tsuyukusa" Cc: =?utf-8?b?b3BlbiBsaXN0Ok1FRElBVEVLIENMT0NLIERSSVZFUlM=?= , =?utf-8?b?b3BlbiBsaXN0Ok9QRU4gRklSTVdBUkUgQU5EIEZMQVRURU5FRCBERVZJQ0Ug?= =?utf-8?b?VFJFRSBCSU5ESU5HUw==?= , robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261129014745.3375923-9-akkun11.open@gmail.com> References: <20261129014745.3375923-1-akkun11.open@gmail.com> <20261129014745.3375923-9-akkun11.open@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 01:54:35 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] clk: mediatek: mt8516: section mismatch and UAF from __initconst parent arrays -- commit beff2d41b331bb091c0366a72f390d0125ae8c68 Author: Akari Tsuyukusa clk: mediatek: mt8516: Keep clock descriptors alive This commit drops __initconst and __initdata from the MT8516 clock descriptor arrays so they remain available when mtk_clk_simple_remove() unregisters the clocks. > diff --git a/drivers/clk/mediatek/clk-mt8516.c b/drivers/clk/mediatek/clk= -mt8516.c > index b646745598780..7933a0ad5140a 100644 > --- a/drivers/clk/mediatek/clk-mt8516.c > +++ b/drivers/clk/mediatek/clk-mt8516.c [ ... ] > @@ -360,7 +360,7 @@ static const char * const nfiecc_parents[] __initcons= t =3D { > "csw_nfiecc_sel" > }; > =20 > -static struct mtk_composite top_muxes[] __initdata =3D { > +static struct mtk_composite top_muxes[] =3D { > /* CLK_MUX_SEL0 */ > MUX(CLK_TOP_UART0_SEL, "uart0_sel", uart0_parents, > 0x000, 0, 1), > @@ -453,7 +453,7 @@ static const char * const ifr_i2c0_parents[] __initco= nst =3D { > "rg_i2c" > }; > =20 > -static const struct mtk_composite ifr_muxes[] __initconst =3D { > +static const struct mtk_composite ifr_muxes[] =3D { > MUX(CLK_IFR_MUX1_SEL, "ifr_mux1_sel", ifr_mux1_parents, 0x000, > 2, 2), > MUX(CLK_IFR_ETH_25M_SEL, "ifr_eth_25m_sel", ifr_eth_25m_parents, 0x080, [Severity: High] Should __initconst also be dropped from the parent clock name arrays referenced by top_muxes[] and ifr_muxes[] (and top_muxes[] marked const)? Moving non-const top_muxes[] out of .init.data into .data while its MUX() entries still point to __initconst parent arrays (uart0_parents[] through nfiecc_parents[]) triggers modpost section mismatch warnings. Also, both top_muxes[] and ifr_muxes[] (pointing to ifr_mux1_parents[], ifr_eth_25m_parents[], and ifr_i2c0_parents[]) will hold dangling .parent_names pointers after init memory is freed, causing a use-after-free in mtk_clk_register_composite() -> clk_hw_register_composite() if the driver probes late or is rebound. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261129014745.3375= 923-1-akkun11.open@gmail.com?part=3D8