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: <5fef7241-bb87-54ed-2516-d3207334274d@samsung.com>
Date:   Wed, 08 Feb 2017 15:09:33 +0100
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Joerg Roedel <joro@...tes.org>
Cc:     Will Deacon <will.deacon@....com>,
        Robin Murphy <robin.murphy@....com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Alex Williamson <alex.williamson@...hat.com>,
        David Woodhouse <dwmw2@...radead.org>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        Joerg Roedel <jroedel@...e.de>,
        linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 09/10] iommu/exynos: Make use of iommu_device_register
 interface

Hi Joerg,

On 2017-02-08 14:57, Joerg Roedel wrote:
> On Tue, Feb 07, 2017 at 01:36:15PM +0100, Marek Szyprowski wrote:
>>> +	ret = iommu_device_sysfs_add(&data->iommu, &pdev->dev, NULL,
>>> +				     "sysmmu.%pa", &ioaddr);
>> Can we stick to the common name across the /sysfs and use
>> dev_name(data->sysmmu)
>> or even dev_name(dev) here?
>>
>> ret = iommu_device_sysfs_add(&data->iommu, &pdev->dev, NULL,
>> dev_name(dev));
> That means that we have multiple 'struct device' with the same name,
> no? I think will lead to confusion when using dev_printk, as its not
> clear anymore which device is refered to in the message.

Each sysmmu device has unique name, like every other platform device
instantiated from device tree. Here is an example from the OdroidXU3
(Exynos5422 based):

# ls -1 /sys/bus/platform/devices/ | grep sysmmu
10a60000.sysmmu
10a70000.sysmmu
11200000.sysmmu
11210000.sysmmu
11d40000.sysmmu
11f10000.sysmmu
11f20000.sysmmu
12880000.sysmmu
12890000.sysmmu
128a0000.sysmmu
128c0000.sysmmu
128d0000.sysmmu
128e0000.sysmmu
13e80000.sysmmu
13e90000.sysmmu
14640000.sysmmu
14650000.sysmmu
14680000.sysmmu

IMHO there is no need for open coding new unique names if device name,
which already contains the base address, can be used instead.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ