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: <26dccbb9-59b0-3e77-5bec-ac1719962135@huawei.com>
Date:   Tue, 18 Jun 2019 17:08:09 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Marc Zyngier <marc.zyngier@....com>
CC:     Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        <linux-kernel@...r.kernel.org>, <guohanjun@...wei.com>
Subject: Re: [PATCH] irqchip/mbigen: stop printing kernel addresses



On 2019/6/18 16:42, Marc Zyngier wrote:
> On 18/06/2019 09:35, Kefeng Wang wrote:
>>
>>
>> On 2019/6/18 15:48, Marc Zyngier wrote:
>>> Hi Kefeng,
>>>
>>> On Tue, 18 Jun 2019 04:22:02 +0100,
>>> Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>>>>
>>>> After commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"),
>>>> it will print "____ptrval____" instead of actual addresses when mbigen
>>>> create domain fails,
>>>>
>>>>   Hisilicon MBIGEN-V2 HISI0152:00: Failed to create mbi-gen@(____ptrval____) irqdomain
>>>>   Hisilicon MBIGEN-V2: probe of HISI0152:00 failed with error -12
>>>>
>>>> Instead of changing the print to "%px", and leaking kernel addresses,
>>>> just remove the print completely.
>>>>
>>>> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
>>>> ---
>>>>  drivers/irqchip/irq-mbigen.c | 3 +--
>>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
>>>> index 98b6e1d4b1a6..d0cf596c801b 100644
>>>> --- a/drivers/irqchip/irq-mbigen.c
>>>> +++ b/drivers/irqchip/irq-mbigen.c
>>>> @@ -355,8 +355,7 @@ static int mbigen_device_probe(struct platform_device *pdev)
>>>>  		err = -EINVAL;
>>>>  
>>>>  	if (err) {
>>>> -		dev_err(&pdev->dev, "Failed to create mbi-gen@%p irqdomain",
>>>> -			mgn_chip->base);
>>>> +		dev_err(&pdev->dev, "Failed to create mbi-gen irqdomain");
>>>
>>> The alternative would be to print res as a resource, which would still
>>> help identifying the offending device by printing its physical
>>> layout, and still not reveal much.
>>
>> It's better to print res to show the physical layout, and add missing "\n",
>> will resend v2.
> 
> As Hanjun mentioned in a separate email, pdev->dev seems to be enough to
> identify which MBIGEN has failed to probe. So maybe all you need to do
> is to add the missing '\n', and tidy up the commit message to reflect that.

OK, done in v2.

> 
> Thanks,
> 
> 	M.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ