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]
Date:   Fri, 24 Mar 2023 15:05:53 +0100
From:   neil.armstrong@...aro.org
To:     Dmitry Rokosov <ddrokosov@...rdevices.ru>,
        krzysztof.kozlowski@...aro.org, robh@...nel.org,
        khilman@...libre.com, jbrunet@...libre.com,
        martin.blumenstingl@...glemail.com, jianxin.pan@...ogic.com
Cc:     kernel@...rdevices.ru, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org, devicetree@...r.kernel.org,
        rockosov@...il.com
Subject: Re: [PATCH v2] firmware: meson_sm: populate platform devices from sm
 device tree data

On 24/03/2023 15:01, Dmitry Rokosov wrote:
> In some meson boards, secure monitor device has children, for example,
> power secure controller. By default, secure monitor isn't the bus in terms
> of device tree subsystem, so the of_platform initialization code doesn't
> populate its device tree data. As a result, secure monitor's children
> aren't probed at all.
> 
> Run the 'of_platform_populate()' routine manually to resolve such issues.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@...rdevices.ru>
> ---
>   drivers/firmware/meson/meson_sm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
> index 77aa5c6398aa..b79d0e316cb1 100644
> --- a/drivers/firmware/meson/meson_sm.c
> +++ b/drivers/firmware/meson/meson_sm.c
> @@ -316,7 +316,7 @@ static int __init meson_sm_probe(struct platform_device *pdev)
>   	if (sysfs_create_group(&pdev->dev.kobj, &meson_sm_sysfs_attr_group))
>   		goto out_in_base;
>   
> -	return 0;
> +	return devm_of_platform_populate(dev);

You should check return and jump to out_in_base on error instead.

Neil

>   
>   out_in_base:
>   	iounmap(fw->sm_shmem_in_base);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ