lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 27 May 2013 20:33:41 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Andrew Jones <drjones@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] modules: insert mods sorted

Andrew Jones <drjones@...hat.com> writes:
> While there isn't a big difference between typing 'lsmod' and
> 'lsmod | sort', the module listing in Oopses isn't so easily sorted.
> Attempting to search these quickly by eye for particular modules while
> rapidly triaging bugs can be a pain. Sort the list and reduce the pain.
>
> Signed-off-by: Andrew Jones <drjones@...hat.com>

Hi Andrew,

        ISTR the story of young Fleming being fired as bottlewasher for
a major lab because the head researcher felt he was wasting his
talents.[1]

        Please take my rejection of this patch as similar endorsement of
your future prospects.

Cheers,
Rusty.
[1] Google can't find any trace of this story, so may be my imagination...

> ---
>  kernel/module.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/module.c b/kernel/module.c
> index cab4bce49c23d..7914d8ef2e09c 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -3146,7 +3146,7 @@ static int may_init_module(void)
>  static int add_unformed_module(struct module *mod)
>  {
>  	int err;
> -	struct module *old;
> +	struct module *old, *m;
>  
>  	mod->state = MODULE_STATE_UNFORMED;
>  
> @@ -3166,7 +3166,13 @@ again:
>  		err = -EEXIST;
>  		goto out;
>  	}
> -	list_add_rcu(&mod->list, &modules);
> +	if (!list_empty(&modules)) {
> +		list_for_each_entry(m, &modules, list)
> +			if (strcmp(mod->name, m->name) < 0)
> +				break;
> +		list_add_tail_rcu(&mod->list, &m->list);
> +	} else
> +		list_add_rcu(&mod->list, &modules);
>  	err = 0;
>  
>  out:
> -- 
> 1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists