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]
Message-ID: <20241009001332.23353-1-jason.gerecke@wacom.com>
Date: Tue,  8 Oct 2024 17:13:32 -0700
From: "Gerecke, Jason" <killertofu@...il.com>
To: linux-kernel@...r.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>,
	Jiri Kosina <jikos@...nel.org>
Cc: Ping Cheng <pinglinux@...il.com>,
	"Tobita, Tatsunosuke" <tatsunosuke.tobita@...om.com>,
	Jason Gerecke <jason.gerecke@...om.com>,
	stable@...r.kernel.org
Subject: [PATCH] HID: wacom: Hardcode (non-inverted) AES pens as BTN_TOOL_PEN

From: Jason Gerecke <jason.gerecke@...om.com>

Unlike EMR tools which encode type information in their tool ID, tools
for AES sensors are all "generic pens". It is inappropriate to make use
of the wacom_intuos_get_tool_type function when dealing with these kinds
of devices. Instead, we should only ever report BTN_TOOL_PEN or
BTN_TOOL_RUBBER, as depending on the state of the Eraser and Invert
bits.

Fixes: 9c2913b962da ("HID: wacom: more appropriate tool type categorization")
Signed-off-by: Jason Gerecke <jason.gerecke@...om.com>
Cc: stable@...r.kernel.org
---
 drivers/hid/wacom_wac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 59a13ad9371cd..413606bdf476d 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2567,6 +2567,8 @@ static void wacom_wac_pen_report(struct hid_device *hdev,
 		/* Going into range select tool */
 		if (wacom_wac->hid_data.invert_state)
 			wacom_wac->tool[0] = BTN_TOOL_RUBBER;
+		else if (wacom_wac->features.quirks & WACOM_QUIRK_AESPEN)
+			wacom_wac->tool[0] = BTN_TOOL_PEN;
 		else if (wacom_wac->id[0])
 			wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]);
 		else
-- 
2.46.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ