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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070908072811.GB1819@martell.zuzino.mipt.ru>
Date:	Sat, 8 Sep 2007 11:28:11 +0400
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	rusty@...tcorp.com.au
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Subject: Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

On Thu, Sep 06, 2007 at 04:02:29PM -0400, Mathieu Desnoyers wrote:
> Remove "static" from module_mutex and the modules list so it can be used by
> other builtin objects in the kernel. Otherwise, every code depending on the
> module list would have to be put in kernel/module.c. Since the immediate values
> depends on the module list but can be considered as logically different, it
> makes sense to implement them in their own file.
> 
> The alternative to this would be to disable preemption in code path that need
> such synchronization, so they can be protected against module unload by
> stop_machine(), but not being able to sleep within while needing such
> synchronization is limiting.

> --- linux-2.6-lttng.orig/kernel/module.c
> +++ linux-2.6-lttng/kernel/module.c
> @@ -64,8 +64,8 @@ extern int module_sysfs_initialized;
>  
>  /* List of modules, protected by module_mutex or preempt_disable
>   * (add/delete uses stop_machine). */
> -static DEFINE_MUTEX(module_mutex);
> -static LIST_HEAD(modules);
> +DEFINE_MUTEX(module_mutex);
> +LIST_HEAD(modules);
>  static DECLARE_MUTEX(notify_mutex);
>  
>  static BLOCKING_NOTIFIER_HEAD(module_notify_list);
> --- linux-2.6-lttng.orig/include/linux/module.h
> +++ linux-2.6-lttng/include/linux/module.h
> @@ -60,6 +60,10 @@ struct module_kobject
>  	struct kobject *drivers_dir;
>  };
>  
> +/* Protects the list of modules. */
> +extern struct mutex module_mutex;
> +extern struct list_head modules;

Rusty, do you still want to keep module_mutex virgin? If not, I can
backout /proc/*/wchan vs rmmod race fix et al and use muuuch simpler version.
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ