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]
Date:   Mon, 28 Feb 2022 14:51:24 +0000
From:   Suzuki K Poulose <suzuki.poulose@....com>
To:     Mao Jinlong <quic_jinlmao@...cinc.com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:     Mao Jinlong <jinlmao@....qualcomm.com>, coresight@...ts.linaro.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org,
        Tingwei Zhang <quic_tingweiz@...cinc.com>,
        Yuanfang Zhang <quic_yuanfang@...cinc.com>,
        Tao Zhang <quic_taozha@...cinc.com>,
        Hao Zhang <quic_hazha@...cinc.com>
Subject: Re: [PATCH] coresight: Defer probe when the child dev is not probed

Hi Jinlong

On 28/02/2022 13:31, Mao Jinlong wrote:
> From: Mao Jinlong <jinlmao@....qualcomm.com>
> 
> It is possible that when device probe, its child device is not
> probed. Then it will fail when add sysfs connection for the device.
> Make device defer probe when the child device is not probed.

Please could you a bit a more specific on the exact issue ?
I don't see a problem with probe deferral right now, with
coresight/next.

For e.g.,

root@...o-server:~# lsmod
Module                  Size  Used by
coresight              73728  0
root@...o-server:~# ls /sys/bus/coresight/devices/
root@...o-server:~# modprobe coresight-etm4x
root@...o-server:~# lsmod
Module                  Size  Used by
coresight_etm4x        81920  0
coresight              73728  1 coresight_etm4x
root@...o-server:~# ls /sys/bus/coresight/devices/
etm0  etm1

-- Note etm2-etm5 doesn't appear --

root@...o-server:~# modprobe coresight-funnel
root@...o-server:~# lsmod
Module                  Size  Used by
coresight_funnel       20480  0
coresight_etm4x        81920  0
coresight              73728  2 coresight_etm4x,coresight_funnel
root@...o-server:~# ls /sys/bus/coresight/devices/
etm0  etm1

-- Still don't appear ---

root@...o-server:~# modprobe coresight-replicator
root@...o-server:~# ls /sys/bus/coresight/devices/
etm0  etm1
root@...o-server:~# modprobe coresight-tmc

-- At this stage, the devices automatically get probed and appear --
root@...o-server:~# ls /sys/bus/coresight/devices/
etm0  etm1  etm2  etm3  etm4  etm5  funnel0  funnel1  funnel2  tmc_etf0 
  tmc_etr0


root@...o-server:~# lsmod
Module                  Size  Used by
coresight_tmc          40960  0
coresight_replicator    20480  0
coresight_funnel       20480  0
coresight_etm4x        81920  0
coresight              73728  4 
coresight_tmc,coresight_etm4x,coresight_replicator,coresight_funnel

So, my question is, what is this patch trying to solve ?


Cheers
Suzuki

> 
> Signed-off-by: Mao Jinlong <jinlmao@....qualcomm.com>
> ---
>   drivers/hwtracing/coresight/coresight-sysfs.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-sysfs.c b/drivers/hwtracing/coresight/coresight-sysfs.c
> index 34d2a2d31d00..7df9eb59bf2c 100644
> --- a/drivers/hwtracing/coresight/coresight-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-sysfs.c
> @@ -73,8 +73,10 @@ int coresight_add_sysfs_link(struct coresight_sysfs_link *info)
>   	if (!info->orig || !info->target ||
>   	    !info->orig_name || !info->target_name)
>   		return -EINVAL;
> -	if (!info->orig->has_conns_grp || !info->target->has_conns_grp)
> +	if (!info->orig->has_conns_grp)
>   		return -EINVAL;
> +	if (!info->target->has_conns_grp)
> +		return -EPROBE_DEFER;
>   
>   	/* first link orig->target */
>   	ret = sysfs_add_link_to_group(&info->orig->dev.kobj,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ