yiding_wang@agilent.com wrote: > I am using moudle-init-tools-3.1-pre6 with kernel 2.6.9. The new insmod seems have restrictions which failed using parameters to load a driver module. > > My module parameter is in the form of modname="*************** ****", a quite long one. > Run - insmod modname.o modname="*********** *******" (with a script), it complains about the space and treats the string next to the space to be a "Unknown parameter". > > By replacing the space with any character, then it complains > "modname: string parameter too long" Patch for that one is attached. It might be overkill, but it works with this patch (as long as parameter value length is <= 1024 -- not that I tried one of that length). Rusty or anyone else, where do the quotes come from? Here's what I enter: insmod test_module modprm="this test" but the kernel sees this parameter string: "modprm=this test" (with the quotation marks). Who/what moved the quotation marks? Is bash doing any of that? I don't see it in insmod or modprobe (with a quick look). > Reducing the length of the parameter to less than 1k character works fine. Right, parameter value length cannot be > 1024. > Same long parameter string wit space in between works fine under 2.4.25 with original insmod. > > Questions: > 1, Is this a bug or new insmod has restrictions? The limit is actually in linux/kernel/params.c, not in insmod. It seems a little arbitrary, but a parameter that long also seems quite excessive. Just break it into multiple parameters. > 2, If it is restriction on special character such as space, or limitation on parameter length, then why and what is the limit? Just 1024 bytes in total length. > 3, If insmod has limitation, then what is better way to pass long parameter with some special character? Just break it into multiple parameters.... -- ~Randy