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] [day] [month] [year] [list]
Date:   Tue, 12 Feb 2019 16:42:07 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     mingo@...hat.com, tj@...nel.org, longman@...hat.com,
        johannes.berg@...el.com, linux-kernel@...r.kernel.org,
        Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH v5 07/15] locking/lockdep: Free lock classes that are no
 longer in use

On Thu, 2019-01-10 at 16:24 +0100, Peter Zijlstra wrote:
> [ ... ]
> @@ -4579,17 +4559,19 @@ static void lockdep_reset_lock_reg(struc
>   */
>  static void lockdep_reset_lock_imm(struct lockdep_map *lock)
>  {
> -	struct pending_free *pf;
>  	unsigned long flags;
> +	LIST_HEAD(zapped);
>  
> -	pf = get_pending_free_lock_imm(&flags);
> -	if (!pf)
> -		return;
> -	__lockdep_reset_lock(pf, lock);
> -	arch_spin_unlock(&lockdep_lock);
> -	raw_local_irq_restore(flags);
> +	raw_local_irq_save(flags);
> +	if (!graph_lock())
> +		goto out_irq;
> +
> +	__lockdep_reset_lock(&zapped, lock);
> +	__free_zapped_classes(&zapped);
>  
> -	free_zapped_classes(&pf->rcu_head);
> +	graph_unlock();
> +out_irq:
> +	raw_local_irq_restore(flags);
>  }

If graph_lock() is used inside lockdep_free_key_range_imm() and/or
lockdep_reset_lock_imm() instead of arch_spin_lock() then the self-tests fail.
Anyway, I will integrate this patch in my patch series.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ