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: <20190225121234.GA17076@fuggles.cambridge.arm.com>
Date:   Mon, 25 Feb 2019 12:12:34 +0000
From:   Will Deacon <will.deacon@....com>
To:     Waiman Long <longman@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH-tip] locking/qspinlock: Remove unnecessary BUG_ON() call

On Sun, Feb 24, 2019 at 08:14:13PM -0500, Waiman Long wrote:
> With the > 4 nesting levels case handled by the commit d682b596d993
> ("locking/qspinlock: Handle > 4 slowpath nesting levels"), the BUG_ON()
> call in encode_tail() will never be triggered. Remove it.
> 
> Signed-off-by: Waiman Long <longman@...hat.com>
> ---
>  kernel/locking/qspinlock.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> index 21ee51b..5e9247d 100644
> --- a/kernel/locking/qspinlock.c
> +++ b/kernel/locking/qspinlock.c
> @@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx)
>  {
>  	u32 tail;
>  
> -#ifdef CONFIG_DEBUG_SPINLOCK
> -	BUG_ON(idx > 3);
> -#endif
>  	tail  = (cpu + 1) << _Q_TAIL_CPU_OFFSET;
>  	tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */

Acked-by: Will Deacon <will.deacon@....com>

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ