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] [thread-next>] [day] [month] [year] [list]
Message-ID: <265b9083-d744-4438-b539-9e001f2138ba@samsung.com>
Date: Thu, 18 Dec 2025 16:29:55 +0100
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby
	<jirislaby@...nel.org>
Subject: Re: [PATCH v1 1/1] serial: core: Restore sysfs fwnode information

On 27.11.2025 17:36, Andy Shevchenko wrote:
> The change that restores sysfs fwnode information does it only for OF cases.
> Update the fix to cover all possible types of fwnodes.
>
> Fixes: d36f0e9a0002 ("serial: core: restore of_node information in sysfs")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---

This patch landed in today's linux-next as commit 24ec03cc5512 ("serial: 
core: Restore sysfs fwnode information"). In my tests I found that it 
breaks booting of most of my test boards (ARM 32 and 64 bit). 
Unfortunately I cannot provide anything useful besides the information 
that booting stops and system doesn't reach shell. There is nothing 
suspicious in the kernel logs. I suspect a memory trashing. Reverting 
$subject on top of linux-next fixes booting.

>   drivers/tty/serial/serial_base_bus.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> index 22749ab0428a..8e891984cdc0 100644
> --- a/drivers/tty/serial/serial_base_bus.c
> +++ b/drivers/tty/serial/serial_base_bus.c
> @@ -13,7 +13,7 @@
>   #include <linux/device.h>
>   #include <linux/idr.h>
>   #include <linux/module.h>
> -#include <linux/of.h>
> +#include <linux/property.h>
>   #include <linux/serial_core.h>
>   #include <linux/slab.h>
>   #include <linux/spinlock.h>
> @@ -60,6 +60,7 @@ void serial_base_driver_unregister(struct device_driver *driver)
>   	driver_unregister(driver);
>   }
>   
> +/* On failure the caller must put device @dev with put_device() */
>   static int serial_base_device_init(struct uart_port *port,
>   				   struct device *dev,
>   				   struct device *parent_dev,
> @@ -73,7 +74,8 @@ static int serial_base_device_init(struct uart_port *port,
>   	dev->parent = parent_dev;
>   	dev->bus = &serial_base_bus_type;
>   	dev->release = release;
> -	device_set_of_node_from_dev(dev, parent_dev);
> +
> +	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
>   
>   	if (!serial_base_initialized) {
>   		dev_dbg(port->dev, "uart_add_one_port() called before arch_initcall()?\n");
> @@ -94,7 +96,7 @@ static void serial_base_ctrl_release(struct device *dev)
>   {
>   	struct serial_ctrl_device *ctrl_dev = to_serial_base_ctrl_device(dev);
>   
> -	of_node_put(dev->of_node);
> +	fwnode_handle_put(dev_fwnode(dev));
>   	kfree(ctrl_dev);
>   }
>   
> @@ -142,7 +144,7 @@ static void serial_base_port_release(struct device *dev)
>   {
>   	struct serial_port_device *port_dev = to_serial_base_port_device(dev);
>   
> -	of_node_put(dev->of_node);
> +	fwnode_handle_put(dev_fwnode(dev));
>   	kfree(port_dev);
>   }
>   

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ