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>] [day] [month] [year] [list]
Date:   Wed, 31 May 2017 17:42:06 +0800
From:   Lv Zheng <lv.zheng@...el.com>
To:     "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Len Brown <len.brown@...el.com>
Cc:     Lv Zheng <lv.zheng@...el.com>, Lv Zheng <zetalog@...il.com>,
        linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Peter Hutterer <peter.hutterer@...-t.net>
Subject: [RFC PATCH v4 3/5] ACPI: button: Add lid event type debugging messages

This patch adds very useful debugging information to lid events.
These messages and with ec_log_drv() can be used to demonstrate the order
between acpi_ec_resume() and acpi_button_resume().

Cc: Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc: Peter Hutterer <peter.hutterer@...-t.net>
Signed-off-by: Lv Zheng <lv.zheng@...el.com>
---
 drivers/acpi/button.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 36485cf..13b75e6 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -201,12 +201,17 @@ static int acpi_lid_notify_state(struct acpi_device *device,
 		if (!state) {
 			input_report_switch(button->input, SW_LID, state);
 			input_sync(button->input);
+			pr_debug("faked open complement event.\n");
 		}
 	}
 
 	/* Send the platform triggered reliable event */
 	input_report_switch(button->input, SW_LID, !state);
 	input_sync(button->input);
+	if (is_bios_event)
+		pr_debug("notified %s event.\n", state ? "open" : "close");
+	else
+		pr_debug("faked %s event.\n", state ? "open" : "close");
 	button->last_state = !!state;
 	button->last_time = ktime_get();
 	button->last_is_bios = is_bios_event;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ