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:   Wed, 24 Mar 2021 16:21:10 +0000
From:   Claudiu Manoil <claudiu.manoil@....com>
To:     Vladimir Oltean <olteanv@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: RE: [PATCH net-next 2/2] net: enetc: don't depend on system
 endianness in enetc_set_mac_ht_flt

>-----Original Message-----
>From: Vladimir Oltean <olteanv@...il.com>
>Sent: Wednesday, March 24, 2021 5:45 PM
>To: Jakub Kicinski <kuba@...nel.org>; David S. Miller
><davem@...emloft.net>
>Cc: netdev@...r.kernel.org; Claudiu Manoil <claudiu.manoil@....com>;
>Vladimir Oltean <vladimir.oltean@....com>
>Subject: [PATCH net-next 2/2] net: enetc: don't depend on system
>endianness in enetc_set_mac_ht_flt
>
>From: Vladimir Oltean <vladimir.oltean@....com>
>
>When enetc runs out of exact match entries for unicast address
>filtering, it switches to an approach based on hash tables, where
>multiple MAC addresses might end up in the same bucket.
>
>However, the enetc_set_mac_ht_flt function currently depends on the
>system endianness, because it interprets the 64-bit hash value as an
>array of two u32 elements. Modify this to use lower_32_bits and
>upper_32_bits.
>
>Tested by forcing enetc to go into hash table mode by creating two
>macvlan upper interfaces:
>
>ip link add link eno0 address 00:01:02:03:00:00 eno0.0 type macvlan && ip link
>set eno0.0 up
>ip link add link eno0 address 00:01:02:03:00:01 eno0.1 type macvlan && ip link
>set eno0.1 up
>
>and verified that the same bit values are written to the registers
>before and after:
>
>enetc_sync_mac_filters: addr 00:00:80:00:40:10 exact match 0
>enetc_sync_mac_filters: addr 00:00:00:00:80:00 exact match 0
>enetc_set_mac_ht_flt: hash 0x80008000000000 UMHFR0 0x0 UMHFR1
>0x800080
>
>Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Claudiu Manoil <claudiu.manoil@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ