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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8b0979e4-7202-869f-95b3-ab5d0381ed69@milecki.pl>
Date:   Fri, 3 Feb 2017 22:41:48 +0100
From:   Rafał Miłecki <rafal@...ecki.pl>
To:     Jon Mason <jon.mason@...adcom.com>,
        David Miller <davem@...emloft.net>
Cc:     bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Zac Schroff <zschroff@...adcom.com>
Subject: Re: [PATCH v2 1/2] net: ethernet: bgmac: init sequence bug

On 02/03/2017 10:08 PM, Jon Mason wrote:
> @@ -61,15 +60,20 @@ static bool platform_bgmac_clk_enabled(struct bgmac *bgmac)
>
>  static void platform_bgmac_clk_enable(struct bgmac *bgmac, u32 flags)
>  {
> -	bgmac_idm_write(bgmac, BCMA_IOCTL,
> -			(BCMA_IOCTL_CLK | BCMA_IOCTL_FGC | flags));
> +	u32 val;
> +
> +	val = bgmac_idm_read(bgmac, BCMA_IOCTL);
> +	/* Some bits of BCMA_IOCTL set by HW/ATF and should not change */
> +	val |= flags & ~(BGMAC_AWCACHE | BGMAC_ARCACHE | BGMAC_AWUSER |
> +			 BGMAC_ARUSER);
> +	val |= BGMAC_CLK_EN;
>  	bgmac_idm_read(bgmac, BCMA_IOCTL);

This read was previously following write op most likely to flush it or
something. I don't think it makes any sense to read after read.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ