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: <ef63bd8c-1797-cbf7-5c9e-ee2855c9e395@samsung.com>
Date:   Tue, 20 Sep 2016 10:51:13 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Tobias Jakobi <tjakobi@...h.uni-bielefeld.de>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        iommu@...ts.linux-foundation.org,
        linux-samsung-soc@...r.kernel.org,
        "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Joerg Roedel <joro@...tes.org>, Inki Dae <inki.dae@...sung.com>,
        Kukjin Kim <kgene@...nel.org>,
        Krzysztof Kozlowski <k.kozlowski@...sung.com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Mark Brown <broonie@...nel.org>,
        "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Tomeu Vizoso <tomeu.vizoso@...labora.com>,
        Lukas Wunner <lukas@...ner.de>,
        Kevin Hilman <khilman@...nel.org>
Subject: Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device
 dependencies)

Hi All,

On 2016-09-19 23:45, Tobias Jakobi wrote:
> I did some tests with the new version today. Sadly the reboot/shutdown
> issues are still present.

Thanks for the report. I've managed to reproduce this issue and it is again
caused by modifying device on devices_kset list before it will be finally
added by device_add(). I thought that the new patchset allows creating links
to a device, which has not been yet added to system device list.

Rafael:
What is your opinion? Should it be allowed to create a link to device, which
has not yet been added to system device list by device_add()? My code 
used to
do that, because IOMMUs are configured from 
of_platform_device_create_pdata()
of_dma_configure() of_iommu_configure(), which happens before device_add().

To solve the reported corruption of devices_kset list, following change is
needed:

diff --git a/drivers/base/core.c b/drivers/base/core.c
index aa8196508db9..4542ba9f60d4 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1039,11 +1039,18 @@ static void devices_kset_move_after(struct 
device *deva, struct device *devb)
   */
  void devices_kset_move_last(struct device *dev)
  {
+       struct device *d;
+
         if (!devices_kset)
                 return;
         pr_debug("devices_kset: Moving %s to end of list\n", 
dev_name(dev));
         spin_lock(&devices_kset->list_lock);
-       list_move_tail(&dev->kobj.entry, &devices_kset->list);
+       list_for_each_entry(d, &devices_kset->list, kobj.entry) {
+               if (d == dev) {
+                       list_move_tail(&dev->kobj.entry, 
&devices_kset->list);
+                       break;
+               }
+       }
         spin_unlock(&devices_kset->list_lock);
  }


If you think that links can be created only to a device, which has been 
fully
added to the system, I will register a bus notifier and create a link on 
consumers
device probe then.

[...]

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ