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]
Date:	Thu, 17 Apr 2008 23:08:17 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	sukadev@...ibm.com
CC:	Andrew Morton <akpm@...l.org>, serue@...ibm.com,
	"Eric W. Biederman" <ebiederm@...ssion.com>, hpa@...or.com,
	Containers <containers@...ts.osdl.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH]: Factor out PTY index allocation

On 04/17/2008 12:17 AM, sukadev@...ibm.com wrote:
> We noticed this while working on pts namespaces and believe this might
> be an useful change even as we rework our pts/device namespace approach.
> 
> ---
> 
> From: Sukadev Bhattiprolu <sukadev@...ibm.com>
> Subject: [PATCH]: Factor out PTY index allocation
> 
> Factor out the code used to allocate/free a pts index into new interfaces,
> devpts_new_index() and devpts_kill_index().  This localizes the external
> data structures used in managing the pts indices.
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev@...ibm.com>
> Signed-off-by: Serge Hallyn<serue@...ibm.com>
> Signed-off-by: Matt Helsley<matthltc@...ibm.com>
> 
> ---
>  drivers/char/tty_io.c     |   40 ++++++----------------------------------
>  fs/devpts/inode.c         |   42 +++++++++++++++++++++++++++++++++++++++++-
>  include/linux/devpts_fs.h |    4 ++++
>  3 files changed, 51 insertions(+), 35 deletions(-)
[...]
> Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
> ===================================================================
> --- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c	2008-04-16 09:51:11.000000000 -0700
> +++ 2.6.25-rc8-mm2/drivers/char/tty_io.c	2008-04-16 09:51:15.000000000 -0700
> @@ -137,9 +136,6 @@ EXPORT_SYMBOL(tty_mutex);
>  
>  #ifdef CONFIG_UNIX98_PTYS
>  extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
> -extern int pty_limit;			/* Config limit on Unix98 ptys */
> -static DEFINE_IDR(allocated_ptys);
> -static DEFINE_MUTEX(allocated_ptys_lock);
[...]
> Index: 2.6.25-rc8-mm2/fs/devpts/inode.c
> ===================================================================
> --- 2.6.25-rc8-mm2.orig/fs/devpts/inode.c	2008-02-27 15:17:59.000000000 -0800
> +++ 2.6.25-rc8-mm2/fs/devpts/inode.c	2008-04-16 09:51:15.000000000 -0700
> @@ -26,6 +27,10 @@
>  
>  #define DEVPTS_DEFAULT_MODE 0600
>  
> +extern int pty_limit;			/* Config limit on Unix98 ptys */
> +static DEFINE_IDR(allocated_ptys);
> +static DECLARE_MUTEX(allocated_ptys_lock);

Ugh, why mutex->semaphore conversion?
--
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