Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-13 Thread Oleg Nesterov
On 05/11, Lucas De Marchi wrote: > > On Fri, May 10, 2013 at 2:10 PM, Oleg Nesterov wrote: > > > >> > -char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe"; > >> > +char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe -q --"; > > > > No. This is incompatible change, we shouldn't do this. > > But th

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-13 Thread Oleg Nesterov
On 05/10, Lucas De Marchi wrote: > > On Fri, May 10, 2013 at 2:35 PM, Oleg Nesterov wrote: > > On 05/10, Oleg Nesterov wrote: > >> > >> > > -char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe"; > >> > > +char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe -q --"; > >> > >> No. This is incompatibl

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-11 Thread Lucas De Marchi
On Fri, May 10, 2013 at 2:10 PM, Oleg Nesterov wrote: > On 05/10, Lucas De Marchi wrote: >> >> On Fri, May 10, 2013 at 12:36 PM, Oleg Nesterov wrote: >> > Well, personally I think it would be better to use kasprintf(), see the >> > patch I sent (it is actually wrong, needs kfree(args) before retu

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 2:35 PM, Oleg Nesterov wrote: > On 05/10, Oleg Nesterov wrote: >> >> On 05/10, Lucas De Marchi wrote: >> > >> > but I think it's a good tradeoff and covers other use cases as you >> > pointed out as well. >> >> OK, good. > > Yes, perhaps this makes sense anyway but... > >>

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Oleg Nesterov
On 05/10, Oleg Nesterov wrote: > > On 05/10, Lucas De Marchi wrote: > > > > but I think it's a good tradeoff and covers other use cases as you > > pointed out as well. > > OK, good. Yes, perhaps this makes sense anyway but... > > Ok. I'll give it a try. > > Please wait a bit, I'll send v2. See be

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Oleg Nesterov
On 05/10, Lucas De Marchi wrote: > > On Fri, May 10, 2013 at 12:36 PM, Oleg Nesterov wrote: > > Well, personally I think it would be better to use kasprintf(), see the > > patch I sent (it is actually wrong, needs kfree(args) before return). > > > > Or. How about the patch below? It should be spli

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 12:36 PM, Oleg Nesterov wrote: > On 05/10, Lucas De Marchi wrote: >> >> Oh, right. Forgot about that. And this patch set should have been sent >> as RFC, since I'm interested in feedback about the idea. What do you >> think? > > Well, personally I think it would be better t

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Oleg Nesterov
On 05/10, Lucas De Marchi wrote: > > Oh, right. Forgot about that. And this patch set should have been sent > as RFC, since I'm interested in feedback about the idea. What do you > think? Well, personally I think it would be better to use kasprintf(), see the patch I sent (it is actually wrong, ne

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Oleg Nesterov
On 05/10, Oleg Nesterov wrote: > > On 05/10, Lucas De Marchi wrote: > > > > -char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe -q --"; > > +char modprobe_path[KMOD_PATH_LEN] = CONFIG_DEFAULT_MODULE_LOAD_BIN; > > But even after 1/3 and 2/3 this can break free_modprobe_argv() ? > It assumes that ar

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 9:58 AM, Oleg Nesterov wrote: > > On 05/10, Lucas De Marchi wrote: > > > > -char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe -q --"; > > +char modprobe_path[KMOD_PATH_LEN] = CONFIG_DEFAULT_MODULE_LOAD_BIN; > > But even after 1/3 and 2/3 this can break free_modprobe_argv(

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Oleg Nesterov
On 05/10, Lucas De Marchi wrote: > > -char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe -q --"; > +char modprobe_path[KMOD_PATH_LEN] = CONFIG_DEFAULT_MODULE_LOAD_BIN; But even after 1/3 and 2/3 this can break free_modprobe_argv() ? It assumes that argv[3] is module_name. Oleg. -- To unsubscrib

[PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-09 Thread Lucas De Marchi
The hard-coded path of modprobe doesn't allow distros to put the binary in another place without add links from one place to another. For example, in recent versions of distros like Fedora, Arch and Suse, kmod is the default tool to load modules and they have to create a link from modprobe to kmod