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: <20181119112755.qtthenx54v3tnok3@plaes.org>
Date:   Mon, 19 Nov 2018 11:27:55 +0000
From:   Priit Laes <plaes@...es.org>
To:     Larry Finger <Larry.Finger@...inger.net>
Cc:     Kees Cook <keescook@...omium.org>,
        Jia-Ju Bai <baijiaju1990@...il.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Colin Ian King <colin.king@...onical.com>,
        Arend van Spriel <arend.vanspriel@...adcom.com>,
        Varsha Rao <rvarsha016@...il.com>,
        linux-wireless@...r.kernel.org, b43-dev@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] b43: Use cordic algorithm from kernel library

On Sun, Nov 18, 2018 at 01:35:57PM -0600, Larry Finger wrote:
> On 11/18/18 2:23 AM, Priit Laes wrote:
> > On Sat, Nov 17, 2018 at 09:31:35PM -0600, Larry Finger wrote:
> > > On 11/14/18 12:27 PM, Priit Laes wrote:
> > > > Kernel library has a common cordic algorithm which is identical
> > > > to internally implementatd one, so use it and drop the duplicate
> > > > implementation.
> > > > 
> 
> My test setup has a hardware failure, thus I cannot test your patch, but I
> now believe it to be correct. Thus your first and third patches may be
> annotated with
> ACKed-by: Larry Finger <Larry.Finger@...inger.net>
> 
> One thing that should be done is to fix the error in the b43 code for stable
> as it was introduced in 2.6.34. I propose adding the attached patched to
> your series placed between your current 2nd and 3rd patches so that the old
> kernels get fixed. Of course, your 3rd patch will need to be revised. If all
> 4 of the patches get submitted together there will be no problems with the
> timing. My change will exist for seconds in the mainline kernel, but it will
> get propagated back through stable.

Thanks!

> From b42ae73ef7505de93e4c66fb9f66930e3f3d969a Mon Sep 17 00:00:00 2001
> From: Larry Finger <Larry.Finger@...inger.net>
> Date: Sun, 18 Nov 2018 13:15:07 -0600
> Subject: [PATCH] b43: Fix error in cordic routine
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> To: kvalo@...eaurora.org
> Cc: linux-wireless@...r.kernel.org
> 
> The cordic routine for calculating sines and cosines that was added in
> commit 986504540306 ("b43: make cordic common (LP-PHY and N-PHY need it)")
> contains an error whereby a quantity declared u32 can in fact go negative.

It seems to be different commit though:
commit 6f98e62a9 ("b43: update cordic code to match current specs")

> This problem was detected by Priit Laes who is switching b43 to use the
> routine in the library functions of the kernel.
> 
> Fixes: 986504540306 ("b43: make cordic common (LP-PHY and N-PHY need it)")
> Reported-by: Priit Laes <plaes@...es.org>
> Cc: Rafa?? Mi??ecki <zajec5@...il.com>
> Cc: Stable <stable@...r.kernel.org> # 2.6.34
> Signed-off-by: Larry Finger <Larry.Finger@...inger.net>
> ---
>  drivers/net/wireless/broadcom/b43/phy_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/broadcom/b43/phy_common.c b/drivers/net/wireless/broadcom/b43/phy_common.c
> index 85f2ca989565..ef3ffa5ad466 100644
> --- a/drivers/net/wireless/broadcom/b43/phy_common.c
> +++ b/drivers/net/wireless/broadcom/b43/phy_common.c
> @@ -616,7 +616,7 @@ struct b43_c32 b43_cordic(int theta)
>  	u8 i;
>  	s32 tmp;
>  	s8 signx = 1;
> -	u32 angle = 0;
> +	s32 angle = 0;
>  	struct b43_c32 ret = { .i = 39797, .q = 0, };
>  
>  	while (theta > (180 << 16))
> -- 
> 2.16.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ