mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* mei modalias files missing device name and newline
@ 2025-01-20 23:30 Daniel Lewart
  2025-01-21  8:04 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Lewart @ 2025-01-20 23:30 UTC (permalink / raw)
  To: Alexander Usyskin, Arnd Bergmann, Greg Kroah-Hartman
  Cc: linux-kernel, Petter Reinholdtsen

mei modalias files are missing the following:
  * device name (cldev->name)
  * trailing newline

Original Debian bug:
  #1091997 - isenkram: Documentation for locating all modalias strings is incorrect
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091997

I couldn't find any documentation that modalias files require a newline,
but all non-mei files do.

$ lspci -s 00:16.0 -v
00:16.0 Communication controller: Intel Corporation Alder Lake PCH HECI Controller (rev 01)
	DeviceName: Onboard - Other
	Subsystem: Micro-Star International Co., Ltd. [MSI] Alder Lake PCH HECI Controller
	Flags: bus master, fast devsel, latency 0, IRQ 138, IOMMU group 8
	Memory at 6001145000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: mei_me
	Kernel modules: mei_me

$ find /sys/devices -name modalias -print0 | xargs -0 file | \
	sed -n 's/: *ASCII text, with no line terminators$//p' | \
	sort | xargs head

==> pci0000:00/0000:00:16.0/0000:00:16.0-082ee5a7-7c25-470a-9643-0c06f0466ea1/modalias <==
mei::082ee5a7-7c25-470a-9643-0c06f0466ea1:00:
==> pci0000:00/0000:00:16.0/0000:00:16.0-309dcde8-ccb1-4062-8f78-600115a34327/modalias <==
mei::309dcde8-ccb1-4062-8f78-600115a34327:01:
==> pci0000:00/0000:00:16.0/0000:00:16.0-3c4852d6-d47b-4f46-b05e-b5edc1aa440e/modalias <==
mei::3c4852d6-d47b-4f46-b05e-b5edc1aa440e:01:
==> pci0000:00/0000:00:16.0/0000:00:16.0-42b3ce2f-bd9f-485a-96ae-26406230b1ff/modalias <==
mei::42b3ce2f-bd9f-485a-96ae-26406230b1ff:01:
==> pci0000:00/0000:00:16.0/0000:00:16.0-55213584-9a29-4916-badf-0fb7ed682aeb/modalias <==
mei::55213584-9a29-4916-badf-0fb7ed682aeb:02:
==> pci0000:00/0000:00:16.0/0000:00:16.0-5565a099-7fe2-45c1-a22b-d7e9dfea9a2e/modalias <==
mei::5565a099-7fe2-45c1-a22b-d7e9dfea9a2e:01:
==> pci0000:00/0000:00:16.0/0000:00:16.0-6861ec7b-d07a-4673-856c-7f22b4d55769/modalias <==
mei::6861ec7b-d07a-4673-856c-7f22b4d55769:02:
==> pci0000:00/0000:00:16.0/0000:00:16.0-8c2f4425-77d6-4755-aca3-891fdbc66a58/modalias <==
mei::8c2f4425-77d6-4755-aca3-891fdbc66a58:01:
==> pci0000:00/0000:00:16.0/0000:00:16.0-8e6a6715-9abc-4043-88ef-9e39c6f63e0f/modalias <==
mei::8e6a6715-9abc-4043-88ef-9e39c6f63e0f:02:
==> pci0000:00/0000:00:16.0/0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04/modalias <==
mei::b638ab7e-94e2-4ea2-a552-d1c54b627f04:01:
==> pci0000:00/0000:00:16.0/0000:00:16.0-dba4d603-d7ed-4931-8823-17ad585705d5/modalias <==
mei::dba4d603-d7ed-4931-8823-17ad585705d5:01:
==> pci0000:00/0000:00:16.0/0000:00:16.0-dd17041c-09ea-4b17-a271-5b989867ec65/modalias <==
mei::dd17041c-09ea-4b17-a271-5b989867ec65:02:
==> pci0000:00/0000:00:16.0/0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1/modalias <==
mei::fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1:01:

Below is a patch for Linux kernel 6.13 which provides the missing newline.
I don't know how to provide the missing device name.

This is my first Linux kernel bug report.
Please let me know what other information would be helpful.

Thank you!
Daniel Lewart
Urbana, Illinois
---
diff -ru a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
--- a/drivers/misc/mei/bus.c	2025-01-19 17:51:45.000000000 -0600
+++ b/drivers/misc/mei/bus.c	2025-01-20 00:00:00.000000000 -0600
@@ -1239,7 +1239,7 @@
 	const uuid_le *uuid = mei_me_cl_uuid(cldev->me_cl);
 	u8 version = mei_me_cl_ver(cldev->me_cl);
 
-	return scnprintf(buf, PAGE_SIZE, "mei:%s:%pUl:%02X:",
+	return scnprintf(buf, PAGE_SIZE, "mei:%s:%pUl:%02X:\n",
 			 cldev->name, uuid, version);
 }
 static DEVICE_ATTR_RO(modalias);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-21  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-20 23:30 mei modalias files missing device name and newline Daniel Lewart
2025-01-21  8:04 ` Greg Kroah-Hartman
2025-01-21  8:20   ` Petter Reinholdtsen
2025-01-21  8:22     ` Greg Kroah-Hartman
2025-01-21  9:02       ` Petter Reinholdtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®