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:	Thu, 11 Feb 2010 17:59:23 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Tiago Pierezan Camargo <tcamargo@...il.com>
CC:	netdev@...r.kernel.org
Subject: Re: Problem with VLANs and via-velocity driver

Tiago Pierezan Camargo wrote:
> Patrick McHardy <kaber <at> trash.net> writes:
>>> ...
>>>
>>> Any suggestions?
>> This should be fixed in the driver as discussed previously.
> 
> Well, the following patch completely disables hw vlan filtering
> (against 2.6.31).

You should CC the maintainer(s).

> --- ../via_kernel_org/via-velocity.c	2010-02-10 11:45:14.000000000 -0200
> +++ via-velocity.c	2010-02-11 11:24:37.000000000 -0200
> @@ -607,9 +607,10 @@
>  {
>  	struct mac_regs __iomem * regs = vptr->mac_regs;
> 
> -	/* Turn on MCFG_PQEN, turn off MCFG_RTGOPT */
> -	WORD_REG_BITS_SET(MCFG_PQEN, MCFG_RTGOPT, &regs->MCFG);
> -	WORD_REG_BITS_ON(MCFG_VIDFR, &regs->MCFG);
> +	/* Completely disable vlan filtering */
> +	WORD_REG_BITS_OFF(MCFG_PQEN, &regs->MCFG);
> +	WORD_REG_BITS_OFF(MCFG_VIDFR, &regs->MCFG);
> +	WORD_REG_BITS_OFF(MCFG_RTGOPT, &regs->MCFG);
> 
>  	/* Disable all CAMs */
>  	memset(vptr->vCAMmask, 0, sizeof(u8) * 8);
> @@ -1406,7 +1407,7 @@
>  		/*
>  		 *	Don't drop CE or RL error frame although RXOK is off
>  		 */
> -		if (rd->rdesc0.RSR & (RSR_RXOK | RSR_CE | RSR_RL)) {
> +		if (rd->rdesc0.RSR & (RSR_RXOK | RSR_CE | RSR_RL | RSR_VIDM)) {
>  			if (velocity_receive_frame(vptr, rd_curr) < 0)
>  				stats->rx_dropped++;
> 
> I know it's not the best solution. I can come up with a better patch
> but I'm a bit confused about the expected behavior.
> 
> - Should we only disable vlan filtering when promiscuous mode is
> enabled? (should we care about hw tag stripping?)

Filtering should be disabled in promiscous mode, stripping can
stay enabled.

> - Should we disable vlan filtering entirely and let the software deal
> with it? (this seems to be the semantics implemented in the freebsd
> driver)

That doesn't seem like a good idea. Basically what it should do
is:

- when no VLANs are configured locally and promiscous mode is
  disabled, all VLANs can be filtered

- when local VLANs are configured, these specific VLANs should be
  accepted

- in promiscous mode, all filters should be disabled
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ