Text-based sysfs attributes are limited to a page, but udev receives
uevents through netlink, not sysfs.
The current limit on the environment of a uevent appears to be 2 KB
(UEVENT_BUFFER_SIZE defined in <linux/kobject.h>). That seems like it
*might* be easier to change, so long as user-space doesn't have a
similar limit.
I looked into systemd/udev, and it seems to use an 8 KB buffer for
receiving uevents:
https://sources.debian.org/src/systemd/247.9-1/src/libsystemd/sd-device/device-monitor.c/?hl=390#L390
But as a first step I think increasing the kernel buffer size to 4 KB
would be enough. Perhaps someone could test whether this patch to the
domU kernel makes udev happier:
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -30,7 +30,7 @@
#define UEVENT_HELPER_PATH_LEN 256
#define UEVENT_NUM_ENVP 64 /* number of env pointers */
-#define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */
+#define UEVENT_BUFFER_SIZE 4096 /* buffer for the variables */
#ifdef CONFIG_UEVENT_HELPER
/* path to the userspace helper executed on an event */
--- END ---
?
Ben.