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]
Date:   Tue, 17 Jul 2018 19:06:53 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     netdev@...r.kernel.org, linville@...driver.com,
        davem@...emloft.net, vivien.didelot@...oirfairelinux.com
Subject: Re: [PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

> >>>> +		if (bitmap_weight(priv->filters, WAKE_FILTER_BITS) >
> >>>> +				  RXCHK_BRCM_TAG_MAX) {
> >>>> +			bitmap_zero(priv->filters, WAKE_FILTER_BITS);
> >>>> +			return -ENOSPC;
> >>>> +		}
> >>>> +
> >>>> +		if (bitmap_weight(priv->filters, WAKE_FILTER_BITS) == 0)
> >>>> +			return -EINVAL;
> >>>> +
> >>>> +		for_each_set_bit(index, priv->filters, WAKE_FILTER_BITS) {
> >>>> +			/* Write the index we want to match within the CID field */
> >>>> +			reg = rxchk_readl(priv, RXCHK_BRCM_TAG(i));
> >>>> +			reg &= ~(RXCHK_BRCM_TAG_CID_MASK <<
> >>>> +				 RXCHK_BRCM_TAG_CID_SHIFT);
> >>>> +			reg |= index << RXCHK_BRCM_TAG_CID_SHIFT;
> >>>> +			rxchk_writel(priv, reg, RXCHK_BRCM_TAG(i));
> >>>> +			rxchk_writel(priv, 0xff00ffff, RXCHK_BRCM_TAG_MASK(i));
> >>>> +			i++;
> >>>> +		}
> >>>> +	}
> >>>

Just to convince me, can you dump the contents of reg. And execute the
commands:

ethtool -s gphy wol f filters 0x1
ethtool -s gphy wol f filters 0x2

After these two commands, we expect only one filter bit to be set, bit
1. Filter Bit 0 should of been cleared when the second command was
executed.

  Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ