* [Buildroot] [PATCH v2] busybox: S01mdev: fix module autoloading
@ 2018-05-07 18:35 Peter Korsgaard
2018-05-08 13:04 ` Thomas Petazzoni
2018-05-24 21:06 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-05-07 18:35 UTC (permalink / raw)
To: buildroot
Commit b4fc5a180c (package/busybox: support spaces in module aliases in
mdev) changed the mdev coldplugging to handle sysfs path elements and
modalias values containing spaces. This unfortunately doesn't work as was
recently reported:
http://lists.busybox.net/pipermail/buildroot/2018-May/220903.html
The problem is that sort -z also expects the fields of the input files to be
zero terminated, which is not the case for modalias sysfs entries.
So drop the -z option to sort. Spaces in modalias entries could be handled
with the xargs -d '\n' option, but that is unfortunately not supported by
the busybox applet. Instead, use tr to convert newlines to zeros so we can
use xargs -0.
Reported-by: Daniel Palmer <daniel@0x0f.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/busybox/S10mdev | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev
index 63ca955b1c..7075b77016 100644
--- a/package/busybox/S10mdev
+++ b/package/busybox/S10mdev
@@ -9,7 +9,8 @@ case "$1" in
echo /sbin/mdev >/proc/sys/kernel/hotplug
/sbin/mdev -s
# coldplug modules
- find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq
+ find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \
+ xargs -0 modprobe -abq
;;
stop)
;;
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] busybox: S01mdev: fix module autoloading
2018-05-07 18:35 [Buildroot] [PATCH v2] busybox: S01mdev: fix module autoloading Peter Korsgaard
@ 2018-05-08 13:04 ` Thomas Petazzoni
2018-05-24 21:06 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-05-08 13:04 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 7 May 2018 20:35:01 +0200, Peter Korsgaard wrote:
> Commit b4fc5a180c (package/busybox: support spaces in module aliases in
> mdev) changed the mdev coldplugging to handle sysfs path elements and
> modalias values containing spaces. This unfortunately doesn't work as was
> recently reported:
>
> http://lists.busybox.net/pipermail/buildroot/2018-May/220903.html
>
> The problem is that sort -z also expects the fields of the input files to be
> zero terminated, which is not the case for modalias sysfs entries.
>
> So drop the -z option to sort. Spaces in modalias entries could be handled
> with the xargs -d '\n' option, but that is unfortunately not supported by
> the busybox applet. Instead, use tr to convert newlines to zeros so we can
> use xargs -0.
>
> Reported-by: Daniel Palmer <daniel@0x0f.com>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
> package/busybox/S10mdev | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] busybox: S01mdev: fix module autoloading
2018-05-07 18:35 [Buildroot] [PATCH v2] busybox: S01mdev: fix module autoloading Peter Korsgaard
2018-05-08 13:04 ` Thomas Petazzoni
@ 2018-05-24 21:06 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-05-24 21:06 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> Commit b4fc5a180c (package/busybox: support spaces in module aliases in
> mdev) changed the mdev coldplugging to handle sysfs path elements and
> modalias values containing spaces. This unfortunately doesn't work as was
> recently reported:
> http://lists.busybox.net/pipermail/buildroot/2018-May/220903.html
> The problem is that sort -z also expects the fields of the input files to be
> zero terminated, which is not the case for modalias sysfs entries.
> So drop the -z option to sort. Spaces in modalias entries could be handled
> with the xargs -d '\n' option, but that is unfortunately not supported by
> the busybox applet. Instead, use tr to convert newlines to zeros so we can
> use xargs -0.
> Reported-by: Daniel Palmer <daniel@0x0f.com>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Committed to 2018.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-24 21:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 18:35 [Buildroot] [PATCH v2] busybox: S01mdev: fix module autoloading Peter Korsgaard
2018-05-08 13:04 ` Thomas Petazzoni
2018-05-24 21:06 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.