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:   Wed, 19 Oct 2022 07:49:35 -0400
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Borislav Petkov <bp@...en8.de>,
        Eric Dumazet <edumazet@...gle.com>,
        Guo Ren <guoren@...ux.alibaba.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Kuniyuki Iwashima <kuniyu@...zon.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Menglong Dong <imagedong@...cent.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Petr Machata <petrm@...dia.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        andriy.shevchenko@...ux.intel.com, caraitto@...gle.com,
        jonolson@...gle.com, willemb@...gle.com,
        "David S .Miller" <davem@...emloft.net>,
        Andrew Jones <ajones@...tanamicro.com>,
        amritha.nambiar@...el.com, linux@...musvillemoes.dk
Subject: Re: [PATCH] Revert "net: fix cpu_max_bits_warn() usage in
 netif_attrmask_next{,_and}"

On Sun, Oct 16, 2022 at 08:09:47PM -0700, Yury Norov wrote:
> This reverts commit 854701ba4c39afae2362ba19a580c461cb183e4f.
> 
> The reverted commit makes netif_attr_test_online() network subsystems
> generating warnings, and it breaks syzkaller testing.
> 
> https://syzkaller.appspot.com/bug?extid=9abe5ecc348676215427
> 
> Signed-off-by: Yury Norov <yury.norov@...il.com>

Fixes: 854701ba4c39 ("net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}")
Acked-by: Michael S. Tsirkin <mst@...hat.com>

> ---
>  include/linux/netdevice.h | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index a36edb0ec199..eddf8ee270e7 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -3663,8 +3663,9 @@ static inline bool netif_attr_test_online(unsigned long j,
>  static inline unsigned int netif_attrmask_next(int n, const unsigned long *srcp,
>  					       unsigned int nr_bits)
>  {
> -	/* n is a prior cpu */
> -	cpu_max_bits_warn(n + 1, nr_bits);
> +	/* -1 is a legal arg here. */
> +	if (n != -1)
> +		cpu_max_bits_warn(n, nr_bits);
>  
>  	if (srcp)
>  		return find_next_bit(srcp, nr_bits, n + 1);
> @@ -3685,8 +3686,9 @@ static inline int netif_attrmask_next_and(int n, const unsigned long *src1p,
>  					  const unsigned long *src2p,
>  					  unsigned int nr_bits)
>  {
> -	/* n is a prior cpu */
> -	cpu_max_bits_warn(n + 1, nr_bits);
> +	/* -1 is a legal arg here. */
> +	if (n != -1)
> +		cpu_max_bits_warn(n, nr_bits);
>  
>  	if (src1p && src2p)
>  		return find_next_and_bit(src1p, src2p, nr_bits, n + 1);
> -- 
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ