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]
Message-Id: <20120919.155049.1144637355081576911.davem@davemloft.net>
Date:	Wed, 19 Sep 2012 15:50:49 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	ordex@...istici.org
Cc:	netdev@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org,
	linus.luessing@....de
Subject: Re: [PATCH net] batman-adv: make batadv_test_bit() return 0 or 1
 only

From: Antonio Quartulli <ordex@...istici.org>
Date: Fri, 14 Sep 2012 12:40:54 +0200

> From: Linus Lüssing <linus.luessing@....de>
> 
> On some architectures test_bit() can return other values than 0 or 1:
> 
> With a generic x86 OpenWrt image in a kvm setup (batadv_)test_bit()
> frequently returns -1 for me, leading to batadv_iv_ogm_update_seqnos()
> wrongly signaling a protected seqno window.
> 
> This patch tries to fix this issue by making batadv_test_bit() return 0
> or 1 only.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@....de>
> Acked-by: Sven Eckelmann <sven@...fation.org>
> Signed-off-by: Antonio Quartulli <ordex@...istici.org>

Indeed, for variable bit testing x86 uses the 'sbb' instruction
to form the result.  So we either get 0 or -1 from test_bit().

Patch applied, thanks a lot.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ