Re: [RFC PATCH] Allow optional module parameters

2013-03-19 Thread Lucas De Marchi
> > On balance, it's probably better to warn, and load the module anyway. However loading the module anyway would bring at least one drawback: if the user made a typo when passing the option the module would load anyway and he will probably not even look in the log, since there's was n

Re: control on cpu/core

2013-04-05 Thread Lucas De Marchi
27;m CCing LKML to broaden your audience. linux-modu...@vger.kernel.org is really low traffic and mostly intended for the module loading/removal process, not really about writing modules. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mes

[PATCH] usermodehelper: Fix -ENOMEM return logic

2013-02-25 Thread Lucas De Marchi
call the cleanup function in case retval == -ENOMEM and also the callers to actually check the return value of this function. Signed-off-by: Lucas De Marchi --- kernel/kmod.c | 9 +++-- security/keys/request_key.c | 10 +++--- 2 files changed, 14 insertions(+), 5 deletions

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-02-25 Thread Lucas De Marchi
On Mon, Feb 25, 2013 at 1:06 PM, Oleg Nesterov wrote: > On 02/25, Lucas De Marchi wrote: >> >> Callers of call_usermodehelper_fns() should check the return value and >> free themselves the data passed if the return is -ENOMEM. This is >> because the subprocess_info is

Re: Regression with orderly_poweroff()

2013-03-12 Thread Lucas De Marchi
sermodehelper_fns() and export call_usermodehelper_{setup,exec}. Doing this we can separate the allocation part using GFP_ATOMIC in order to make it work on interrupt context. May I suggest going with something like below after that patches are applied (sorry, whitespace damaged)? I can also rework the p

Re: [PATCH v3 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-12 Thread Lucas De Marchi
On Tue, Mar 12, 2013 at 5:31 PM, Andrew Morton wrote: > On Mon, 11 Mar 2013 21:48:06 -0300 Lucas De Marchi > wrote: > >> call_usermodehelper_setup() + call_usermodehelper_exec() need to be >> called instead of call_usermodehelper_fns() when the cleanup function >> n

Re: [PATCH 0/1] poweroff: change orderly_poweroff() to use schedule_work()

2013-03-13 Thread Lucas De Marchi
s is correct... > > > Lucas, Andrew, sorry. If this patch will be applied, then > > kernel-sysc-use-the-simpler-call_usermodehelper.patch No problem for me... your patch already does what this one is doing. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC] module: signature infrastructure

2012-09-04 Thread Lucas De Marchi
char *sig = NULL; > + > + /* This is not a valid module: ELF header is larger anyway. */ > + if (*len < sizeof(MODULE_SIG_STRING)) > + return -ENOEXEC; > + > + for (i = 0; i < *len - (sizeof(MODULE_SIG_STRING)-1); i++) { > +

Re: [PATCH 2/2] module: wait when loading a module which is currently initializing.

2012-09-14 Thread Lucas De Marchi
failed to initialize for some reason). It's also > consistent with what we do for dependent modules which are still loading. > > Suggested-by: Lucas De Marchi > Signed-off-by: Rusty Russell > --- > kernel/module.c | 28 ++-- > 1 file changed, 26

Re: [PATCH 1/2] module: fix symbol waiting when module fails before init

2012-09-14 Thread Lucas De Marchi
module_wq); > blocking_notifier_call_chain(&module_notify_list, > MODULE_STATE_LIVE, mod); > > @@ -3071,6 +3070,7 @@ SYSCALL_DEFINE3(init_module, void __user > mod->init_ro_size = 0; > mod->init_text_size = 0; &

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Lucas De Marchi
g entirely for the synchronous firmware loading case. This would break non-udev users with different paths. Namely Android, which uses /system/etc/firmware and /system/vendor/firmware (not sure about them though, I'm not keen on Android camp) So maintaining the fallback or adding a configu

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Lucas De Marchi
model. They wanted to pass a fd instead of a buffer. That is being done in the new finit_module syscall being discussed: http://www.gossamer-threads.com/lists/linux/kernel/1592271?do=post_view_flat Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-22 Thread Lucas De Marchi
> int err; > struct load_info info = { }; > @@ -3269,13 +3281,17 @@ SYSCALL_DEFINE2(finit_module, int, fd, const char > __user *, uargs) > if (err) > return err; > > - pr_debug("finit_module: fd=%d, uargs=%p\n", fd, uargs); &

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-22 Thread Lucas De Marchi
On Tue, Oct 23, 2012 at 1:40 AM, Kees Cook wrote: > On Mon, Oct 22, 2012 at 7:37 PM, Lucas De Marchi > wrote: >> On Mon, Oct 22, 2012 at 5:39 AM, Rusty Russell wrote: >>> "Michael Kerrisk (man-pages)" writes: >>>>> FIX: add flags arg to sys_finit_

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-23 Thread Lucas De Marchi
On Tue, Oct 23, 2012 at 1:42 PM, Kees Cook wrote: > On Mon, Oct 22, 2012 at 9:08 PM, Lucas De Marchi > wrote: >> On Tue, Oct 23, 2012 at 1:40 AM, Kees Cook wrote: >>> On Mon, Oct 22, 2012 at 7:37 PM, Lucas De Marchi >>> wrote: >>>> On Mon, Oct 22, 2

Re: [Request for review] Revised delete_module(2) manual page

2012-10-23 Thread Lucas De Marchi
odprobe (because of -r flag), not lsmod. The rest looks good. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Drop support to compressed modules?

2012-09-21 Thread Lucas De Marchi
have these numbers? About the bug, I think it's fixed in http://www.spinics.net/lists/linux-modules/msg00846.html. Need to test a bit more before rolling out a new release. Regards, Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: [PATCH] modules: add support for soft module dependencies

2013-09-17 Thread Lucas De Marchi
On Thu, Sep 12, 2013 at 9:07 PM, Rusty Russell wrote: > Lucas De Marchi writes: >> On Wed, Jul 24, 2013 at 11:03 PM, Herbert Xu >> wrote: >>> On Thu, Jul 25, 2013 at 09:32:02AM +0930, Rusty Russell wrote: >>>> Herbert Xu writes: >>>> > Hi Rus

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-17 Thread Lucas De Marchi
On Mon, Sep 16, 2013 at 12:47 AM, Rusty Russell wrote: > Lucas De Marchi writes: >> On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell wrote: >>> Peter Chen writes: >>>> Currently, if module's refcount is not zero during the unload, >>>> it wai

Re: [PATCH] modules: add support for soft module dependencies

2013-09-17 Thread Lucas De Marchi
On Tue, Sep 17, 2013 at 11:10 PM, Rusty Russell wrote: > Lucas De Marchi writes: >> On Thu, Sep 12, 2013 at 9:07 PM, Rusty Russell wrote: >>> Lucas De Marchi writes: >>>> On Wed, Jul 24, 2013 at 11:03 PM, Herbert Xu >>>> wrote: >>>>>

Re: [PATCH] depmod: warn on invalid devname specification

2013-09-09 Thread Lucas De Marchi
e (%s) but " > + "lacks major and minor information. " > + "Ignoring.\n", mod->modname, devname); > } > } > > -- Patch has been applied. Thanks. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] modules: add support for soft module dependencies

2013-09-10 Thread Lucas De Marchi
from kernel itself. However looking at the only user right now, crct10dif: couldn't we detect at runtime if this module can be used instead of just trying to load it as a pre softdep and possibly failing? Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] usb: ohci/uhci - add soft dependencies on ehci_hcd

2013-09-10 Thread Lucas De Marchi
ly cause ehci-hcd to be unloaded also? Or would unloading >> ehci-hcd cause ohci-hcd to be unloaded? > > No, unloading does not care about dependencies. modprobe -r will remove then as well, in the opposite order, i.e. post softdep, module, pre softdep. However this applies only to modprobe, not to the related function in libkmod since it would be weird to other programs using this library function. Try playing with this in /etc/modprobe.d/bla.conf (and replace echo with whatever unknown command to test a failure scenario): install bla echo install bla remove bla echo remove bla softdep sr_mod pre: bla Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-12 Thread Lucas De Marchi
and if anyone tries to use we force a 10s delay on module removal. So far nobody complained. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: Potential use-after-free in ____call_usermodehelper

2013-09-03 Thread Lucas De Marchi
nalysis. yes... the VFORK here is what you were missing. > > >>> >> 2. When wait=UMH_NO_WAIT, __call_usermodehelper() starts child thread >>> >> and instantly frees subprocess_info. The child thread reads >>> >> subprocess_info. Looks like another use-afte

Re: A workaround for request_firmware() stuck in module_init

2012-09-05 Thread Lucas De Marchi
crazy things and like start daemons as modprobe's install rules. And that's true even with old module-init-tools. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: A workaround for request_firmware() stuck in module_init

2012-09-05 Thread Lucas De Marchi
the rule in stone: *don't call request_firmware from init_module, instead give the name of the firmware*. I even see drivers whose only purpose is to load the firmware and change the PID so it's handled by another module (like drivers/bluetooth/bcm203x.c) to be simplified by some extent.

Re: [RFC] module: signature infrastructure

2012-09-05 Thread Lucas De Marchi
On Tue, Sep 4, 2012 at 9:19 PM, Rusty Russell wrote: > Lucas De Marchi writes: >> Hi Rusty, >> >> On Tue, Sep 4, 2012 at 2:55 AM, Rusty Russell wrote: >>> @@ -2399,7 +2437,50 @@ static inline void kmemleak_load_module(const struct >>> module *mod, >&g

[ANNOUNCE] kmod 10

2012-09-06 Thread Lucas De Marchi
blacklisted modules. Other than that, improvements to testsuite and man pages. I also re-licensed the testsuite as LGPL. If anyone wants to use in his own project and LGPL doesn't fit your needs, let me know. Shortlog is below Cheers! Lucas De Marchi --- Colin Walters (1): build-sys: Add --di

Re: [ANNOUNCE] kmod 10

2012-10-08 Thread Lucas De Marchi
On Sun, Sep 16, 2012 at 11:34 PM, Jan Engelhardt wrote: > > On Thursday 2012-09-06 21:37, Lucas De Marchi wrote: >> >>kmod 10 is out: >> >>ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-10.tar.xz >>ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-1

Re: [ANNOUNCE] kmod 10

2012-10-08 Thread Lucas De Marchi
On Mon, Sep 17, 2012 at 12:15 AM, Bruce Dubbs wrote: > Jan Engelhardt wrote: >> >> >> On Thursday 2012-09-06 21:37, Lucas De Marchi wrote: >>> >>> >>> kmod 10 is out: >>> >>> ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-1

[ANNOUNCE] kmod 12

2012-12-04 Thread Lucas De Marchi
report of "modprobe -f" failing, yet before this release it was not working properly. Maybe people are not tainting their kernel as frequently as I imagined. Shortlog is below. Cheers Lucas De Marchi --- Aleksey Makarov (1): fix is_module_filename() Lucas De Marchi (7): dep

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-17 Thread Lucas De Marchi
int err; > struct load_info info = { }; > @@ -3269,7 +3269,11 @@ SYSCALL_DEFINE2(finit_module, int, fd, const char > __user *, uargs) > if (err) > return err; > > - pr_debug("finit_module: fd=%d, uargs=%p\n", fd, uargs); > +

[ANNOUNCE] kmod 11

2012-11-07 Thread Lucas De Marchi
re details on changes. Shortlog is below. Cheers! Lucas De Marchi --- Dave Reisner (5): Revert "build-sys: disable jobserver for rootfs target" Define rootfs as dependency of check-am Makefile: remove redundant flags to $(RM) modinfo: clarify verbiage for field s

[ANNOUNCE] kmod 14

2013-07-03 Thread Lucas De Marchi
s to everyone involved in this release. Shortlog is below. Cheers Lucas De Marchi --- Chengwei Yang (2): Several minor fixes for documentation Add document for exported enums Jan Luebbe (1): libkmod: Avoid calling syscall() with -1 Johannes Berg (1): modprobe: don

Re: [RFC PATCH] Allow optional module parameters

2013-07-03 Thread Lucas De Marchi
ding at boot. It may be worth adding a more >> intentional way to do that. > > Hm, right, there seems to be no clean way to achieve this via a > commandline argument. Maybe define a magic module option to tell the > module loader not to load a module? modprobe.blacklist=modname

module refcnt underflow

2013-06-26 Thread Lucas De Marchi
en such a value so I guess it might be difficult to reproduce it again. Any hints on what could cause decs to be greater than incs in module_refcount()? -- Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to major

Re: [PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-25 Thread Lucas De Marchi
-ENOMEM;-) Yep, it's in -mm with -ENOMEM: http://git.cmpxchg.org/?p=linux-mmotm.git;a=commitdiff;h=a8c67c6e380a8ff15997e8673e97d9fcdf7b8f9c Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kerne

Re: [BUG] 3.10.[01] modprobe snd-... hangs

2013-07-15 Thread Lucas De Marchi
o blame in the changes for the past releases. Any chance a bad entry in your .conf was added too? You may want to paste the output of modprobe -c, at least until "# End of configuration files. Dumping indexes now:" > > On my systems, that's snd-seq-dummy, which depends on snd_seq.

Re: [alsa-devel] [BUG] 3.10.[01] modprobe snd-... hangs

2013-07-16 Thread Lucas De Marchi
n able to reducte the number of processes to get a full > trace; see attached file. > > Please note that in this case the proprietary "nvidia" module was loaded, > since I currently onyl have remove access to the machine. > The original trace from yesterday happend withou

[ANNOUNCE] kmod 15

2013-08-22 Thread Lucas De Marchi
o the library is kind of an workaround for people doing initrd needing their tools to be statically linked. As usual, shortlog is below. Cheers Lucas De Marchi --- Jan Engelhardt (1): depmod: add missing "else" clause Lucas De Marchi (15): tools: Do not link dynamical

Re: [PATCH] depmod: add missing "else" clause

2013-08-09 Thread Lucas De Marchi
ERR("unsupported file mode %s: %#x\n", path, st.st_mode); > return -EINVAL; > } > -- Applied, thanks. Please make sure to CC linux-modu...@vger.kernel.org Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
aram=1? I guess we need to update kmod then, because currently we ignore and treat this case as a wrong token. From a quick look, allowing it in kmod would be as simple as removing a condition check. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&quo

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
On Tue, Aug 13, 2013 at 10:00 PM, Lucas De Marchi wrote: > On Tue, Aug 13, 2013 at 9:17 PM, Steven Rostedt wrote: >> On Tue, 13 Aug 2013 20:34:58 -0300 >> Lucas De Marchi wrote: >> >> >>> so in kcmdline we would have modulename.param instead of modulename

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
On Tue, Aug 13, 2013 at 9:17 PM, Steven Rostedt wrote: > On Tue, 13 Aug 2013 20:34:58 -0300 > Lucas De Marchi wrote: > > >> so in kcmdline we would have modulename.param instead of modulename.param=1? >> >> I guess we need to update kmod then, because currently we

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 actuall

Re: [systemd-devel] 2013 Plumber's CFP: Fastboot

2013-05-15 Thread Lucas De Marchi
e's also this MC we proposed: > > http://wiki.linuxplumbersconf.org/2013:boot_and_core_os > > which sounds pretty close to fastboot? > What if we merge the proposals? John, are you ok with proposing (some of) these topics in the "Boot and Core OS" track? I could help with the module-related part, too. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[ANNOUNCE] kmod 13

2013-04-09 Thread Lucas De Marchi
. The older syscall is also used in case the module is compressed. There are also bug fixes and other minor new features. Check the NEWS file. Thanks to everyone involved in this release. Shortlog is below. Cheers, Lucas De Marchi --- Andrey Mazo (2): depmod: --symbol-prefix actually

[PATCH 1/3] argv_split(): Allow extra params

2013-05-09 Thread Lucas De Marchi
Add an argument allowing argv_split to leave room for parameters to be filled by the caller. This is useful in situations we want to split the command and add a options as the last arguments. Signed-off-by: Lucas De Marchi --- fs/coredump.c | 2 +- include/linux/string.h

[PATCH 2/3] kmod: Use argv_split(), passing module as extra param

2013-05-09 Thread Lucas De Marchi
Now that argv_split() leaves room for extra parameter, make call_modprobe() use it. Signed-off-by: Lucas De Marchi --- kernel/kmod.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/kernel/kmod.c b/kernel/kmod.c index 166aff5..70df90b 100644 --- a/kernel

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

2013-05-09 Thread Lucas De Marchi
but it would have to be done very early in the boot sequence and on every boot since modprobe may be called even before / is mounted. In this scenario booting without and initrd would be more difficult as well. Signed-off-by: Lucas De Marchi --- init/Kconfig | 7 +++ kernel/kmod.c | 2 +-

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 a

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,

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. >> >

Re: [PATCH 1/1] usermodehelper: check subprocess_info->path != NULL

2013-05-16 Thread Lucas De Marchi
.c > @@ -569,6 +569,11 @@ int call_usermodehelper_exec(struct subprocess_info > *sub_info, int wait) > int retval = 0; > > helper_lock(); > + if (!sub_info->path) { > + retval = -EINVAL; > + goto out; > + } &

Re: [PATCH] usermodehelper: kill the sub_info->path[0] check

2013-05-21 Thread Lucas De Marchi
nt to detect the "disabled by admin" case. > > Kill it. Not only it looks strange, it can confuse other callers. > And this allows us to revert 264b83c0 "usermodehelper: check > subprocess_info->path != NULL", do_execve(NULL) is safe. > > Signed-off-by: O

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-06 Thread Lucas De Marchi
Hi Oleg, On Mon, Feb 25, 2013 at 3:08 PM, Oleg Nesterov wrote: > On 02/25, Lucas De Marchi wrote: >> >> Yep. The current interface is confusing. I agree that a separate >> setup() + exec() would make more sense. > > Great, > >> > @@ -98,8 +98,14 @@ s

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-07 Thread Lucas De Marchi
On Thu, Mar 7, 2013 at 4:37 PM, Oleg Nesterov wrote: > Hi Lucas, > > On 03/06, Lucas De Marchi wrote: >> >> On Mon, Feb 25, 2013 at 3:08 PM, Oleg Nesterov wrote: >> > >> > So, I hope you will send v2. I'd suggest to split the fixes. 1/3 >> &

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-07 Thread Lucas De Marchi
On Thu, Mar 7, 2013 at 5:07 PM, Oleg Nesterov wrote: > On 03/07, Lucas De Marchi wrote: >> >> On Thu, Mar 7, 2013 at 4:37 PM, Oleg Nesterov wrote: >> > >> >> @@ -98,12 +93,13 @@ static int call_modprobe(char *module_name, int wait) >> >> arg

[PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case there's an OOM in this last function the cleanup function may not be called - in this case we would miss a call to key_put(). Signed-off-by: Lucas De Marchi --- security

[PATCH v2 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
remove the _fns variant. Signed-off-by: Lucas De Marchi --- fs/coredump.c | 15 --- init/do_mounts_initrd.c | 11 +-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index 7dfb3b0..468b4f6 100644 --- a/fs/coredump.c +++ b

[PATCH v2 5/7] coredump: remove trailling whitespaces

2013-03-07 Thread Lucas De Marchi
Signed-off-by: Lucas De Marchi --- fs/coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index c647965..7dfb3b0 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -522,7 +522,7 @@ void do_coredump(siginfo_t *siginfo) ispipe

[PATCH v2 0/7] kmod/usermodehelper changes

2013-03-07 Thread Lucas De Marchi
fo is separating from executing it, it's safe to allways call the cleanup. Lucas De Marchi (7): kernel/sys.c: Use the simpler call_usermodehelper() usermodehelper: Export _exec() and _setup() functions kmod: split call to call_usermodehelper_fns() KEYS: split call to call_usermode

[PATCH v2 1/7] kernel/sys.c: Use the simpler call_usermodehelper()

2013-03-07 Thread Lucas De Marchi
Commit "7ff6764 usermodehelper: cleanup/fix __orderly_poweroff() && argv_free()" simplified __orderly_poweroff() removing the need to use call_usermodehelper_fns(). Since we are not passing any callback, it's simpler to use call_usermodehelper(). Signed-off-by: Lucas De Ma

[PATCH v2 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-07 Thread Lucas De Marchi
alled or not. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 8 kernel/kmod.c| 56 +--- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 5398d58..7eebcf5 1

[PATCH v2 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case the latter returns -ENOMEM the cleanup function may had not been called - in this case we would not free argv and module_name. Signed-off-by: Lucas De Marchi --- kernel/kmod.c | 15

[PATCH v2 7/7] kmod: remove call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
This function suffers from not being able to determine if the cleanup is called in case it returns -ENOMEM. Nobody is using it anymore, so let's remove it. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 11 +-- kernel/kmod.c| 31 +

Re: [PATCH v2 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:23 PM, Oleg Nesterov wrote: > On 03/08, Lucas De Marchi wrote: >> >> Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of >> calling call_usermodehelper_fns(). In case the latter returns -ENOMEM >> the cleanup function may ha

Re: [PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:25 PM, Oleg Nesterov wrote: > On 03/08, Lucas De Marchi wrote: >> >> static int call_usermodehelper_keys(char *path, char **argv, char **envp, >> struct key *session_keyring, int wait) >> { >> -

Re: [PATCH v2 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:42 PM, Oleg Nesterov wrote: > On 03/08, Lucas De Marchi wrote: >> >> @@ -571,9 +572,17 @@ void do_coredump(siginfo_t *siginfo) >> goto fail_dropcount; >> } >> >> - retval = call_usermod

[PATCH v3 1/7] kernel/sys.c: Use the simpler call_usermodehelper()

2013-03-11 Thread Lucas De Marchi
Commit "7ff6764 usermodehelper: cleanup/fix __orderly_poweroff() && argv_free()" simplified __orderly_poweroff() removing the need to use call_usermodehelper_fns(). Since we are not passing any callback, it's simpler to use call_usermodehelper(). Signed-off-by: Lucas De Ma

[PATCH v3 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case the latter returns -ENOMEM the cleanup function may had not been called - in this case we would not free argv and module_name. Signed-off-by: Lucas De Marchi --- Changes from v2

[PATCH v3 5/7] coredump: remove trailling whitespaces

2013-03-11 Thread Lucas De Marchi
Signed-off-by: Lucas De Marchi --- fs/coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index c647965..7dfb3b0 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -522,7 +522,7 @@ void do_coredump(siginfo_t *siginfo) ispipe

[PATCH v3 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case there's an OOM in this last function the cleanup function may not be called - in this case we would miss a call to key_put(). Signed-off-by: Lucas De Marchi --- Changes fr

[PATCH v3 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
remove the _fns variant. Signed-off-by: Lucas De Marchi --- Changes from v2: simplify error handling as suggested by Oleg. fs/coredump.c | 12 +--- init/do_mounts_initrd.c | 8 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/fs/coredump.c b/fs

[PATCH v3 7/7] kmod: remove call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
This function suffers from not being able to determine if the cleanup is called in case it returns -ENOMEM. Nobody is using it anymore, so let's remove it. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 11 +-- kernel/kmod.c| 31 +

[PATCH v3 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-11 Thread Lucas De Marchi
alled or not. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 8 kernel/kmod.c| 56 +--- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 5398d58..7eebcf5 1

Re: [PATCH 2/2] module: wait when loading a module which is currently initializing.

2012-09-17 Thread Lucas De Marchi
On Mon, Sep 17, 2012 at 1:36 AM, Rusty Russell wrote: > Lucas De Marchi writes: >>> - if (find_module(mod->name)) { >>> + if ((old = find_module(mod->name)) != NULL) { >>> + if (old->state == MODULE_STATE_COMING) { >>> +

Re: [Request for review] Revised delete_module(2) manual page

2012-10-11 Thread Lucas De Marchi
If the kernel was not built with >> .BR CONFIG_MODULE_FORCE_UNLOAD , >> this flag is silently ignored. > > NOTES: > > If O_NONBLOCK is not set, then the kernel may enter uninterruptible > sleep until the module reference count reaches zero. This is not > generally desir

Re: [PATCH 1/4] module: add syscall to load module from fd

2013-01-09 Thread Lucas De Marchi
th CONFIG_MOD‐ >ULE_FORCE_LOAD), then loading will continue, otherwise it will >fail with ENOEXEC as expected for malformed modules. > ... >ERRORS > ... >The following errors may additionally occur for finit_module(): > >EBADF

[ANNOUNCE] kmod 23

2016-07-19 Thread Lucas De Marchi
below Anton Blanchard (1): depmod: Ignore PowerPC64 ABIv2 .TOC. symbol Héctor Orón Martínez (1): kmod: compiling with old sed version (!ERE support) Josh Triplett (1): depmod: Don't insert comment in modules.devname if otherwise empty Lucas De Marchi (8): travis: worka

[PATCH v3 2/3] i2c: designware: detect when dynamic tar update is possible

2016-07-28 Thread Lucas De Marchi
it indirectly by writing to the 10BIT_ADDR field in IC_CON: this field is read only when dynamic tar update is enabled. Signed-off-by: Lucas De Marchi Signed-off-by: José Roberto de Souza --- drivers/i2c/busses/i2c-designware-core.c | 37 ++-- drivers/i2c/busses/i2c

[PATCH v3 1/3] i2c: designware: wait for disable/enable only if necessary

2016-07-28 Thread Lucas De Marchi
conds time elapsed ( +- 5.90% ) Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi --- drivers/i2c/busses/i2c-designware-core.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/

[PATCH v3 0/3] i2c: designware: improve performance for transfers

2016-07-28 Thread Lucas De Marchi
a (1): i2c: designware: wait for disable/enable only if necessary Lucas De Marchi (2): i2c: designware: detect when dynamic tar update is possible i2c: designware: do not disable adapter after transfer drivers/i2c/busses/i2c-designware-core.c | 103 +-- drivers/i2

[PATCH v3 3/3] i2c: designware: do not disable adapter after transfer

2016-07-28 Thread Lucas De Marchi
s. Alternating register reads on 2 slaves: perf stat -r4 chrt -f 10 ./i2c-test /dev/i2c-1 25000 0x40 0x6 0x1e 0x00 Before: 8.638705161 seconds time elapsed ( +- 5.90% ) After: 7.516821591 seconds time elapsed ( +- 0.11% ) Signed-off-by: Lucas De

[PATCH v4 3/4] i2c: designware: detect when dynamic tar update is possible

2016-08-23 Thread Lucas De Marchi
it indirectly by writing to the 10BIT_ADDR field in IC_CON: this field is read only when dynamic tar update is enabled. Signed-off-by: Lucas De Marchi Signed-off-by: José Roberto de Souza --- drivers/i2c/busses/i2c-designware-core.c | 44 drivers/i2c/busses/i2c

[PATCH v4 2/4] i2c: designware: add common functions for locking

2016-08-23 Thread Lucas De Marchi
These are used in 2 places and will be needed in more. Signed-off-by: Lucas De Marchi --- drivers/i2c/busses/i2c-designware-core.c | 52 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c

[PATCH v4 1/4] i2c: designware: wait for disable/enable only if necessary

2016-08-23 Thread Lucas De Marchi
conds time elapsed ( +- 5.90% ) Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi --- drivers/i2c/busses/i2c-designware-core.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/

[PATCH v4 0/4] i2c: designware: improve performance for transfers

2016-08-23 Thread Lucas De Marchi
- This is tested on BayTrail and CherryTrail, both of them returning true for "dynamically update TAR" José Roberto de Souza (1): i2c: designware: wait for disable/enable only if necessary Lucas De Marchi (3): i2c: designware: add common functions for locking i2c: designw

[PATCH v4 4/4] i2c: designware: do not disable adapter after transfer

2016-08-23 Thread Lucas De Marchi
s. Alternating register reads on 2 slaves: perf stat -r4 chrt -f 10 ./i2c-test /dev/i2c-1 25000 0x40 0x6 0x1e 0x00 Before: 8.638705161 seconds time elapsed ( +- 5.90% ) After: 7.516821591 seconds time elapsed ( +- 0.11% ) Signed-off-by: Lucas De

Re: [PATCH 2/6] module: add support for symbol namespaces.

2018-07-25 Thread Lucas De Marchi
at would be easy and allow depmod to be backward compatible since we would do nothing if the symbol doesn't have the suffix. As for dependency on a new version, this seems trivial enough to be backported to previous releases used on distros so even if they are not rolling they would get a compat

[ANNOUNCE] kmod 25

2018-01-08 Thread Lucas De Marchi
d: add override test depmod: module_is_higher_priority: fix modname length calculation Lucas De Marchi (9): test-depmod: avoid warning when we don't have zlib build: add mkosi hooks build: use tool from configure testsuite: generalize mkosi support for other dis

Re: [PATCH v2] module: create weak dependecies

2024-05-09 Thread Lucas De Marchi
ux/module.h @@ -173,6 +173,11 @@ extern void cleanup_module(void); */ #define MODULE_SOFTDEP(_softdep) MODULE_INFO(softdep, _softdep) +/* Weak module dependencies. See man modprobe.d for details. Documentation/process/coding-style.rst section 8 says to balance the /* and */, but up to Luis what h

Re: [PATCH v3] module: create weak dependecies

2024-05-14 Thread Lucas De Marchi
new enough. If it isn't, depmod will have the same behavior as always (keeping backward compatibility) and the information for the 'weak' dependency will not be provided. Signed-off-by: Jose Ignacio Tornos Martinez Reviewed-by: Lucas De Marchi thanks Lucas De Marchi --- V2

[ANNOUNCE] kmod 31

2023-09-29 Thread Lucas De Marchi
testsuite: fix override of `stat` on 32-bit architectures Lucas De Marchi (8): testsuite: Move setup-rootfs logic from Makefile to script testsuite: Handle different sysconfdir libkmod: Do not inititialize file->memory on open libkmod: Extract finit_module vs init

Re: [PATCH kmod v5 0/5] kmod /usr support

2023-10-17 Thread Lucas De Marchi
g the preferred solution? Lucas De Marchi

Re: [PATCH kmod v5 5/5] libkmod, depmod, modprobe: Make directory for kernel modules configurable

2023-10-17 Thread Lucas De Marchi
od/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-j.ko"]="mod-loop-j.ko" + ["test-depmod/detect-loop$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-k.ko"]="mod-loop-k.ko" + ["test-depmod/search-order-external-first$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" + ["test-depmod/search-order-external-first$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" ["test-depmod/search-order-external-first/lib/modules/external/"]="mod-simple.ko" why didn't you change it here? - ["test-depmod/search-order-external-last/lib/modules/4.4.4/foo/"]="mod-simple.ko" - ["test-depmod/search-order-external-last/lib/modules/4.4.4/foobar/"]="mod-simple.ko" + ["test-depmod/search-order-external-last$MODULE_DIRECTORY/4.4.4/foo/"]="mod-simple.ko" + ["test-depmod/search-order-external-last$MODULE_DIRECTORY/4.4.4/foobar/"]="mod-simple.ko" ["test-depmod/search-order-external-last/lib/modules/external/"]="mod-simple.ko" and here... Otherwise looks good to me. Pushed the first 4 patches. thanks Lucas De Marchi

Re: [PATCH kmod] libkmod: remove pkcs7 obj_to_hash_algo()

2023-11-07 Thread Lucas De Marchi
openssl and kernel know about. For example SHA3 are being added for v6.7 and with this patch are automatically supported. Signed-off-by: Dimitri John Ledkov Applied, thanks Lucas De Marchi

Re: [PATCH] kmod: Add FIPS 202 SHA-3 support

2023-12-06 Thread Lucas De Marchi
case NID_sha3_512: + return PKEY_HASH_SHA3_512; with your other patch, libkmod: remove pkcs7 obj_to_hash_algo(), this hunk is not needed anymore. Do you want to send a new version of this patch? thanks Lucas De Marchi default: return -1; } -- 2.34.1

Re: [PATCH 0/2] kmod /usr support

2023-12-06 Thread Lucas De Marchi
applied, thanks Lucas De Marchi

  1   2   >