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: <20140805132837.GA19379@twins.programming.kicks-ass.net>
Date:	Tue, 5 Aug 2014 15:28:37 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Waiman Long <Waiman.Long@...com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Maarten Lankhorst <maarten.lankhorst@...onical.com>,
	Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
	Scott J Norton <scott.norton@...com>,
	Fengguang Wu <fengguang.wu@...el.com>
Subject: Re: [PATCH 2/2 v6] locking/selftest: Support queued rwlock

On Tue, Jul 29, 2014 at 02:53:19PM -0400, Waiman Long wrote:
> The queued rwlock does not support the use of recursive read-lock in
> the process context. With changes in the lockdep code to check and
> disallow recursive read-lock, it is also necessary for the locking
> selftest to be updated to change the process context recursive read
> locking results from SUCCESS to FAILURE for rwlock.
> 
> Signed-off-by: Waiman Long <Waiman.Long@...com>
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
> ---
>  lib/locking-selftest.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
> index 872a15a..9a33688 100644
> --- a/lib/locking-selftest.c
> +++ b/lib/locking-selftest.c
> @@ -267,19 +267,19 @@ GENERATE_TESTCASE(AA_rsem)
>  #undef E
>  
>  /*
> - * Special-case for read-locking, they are
> + * Special-case for read-locking, they are not
>   * allowed to recurse on the same lock class:
>   */
>  static void rlock_AA1(void)
>  {
>  	RL(X1);
> -	RL(X1); // this one should NOT fail
> +	RL(X1); // this one should fail
>  }
>  
>  static void rlock_AA1B(void)
>  {
>  	RL(X1);
> -	RL(X2); // this one should NOT fail
> +	RL(X2); // this one should fail
>  }

Maybe I wasn't clear; but I meant you should extend the lock tests to
cover the full qrwlock semantics.

That means we also need tests like:

	RL(X1);
	IRQ_ENTER();
	RL(X2);
	IRQ_EXIT();

To fully validate that in_interrupt exception to fairness etc..

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ