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: <20211108202058.th7vjq4sjca3encz@skbuf>
Date:   Mon, 8 Nov 2021 22:20:58 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Robert Marko <robert.marko@...tura.hr>
Cc:     andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
        davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Gabor Juhos <j4g8y7@...il.com>,
        John Crispin <john@...ozen.org>
Subject: Re: [net-next] net: dsa: qca8k: only change the MIB_EN bit in
 MODULE_EN register

Timed out waiting for ACK/NACK from John.

On Thu, Nov 04, 2021 at 01:49:27PM +0100, Robert Marko wrote:
> From: Gabor Juhos <j4g8y7@...il.com>
> 
> The MIB module needs to be enabled in the MODULE_EN register in
> order to make it to counting. This is done in the qca8k_mib_init()
> function. However instead of only changing the MIB module enable
> bit, the function writes the whole register. As a side effect other
> internal modules gets disabled.

Please be more specific.
The MODULE_EN register contains these other bits:
BIT(0): MIB_EN
BIT(1): ACL_EN (ACL module enable)
BIT(2): L3_EN (Layer 3 offload enable)
BIT(10): SPECIAL_DIP_EN (Enable special DIP (224.0.0.x or ff02::1) broadcast
0 = Use multicast DP
1 = Use broadcast DP)

> 
> Fix up the code to only change the MIB module specific bit.

Clearing which one of the above bits bothers you? The driver for the
qca8k switch supports neither layer 3 offloading nor ACLs, and I don't
really know what this special DIP packet/header is).

Generally the assumption for OF-based drivers is that one should not
rely on any configuration done by prior boot stages, so please explain
what should have worked but doesn't.

> 
> Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family")
> Signed-off-by: Gabor Juhos <j4g8y7@...il.com>
> Signed-off-by: Robert Marko <robert.marko@...tura.hr>
> ---
>  drivers/net/dsa/qca8k.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index a984f06f6f04..a229776924f8 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -583,7 +583,7 @@ qca8k_mib_init(struct qca8k_priv *priv)
>  	if (ret)
>  		goto exit;
>  
> -	ret = qca8k_write(priv, QCA8K_REG_MODULE_EN, QCA8K_MODULE_EN_MIB);
> +	ret = qca8k_reg_set(priv, QCA8K_REG_MODULE_EN, QCA8K_MODULE_EN_MIB);
>  
>  exit:
>  	mutex_unlock(&priv->reg_mutex);
> -- 
> 2.33.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ