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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Apr 2018 14:06:47 -0400
From:   "Hook, Gary" <ghook@....com>
To:     Robin Murphy <robin.murphy@....com>,
        "Mehta, Sohil" <sohil.mehta@...el.com>,
        "gary.hook@....com" <gary.hook@....com>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU

On 4/17/2018 1:55 PM, Robin Murphy wrote:
> On 17/04/18 18:36, Hook, Gary wrote:
>> On 4/13/2018 7:55 PM, Mehta, Sohil wrote:
>>> On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote:
>>>> +struct dentry *iommu_debugfs_setup(void)
>>>> +{
>>>> +    if (!debugfs_initialized())
>>>
>>> This check is probably not needed.
>>
>> Ah, so it isn't. Thank you.
>>
>>>
>>>> +        return NULL;
>>>> +
>>>> +    if (!iommu_debugfs_dir)
>>>> +        iommu_debugfs_dir = debugfs_create_dir("iommu",
>>>> NULL);
>>>> +
>>>> +    if (iommu_debugfs_dir)
>>>> +        pr_warn("WARNING: IOMMU DEBUGFS SUPPORT HAS BEEN
>>>> ENABLED IN THIS KERNEL\n");
>>>> +
>>>
>>> As this gets called for each IOMMU, do you want to use pr_warn_once?
>>
>> That works, yes.
> 
> Or I guess you could just roll the pr_warn() into the previous if() 
> condition, i.e. only warn when the singleton debugfs_dir is actually 
> created.

That makes more sense for a code path this isn't going to be hit more 
than a few times at most.

> 
> Robin.
> 
>>
>>>
>>>> +    return iommu_debugfs_dir;
>>>> +}
>>>> +EXPORT_SYMBOL_GPL(iommu_debugfs_setup);
>>>
>>> -Sohil
>>>
>>
>> _______________________________________________
>> iommu mailing list
>> iommu@...ts.linux-foundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/iommu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ