Skip to contentSkip to conversation

mod_devicetable: Bump auxiliary_device_id name size

PATCH Superseded Raag Jadav 3 participants 4 messages Oct 31, 2025 – Nov 3, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Raag Jadav

author
#0 lore raw

PATCH 1/1 mod_devicetable: Bump auxiliary_device_id name size

Since auxiliary device id string is formed using the combination of parent and child device names, it may require more than 32 bytes if both the names are long enough. Bump the size to 40 bytes to satisfy such cases.

---
Triggered by [1].

[1] https://lore.kernel.org/r/[email protected]

 include/linux/mod_devicetable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mod_devicetable.h +1 -1
index 6077972e8b45..24eb5a88a5c5 100644
@@ -867,7 +867,7 @@ struct mhi_device_id {
 	kernel_ulong_t driver_data;
 };
 
-#define AUXILIARY_NAME_SIZE 32
+#define AUXILIARY_NAME_SIZE 40
 #define AUXILIARY_MODULE_PREFIX "auxiliary:"
 
 struct auxiliary_device_id {
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Raag Jadav

Since auxiliary device id string is formed using the combination of parent and child device names, it may require more than 32 bytes if both the names are long enough. Bump the size to 40 bytes to satisfy such cases.

What in-kernel users need such a larger name? If we allow larger names, people will try to do crazy things and use memory addresses in them (has happened already...)

Quoted 6 lines

---
Triggered by [1].

[1] https://lore.kernel.org/r/[email protected]

How long would this driver submission's name be? I couldn't figure it out, and really, any device with a huge name is going to be a pain...

thanks,

greg k-h

#2 lore raw
Quoted 14 lines · Greg KH
Quoted 3 lines · Raag Jadav

Since auxiliary device id string is formed using the combination of parent and child device names, it may require more than 32 bytes if both the names are long enough. Bump the size to 40 bytes to satisfy such cases.

What in-kernel users need such a larger name? If we allow larger names, people will try to do crazy things and use memory addresses in them (has happened already...)

Quoted 5 lines

---
Triggered by [1].

Quoted 4 lines
Quoted 1 line

[1] https://lore.kernel.org/r/[email protected]

How long would this driver submission's name be? I couldn't figure it out, and really, any device with a huge name is going to be a pain...

Right, Raag, please describe a use case.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#3 lore raw
Quoted 15 lines · Andy Shevchenko
Quoted 14 lines · Greg KH
Quoted 3 lines · Raag Jadav

Since auxiliary device id string is formed using the combination of parent and child device names, it may require more than 32 bytes if both the names are long enough. Bump the size to 40 bytes to satisfy such cases.

What in-kernel users need such a larger name? If we allow larger names, people will try to do crazy things and use memory addresses in them (has happened already...)

Quoted 5 lines

---
Triggered by [1].

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

[1] https://lore.kernel.org/r/[email protected]

How long would this driver submission's name be? I couldn't figure it out, and really, any device with a huge name is going to be a pain...

Right, Raag, please describe a use case.

The driver linked above compiles to intel_ehl_pse_io, so the child will match against "intel_ehl_pse_io.gpio-elkhartlake" which is 34 bytes (including termination).

Would that be sufficient or did I miss something?

Raag