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, 29 May 2020 14:14:22 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Michael Turquette <mturquette@...libre.com>,
        Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH v4 1/2] clk: hisilicon: Use correct return value about hisi_reset_init()

Quoting Tiezhu Yang (2020-05-29 03:20:11)
> On 05/29/2020 05:36 PM, Stephen Boyd wrote:
> > Quoting Tiezhu Yang (2020-05-28 23:44:20)
> >> On 05/29/2020 12:31 PM, Stephen Boyd wrote:
> >>> Quoting Tiezhu Yang (2020-05-28 21:02:05)
> >>> I think you didn't understand my question. I'm asking where is this
> >>> patch applied to the kernel and what commit is it? I don't see it in the
> >>> clk tree.
> >> Sorry for that, actually I do not quite understand what you mean.
> >>
> >> In my opinion, after the following commit,  when devm_ioremap_resource()
> >> is called in hisi_reset_init(), hisi_reset_init() still returns NULL and
> >> it only returns
> >> -ENOMEM when call hisi_reset_init() failed, I think it may returns
> >> -EINVAL, -EBUSY
> >> or -ENOMEM if failed, this is what I want to fix.
> >>
> >> "reset: hisilicon: fix potential NULL pointer dereference"
> >> https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/commit/drivers/clk/hisilicon/reset.c?h=clk-next&id=e9a2310fb689151166df7fd9971093362d34bd79
> >>
> > This commit doesn't change the value that is returned by
> > hisi_reset_init() on an error. It still returns NULL when an error
> > happens.
> 
> Yes, I agree, but after this commit e9a2310fb689 ("reset:
> hisilicon: fix potential NULL pointer dereference"), the
> return value of hisi_reset_init() is not so correct because
> it replaces devm_ioremap() with devm_ioremap_resource().

Where does the return value of hisi_reset_init() change in that commit?
The usage of devm_ioremap_resource() vs. devm_ioremap() doesn't change
the return value of hisi_reset_init().

> 
> Do you think the code of this patch is OK but the "Fixes:" commit
> is not accurate? If so, can we remove the "Fixes:" tag?
> 

No. The patch is incorrect and the Fixes tag is incorrect.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ