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]
Date:   Mon, 9 Jul 2018 09:10:00 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Andrew Lunn <andrew@...n.ch>, Colin King <colin.king@...onical.com>
Cc:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: dsa: bcm_sf2: remove redundant variable off

Hi Andrew,

On 07/04/2018 07:25 AM, Andrew Lunn wrote:
> Hi Florian
> 
> I this a bug? It seems to be a result of moving to
> b53_disable_port() in f86ad77faf.
> 
> Before you would handle the CPU port differently than a normal
> port. After this change, there is no difference?

This is not a bug actually but it is not obvious because there was a
separate definition added in bcm_sf2_regs.h for port 8 named
CORE_IMP_CTL. The logic in b53_regs.h is:

#define B53_PORT_CTRL(i)                (0x00 + (i))

and due to the memory map used in bcm_sf2, that would translate into:

8 << 2 = 0x20 which is correct here and matches the definition of
CORE_IMP_CTL.

in fact, the new code is more correct because any port could be a DSA
CPU port, whereas before we assumed that port 8 == CPU port, which is
not necessarily true.

Thanks!
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ