[PATCH] net: Fix the arp error in some cases

2020-06-12 Thread guodeqing
ie., $ ifconfig eth0 6.6.6.6 netmask 255.255.255.0 $ ip rule add from 6.6.6.6 table $ ip route add 9.9.9.9 via 6.6.6.6 $ ping -I 6.6.6.6 9.9.9.9 PING 9.9.9.9 (9.9.9.9) from 6.6.6.6 : 56(84) bytes of data. ^C --- 9.9.9.9 ping statistics --- 3 packets transmitted, 0 received, 100% packet los

Re: [PATCH] test_objagg: Fix memory leak in test_hints_case()

2020-06-12 Thread Markus Elfring
> … The patch fixes this issue. I propose to replace this information by the tag “Fixes”. Please choose another imperative wording for your change description. Regards, Markus

Re: [PATCH] ethernet: Fix memory leak in ethoc_probe()

2020-06-12 Thread Markus Elfring
> … The patch fixes this issue. I propose to replace this information by the tag “Fixes”. Please choose another imperative wording for your change description. Regards, Markus

Re: [PATCH v2 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-12 Thread Marcel Holtmann
Hi Miao-chen, > The name in the mgmt-api.txt doc is "Add Advertisement Patterns > Monitor Command", and Luiz changed the name from > MGMT_OP_ADD_ADV_PATTERNS_MONITOR to MGMT_OP_ADD_ADV_MONITOR before > applied. So we either change the doc or change the header file to > match. Based on the outcome

Re: [PATCH] rocker: Fix error handling in dma_rings_init()

2020-06-12 Thread Markus Elfring
> … The patch fixes the > order consistent with cleanup in rocker_dma_rings_fini(). I suggest to choose another imperative wording for your change description. Will the tag “Fixes” become helpful for the commit message? Regards, Markus

[PATCH v3] net: atm: Remove the error message according to the atomic context

2020-06-12 Thread Yi Wang
From: Liao Pingfang Looking into the context (atomic!) and the error message should be dropped. Signed-off-by: Liao Pingfang --- Changes in v3: remove {} as there is only one statement left. net/atm/lec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/atm/lec.c b/n

Re: [RFC PATCH bpf-next 8/8] tools/bpftool: show PIDs with FDs open against BPF map/prog/link/btf

2020-06-12 Thread Andrii Nakryiko
On Fri, Jun 12, 2020 at 8:45 PM Alexei Starovoitov wrote: > > On Fri, Jun 12, 2020 at 03:31:50PM -0700, Andrii Nakryiko wrote: > > Add bpf_iter-based way to find all the processes that hold open FDs against > > BPF object (map, prog, link, btf). Add new flag (-o, for "ownership", given > > -p is a

Re: [PATCH] NFC: Fix error handling in rawsock_connect()

2020-06-12 Thread Markus Elfring
> … The patch fixes this issue. I suggest to replace this information by the tag “Fixes”. Please choose another imperative wording for your change description. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=df2fbf5bfa0e7fff8b

Re: [PATCH bpf v3 1/2] bpf: don't return EINVAL from {get,set}sockopt when optlen > PAGE_SIZE

2020-06-12 Thread Alexei Starovoitov
On Fri, Jun 12, 2020 at 06:03:03PM -0700, Stanislav Fomichev wrote: > On Fri, Jun 12, 2020 at 5:34 PM Alexei Starovoitov > wrote: > > > > On Mon, Jun 08, 2020 at 11:27:47AM -0700, Stanislav Fomichev wrote: > > > Attaching to these hooks can break iptables because its optval is > > > usually quite

Re: [RFC PATCH bpf-next 8/8] tools/bpftool: show PIDs with FDs open against BPF map/prog/link/btf

2020-06-12 Thread Alexei Starovoitov
On Fri, Jun 12, 2020 at 03:31:50PM -0700, Andrii Nakryiko wrote: > Add bpf_iter-based way to find all the processes that hold open FDs against > BPF object (map, prog, link, btf). Add new flag (-o, for "ownership", given > -p is already taken) to trigger collection and output of these PIDs. > > Sa

net boot error: BUG: using smp_processor_id() in preemptible code in ext4_mb_new_blocks

2020-06-12 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:6954a9e4 ibmvnic: Flush existing work items before device .. git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=1367d93910 kernel config: https://syzkaller.appspot.com/x/.config?x=b366fd92adf6f8b4 dashboar

RE: linux-next: build warning after merge of the net-next tree

2020-06-12 Thread Kirsher, Jeffrey T
> -Original Message- > From: Stephen Rothwell > Sent: Friday, June 12, 2020 18:16 > To: Kirsher, Jeffrey T > Cc: David Miller ; Networking > ; Linux Next Mailing List n...@vger.kernel.org>; Linux Kernel Mailing List ker...@vger.kernel.org>; Lifshits, Vitaly > Subject: Re: linux-next: b

Re: linux-next: build warning after merge of the net-next tree

2020-06-12 Thread Stephen Rothwell
Hi all, On Wed, 27 May 2020 01:15:09 + "Kirsher, Jeffrey T" wrote: > > > -Original Message- > > From: Stephen Rothwell > > Sent: Monday, May 25, 2020 05:40 > > To: David Miller ; Networking > > > > Cc: Linux Next Mailing List ; Linux Kernel > > Mailing > > List ; Lifshits, Vitaly

pull-request: bpf 2020-06-12

2020-06-12 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. We've added 26 non-merge commits during the last 10 day(s) which contain a total of 27 files changed, 348 insertions(+), 93 deletions(-). The main changes are: 1) sock_hash accounting fix, from Andrey. 2) libbpf fix

Re: [PATCH bpf] bpf: undo internal BPF_PROBE_MEM in BPF insns dump

2020-06-12 Thread Alexei Starovoitov
On Fri, Jun 12, 2020 at 5:22 PM Andrii Nakryiko wrote: > > BPF_PROBE_MEM is kernel-internal implmementation details. When dumping BPF > instructions to user-space, it needs to be replaced back with BPF_MEM mode. > > Fixes: 2a02759ef5f8 ("bpf: Add support for BTF pointers to interpreter") > Signed-

Re: [PATCH bpf v3 1/2] bpf: don't return EINVAL from {get,set}sockopt when optlen > PAGE_SIZE

2020-06-12 Thread Alexei Starovoitov
On Mon, Jun 08, 2020 at 11:27:47AM -0700, Stanislav Fomichev wrote: > Attaching to these hooks can break iptables because its optval is > usually quite big, or at least bigger than the current PAGE_SIZE limit. > David also mentioned some SCTP options can be big (around 256k). > > There are two pos

[PATCH bpf] bpf: undo internal BPF_PROBE_MEM in BPF insns dump

2020-06-12 Thread Andrii Nakryiko
BPF_PROBE_MEM is kernel-internal implmementation details. When dumping BPF instructions to user-space, it needs to be replaced back with BPF_MEM mode. Fixes: 2a02759ef5f8 ("bpf: Add support for BTF pointers to interpreter") Signed-off-by: Andrii Nakryiko --- kernel/bpf/syscall.c | 17 +++

Re: [RFC 1/8] docs: networking: reorganize driver documentation again

2020-06-12 Thread Shannon Nelson
On 6/11/20 10:30 AM, Jakub Kicinski wrote: Organize driver documentation by device type. Most documents have fairly verbose yet uninformative names, so let users first select a well defined device type, and then search for a particular driver. While at it rename the section from Vendor drivers t

Re: [PATCH v3 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-12 Thread Miao-chen Chou
Hi Jakub, I uploaded v4 to address these. Thanks for the reminder. Regards, Miao On Fri, Jun 12, 2020 at 10:49 AM Jakub Kicinski wrote: > > On Thu, 11 Jun 2020 23:15:26 -0700 Miao-chen Chou wrote: > > This adds the request handler of MGMT_OP_REMOVE_ADV_MONITOR command. > > Note that the control

[PATCH v4 7/7] Bluetooth: Update background scan and report device based on advertisement monitors

2020-06-12 Thread Miao-chen Chou
This calls hci_update_background_scan() when there is any update on the advertisement monitors. If there is at least one advertisement monitor, the filtering policy of scan parameters should be 0x00. This also reports device found mgmt events if there is at least one monitor. The following cases w

[PATCH v4 6/7] Bluetooth: Notify adv monitor removed event

2020-06-12 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou --- Changes in v4

[PATCH v4 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-12 Thread Miao-chen Chou
This adds the request handler of MGMT_OP_REMOVE_ADV_MONITOR command. Note that the controller-based monitoring is not yet in place. This removes the internal monitor(s) without sending HCI traffic, so the request returns immediately. The following test was performed. - Issue btmgmt advmon-remove w

[PATCH v4 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-06-12 Thread Miao-chen Chou
This adds the request handler of MGMT_OP_READ_ADV_MONITOR_FEATURES command. Since the controller-based monitoring is not yet in place, this report only the supported features but not the enabled features. The following test was performed. - Issuing btmgmt advmon-features. Signed-off-by: Miao-chen

[PATCH v4 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

2020-06-12 Thread Miao-chen Chou
This adds the request handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR command. Note that the controller-based monitoring is not yet in place. This tracks the content of the monitor without sending HCI traffic, so the request returns immediately. The following manual test was performed. - Issue btmgmt

[PATCH v4 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-12 Thread Miao-chen Chou
This adds support for Advertisement Monitor API. Here are the commands and events added. - Read Advertisement Monitor Feature command - Add Advertisement Pattern Monitor command - Remove Advertisement Monitor command - Advertisement Monitor Added event - Advertisement Monitor Removed event Signed-

[PATCH v4 5/7] Bluetooth: Notify adv monitor added event

2020-06-12 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou --- Changes in v4: None C

Re: [PATCH] xdp_rxq_info_user: Fix null pointer dereference. Replace malloc/memset with calloc.

2020-06-12 Thread John Fastabend
Jesper Dangaard Brouer wrote: > On Fri, 12 Jun 2020 14:53:27 -0400 > Gaurav Singh wrote: > > > Memset on the pointer right after malloc can cause a > > null pointer deference if it failed to allocate memory. > > A simple fix is to replace malloc/memset with a calloc() > > > > Fixes: 0fca931a6f21

Re: [PATCH bpf] bpf: sockmap: don't attach programs to UDP sockets

2020-06-12 Thread John Fastabend
Jakub Sitnicki wrote: > On Thu, 11 Jun 2020 18:25:20 +0100 > Lorenz Bauer wrote: > > > The stream parser infrastructure isn't set up to deal with UDP > > sockets, so we mustn't try to attach programs to them. > > > > I remember making this change at some point, but I must have lost > > it while

Re: [PATCH bpf] bpf: tcp: recv() should return 0 when the peer socket is closed

2020-06-12 Thread John Fastabend
Alexei Starovoitov wrote: > On Fri, Jun 12, 2020 at 3:18 AM Jakub Sitnicki wrote: > > > > On Wed, 10 Jun 2020 12:19:43 +0200 > > Sabrina Dubroca wrote: > > > > > If the peer is closed, we will never get more data, so > > > tcp_bpf_wait_data will get stuck forever. In case we passed > > > MSG_DONT

Re: [PATCH bpf 1/2] flow_dissector: reject invalid attach_flags

2020-06-12 Thread Alexei Starovoitov
On Fri, Jun 12, 2020 at 9:02 AM Lorenz Bauer wrote: > > Using BPF_PROG_ATTACH on a flow dissector program supports neither flags > nor target_fd but accepts any value. Return EINVAL if either are non-zero. > > Signed-off-by: Lorenz Bauer > Fixes: b27f7bb590ba ("flow_dissector: Move out netns_bpf

Re: [PATCH bpf] libbpf: support pre-initializing .bss global variables

2020-06-12 Thread Alexei Starovoitov
On Fri, Jun 12, 2020 at 12:45 PM Andrii Nakryiko wrote: > > Remove invalid assumption in libbpf that .bss map doesn't have to be updated > in kernel. With addition of skeleton and memory-mapped initialization image, > .bss doesn't have to be all zeroes when BPF map is created, because user-code >

Re: [PATCH bpf] tools/bpftool: fix skeleton codegen

2020-06-12 Thread Alexei Starovoitov
On Fri, Jun 12, 2020 at 3:05 PM Tobias Klauser wrote: > > On 2020-06-12 at 22:16:03 +0200, Andrii Nakryiko wrote: > > Remove unnecessary check at the end of codegen() routine which makes > > codegen() > > to always fail and exit bpftool with error code. Positive value of variable > > n is not an

Re: [PATCH v2 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-12 Thread Miao-chen Chou
Hi Marcel, The name in the mgmt-api.txt doc is "Add Advertisement Patterns Monitor Command", and Luiz changed the name from MGMT_OP_ADD_ADV_PATTERNS_MONITOR to MGMT_OP_ADD_ADV_MONITOR before applied. So we either change the doc or change the header file to match. Based on the outcome I may need to

Re: [PATCH bpf] tools/bpftool: fix skeleton codegen

2020-06-12 Thread Tobias Klauser
On 2020-06-12 at 22:16:03 +0200, Andrii Nakryiko wrote: > Remove unnecessary check at the end of codegen() routine which makes codegen() > to always fail and exit bpftool with error code. Positive value of variable > n is not an indicator of a failure. > > Cc: Tobias Klauser > Fixes: 2c4779eff83

Re: [PATCH bpf] bpf: tcp: recv() should return 0 when the peer socket is closed

2020-06-12 Thread Alexei Starovoitov
On Fri, Jun 12, 2020 at 3:18 AM Jakub Sitnicki wrote: > > On Wed, 10 Jun 2020 12:19:43 +0200 > Sabrina Dubroca wrote: > > > If the peer is closed, we will never get more data, so > > tcp_bpf_wait_data will get stuck forever. In case we passed > > MSG_DONTWAIT to recv(), we get EAGAIN but we shoul

Re: [REGRESSION] mlx5: Driver remove during hot unplug is broken

2020-06-12 Thread Saeed Mahameed
On Fri, 2020-06-12 at 15:09 +0200, Niklas Schnelle wrote: > Hello Parav, Hello Saeed, > > our CI system for IBM Z Linux found a hang[0] when hot unplugging a > ConnectX-4 Lx VF from a z/VM guest > in Linus' current tree and added during the merge window. > Sadly it didn't happen all the time which

Re: [PATCH net] net: mvneta: do not redirect frames during reconfiguration

2020-06-12 Thread Lorenzo Bianconi
> From: Lorenzo Bianconi > Date: Tue, 9 Jun 2020 00:02:39 +0200 > > > Disable frames injection in mvneta_xdp_xmit routine during hw > > re-configuration in order to avoid hardware hangs > > > > Fixes: b0a43db9087a ("net: mvneta: add XDP_TX support") > > Signed-off-by: Lorenzo Bianconi > > Loo

Re: [pull request][net 00/10] mlx5 fixes 2020-06-11

2020-06-12 Thread Saeed Mahameed
On Thu, 2020-06-11 at 18:23 -0700, David Miller wrote: > From: Saeed Mahameed > Date: Thu, 11 Jun 2020 15:46:58 -0700 > > > This series introduces some fixes to mlx5 driver. > > For more information please see tag log below. > > Tag log is basically empty :-) Sorry, I will make sure to drop thi

Re: [PATCH net] ibmvnic: Flush existing work items before device removal

2020-06-12 Thread David Miller
From: Thomas Falcon Date: Fri, 12 Jun 2020 13:34:41 -0500 > Ensure that all scheduled work items have completed before continuing > with device removal and after further event scheduling has been > halted. This patch fixes a bug where a scheduled driver reset event > is processed following device

Re: [PATCH net] ibmvnic: Harden device login requests

2020-06-12 Thread David Miller
From: Thomas Falcon Date: Fri, 12 Jun 2020 13:31:39 -0500 > @@ -841,13 +841,14 @@ static int ibmvnic_login(struct net_device *netdev) > { > struct ibmvnic_adapter *adapter = netdev_priv(netdev); > unsigned long timeout = msecs_to_jiffies(3); > + int retries = 10; > int

Re: [Patch net] genetlink: clean up family attributes allocations

2020-06-12 Thread David Miller
From: Cong Wang Date: Fri, 12 Jun 2020 00:16:55 -0700 > genl_family_rcv_msg_attrs_parse() and genl_family_rcv_msg_attrs_free() > take a boolean parameter to determine whether allocate/free the family > attrs. This is unnecessary as we can just check family->parallel_ops. > More importantly, calle

Re: [PATCH] net: Fix a potential incorrect error handling in rawsock_connect

2020-06-12 Thread Andrew Lunn
On Fri, Jun 12, 2020 at 03:37:43PM -0500, Aditya Pakki wrote: > In rawsock_connect, the device is allocated by calling nfc_get_device. > In case of incorrect bounds index, the device should be freed by > calling nfc_put_device. The patch fixes this issue. Hi Aditya Putting nfc in the Subject: wou

Re: [PATCH] net: ethernet: Fix potential memory leak caused in error handling

2020-06-12 Thread Andrew Lunn
On Fri, Jun 12, 2020 at 03:06:54PM -0500, Aditya Pakki wrote: > In ethoc_probe, a failure of mdiobus_register() does not release > the memory allocated by mdiobus_alloc. The patch fixes this issue. Hi Aditya Please improve the Subject: line to indicate which driver you are fixing. A Fixes: tag w

[PATCH] net: Fix a potential incorrect error handling in rawsock_connect

2020-06-12 Thread Aditya Pakki
In rawsock_connect, the device is allocated by calling nfc_get_device. In case of incorrect bounds index, the device should be freed by calling nfc_put_device. The patch fixes this issue. Signed-off-by: Aditya Pakki --- net/nfc/rawsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH] rocker: fix incorrect error handling in dma_rings_init

2020-06-12 Thread Aditya Pakki
In rocker_dma_rings_init, the goto blocks in case of errors caused by the functions rocker_dma_cmd_ring_waits_alloc() and rocker_dma_ring_create() are incorrect. The patch fixes the order consistent with cleanup in rocker_dma_rings_fini(). Signed-off-by: Aditya Pakki --- drivers/net/ethernet/roc

Re: [PATCH] xdp_rxq_info_user: Fix null pointer dereference. Replace malloc/memset with calloc.

2020-06-12 Thread Jesper Dangaard Brouer
On Fri, 12 Jun 2020 14:53:27 -0400 Gaurav Singh wrote: > Memset on the pointer right after malloc can cause a > null pointer deference if it failed to allocate memory. > A simple fix is to replace malloc/memset with a calloc() > > Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access t

[PATCH bpf] tools/bpftool: fix skeleton codegen

2020-06-12 Thread Andrii Nakryiko
Remove unnecessary check at the end of codegen() routine which makes codegen() to always fail and exit bpftool with error code. Positive value of variable n is not an indicator of a failure. Cc: Tobias Klauser Fixes: 2c4779eff837 ("tools, bpftool: Exit on error in function codegen") Signed-off-by

[PATCH] net: ethernet: Fix potential memory leak caused in error handling

2020-06-12 Thread Aditya Pakki
In ethoc_probe, a failure of mdiobus_register() does not release the memory allocated by mdiobus_alloc. The patch fixes this issue. Signed-off-by: Aditya Pakki --- drivers/net/ethernet/ethoc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ethoc.c b/dr

Re: [PATCH 1/2] docs: mm/gup: pin_user_pages.rst: add a "case 5"

2020-06-12 Thread John Hubbard
On 2020-06-12 12:24, Matthew Wilcox wrote: On Fri, May 29, 2020 at 04:43:08PM -0700, John Hubbard wrote: +CASE 5: Pinning in order to write to the data within the page +- +Even though neither DMA nor Direct IO is involved, just a simple

[PATCH] test_objagg: Fix potential memory leak in error handling

2020-06-12 Thread Aditya Pakki
In case of failure of check_expect_hints_stats(), the resources allocated by objagg_hints_get should be freed. The patch fixes this issue. Signed-off-by: Aditya Pakki --- lib/test_objagg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/test_objagg.c b/lib/test_objagg

[PATCH bpf] libbpf: support pre-initializing .bss global variables

2020-06-12 Thread Andrii Nakryiko
Remove invalid assumption in libbpf that .bss map doesn't have to be updated in kernel. With addition of skeleton and memory-mapped initialization image, .bss doesn't have to be all zeroes when BPF map is created, because user-code might have initialized those variables from user-space. Fixes: eba

Re: [PATCH 1/2] docs: mm/gup: pin_user_pages.rst: add a "case 5"

2020-06-12 Thread Matthew Wilcox
On Fri, May 29, 2020 at 04:43:08PM -0700, John Hubbard wrote: > +CASE 5: Pinning in order to write to the data within the page > +- > +Even though neither DMA nor Direct IO is involved, just a simple case of > "pin, > +access page's data,

[PATCH] proc: Use new_inode not new_inode_pseudo

2020-06-12 Thread Eric W. Biederman
Recently syzbot reported that unmounting proc when there is an ongoing inotify watch on the root directory of proc could result in a use after free when the watch is removed after the unmount of proc when the watcher exits. Commit 69879c01a0c3 ("proc: Remove the now unnecessary internal mount of

Re: [PATCH] mptcp: fix memory leak in mptcp_subflow_create_socket()

2020-06-12 Thread Mat Martineau
Hello Wei, On Fri, 12 Jun 2020, Wei Yongjun wrote: socket malloced by sock_create_kern() should be release before return in the error handling, otherwise it cause memory leak. unreferenced object 0x88810910c000 (size 1216): comm "0003_test_m", pid 12238, jiffies 4295050289 (age 54.

[PATCH] xdp_rxq_info_user: Fix null pointer dereference. Replace malloc/memset with calloc.

2020-06-12 Thread Gaurav Singh
Memset on the pointer right after malloc can cause a null pointer deference if it failed to allocate memory. A simple fix is to replace malloc/memset with a calloc() Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to xdp_rxq_info") Signed-off-by: Gaurav Singh --- samples/bpf/xdp

[PATCH net] ibmvnic: Flush existing work items before device removal

2020-06-12 Thread Thomas Falcon
Ensure that all scheduled work items have completed before continuing with device removal and after further event scheduling has been halted. This patch fixes a bug where a scheduled driver reset event is processed following device removal. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/i

net test error: BUG: using smp_processor_id() in preemptible code in ext4_mb_new_blocks

2020-06-12 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:18dbd4cd Merge branch 'net-ipa-endpoint-configuration-fixes' git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=13f762ea10 kernel config: https://syzkaller.appspot.com/x/.config?x=b366fd92adf6f8b4 dashboar

[PATCH net] ibmvnic: Harden device login requests

2020-06-12 Thread Thomas Falcon
The VNIC driver's "login" command sequence is the final step in the driver's initialization process with device firmware, confirming the available device queue resources to be utilized by the driver. Under high system load, firmware may not respond to the request in a timely manner or may abort the

net-next test error: BUG: using smp_processor_id() in preemptible code in ext4_mb_new_blocks

2020-06-12 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:af7b4801 Merge git://git.kernel.org/pub/scm/linux/kernel/g.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=15fe909e10 kernel config: https://syzkaller.appspot.com/x/.config?x=b366fd92adf6f8b4 das

Re: [PATCH] mptcp: use list_first_entry_or_null

2020-06-12 Thread Mat Martineau
Hello Geliang, On Fri, 12 Jun 2020, Geliang Tang wrote: Use list_first_entry_or_null to simplify the code. Signed-off-by: Geliang Tang --- net/mptcp/protocol.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 86d265500c

Re: [RFC,net-next, 3/5] vrf: add sysctl parameter for strict mode

2020-06-12 Thread Jakub Kicinski
On Fri, 12 Jun 2020 18:49:35 +0200 Andrea Mayer wrote: > Add net.vrf.strict_mode sysctl parameter. > > When net.vrf.strict_mode=0 (default) it is possible to associate multiple > VRF devices to the same table. Conversely, when net.vrf.strict_mode=1 a > table can be associated to a single VRF devic

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-12 Thread Jakub Kicinski
On Fri, 12 Jun 2020 18:49:33 +0200 Andrea Mayer wrote: > Add infrastructure to l3mdev (the core code for Layer 3 master devices) in > order to find out the corresponding VRF device for a given table id. > Therefore, the l3mdev implementations: > - can register a callback that returns the device in

Re: [PATCH v3 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-12 Thread Jakub Kicinski
On Thu, 11 Jun 2020 23:15:26 -0700 Miao-chen Chou wrote: > This adds the request handler of MGMT_OP_REMOVE_ADV_MONITOR command. > Note that the controller-based monitoring is not yet in place. This > removes the internal monitor(s) without sending HCI traffic, so the > request returns immediately.

Re: [PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX

2020-06-12 Thread Matthieu Baerts
Hi Geliang, On 12/06/2020 07:27, Geliang Tang wrote: Unify these two duplicate macros into 8. Thank you for this new patch! (...) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 809687d3f410..86d265500cf6 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -135,7

Re: [RFC,net-next, 0/5] Strict mode for VRF

2020-06-12 Thread Dinesh G Dutt
Thanks for doing this Andrea. This is a very important patch. I'll let the others comment on the specificity of the patch, but strict mode=1 should be the default . Dinesh On 6/12/20 9:49 AM, Andrea Mayer wrote: This patch set adds the new "strict mode" functionality to the Virtual Routing an

[RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-12 Thread Andrea Mayer
Add infrastructure to l3mdev (the core code for Layer 3 master devices) in order to find out the corresponding VRF device for a given table id. Therefore, the l3mdev implementations: - can register a callback that returns the device index of the l3mdev associated with a given table id; - can o

[RFC,net-next, 3/5] vrf: add sysctl parameter for strict mode

2020-06-12 Thread Andrea Mayer
Add net.vrf.strict_mode sysctl parameter. When net.vrf.strict_mode=0 (default) it is possible to associate multiple VRF devices to the same table. Conversely, when net.vrf.strict_mode=1 a table can be associated to a single VRF device. When switching from net.vrf.strict_mode=0 to net.vrf.strict_m

[RFC,net-next, 2/5] vrf: track associations between VRF devices and tables

2020-06-12 Thread Andrea Mayer
Add the data structures and the processing logic to keep track of the associations between VRF devices and routing tables. When a VRF is instantiated, it needs to refer to a given routing table. For each table, we explicitly keep track of the existing VRFs that refer to the table. Signed-off-by: A

[RFC,net-next, 5/5] selftests: add selftest for the VRF strict mode

2020-06-12 Thread Andrea Mayer
The new strict mode functionality is tested in different configurations and on different network namespaces. Signed-off-by: Andrea Mayer --- .../selftests/net/vrf_strict_mode_test.sh | 390 ++ 1 file changed, 390 insertions(+) create mode 100755 tools/testing/selftests/net/v

[RFC,net-next, 0/5] Strict mode for VRF

2020-06-12 Thread Andrea Mayer
This patch set adds the new "strict mode" functionality to the Virtual Routing and Forwarding infrastructure (VRF). Hereafter we discuss the requirements and the main features of the "strict mode" for VRF. On VRF creation, it is necessary to specify the associated routing table used during the loo

[RFC,net-next, 4/5] vrf: add l3mdev registration for table to VRF device lookup

2020-06-12 Thread Andrea Mayer
During the initialization phase of the VRF module, the callback for table to VRF device lookup is registered in l3mdev. Signed-off-by: Andrea Mayer --- drivers/net/vrf.c | 59 +++ 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/drivers/n

[PATCH bpf 2/2] bpf: sockmap: reject invalid attach_flags

2020-06-12 Thread Lorenz Bauer
Using BPF_PROG_ATTACH on a sockmap program currently understands no flags, but accepts any value. Return EINVAL if any flags are specified. Signed-off-by: Lorenz Bauer Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") --- net/core/sock_map.c | 3 +++ 1 file changed, 3 ins

[PATCH bpf 1/2] flow_dissector: reject invalid attach_flags

2020-06-12 Thread Lorenz Bauer
Using BPF_PROG_ATTACH on a flow dissector program supports neither flags nor target_fd but accepts any value. Return EINVAL if either are non-zero. Signed-off-by: Lorenz Bauer Fixes: b27f7bb590ba ("flow_dissector: Move out netns_bpf prog callbacks") --- kernel/bpf/net_namespace.c | 3 +++ 1 file

Re: [PATCH] xdp_rxq_info_user: Replace malloc/memset w/calloc

2020-06-12 Thread Joe Perches
On Fri, 2020-06-12 at 14:05 +0200, Jesper Dangaard Brouer wrote: > On Fri, 12 Jun 2020 03:14:58 -0700 > Joe Perches wrote: > > > On Fri, 2020-06-12 at 08:42 +0200, Jesper Dangaard Brouer wrote: > > > On Thu, 11 Jun 2020 20:36:40 -0400 > > > Gaurav Singh wrote: > > > > > > > Replace malloc/mem

Re: [PATCH net 2/2] flow_offload: fix the list_del corruption in the driver list

2020-06-12 Thread Vlad Buslov
On Fri 12 Jun 2020 at 13:08, we...@ucloud.cn wrote: > From: wenxu > > When a indr device add in offload success. After the representor > go away. All the flow_block_cb cleanup but miss del form driver > list. > > Fixes: 0fdcf78d5973 ("net: use flow_indr_dev_setup_offload()") > Signed-off-by: wen

Re: [PATCH] ath10k: Wait until copy complete is actually done before completing

2020-06-12 Thread pillair
Hi Doug, The send callback for the CEs do check for hw_index/SRRI before trying to free the buffer. But adding a check for copy-complete (before calling the individual CE callbacks) seems to be the better approach. Hence I agree that this patch should be added. Thanks, Rakesh Pillai. On 202

Re: [PATCH net v3 1/2] flow_offload: fix incorrect cleanup for indirect flow_blocks

2020-06-12 Thread Vlad Buslov
On Thu 11 Jun 2020 at 19:52, we...@ucloud.cn wrote: > From: wenxu > > If the representor is removed, then identify the indirect > flow_blocks that need to be removed by the release callback. > > Fixes: 1fac52da5942 ("net: flow_offload: consolidate indirect flow_block > infrastructure") > Signed

Re: [PATCH net 1/2] flow_offload: return zero for FLOW_BLOCK_UNBIND type flow_indr_dev_setup_offload

2020-06-12 Thread wenxu
Please drop this series. Thank you. 在 2020/6/12 18:08, we...@ucloud.cn 写道: From: wenxu block->nooffloaddevcnt warning with following dmesg log: When a indr device add in offload success. The block->nooffloaddevcnt always zero. But When all the representors go away. All the flow_block_cb clea

[PATCH] ipvs: avoid drop first packet to reuse conntrack

2020-06-12 Thread YangYuxi
Since 'commit f719e3754ee2 ("ipvs: drop first packet to redirect conntrack")', when a new TCP connection meet the conditions that need reschedule, the first syn packet is dropped, this cause one second latency for the new connection, more discussion about this problem can easy search from google, s

Re: [PATCH v2 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-12 Thread Marcel Holtmann
Hi Miao-chen, > Thanks for reviewing. Please see v3 for the update. > I am trying to settle down the name of Add Advertisement Pattern > Monitor command with Luiz on the other thread. I will post the update > here once it is sorted out. I thought the name was just fine. Especially in the discusse

Re: [PATCH v4 0/3] Add support for SQI and master-slave

2020-06-12 Thread Michal Kubecek
On Wed, Jun 10, 2020 at 10:37:41AM +0200, Oleksij Rempel wrote: > This patch set is extending ethtool to make it more usable on automotive > PHYs like NXP TJA11XX. > > They make use of new KAPI (currently in net-next, will go probably to the > kernel 5.8-rc1): > - PHY master-slave role configurati

[REGRESSION] mlx5: Driver remove during hot unplug is broken

2020-06-12 Thread Niklas Schnelle
Hello Parav, Hello Saeed, our CI system for IBM Z Linux found a hang[0] when hot unplugging a ConnectX-4 Lx VF from a z/VM guest in Linus' current tree and added during the merge window. Sadly it didn't happen all the time which sent me on the wrong path for two full git bisects. Anyway, I've n

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Russell King - ARM Linux admin
On Fri, Jun 12, 2020 at 01:52:50PM +0200, Sascha Hauer wrote: > On Fri, Jun 12, 2020 at 12:30:31PM +0100, Russell King - ARM Linux admin > wrote: > > On Fri, Jun 12, 2020 at 12:22:13PM +0100, Russell King - ARM Linux admin > > wrote: > > > On Fri, Jun 12, 2020 at 11:42:08AM +0100, Russell King -

Re: [Patch net] genetlink: clean up family attributes allocations

2020-06-12 Thread Ido Schimmel
On Fri, Jun 12, 2020 at 12:16:55AM -0700, Cong Wang wrote: > genl_family_rcv_msg_attrs_parse() and genl_family_rcv_msg_attrs_free() > take a boolean parameter to determine whether allocate/free the family > attrs. This is unnecessary as we can just check family->parallel_ops. > More importantly, ca

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Russell King - ARM Linux admin
On Fri, Jun 12, 2020 at 02:06:04PM +0200, Sascha Hauer wrote: > And here is the same patch which applies on master and the net tree. > It works as expected on my Armada XP in 2.5Gbps mode. Provided you are > happy with the patch I can send it as a formal patch on monday if by > then you haven't don

Re: [PATCH] xdp_rxq_info_user: Replace malloc/memset w/calloc

2020-06-12 Thread Toke Høiland-Jørgensen
Joe Perches writes: > On Fri, 2020-06-12 at 08:42 +0200, Jesper Dangaard Brouer wrote: >> On Thu, 11 Jun 2020 20:36:40 -0400 >> Gaurav Singh wrote: >> >> > Replace malloc/memset with calloc >> > >> > Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to >> > xdp_rxq_info") >> > S

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Sascha Hauer
On Fri, Jun 12, 2020 at 11:18:20AM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 12, 2020 at 11:01:15AM +0100, Russell King - ARM Linux admin > wrote: > > On Fri, Jun 12, 2020 at 09:47:10AM +0100, Russell King - ARM Linux admin > > wrote: > > > On Fri, Jun 12, 2020 at 10:38:47AM +020

Re: [PATCH] xdp_rxq_info_user: Replace malloc/memset w/calloc

2020-06-12 Thread Jesper Dangaard Brouer
On Fri, 12 Jun 2020 03:14:58 -0700 Joe Perches wrote: > On Fri, 2020-06-12 at 08:42 +0200, Jesper Dangaard Brouer wrote: > > On Thu, 11 Jun 2020 20:36:40 -0400 > > Gaurav Singh wrote: > > > > > Replace malloc/memset with calloc > > > > > > Fixes: 0fca931a6f21 ("samples/bpf: program demonstra

Re: [PATCH 1/2] net: dsa: qca8k: Switch to PHYLINK instead of PHYLIB

2020-06-12 Thread Jonathan McDowell
On Thu, Jun 11, 2020 at 09:55:23AM +0100, Russell King - ARM Linux admin wrote: > On Wed, Jun 10, 2020 at 08:14:03PM +0100, Jonathan McDowell wrote: > > Update the driver to use the new PHYLINK callbacks, removing the > > legacy adjust_link callback. > > Looks good, there's a couple of issues / qu

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Sascha Hauer
On Fri, Jun 12, 2020 at 12:30:31PM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 12, 2020 at 12:22:13PM +0100, Russell King - ARM Linux admin > wrote: > > On Fri, Jun 12, 2020 at 11:42:08AM +0100, Russell King - ARM Linux admin > > wrote: > > > With the obvious mistakes fixed (extran

[PATCH net] i40e: fix crash when Rx descriptor count is changed

2020-06-12 Thread Björn Töpel
From: Björn Töpel When the AF_XDP buffer allocator was introduced, the Rx SW ring "rx_bi" allocation was moved from i40e_setup_rx_descriptors() function, and was instead done in the i40e_configure_rx_ring() function. This broke the ethtool set_ringparam() hook for changing the Rx descriptor coun

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Russell King - ARM Linux admin
On Fri, Jun 12, 2020 at 12:22:13PM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 12, 2020 at 11:42:08AM +0100, Russell King - ARM Linux admin > wrote: > > With the obvious mistakes fixed (extraneous 'i' and lack of default > > case), it seems to still work on Armada 388 Clearfog Pro w

Re: [PATCH 0/6] Add Microchip MCP25XXFD CAN driver

2020-06-12 Thread Marc Kleine-Budde
On 6/11/20 10:30 PM, Marc Kleine-Budde wrote: > On 6/11/20 6:26 PM, Marc Kleine-Budde wrote: >> I initially started looking at Martin's driver and it was not using several >> modern CAN driver infrastructures. I then posted some cleanup patches but >> Martin >> was not working on the driver any mo

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Russell King - ARM Linux admin
On Fri, Jun 12, 2020 at 11:42:08AM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 12, 2020 at 11:18:20AM +0100, Russell King - ARM Linux admin > wrote: > > On Fri, Jun 12, 2020 at 11:01:15AM +0100, Russell King - ARM Linux admin > > wrote: > > > On Fri, Jun 12, 2020 at 09:47:10AM +010

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Russell King - ARM Linux admin
On Fri, Jun 12, 2020 at 11:18:20AM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 12, 2020 at 11:01:15AM +0100, Russell King - ARM Linux admin > wrote: > > On Fri, Jun 12, 2020 at 09:47:10AM +0100, Russell King - ARM Linux admin > > wrote: > > > On Fri, Jun 12, 2020 at 10:38:47AM +020

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Russell King - ARM Linux admin
On Fri, Jun 12, 2020 at 11:01:15AM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 12, 2020 at 09:47:10AM +0100, Russell King - ARM Linux admin > wrote: > > On Fri, Jun 12, 2020 at 10:38:47AM +0200, Sascha Hauer wrote: > > > The Marvell MVNETA Ethernet controller supports a 2.5Gbps SGMI

Re: [PATCH bpf] bpf: sockmap: don't attach programs to UDP sockets

2020-06-12 Thread Jakub Sitnicki
On Thu, 11 Jun 2020 18:25:20 +0100 Lorenz Bauer wrote: > The stream parser infrastructure isn't set up to deal with UDP > sockets, so we mustn't try to attach programs to them. > > I remember making this change at some point, but I must have lost > it while rebasing or something similar. > > Fi

Re: [PATCH v2] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-12 Thread Sascha Hauer
On Fri, Jun 12, 2020 at 09:47:10AM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 12, 2020 at 10:38:47AM +0200, Sascha Hauer wrote: > > The Marvell MVNETA Ethernet controller supports a 2.5Gbps SGMII mode > > called DRSGMII. Depending on the Port MAC Control Register0 PortType > > setti

Re: [PATCH bpf] bpf: tcp: recv() should return 0 when the peer socket is closed

2020-06-12 Thread Jakub Sitnicki
On Wed, 10 Jun 2020 12:19:43 +0200 Sabrina Dubroca wrote: > If the peer is closed, we will never get more data, so > tcp_bpf_wait_data will get stuck forever. In case we passed > MSG_DONTWAIT to recv(), we get EAGAIN but we should actually get > 0. > > From man 2 recv: > > RETURN VALUE > >

Re: [PATCH] xdp_rxq_info_user: Replace malloc/memset w/calloc

2020-06-12 Thread Joe Perches
On Fri, 2020-06-12 at 08:42 +0200, Jesper Dangaard Brouer wrote: > On Thu, 11 Jun 2020 20:36:40 -0400 > Gaurav Singh wrote: > > > Replace malloc/memset with calloc > > > > Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to > > xdp_rxq_info") > > Signed-off-by: Gaurav Singh > >

  1   2   >