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-next>] [day] [month] [year] [list]
Message-ID: <20141229013606.GR970@techyauld.com>
Date:	Mon, 29 Dec 2014 09:36:06 +0800
From:	Zheng Yi <yzheng@...hyauld.com>
To:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Cc:	Mugunthan V N <mugunthanvnm@...com>,
	Lokesh Vutla <lokeshvutla@...com>
Subject: [CPSW driver] broadcast ethernet pkg will be dropped?

Hi Sir

   I found your mail address from Linux kernel git repo. I think there
   is a problem in CPSW driver. If it is not your duty to maintain
   those code, could you please tell me the ones who are in charge of
   it?

   I found that when a AM3352 board boot, I use a laptop to send ARP
   request to it, the board do not reponse. Even ifconfig do not show
   that there is any pkg sent to the CPSW device. I'm sure that the
   ARP request PKG received by SoC(confirmed by my oscilloscope).

   After reading the SoC doc (Tech ref manual) and reading the driver code, i found that:
   15.3.2.7 Address Lookup Engine (ALE)
   "Broadcast packets will be dropped unless the broadcast address is entered into the table with the super bit set."

   and in driver: drivers/net/ether/ti/cpsw_ale.c

   int cpsw_ale_add_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask,
                          int flags, u16 vid, int mcast_state)
   {
          /* ....... */

          cpsw_ale_set_super(ale_entry, (flags & ALE_BLOCKED) ? 1 : 0);

          /* ....... */
   }

   I have searched all of the calling of that function, and found no
   ALE_BLOCKED flag was set.  Especially, in
   cpsw_add_dual_emac_def_ale_entries(), only ALE_VLAN was provided
   for the broadcast address.

   After change the flag(brutally), my board can response to the ARP broadcast requests correctly.

   Here are some questions I do not found the answer:
   1. the macro ALE_BLOCKED seems be used uncorrectly.
      If one want the pkg should be "blocked", the "super" bit should be cleared, not be set.
      So, in cpsw_ale_add_mcast(), we should do like this:
          cpsw_ale_set_super(ale_entry, (flags & ALE_BLOCKED) ? 0 : 1);

      Do you think the current logic is reversed?

   2. broadcast ethernet pkg from "FF:FF:FF:FF:FF:FF" should be alowed.
      If by default, it desiged to be filtered out, why not add an interface to support
      restore it? I do not found any code that can change filtering the broadcast pkg in runtime.






--
Brock Zheng <yzheng@...hyauld.com>
郑 祎

北京中科腾越科技发展有限公司
北京市海淀区东北旺西路8号中关村软件园21号楼启明星辰大厦二层六区(邮编:100094)

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ