[PATCH RESEND net-next] net/ncsi: Refactor MAC, VLAN filters

David Miller davem at davemloft.net
Wed Apr 18 03:51:15 AEST 2018


From: Samuel Mendoza-Jonas <sam at mendozajonas.com>
Date: Tue, 17 Apr 2018 14:23:23 +1000

> The NCSI driver defines a generic ncsi_channel_filter struct that can be
> used to store arbitrarily formatted filters, and several generic methods
> of accessing data stored in such a filter.
> However in both the driver and as defined in the NCSI specification
> there are only two actual filters: VLAN ID filters and MAC address
> filters. The splitting of the MAC filter into unicast, multicast, and
> mixed is also technically not necessary as these are stored in the same
> location in hardware.
> 
> To save complexity, particularly in the set up and accessing of these
> generic filters, remove them in favour of two specific structs. These
> can be acted on directly and do not need several generic helper
> functions to use.
> 
> This also fixes a memory error found by KASAN on ARM32 (which is not
> upstream yet), where response handlers accessing a filter's data field
> could write past allocated memory.
 ...
> Reported-by: Joel Stanley <joel at jms.id.au>
> Signed-off-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>

Applied to net-next, thank you.


More information about the openbmc mailing list