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: <20210820174917.4emwkb75i2yydm7c@expel>
Date:   Fri, 20 Aug 2021 12:49:17 -0500
From:   Nishanth Menon <nm@...com>
To:     jing yangyang <cgel.zte@...il.com>
CC:     Tero Kristo <kristo@...nel.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-clk@...r.kernel.org>,
        jing yangyang <jing.yangyang@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] clk/keystone: fix application of sizeof to
 pointer

On 19:20-20210819, jing yangyang wrote:
> sizeof when applied to a pointer typed expression gives the size of
> the pointer.
> 
> ./drivers/clk/keystone/sci-clk.c:398:8-14: ERROR application of sizeof to pointer
> 
> This issue was detected with the help of Coccinelle.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@....com.cn>
> ---
>  drivers/clk/keystone/sci-clk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
> index 7e1b136..010a61a 100644
> --- a/drivers/clk/keystone/sci-clk.c
> +++ b/drivers/clk/keystone/sci-clk.c
> @@ -395,7 +395,7 @@ static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
>  	key.clk_id = clkspec->args[1];
>  
>  	clk = bsearch(&key, provider->clocks, provider->num_clocks,
> -		      sizeof(clk), _cmp_sci_clk);
> +		      sizeof(*clk), _cmp_sci_clk);

I am trying to understand this.. bsearch uses base + size to do
iteration, provider is sci_clk_provider ->num_clocks is struct sci_clk
** same as clk. iteration is done on provider->clocks .. not on *clk,
am I missing something? or is it one of those testing patches?

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ