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: <alpine.LFD.2.02.1109021104140.2723@ionos>
Date:	Fri, 2 Sep 2011 11:19:25 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Andi Kleen <andi@...stfloor.org>
cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	eric.dumazet@...il.com, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 1/4] posix-timers: move global timer id management to
 signal_struct v2

On Mon, 29 Aug 2011, Andi Kleen wrote:

Hint: Ccing maintainers of affected code might help to get code
      reviewed and eventually merged.

> diff --git a/include/linux/init_task.h b/include/linux/init_task.h
> index d14e058..564248d 100644
> --- a/include/linux/init_task.h
> +++ b/include/linux/init_task.h
> @@ -10,6 +10,7 @@
>  #include <linux/pid_namespace.h>
>  #include <linux/user_namespace.h>
>  #include <linux/securebits.h>
> +#include <linux/idr.h>

New line please.

>  #include <net/net_namespace.h>
>  
>  #ifdef CONFIG_SMP
> @@ -37,6 +38,7 @@ extern struct fs_struct init_fs;
>  		.list = LIST_HEAD_INIT(sig.shared_pending.list),	\
>  		.signal =  {{0}}},					\
>  	.posix_timers	 = LIST_HEAD_INIT(sig.posix_timers),		\
> +	.idr_lock	 = __SPIN_LOCK_UNLOCKED(idr_lock),		\

  sig.idr_lock

Also is there a requirement, that this is a spinlock? AFAICT it's all
process context and slowpath, so we can make it a mutex.

>  	.cpu_timers	= INIT_CPU_TIMERS(sig.cpu_timers),		\
>  	.rlim		= INIT_RLIMITS,					\
>  	.cputimer	= { 						\
> @@ -46,6 +48,7 @@ extern struct fs_struct init_fs;
>  	},								\
>  	.cred_guard_mutex =						\
>  		 __MUTEX_INITIALIZER(sig.cred_guard_mutex),		\
> +	.posix_timers_id = IDR_INIT(posix_timer_id),			\

  sig.posix_timer_id

>  	INIT_THREADGROUP_FORK_LOCK(sig)					\
>  }
  
> @@ -541,6 +539,7 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
>  	int error, new_timer_id;
>  	sigevent_t event;
>  	int it_id_set = IT_ID_NOT_SET;
> +	struct signal_struct *s = current->signal;

  *sig please, cryptic variable names are a PITA.

Thanks,

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