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]
Date:   Fri, 2 Sep 2016 16:35:54 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Frederic Weisbecker <fweisbec@...il.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Wanpeng Li <wanpeng.li@...mail.com>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Ingo Molnar <mingo@...nel.org>, Mike Galbraith <efault@....de>,
        Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH 3/5] u64_stats: Introduce IRQs disabled helpers



On 02/09/2016 16:03, Frederic Weisbecker wrote:
>  static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
>  {
> -#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
> -	return read_seqcount_begin(&syncp->seq);
> -#else
> -#if BITS_PER_LONG==32
> +#if BITS_PER_LONG==32 && !defined(CONFIG_SMP)
>  	preempt_disable();
> +#else

This should be #endif, or this side ends without a "return" statement.

> +	return __u64_stats_fetch_begin(syncp);
>  #endif
> -	return 0;
> +}

...

> 
>  static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
>  					 unsigned int start)
>  {
> -#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
> -	return read_seqcount_retry(&syncp->seq, start);
> -#else
> -#if BITS_PER_LONG==32
> +#if BITS_PER_LONG==32 && !defined(CONFIG_SMP)
>  	preempt_enable();
> -#endif
> -	return false;
> +#else

Same here.

> +	return __u64_stats_fetch_retry(syncp, start);
>  #endif
>  }


...

> 
> -	return read_seqcount_begin(&syncp->seq);
> -#else
> -#if BITS_PER_LONG==32
> +#if BITS_PER_LONG==32 && !defined(CONFIG_SMP)
>  	local_irq_disable();
> -#endif
> -	return 0;
> +#else

Same here.

> +	return __u64_stats_fetch_begin(syncp);
>  #endif


> 
> -#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
> -	return read_seqcount_retry(&syncp->seq, start);
> -#else
> -#if BITS_PER_LONG==32
> +#if BITS_PER_LONG==32 && !defined(CONFIG_SMP)
>  	local_irq_enable();
> -#endif
> -	return false;
> +#else

Same here.

> +	return __u64_stats_fetch_retry(syncp, start);
>  #endif


Thanks,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ