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: <20200113145542.GV2844@hirez.programming.kicks-ass.net>
Date:   Mon, 13 Jan 2020 15:55:42 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Waiman Long <longman@...hat.com>
Cc:     Ingo Molnar <mingo@...hat.com>, Will Deacon <will.deacon@....com>,
        linux-kernel@...r.kernel.org, Bart Van Assche <bvanassche@....org>
Subject: Re: [PATCH v2 1/6] locking/lockdep: Track number of zapped classes

On Mon, Dec 16, 2019 at 10:15:12AM -0500, Waiman Long wrote:
> The whole point of the lockdep dynamic key patch is to allow unused
> locks to be removed from the lockdep data buffers so that existing
> buffer space can be reused. However, there is no way to find out how
> many unused locks are zapped and so we don't know if the zapping process
> is working properly.
> 
> Add a new nr_zapped_classes variable to track that and show it in
> /proc/lockdep_stats if it is non-zero.
> 

> diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c
> index dadb7b7fba37..d98d349bb648 100644
> --- a/kernel/locking/lockdep_proc.c
> +++ b/kernel/locking/lockdep_proc.c
> @@ -336,6 +336,15 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
>  	seq_printf(m, " debug_locks:                   %11u\n",
>  			debug_locks);
>  
> +	/*
> +	 * Zappped classes and lockdep data buffers reuse statistics.
> +	 */
> +	if (!nr_zapped_classes)
> +		return 0;
> +
> +	seq_puts(m, "\n");
> +	seq_printf(m, " zapped classes:                %11lu\n",
> +			nr_zapped_classes);
>  	return 0;
>  }

Why is that conditional?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ