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-next>] [day] [month] [year] [list]
Date:   Sun, 10 Jul 2022 19:40:26 +0300
From:   Roman Stratiienko <r.stratiienko@...il.com>
To:     linux-pm@...r.kernel.org
Cc:     rafael@...nel.org, daniel.lezcano@...aro.org, amitk@...nel.org,
        rui.zhang@...el.com, linux-kernel@...r.kernel.org, megi@....cz,
        Roman Stratiienko <r.stratiienko@...il.com>
Subject: [RFC] thermal/core: Disable uevent messages for cooling devices

During suspend, the big CPU cluster is turned off first while a little
is still running. This forcibly unregisters the cooling device which
sends a "REMOVE" uevent to all subscribers [1].

In case userspace netlink subscriber has set the EPOLLWAKEUP flag, a
wakeup event is triggered that causes suspend to be aborted.

Without this change, suspend doesn't work on PinePhone PRO with AOSP
userland.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5c238a8b599f1ae25eaeb08ad0e9e13e2b9eb023
Signed-off-by: Roman Stratiienko <r.stratiienko@...il.com>
---
 drivers/thermal/thermal_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index cdc0552e8c42e..e6b21f2792a85 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -925,6 +925,7 @@ __thermal_cooling_device_register(struct device_node *np,
 	cdev->device.class = &thermal_class;
 	cdev->devdata = devdata;
 	thermal_cooling_device_setup_sysfs(cdev);
+	dev_set_uevent_suppress(&cdev->device, true);
 	ret = device_register(&cdev->device);
 	if (ret)
 		goto out_kfree_type;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ