> > > In other words: this fixes the mb_add_cmdline(kcmdline) case, and > > > doesn't break comma escaping on the initrd case (because it was > > > already broken). I don't see a problem with this patch. > > > > ... there is one case of comma escaping that wasn't broken: > > > > $ qemu-system-x86_64 -kernel foo -initrd '/tmp/one > > arg,,with,,commas,/tmp/another arg,,with,,commas' > > > > Oh, I didn't notice the whitespace-based split for initrd > arguments. > > This is messier than I thought. Maybe the simplest solution is to > inline mb_add_cmdline() at both callers, and change the kcmdline > one to use memcpy().
Yes, I agree. Paolo