[PATCH] atm: lanai: dont run lanai_dev_close if not open

2021-02-27 Thread Tong Zhang
lanai_dev_open() can fail. When it fail, lanai->base is unmapped and the pci device is disabled. The caller, lanai_init_one(), then tries to run atm_dev_deregister(). This will subsequently call lanai_dev_close() and use the already released MMIO area. To fix this issue, set the lanai->base to NUL

Re: INFO: task hung in switchdev_deferred_process_work (2)

2021-02-27 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:5695e516 Merge tag 'io_uring-worker.v3-2021-02-25' of git:.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=135da5cad0 kernel config: https://syzkaller.appspot.com/x/.config?x=8c76dad

Re: [RFC PATCH net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-02-27 Thread Andrew Lunn
On Wed, Feb 24, 2021 at 05:41:10PM +0200, Moshe Shemesh wrote: > From: Vladyslav Tarasiuk > > Define get_module_eeprom_data_by_page() ethtool callback and implement > netlink infrastructure. > > get_module_eeprom_data_by_page() allows network drivers to dump a part > of module's EEPROM specified

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-27 Thread Linus Walleij
On Wed, Feb 17, 2021 at 7:21 AM DENG Qingfang wrote: > Add support for Realtek RTL8366S switch tag > > Signed-off-by: DENG Qingfang I understand this switch tag now sorry for confusion. > @@ -104,6 +104,12 @@ config NET_DSA_TAG_RTL4_A > Realtek switches with 4 byte protocol A tags, s

[PATCH] atm: eni: dont release is never initialized

2021-02-27 Thread Tong Zhang
label err_eni_release is reachable when eni_start() fail. In eni_start() it calls dev->phy->start() in the last step, if start() fail we don't need to call phy->stop(), if start() is never called, we neither need to call phy->stop(), otherwise null-ptr-deref will happen. In order to fix this issue

[PATCH v3] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-27 Thread Pavel Skripkin
syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. It was caused by __netdev_alloc_skb(), which doesn't check len value after adding NET_SKB_PAD. Order will be >= MAX_ORDER and passed to __alloc_pages_nodemask() if size > KMALLOC_MAX_SIZE. Same happens in __napi_alloc_sk

Re: [PATCH net] net: Fix gro aggregation for udp encaps with zero csum

2021-02-27 Thread John Fastabend
Willem de Bruijn wrote: > On Fri, Feb 26, 2021 at 4:23 PM Daniel Borkmann wrote: > > > > We noticed a GRO issue for UDP-based encaps such as vxlan/geneve when the > > csum for the UDP header itself is 0. In that case, GRO aggregation does > > not take place on the phys dev, but instead is deferred

[PATCH v2] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-27 Thread Pavel Skripkin
syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. It was caused by __netdev_alloc_skb(), which doesn't check len value after adding NET_SKB_PAD. Order will be >= MAX_ORDER and passed to __alloc_pages_nodemask() if size > KMALLOC_MAX_SIZE. Same happens in __napi_alloc_sk

Re: [PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets

2021-02-27 Thread Florian Fainelli
On 2/26/2021 5:20 AM, Rafał Miłecki wrote: > From: Rafał Miłecki > > When receiving a lot of packets hardware may run out of free > descriptiors and stop RX ring. Enable it every time after handling > received packets. > > Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controll

Re: [PATCH v2] eeprom/optoe: driver to read/write SFP/QSFP/CMIS EEPROMS

2021-02-27 Thread Andrew Lunn
> > I assume you have seen the work NVIDIA submitted last week? This idea of > > linear pages is really restrictive and we are moving away from it. > > No, I haven't seen it. I can't seem to locate anything in the past month on > LMKL from NVIDIA. Please point me to it. [RFC PATCH net-next 0/5]

Re: [PATCH net] net: Fix gro aggregation for udp encaps with zero csum

2021-02-27 Thread Willem de Bruijn
On Fri, Feb 26, 2021 at 4:23 PM Daniel Borkmann wrote: > > We noticed a GRO issue for UDP-based encaps such as vxlan/geneve when the > csum for the UDP header itself is 0. In that case, GRO aggregation does > not take place on the phys dev, but instead is deferred to the vxlan/geneve > driver (see

Re: [PATCH v2 net 2/6] net: enetc: initialize RFS/RSS memories for unused ports too

2021-02-27 Thread Michael Walle
Am 2021-02-25 13:18, schrieb Vladimir Oltean: From: Vladimir Oltean Michael reports that since linux-next-20210211, the AER messages for ECC errors have started reappearing, and this time they can be reliably reproduced with the first ping on one of his LS1028A boards. $ ping 1[ 33.258069]

Re: [PATCH v2 net 5/6] net: enetc: don't disable VLAN filtering in IFF_PROMISC mode

2021-02-27 Thread Michael Walle
Am 2021-02-27 01:16, schrieb Vladimir Oltean: On Fri, Feb 26, 2021 at 03:49:22PM -0800, Jakub Kicinski wrote: On Sat, 27 Feb 2021 01:42:44 +0200 Vladimir Oltean wrote: > On Fri, Feb 26, 2021 at 03:28:36PM -0800, Jakub Kicinski wrote: > > I don't understand what you're fixing tho. > > > > Are we

[PATCH bpf-next v5 0/2] Optimize bpf_redirect_map()/xdp_do_redirect()

2021-02-27 Thread Björn Töpel
Hi XDP-folks, This two patch series contain two optimizations for the bpf_redirect_map() helper and the xdp_do_redirect() function. The bpf_redirect_map() optimization is about avoiding the map lookup dispatching. Instead of having a switch-statement and selecting the correct lookup function, we

[PATCH bpf-next v5 2/2] bpf, xdp: restructure redirect actions

2021-02-27 Thread Björn Töpel
From: Björn Töpel The XDP_REDIRECT implementations for maps and non-maps are fairly similar, but obviously need to take different code paths depending on if the target is using a map or not. Today, the redirect targets for XDP either uses a map, or is based on ifindex. Here, an explicit redirect

[PATCH bpf-next v5 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-27 Thread Björn Töpel
From: Björn Töpel Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this change adds bpf_redirect_map() as a map operation. Each map provides its bpf_redirect_map() version, and correct function is autom

Re: [net 01/15] net/mlx5e: E-switch, Fix rate calculation for overflow

2021-02-27 Thread Arnd Bergmann
On Fri, Feb 12, 2021 at 3:59 AM Saeed Mahameed wrote: > > From: Parav Pandit > > rate_bytes_ps is a 64-bit field. It passed as 32-bit field to > apply_police_params(). Due to this when police rate is higher > than 4Gbps, 32-bit calculation ignores the carry. This results > in incorrect rate confi

[PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-27 Thread Lorenzo Bianconi
We want to change the current ndo_xdp_xmit drop semantics because it will allow us to implement better queue overflow handling. This is working towards the larger goal of a XDP TX queue-hook. Move XDP_REDIRECT error path handling from each XDP ethernet driver to devmap code. According to the new AP

Re: [PATCH] net/core/skbuff.c: __netdev_alloc_skb fix when len is greater than KMALLOC_MAX_SIZE

2021-02-27 Thread Alexander Lobakin
From: Pavel Skripkin Date: Fri, 26 Feb 2021 22:11:06 +0300 Hi, > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. > It was caused by __netdev_alloc_skb(), which doesn't check len value after > adding NET_SKB_PAD. > Order will be >= MAX_ORDER and passed to __alloc_pag

Re: [PATCH bpf-next V2 1/2] bpf: BPF-helper for MTU checking add length input

2021-02-27 Thread Jesper Dangaard Brouer
On Sat, 27 Feb 2021 00:36:02 +0100 Daniel Borkmann wrote: > On 2/18/21 12:49 PM, Jesper Dangaard Brouer wrote: > > The FIB lookup example[1] show how the IP-header field tot_len > > (iph->tot_len) is used as input to perform the MTU check. > > > > This patch extend the BPF-helper bpf_check_mtu()

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-27 Thread Daniel Borkmann
On 2/27/21 10:04 AM, Björn Töpel wrote: On 2021-02-26 22:48, Daniel Borkmann wrote: On 2/26/21 12:23 PM, Björn Töpel wrote: From: Björn Töpel Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this ch

Re: [PATCH bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-27 Thread Lorenzo Bianconi
> On 2/17/21 2:56 PM, Lorenzo Bianconi wrote: > > We want to change the current ndo_xdp_xmit drop semantics because > > it will allow us to implement better queue overflow handling. > > This is working towards the larger goal of a XDP TX queue-hook. > > Move XDP_REDIRECT error path handling from ea

[PATCH] e1000e: use proper #include guard name in hw.h

2021-02-27 Thread Greg Kroah-Hartman
The include guard for the e1000e and e1000 hw.h files are the same, so add the proper "E" term to the hw.h file for the e1000e driver. This resolves some static analyzer warnings, like the one found by the "lgtm.com" tool. Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: "David S. Miller" Cc: Jakub Ki

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-27 Thread Björn Töpel
On 2021-02-26 22:48, Daniel Borkmann wrote: On 2/26/21 12:23 PM, Björn Töpel wrote: From: Björn Töpel Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this change adds bpf_redirect_map() as a map

Re: [RFC PATCH v5 11/19] virtio/vsock: dequeue callback for SOCK_SEQPACKET

2021-02-27 Thread Arseny Krasnov
On 24.02.2021 09:41, Michael S. Tsirkin wrote: > On Wed, Feb 24, 2021 at 08:07:48AM +0300, Arseny Krasnov wrote: >> On 23.02.2021 17:17, Michael S. Tsirkin wrote: >>> On Thu, Feb 18, 2021 at 08:39:37AM +0300, Arseny Krasnov wrote: This adds transport callback and it's logic for SEQPACKET deq