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: <wrfj8twwsfru.fsf@redhat.com>
Date:	Wed, 20 Jul 2016 07:36:05 -0400
From:	Jes Sorensen <Jes.Sorensen@...hat.com>
To:	Colin King <colin.king@...onical.com>
Cc:	Larry Finger <Larry.Finger@...inger.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Bhaktipriya Shridhar <bhaktipriya96@...il.com>,
	Bhumika Goyal <bhumirks@...il.com>,
	Amitoj Kaur Chawla <amitoj1606@...il.com>,
	Shivani Bhardwaj <shivanib134@...il.com>,
	Daniil Leshchev <meleodr@...il.com>,
	Ksenija Stanojevic <ksenija.stanojevic@...il.com>,
	linux-wireless@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: hal: check BT_Active and BT_State with correct bit pattern

Colin King <colin.king@...onical.com> writes:
> From: Colin Ian King <colin.king@...onical.com>
>
> BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent
> comparisons with 0xffffffff are therefore a buggy check.  Instead, check them
> against 0x00ffffff.
>
> Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff
> is an expected invalid bit pattern that should be checked before BT_Active and
> BT_State are masked with 0x00ffffff, so for now, this fix seems like the least
> risky approach.
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I don't really know about the BT parts here, since I never did anything
with that part of the chip. Larry probably knows more.

The only question is whether fixing this bug changes behavior that has
unexpected side effects?

Cheers,
Jes

>
> diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
> index bfcbd7a..6989580 100644
> --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
> +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
> @@ -9824,7 +9824,7 @@ void BTDM_CheckBTIdleChange1Ant(struct rtw_adapter *padapter)
>  	BT_Polling = rtl8723au_read32(padapter, regBTPolling);
>  	RTPRINT(FBT, BT_TRACE, ("[DM][BT], BT_Polling(0x%x) =%x\n", regBTPolling, BT_Polling));
>  
> -	if (BT_Active == 0xffffffff && BT_State == 0xffffffff && BT_Polling == 0xffffffff)
> +	if (BT_Active == 0x00ffffff && BT_State == 0x00ffffff && BT_Polling == 0xffffffff)
>  		return;
>  	if (BT_Polling == 0)
>  		return;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ