[PATCH mlx5-next v7 4/4] net/mlx5: Implement sriov_get_vf_total_msix/count() callbacks

2021-02-28 Thread Leon Romanovsky
From: Leon Romanovsky The mlx5 implementation executes a firmware command on the PF to change the configuration of the selected VF. Signed-off-by: Leon Romanovsky --- .../net/ethernet/mellanox/mlx5/core/main.c| 2 ++ .../ethernet/mellanox/mlx5/core/mlx5_core.h | 7 .../net/etherne

[PATCH mlx5-next v7 2/4] net/mlx5: Add dynamic MSI-X capabilities bits

2021-02-28 Thread Leon Romanovsky
From: Leon Romanovsky These new fields declare the number of MSI-X vectors that is possible to allocate on the VF through PF configuration. Value must be in range defined by min_dynamic_vf_msix_table_size and max_dynamic_vf_msix_table_size. The driver should continue to query its MSI-X table th

[PATCH mlx5-next v7 3/4] net/mlx5: Dynamically assign MSI-X vectors count

2021-02-28 Thread Leon Romanovsky
From: Leon Romanovsky The number of MSI-X vectors is a PCI property visible through lspci. The field is read-only and configured by the device. The mlx5 devices work in a static or dynamic assignment mode. Static assignment means that all newly created VFs have a preset number of MSI-X vectors d

[PATCH mlx5-next v7 1/4] PCI: Add a sysfs file to change the MSI-X table size of SR-IOV VFs

2021-02-28 Thread Leon Romanovsky
From: Leon Romanovsky A typical cloud provider SR-IOV use case is to create many VFs for use by guest VMs. The VFs may not be assigned to a VM until a customer requests a VM of a certain size, e.g., number of CPUs. A VF may need MSI-X vectors proportional to the number of CPUs in the VM, but ther

[PATCH mlx5-next v7 0/4] Dynamically assign MSI-X vectors count

2021-02-28 Thread Leon Romanovsky
From: Leon Romanovsky @Alexander Duyck, please update me if I can add your ROB tag again to the series, because you liked v6 more. Thanks - Changelog v7: * Rebase on top v5.12-rc1 * More english fixes * Returned

Re: [PATCH] vdpa/mlx5: Fix wrong use of bit numbers

2021-02-28 Thread Jason Wang
On 2021/3/1 2:28 下午, Eli Cohen wrote: VIRTIO_F_VERSION_1 is a bit number. Use BIT_ULL() with mask conditionals. Also, in mlx5_vdpa_is_little_endian() use BIT_ULL for consistency with the rest of the code. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off

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

2021-02-28 Thread Jesper Dangaard Brouer
On Sun, 28 Feb 2021 23:27:25 +0100 Lorenzo Bianconi wrote: > > > drops = bq->count - sent; > > > -out: > > > - bq->count = 0; > > > + if (unlikely(drops > 0)) { > > > + /* If not all frames have been transmitted, it is our > > > + * responsibility to free them > > > +

Re: Re: [PATCH] iwlegacy: Add missing check in il4965_commit_rxon

2021-02-28 Thread dinghao . liu
> On Sun, Feb 28, 2021 at 08:25:22PM +0800, Dinghao Liu wrote: > > There is one il_set_tx_power() call in this function without > > return value check. Print error message and return error code > > on failure just like the other il_set_tx_power() call. > > We have few calls for il_set_tx_power(),

Re: [PATCH] iwlegacy: Add missing check in il4965_commit_rxon

2021-02-28 Thread Stanislaw Gruszka
On Sun, Feb 28, 2021 at 08:25:22PM +0800, Dinghao Liu wrote: > There is one il_set_tx_power() call in this function without > return value check. Print error message and return error code > on failure just like the other il_set_tx_power() call. We have few calls for il_set_tx_power(), on some case

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-02-28 Thread Martin Schiller
On 2021-02-27 00:03, Xie He wrote: On Fri, Feb 26, 2021 at 6:21 AM Martin Schiller wrote: I have now had a look at it. It works as expected. I just wonder if it would not be more appropriate to call the lapb_register() already in x25_hdlc_open(), so that the layer2 (lapb) can already "work" be

[PATCH] vdpa/mlx5: Fix wrong use of bit numbers

2021-02-28 Thread Eli Cohen
VIRTIO_F_VERSION_1 is a bit number. Use BIT_ULL() with mask conditionals. Also, in mlx5_vdpa_is_little_endian() use BIT_ULL for consistency with the rest of the code. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen --- drivers/vdpa/mlx5/net

[PATCH 5/5] mm: memcontrol: use object cgroup for remote memory cgroup charging

2021-02-28 Thread Muchun Song
We spent a lot of energy to make slab accounting do not hold a refcount to memory cgroup, so the dying cgroup can be freed as soon as possible on cgroup offlined. But some users of remote memory cgroup charging (e.g. bpf and fsnotify) hold a refcount to memory cgroup for charging to it later. Actu

[PATCH 4/5] mm: memcontrol: move remote memcg charging APIs to CONFIG_MEMCG_KMEM

2021-02-28 Thread Muchun Song
The remote memcg charing APIs is a mechanism to charge kernel memory to a given memcg. So we can move the infrastructure to the scope of the CONFIG_MEMCG_KMEM. As a bonus, on !CONFIG_MEMCG_KMEM build some functions and variables can be compiled out. Signed-off-by: Muchun Song --- include/linux/

[PATCH 3/5] mm: memcontrol: reparent the kmem pages on cgroup removal

2021-02-28 Thread Muchun Song
Currently the slab objects already reparent to it's parent memcg on cgroup removal. But there are still some corner objects which are not reparent (e.g. allocations larger than order-1 page on SLUB). Actually those objects are allocated directly from the buddy allocator. And they are chared as kmem

[PATCH 1/5] mm: memcontrol: introduce obj_cgroup_{un}charge_page

2021-02-28 Thread Muchun Song
We know that the unit of charging slab object is bytes, the unit of charging kmem page is PAGE_SIZE. So If we want to reuse obj_cgroup APIs to charge the kmem pages, we should pass PAGE_SIZE (as third parameter) to obj_cgroup_charge(). Because the charing size is page size, we always need to refill

[PATCH 2/5] mm: memcontrol: make page_memcg{_rcu} only applicable for non-kmem page

2021-02-28 Thread Muchun Song
We want to reuse the obj_cgroup APIs to reparent the kmem pages when the memcg offlined. If we do this, we should store an object cgroup pointer to page->memcg_data for the kmem pages. Finally, page->memcg_data can have 3 different meanings. 1) For the slab pages, page->memcg_data points to an

[PATCH 0/5] Use obj_cgroup APIs to change kmem pages

2021-02-28 Thread Muchun Song
Since Roman series "The new cgroup slab memory controller" applied. All slab objects are changed via the new APIs of obj_cgroup. This new APIs introduce a struct obj_cgroup instead of using struct mem_cgroup directly to charge slab objects. It prevents long-living objects from pinning the original

Re: rename the command ip

2021-02-28 Thread Leon Romanovsky
On Sun, Feb 28, 2021 at 10:39:14PM +0100, Phil Sutter wrote: > William, > > [Cc'ing netdev list as that's the place to discuss iproute2 > development.] <...> > > IMPORTANT NOTICE: The contents of this email and any attachments are > > confidential and may also be privileged. If you are not the i

[PATCH] inetpeer: use div64_ul() and clamp_val() calculate inet_peer_threshold

2021-02-28 Thread Yejune Deng
In inet_initpeers(), struct inet_peer on IA32 uses 128 bytes in nowdays. Get rid of the cascade and use div64_ul() and clamp_val() calculate that will not need to be adjusted in the future as suggested by Eric Dumazet. Suggested-by: Eric Dumazet Signed-off-by: Yejune Deng --- net/ipv4/inetpeer.

Not yet merged patches

2021-02-28 Thread Eli Cohen
Hi Michael, I see that you did not include these in your latest pull request. https://lkml.org/lkml/2021/2/10/1386 https://lkml.org/lkml/2021/2/10/1383 https://lkml.org/lkml/2021/2/18/124 Are you going to merge them?

[PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-02-28 Thread Tong Zhang
Currently doing modprobe c_can_pci will make kernel complain "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() called before pm is initialized in register_candev() and doing so will also cause it to enable twice. This fix is similar to 227619c3ff7c, move those pm_enable/disable

[PATCH] xfrm: Use actual socket sk instead of skb socket for xfrm_output_resume

2021-02-28 Thread Evan Nimmo
A situation can occur where the interface bound to the sk is different to the interface bound to the sk attached to the skb. The interface bound to the sk is the correct one however this information is lost inside xfrm_output2 and instead the sk on the skb is used in xfrm_output_resume instead. Thi

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Jason Wang
On 2021/3/1 5:34 上午, Michael S. Tsirkin wrote: On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: Detecting it isn't enough though, we will need a new ioctl to notify the kernel that it's a legacy guest. Ugh :( Well, although I think adding an ioctl is doable, may I know what the use

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Jason Wang
On 2021/3/1 5:30 上午, Michael S. Tsirkin wrote: On Wed, Feb 24, 2021 at 05:30:37PM +0800, Jason Wang wrote: On 2021/2/24 4:43 下午, Michael S. Tsirkin wrote: On Wed, Feb 24, 2021 at 04:26:43PM +0800, Jason Wang wrote: Basically on first guest access QEMU would tell kernel whether gu

Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Jason Wang
On 2021/3/1 5:25 上午, Michael S. Tsirkin wrote: On Fri, Feb 26, 2021 at 04:19:16PM +0800, Jason Wang wrote: On 2021/2/26 2:53 上午, Michael S. Tsirkin wrote: On Thu, Feb 25, 2021 at 12:36:07PM +0800, Jason Wang wrote: On 2021/2/24 7:12 下午, Cornelia Huck wrote: On Wed, 24 Feb 2021 17:29:07 +080

[PATCH v5 net-next] virtio-net: support XDP when not more queues

2021-02-28 Thread Xuan Zhuo
The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX/XDP_REDIRECT, then xdp cannot be loaded to work, even xdp does not use the XDP_TX/XDP_REDIRECT. Th

Re: [PATCH] net:ipv4: Packet is not forwarded if bc_forwarding not configured on ingress interface

2021-02-28 Thread David Ahern
On 2/28/21 5:53 PM, Henry Shen wrote: > When an IPv4 packet with a destination address of broadcast is received > on an ingress interface, it will not be forwarded out of the egress > interface if the ingress interface is not configured with bc_forwarding > but the egress interface is. If both the

Re: [PATCH wpan 02/17] net: ieee802154: fix memory leak when deliver monitor skbs

2021-02-28 Thread Alexander Aring
Hi Stefan, On Sun, 28 Feb 2021 at 10:21, Alexander Aring wrote: > > This patch adds a missing consume_skb() when deliver a skb to upper > monitor interfaces of a wpan phy. > > Reported-by: syzbot+44b651863a17760a8...@syzkaller.appspotmail.com > Signed-off-by: Alexander Aring > --- > net/mac8021

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-02-28 Thread Jisheng Zhang
On Mon, 1 Mar 2021 11:51:24 +0900 Dominique Martinet wrote: > > > Jisheng Zhang wrote on Mon, Mar 01, 2021 at 10:33:36AM +0800: > > I met below warning when cating a small size(about 80bytes) txt file > > on 9pfs(msize=2097152 is passed to 9p mount option), the reason is we > > miss iov_iter_ad

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-02-28 Thread Dominique Martinet
Jisheng Zhang wrote on Mon, Mar 01, 2021 at 10:33:36AM +0800: > I met below warning when cating a small size(about 80bytes) txt file > on 9pfs(msize=2097152 is passed to 9p mount option), the reason is we > miss iov_iter_advance() if the read count is 0, so we didn't truncate > the pipe, then iov_i

[PATCH v4 net-next] virtio-net: support XDP_TX when not more queues

2021-02-28 Thread Xuan Zhuo
The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX. This patch allows XDP_TX to run by reuse the existing SQ with __netif_tx_lock() hold when there a

[PATCH] can: c_can_pci: fix use-after-free

2021-02-28 Thread Tong Zhang
There is a UAF in c_can_pci_remove(). dev is released by free_c_can_dev() and is used by pci_iounmap(pdev, priv->base) later. To fix this issue, save the mmio address before releasing dev. [ 1795.746699] == [ 1795.747093] BUG: KASAN:

[PATCH] net: 9p: free what was emitted when read count is 0

2021-02-28 Thread Jisheng Zhang
I met below warning when cating a small size(about 80bytes) txt file on 9pfs(msize=2097152 is passed to 9p mount option), the reason is we miss iov_iter_advance() if the read count is 0, so we didn't truncate the pipe, then iov_iter_pipe() thinks the pipe is full. Fix it by calling iov_iter_advance

Re: [PATCH] inetpeer: use else if instead of if to reduce judgment

2021-02-28 Thread Yejune Deng
Thanks,I will adopt it and resubmit. On Fri, Feb 26, 2021 at 10:50 PM Eric Dumazet wrote: > > > > On 2/26/21 11:57 AM, Yejune Deng wrote: > > In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will > > be judged three times. Use else if instead of if, it only needs to be > > judged

[PATCH] net:ipv4: Packet is not forwarded when ingress interface is not configured with bc_forwarding

2021-02-28 Thread Henry Shen
Allow an IPv4 packet with a destination address of broadcast to be forwarded if the ingress interface is not configured with bc_forwarding but the egress interface is. This is inline with Cisco's implementation of directed broadcast. Henry Shen (1): net:ipv4: Fix pakcet not forwarded when ing

[PATCH] net:ipv4: Packet is not forwarded if bc_forwarding not configured on ingress interface

2021-02-28 Thread Henry Shen
When an IPv4 packet with a destination address of broadcast is received on an ingress interface, it will not be forwarded out of the egress interface if the ingress interface is not configured with bc_forwarding but the egress interface is. If both the ingress and egress interfaces are configured

Re: [PATCH iproute2-next] mptcp: add support for port based endpoint

2021-02-28 Thread David Ahern
On 2/19/21 1:42 PM, Paolo Abeni wrote: > The feature is supported by the kernel since 5.11-net-next, > let's allow user-space to use it. > > Just parse and dump an additional, per endpoint, u16 attribute > > Signed-off-by: Paolo Abeni > --- > ip/ipmptcp.c| 16 ++-- > man/man

[PATCH] net:ipv4: Packet is not forwarded when ingress interface is not configured with bc_forwarding

2021-02-28 Thread Henry Shen
Allow an IPv4 packet with a destination address of broadcast to be forwarded if the ingress interface is not configured with bc_forwarding but the egress interface is. This is inline with Cisco's implementation of directed broadcast. Henry Shen (1): net:ipv4: Fix pakcet not forwarded when ing

Re: [PATCH v4] net/qrtr: fix __netdev_alloc_skb call

2021-02-28 Thread Alexander Lobakin
From: Pavel Skripkin Date: Mon, 1 Mar 2021 02:22:40 +0300 > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. > It was caused by a huge length value passed from userspace to > qrtr_tun_write_iter(), > which tries to allocate skb. Since the value comes from the untruste

[PATCH] net:ipv4: Packet is not forwarded when ingress interface is not configured with bc_forwarding

2021-02-28 Thread Henry Shen
When an IPv4 packet with a destination address of broadcast is received on an ingress interface, it will not be forwarded out of the egress interface if the ingress interface is not configured with bc_forwarding but the egress interface is. If both the ingress and egress interfaces are configured

Re: [RFC PATCH net 2/2] selftests: fib_nexthops: Test blackhole nexthops when loopback goes down

2021-02-28 Thread David Ahern
On 2/28/21 7:26 AM, Ido Schimmel wrote: > From: Ido Schimmel > > Test that blackhole nexthops are not flushed when the loopback device > goes down. > > > Signed-off-by: Ido Schimmel > --- > tools/testing/selftests/net/fib_nexthops.sh | 8 > 1 file changed, 8 insertions(+) > > diff

Re: [RFC PATCH net 1/2] nexthop: Do not flush blackhole nexthops when loopback goes down

2021-02-28 Thread David Ahern
On 2/28/21 7:26 AM, Ido Schimmel wrote: > From: Ido Schimmel > > As far as user space is concerned, blackhole nexthops do not have a > nexthop device and therefore should not be affected by the > administrative or carrier state of any netdev. > > However, when the loopback netdev goes down all t

[PATCH v4] net/qrtr: fix __netdev_alloc_skb call

2021-02-28 Thread Pavel Skripkin
syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. It was caused by a huge length value passed from userspace to qrtr_tun_write_iter(), which tries to allocate skb. Since the value comes from the untrusted source there is no need to raise a warning in __alloc_pages_nodem

[PATCH v4] net/qrtr: fix __netdev_alloc_skb call

2021-02-28 Thread Pavel Skripkin

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

2021-02-28 Thread Vladimir Oltean
On Sat, Feb 27, 2021 at 02:18:20PM +0100, Michael Walle wrote: > 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

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

2021-02-28 Thread Lorenzo Bianconi
> > Lorenzo Bianconi writes: > > > ... > > diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c > > b/drivers/net/ethernet/amazon/ena/ena_netdev.c > > index 102f2c91fdb8..7ad0557dedbd 100644 > > --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c > > +++ b/drivers/net/ethernet/amazon/ena/ena

Re: rename the command ip

2021-02-28 Thread Phil Sutter
William, [Cc'ing netdev list as that's the place to discuss iproute2 development.] On Fri, Feb 26, 2021 at 12:04:12PM -0600, William Chen wrote: > I see your excellent contributions to iproute2. I hope that you are well. Thanks! > But I have to say the command name "ip" is not good. It renders

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: > > Detecting it isn't enough though, we will need a new ioctl to notify > > the kernel that it's a legacy guest. Ugh :( > Well, although I think adding an ioctl is doable, may I know what the use > case there will be for kernel to leverag

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Wed, Feb 24, 2021 at 05:30:37PM +0800, Jason Wang wrote: > > On 2021/2/24 4:43 下午, Michael S. Tsirkin wrote: > > On Wed, Feb 24, 2021 at 04:26:43PM +0800, Jason Wang wrote: > > > Basically on first guest access QEMU would tell kernel whether > > > guest is using the legacy or the mode

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: > > > On 2/23/2021 9:04 PM, Michael S. Tsirkin wrote: > > On Tue, Feb 23, 2021 at 11:35:57AM -0800, Si-Wei Liu wrote: > > > > > > On 2/23/2021 5:26 AM, Michael S. Tsirkin wrote: > > > > On Tue, Feb 23, 2021 at 10:03:57AM +0800, Jason Wa

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Thu, Feb 25, 2021 at 04:56:42PM -0800, Si-Wei Liu wrote: > > Hi Michael, > > Are you okay to live without this ioctl for now? I think QEMU is the one > that needs to be fixed and will have to be made legacy guest aware. I think > the kernel can just honor the feature negotiation result done by

Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Fri, Feb 26, 2021 at 04:19:16PM +0800, Jason Wang wrote: > > On 2021/2/26 2:53 上午, Michael S. Tsirkin wrote: > > On Thu, Feb 25, 2021 at 12:36:07PM +0800, Jason Wang wrote: > > > On 2021/2/24 7:12 下午, Cornelia Huck wrote: > > > > On Wed, 24 Feb 2021 17:29:07 +0800 > > > > Jason Wang wrote: > >

[PATCH net 3/3] sh_eth: fix TRSCER mask for R7S9210

2021-02-28 Thread Sergey Shtylyov
According to the RZ/A2M Group User's Manual: Hardware, Rev. 2.00, the TRSCER register has bit 9 reserved, hence we can't use the driver's default TRSCER mask. Add the explicit initializer for sh_eth_cpu_data:: trscer_err_mask for R7S9210. Fixes: 6e0bb04d0e4f ("sh_eth: Add R7S9210 support") Signe

[PATCH net 2/3] sh_eth: fix TRSCER mask for R7S72100

2021-02-28 Thread Sergey Shtylyov
According to the RZ/A1H Group, RZ/A1M Group User's Manual: Hardware, Rev. 4.00, the TRSCER register has bit 9 reserved, hence we can't use the driver's default TRSCER mask. Add the explicit initializer for sh_eth_cpu_data::trscer_err_mask for R7S72100. Fixes: db893473d313 ("sh_eth: Add support

[PATCH net 1/3] sh_eth: fix TRSCER mask for SH771x

2021-02-28 Thread Sergey Shtylyov
According to the SH7710, SH7712, SH7713 Group User's Manual: Hardware, Rev. 3.00, the TRSCER register actually has only bit 7 valid (and named differently), with all the other bits reserved. Apparently, this was not the case with some early revisions of the manual as we have the other bits declar

[PATCH net 0/3] Fix TRSCER masks in the Ether driver

2021-02-28 Thread Sergey Shtylyov
Here are 3 patches against DaveM's 'net' repo. I'm fixing the TRSCER masks in the driver to match the manuals... [1/3] sh_eth: fix TRSCER mask for SH771x [2/3] sh_eth: fix TRSCER mask for R7S72100 [3/3] sh_eth: fix TRSCER mask for R7S9210

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

2021-02-28 Thread Pavel Skripkin
> From: Pavel Skripkin > Date: Sun, 28 Feb 2021 22:28:13 +0300 > > > Hi, thanks for reply! > > > > > From: Pavel Skripkin > > > Date: Sat, 27 Feb 2021 20:51:14 +0300 > > > > > > Hi, > > > > > > > syzbot found WARNING in __alloc_pages_nodemask()[1] when order > > > > >= > > > > MAX_ORDER. >

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

2021-02-28 Thread Alexander Lobakin
From: Pavel Skripkin Date: Sun, 28 Feb 2021 22:28:13 +0300 > Hi, thanks for reply! > > > From: Pavel Skripkin > > Date: Sat, 27 Feb 2021 20:51:14 +0300 > > > > Hi, > > > > > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= > > > MAX_ORDER. > > > It was caused by __netdev_alloc_s

Re: [RESEND net 0/3] net: hns3: fixes fot -net

2021-02-28 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Sat, 27 Feb 2021 15:24:50 +0800 you wrote: > The patchset includes some fixes for the HNS3 ethernet driver. > > Jian Shen (3): > net: hns3: fix error mask definition of flow director > net: hns3: fix query vlan mask val

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

2021-02-28 Thread Jakub Kicinski
On Sat, 27 Feb 2021 09:16:38 -0800 John Fastabend wrote: > 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 ag

Re: [PATCH net] net: phy: ti: take into account all possible interrupt sources

2021-02-28 Thread Jakub Kicinski
On Fri, 26 Feb 2021 17:30:20 +0200 Ioana Ciornei wrote: > diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c > index be1224b4447b..f7a2ec150e54 100644 > --- a/drivers/net/phy/dp83822.c > +++ b/drivers/net/phy/dp83822.c > @@ -290,6 +290,7 @@ static int dp83822_config_intr(struct phy_

Re: [PATCH net v2] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-28 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 25 Feb 2021 13:51:02 +0100 you wrote: > From: Yinjun Zhang > > The command "ethtool -L combined 0" may clean the RX/TX channel > count and skip the error path, since the attrs > tb[ETHTOOL_A_CHANNELS_RX_COUNT] and tb[

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

2021-02-28 Thread Jakub Kicinski
On Sat, 27 Feb 2021 08:38:24 -0800 Florian Fainelli wrote: > 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. > > >

Re: [PATCH v3 net-next] virtio-net: support XDP_TX when not more queues

2021-02-28 Thread Jakub Kicinski
On Sun, 28 Feb 2021 16:22:47 +0800 Xuan Zhuo wrote: > +static void virtnet_put_xdp_sq(struct virtnet_info *vi, struct send_queue > *sq) > +{ > + struct netdev_queue *txq; > + unsigned int qp; > + > + if (vi->curr_queue_pairs <= nr_cpu_ids) { > + qp = sq - vi->sq; > +

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

2021-02-28 Thread Pavel Skripkin
Hi, thanks for reply! > From: Pavel Skripkin > Date: Sat, 27 Feb 2021 20:51:14 +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 wi

Re: [PATCH net v2] net: fix race between napi kthread mode and busy poll

2021-02-28 Thread Jakub Kicinski
On Sat, 27 Feb 2021 15:23:56 -0800 Wei Wang wrote: > > > Indeed, looks like the task will be in WAKING state until it runs? > > > We can switch the check in napi_schedule() from > > > > > > if (thread->state == TASK_RUNNING) > > > > > > to > > > > > > if (!(thread->state & TASK_

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

2021-02-28 Thread Alexander Lobakin
From: Jakub Kicinski Date: Sun, 28 Feb 2021 10:55:52 -0800 > On Sun, 28 Feb 2021 18:14:46 + Alexander Lobakin wrote: > > > [1] WARNING in __alloc_pages_nodemask+0x5f8/0x730 mm/page_alloc.c:5014 > > > Call Trace: > > > __alloc_pages include/linux/gfp.h:511 [inline] > > > __alloc_pages_node i

Re: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h

2021-02-28 Thread Jakub Kicinski
On Sun, 28 Feb 2021 19:58:17 +0300 Alexey Dobriyan wrote: > From c17ac63e1334c742686cd411736699c1d34d45a7 Mon Sep 17 00:00:00 2001 > From: Alexey Dobriyan > Date: Wed, 10 Feb 2021 21:07:45 +0300 > Subject: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h > > This file has been empty sin

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

2021-02-28 Thread Jakub Kicinski
On Sun, 28 Feb 2021 18:14:46 + Alexander Lobakin wrote: > > [1] WARNING in __alloc_pages_nodemask+0x5f8/0x730 mm/page_alloc.c:5014 > > Call Trace: > > __alloc_pages include/linux/gfp.h:511 [inline] > > __alloc_pages_node include/linux/gfp.h:524 [inline] > > alloc_pages_node include/linux/gfp

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

2021-02-28 Thread Alexander Lobakin
From: Pavel Skripkin Date: Sat, 27 Feb 2021 20:51:14 +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 net] net: dsa: tag_rtl4_a: fix egress tags

2021-02-28 Thread Florian Fainelli
On 2/28/2021 9:08 AM, DENG Qingfang wrote: > Commit 86dd9868b878 has several issues, but was accepted too soon > before anyone could take a look. > > - Double free. dsa_slave_xmit() will free the skb if the xmit function > returns NULL, but the skb is already freed by eth_skb_pad(). Use > _

[PATCH 12/11] pragma once: scripted treewide conversion

2021-02-28 Thread Alexey Dobriyan
[ Bcc a lot of lists so that people understand what's this is all ] [ about without creating uber-cc-thread. ] [ Apologies if I missed your subsystem] [ Please see [PATCH 11/11: pragma once: conversion script (in Pytho

[PATCH net] net: dsa: tag_rtl4_a: fix egress tags

2021-02-28 Thread DENG Qingfang
Commit 86dd9868b878 has several issues, but was accepted too soon before anyone could take a look. - Double free. dsa_slave_xmit() will free the skb if the xmit function returns NULL, but the skb is already freed by eth_skb_pad(). Use __skb_put_padto() to avoid that. - Unnecessary allocation.

[PATCH 10/11] pragma once: delete few backslashes

2021-02-28 Thread Alexey Dobriyan
>From 251ca5673886b5bb0a42004944290b9d2b267a4a Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 19 Feb 2021 13:37:24 +0300 Subject: [PATCH 10/11] pragma once: delete few backslashes Some macros contain one backslash too many and end up being the last macro in a header file. When #pragma

[PATCH 01/11] pragma once: delete include/linux/atm_suni.h

2021-02-28 Thread Alexey Dobriyan
>From c17ac63e1334c742686cd411736699c1d34d45a7 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Wed, 10 Feb 2021 21:07:45 +0300 Subject: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h This file has been empty since 2.3.99-pre3! Delete it instead of converting to #pragma once. Sig

Re: [RFC PATCH net-next 11/12] Documentation: networking: switchdev: clarify device driver behavior

2021-02-28 Thread Ido Schimmel
On Sun, Feb 21, 2021 at 11:33:54PM +0200, Vladimir Oltean wrote: > From: Florian Fainelli > > This patch provides details on the expected behavior of switchdev > enabled network devices when operating in a "stand alone" mode, as well > as when being bridge members. This clarifies a number of thin

Re: [RESEND PATCH v18 0/3] userspace MHI client interface driver

2021-02-28 Thread Manivannan Sadhasivam
On Sun, Feb 28, 2021 at 03:12:42PM +0100, Aleksander Morgado wrote: > Hey Manivannan, Jakub & all, > > > > > So please let us know the path forward on this series. We are open to > > any suggestions but you haven't provided one till now. > > > > I just found out that Sierra Wireless also provides

[PATCH wpan 17/17] net: ieee802154: stop dump llsec params for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec params for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+cde43a581a8e5f317...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 fil

[PATCH wpan 16/17] net: ieee802154: forbid monitor for del llsec seclevel

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+fbf4fc11a819824e0...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3

[PATCH wpan 15/17] net: ieee802154: forbid monitor for add llsec seclevel

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/

[PATCH wpan 13/17] net: ieee802154: forbid monitor for del llsec devkey

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl

[PATCH wpan 01/17] net: ieee802154: make shift exponent unsigned

2021-02-28 Thread Alexander Aring
This patch changes the iftype type variable to unsigned that it can never be reach a negative value. Reported-by: syzbot+7bf7b22759195c9a2...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH wpan 14/17] net: ieee802154: stop dump llsec seclevels for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec seclevels for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154

[PATCH wpan 11/17] net: ieee802154: stop dump llsec devkeys for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec devkeys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c

[PATCH wpan 12/17] net: ieee802154: forbid monitor for add llsec devkey

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl

[PATCH wpan 09/17] net: ieee802154: forbid monitor for add llsec dev

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 04/17] net: ieee802154: forbid monitor for set llsec params

2021-02-28 Thread Alexander Aring
This patch forbids to set llsec params for monitor interfaces which we don't support yet. Reported-by: syzbot+8b6719da8a04beeaf...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802154

[PATCH wpan 10/17] net: ieee802154: forbid monitor for del llsec dev

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 06/17] net: ieee802154: forbid monitor for add llsec key

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 02/17] net: ieee802154: fix memory leak when deliver monitor skbs

2021-02-28 Thread Alexander Aring
This patch adds a missing consume_skb() when deliver a skb to upper monitor interfaces of a wpan phy. Reported-by: syzbot+44b651863a17760a8...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/mac802154/rx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac802154/rx.c

[PATCH wpan 07/17] net: ieee802154: forbid monitor for del llsec key

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 08/17] net: ieee802154: stop dump llsec devs for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec devs for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c b/

[PATCH wpan 00/17] ieee802154: syzbot fixes

2021-02-28 Thread Alexander Aring
Hi, this patch series contains fixes found by syzbot for nl802154 and a memory leak each time we receiving a skb for monitor interfaces. The first three patches are misc fixes, all others are to forbid monitor interfaces to access security mib values which are never initialized for monitor interf

[PATCH wpan 03/17] net: ieee802154: nl-mac: fix check on panid

2021-02-28 Thread Alexander Aring
This patch fixes a null pointer derefence for panid handle by move the check for the netlink variable directly before accessing them. Reported-by: syzbot+d4c07de0144f6f63b...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl-mac.c | 7 --- 1 file changed, 4 inser

[PATCH wpan 05/17] net: ieee802154: stop dump llsec keys for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec keys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c b/

[RFC PATCH 9/12] x86/Hyper-V: Add new parameter for vmbus_sendpacket_pagebuffer()/mpb_desc()

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add new parameter io_type and struct bounce_pkt for vmbus_sendpacket_pagebuffer() and vmbus_sendpacket_mpb_desc() in order to add bounce buffer support later. Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Tianyu Lan --- drivers/hv/channel.

[RFC PATCH 11/12] HV/Netvsc: Add Isolation VM support for netvsc driver

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add Isolation VM support for netvsc driver. Map send/receive ring buffer in extra address space in SNP isolation VM, reserve bounce buffer for packets sent via vmbus_sendpacket_pagebuffer() and release bounce buffer via hv_pkt_bounce() when get send complete response from host.

[RFC PATCH 2/12] x86/Hyper-V: Add new hvcall guest address host visibility support

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add new hvcall guest address host visibility support. Mark vmbus ring buffer visible to host when create gpadl buffer and mark back to not visible when tear down gpadl buffer. Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Tianyu Lan --- arc

[RFC PATCH 00/12] x86/Hyper-V: Add Hyper-V Isolation VM support

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Hyper-V provides two kinds of Isolation VMs. VBS(Virtualization-based security) and AMD SEV-SNP unenlightened Isolation VMs. This patchset is to add support for these Isolation VM support in Linux. The memory of these vms are encrypted and host can't access guest memory directly

[RFC PATCH 1/12] x86/Hyper-V: Add visibility parameter for vmbus_establish_gpadl()

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add visibility parameter for vmbus_establish_gpadl() and prepare to change host visibility when create gpadl for buffer. Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Tianyu Lan --- arch/x86/include/asm/hyperv-tlfs.h | 9 + drivers

  1   2   >