lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250703180924.55aa0fb0@booty>
Date: Thu, 3 Jul 2025 18:09:24 +0200
From: Luca Ceresoli <luca.ceresoli@...tlin.com>
To: "Colin King (gmail)" <colin.i.king@...il.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
 "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API

Hello Colin,

sorry for the late reply (vacation time).

On Wed, 2 Jul 2025 10:41:52 +0100
"Colin King (gmail)" <colin.i.king@...il.com> wrote:

> Hi,
> 
> I believe there is a regression in linux-next caused by the following 
> commit:
> 
> commit a59a271769149f0b8258507276f3d2a24370cbdb
> Author: Luca Ceresoli <luca.ceresoli@...tlin.com>
> Date:   Wed May 28 11:29:36 2025 +0200
> 
>      drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API
> 
> 
> the issue is as follows:
> 
> static int tc_probe_bridge_endpoint(struct tc_data *tc, enum tc_mode mode)
> {
>          struct device *dev = tc->dev;
>          struct of_endpoint endpoint;
>          struct device_node *node = NULL;
> 
>          for_each_endpoint_of_node(dev->of_node, node) {

Well spotted! I wonder why this was not caught by my spatch runs.

I think there should be an extra line here:

   of_graph_parse_endpoint(node, &endpoint);

>                  if (endpoint.port == 2) {
> 			...
> 			...
> 
> The check for endpoint.port == 2 is checking an uninitialized field in 
> the uninitialized structure endpoint. The code before this commit called 
>   of_graph_parse_endpoint(node, &endpoint) to fetch endpoint and now 
> this seems to be missing.

As the commit message states, with this patch we are iterating over the
endpoints twice. However when iterating twice we need to parse the
endpoints twice as well.

I'm double checking this before sending a fix.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ