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: <4BEF677A.2030003@uw.no>
Date:	Sun, 16 May 2010 03:33:14 +0000
From:	"Daniel K." <dk@...no>
To:	Arnd Bergmann <arnd@...db.de>
CC:	linux-kernel@...r.kernel.org, Alan Cox <alan@...rguk.ukuu.org.uk>,
	Greg KH <gregkh@...e.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	John Kacur <jkacur@...hat.com>,
	Al Viro <viro@...iv.linux.org.uk>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 10/10] tty: implement BTM as mutex instead of BKL

Arnd Bergmann wrote:
> diff --git a/drivers/char/tty_mutex.c b/drivers/char/tty_mutex.c
> new file mode 100644
> index 0000000..f66dfdf
> --- /dev/null
> +++ b/drivers/char/tty_mutex.c
> @@ -0,0 +1,47 @@
> +/*
> + * drivers/char/tty_lock.c
> + */
> +#include <linux/tty.h>
> +#include <linux/module.h>
> +#include <linux/kallsyms.h>
> +#include <linux/semaphore.h>
> +#include <linux/sched.h>
> +
> +/*
> + * The 'big tty semaphore'

Referred to as Big TTY Mutex or BTM elsewhere.


> + * This mutex is taken and released by tty_lock() and tty_unlock(),
> + * replacing the older big kernel mutex.

big kernel lock, or BKL?


> + * It can no longer be taken recursively, and does not get
> + * released implicitly while sleeping.
> + *
> + * Don't use in new code.
> + */
> +static DEFINE_MUTEX(big_tty_mutex);
> +struct task_struct *__big_tty_mutex_owner;
> +EXPORT_SYMBOL_GPL(__big_tty_mutex_owner);

> +config TTY_MUTEX
> +	bool "Use a mutex instead of BKL for TTY locking"
> +	depends on EXPERIMENTAL && SMP
> +	help
> +	  The TTY subsystem traditionally depends on the big kernel lock
> +	  for serialization. Saying Y here replaces the BKL with the Big
> +	  TTY Mutex (BTM).
> +	  Building a kernel without the BKL is only possible with TTY_MUTEX
> +	  enabled.
> +


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