Re: [Linuxptp-devel] strangeness

2019-03-06 Thread Harini Katakam
Hi Paul, On Thu, Mar 7, 2019 at 4:38 AM Paul Thomas wrote: > > On Fri, Mar 1, 2019 at 1:24 AM Harini Katakam wrote: > > > > +netdev > > > > Hi Paul, > > On Fri, Mar 1, 2019 at 12:29 AM Richard Cochran > > wrote: > > > > > > On Thu, Feb 28, 2019 at 12:33:26PM -0500, Paul Thomas wrote: > > > > Yes

[PATCH 2/2] ip6mr: Make cache queue length configurable

2019-03-06 Thread Brodie Greenfield
We want to be able to keep more spaces available in our queue for processing incoming IPv6 multicast traffic (adding (S,G) entries) - this lets us learn more groups faster, rather than dropping them at this stage. Signed-off-by: Brodie Greenfield --- Documentation/networking/ip-sysctl.txt | 8 ++

[PATCH 0/2] Make ipmr queue length configurable

2019-03-06 Thread Brodie Greenfield
We want to have some more space in our queue for processing incoming multicast packets, so we can process more of them without dropping them prematurely. It is useful to be able to increase this limit on higher-spec platforms that can handle more items. For the particular use case here at Allied T

[PATCH 1/2] ipmr: Make cache queue length configurable

2019-03-06 Thread Brodie Greenfield
We want to be able to keep more spaces available in our queue for processing incoming multicast traffic (adding (S,G) entries) - this lets us learn more groups faster, rather than dropping them at this stage. Signed-off-by: Brodie Greenfield --- Documentation/networking/ip-sysctl.txt | 8 +++

Re: [PATCH net v2] failover: allow name change on IFF_UP slave interfaces

2019-03-06 Thread si-wei liu
On 3/6/2019 8:13 PM, Samudrala, Sridhar wrote: On 3/6/2019 7:08 PM, Si-Wei Liu wrote: When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-06 Thread Parav Pandit
Hi Jakub, > -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Jakub Kicinski > Sent: Wednesday, March 6, 2019 11:57 AM > To: Jiri Pirko > Cc: da...@davemloft.net; netdev@vger.kernel.org; oss- > driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: all

[PATCH net v2] failover: allow name change on IFF_UP slave interfaces

2019-03-06 Thread Si-Wei Liu
When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kernel (net_failover) opens the slave earlier tha

Re: [net-next PATCH v2] net/rds: Accept peer connection reject messages due to incompatible version

2019-03-06 Thread Yanjun Zhu
On 2019/3/7 10:09, Yanjun Zhu wrote: On 2019/3/7 9:55, Santosh Shilimkar wrote: On 3/6/2019 5:49 PM, Gerd Rausch wrote: Prior to commit d021fabf525ff ("rds: rdma: add consumer reject") function "rds_rdma_cm_event_handler_cmn" would always honor a rejected connection attempt by issuing a "

Re: [PATCH] vhost: silence an unused-variable warning

2019-03-06 Thread Jason Wang
On 2019/3/6 下午7:05, Arnd Bergmann wrote: On some architectures, the MMU can be disabled, leading to access_ok() becoming an empty macro that does not evaluate its size argument, which in turn produces an unused-variable warning: drivers/vhost/vhost.c:1191:9: error: unused variable 's' [-Werro

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-06 Thread Jason Wang
On 2019/3/7 上午12:31, Michael S. Tsirkin wrote: +static void vhost_set_vmap_dirty(struct vhost_vmap *used) +{ + int i; + + for (i = 0; i < used->npages; i++) + set_page_dirty_lock(used->pages[i]); This seems to rely on page lock to mark page dirty. Could it happen tha

[PATCH net] net: selinux: fix memory leak in selinux_netlbl_socket_post_create()

2019-03-06 Thread Mao Wenan
If netlbl_sock_setattr() is failed, it directly returns rc and forgets to free secattr. BUG: memory leak unreferenced object 0x8883c3ea4200 (size 2664): comm "syz-executor.2", pid 8813, jiffies 4297264419 (age 156.090s) hex dump (first 32 bytes): 7f 00 00 01 7f 00 00 01 eb 7f ed 71 4e

Re: [RFC PATCH V2 4/5] vhost: introduce helpers to get the size of metadata area

2019-03-06 Thread Jason Wang
On 2019/3/7 上午2:43, Souptick Joarder wrote: On Wed, Mar 6, 2019 at 12:48 PM Jason Wang wrote: Signed-off-by: Jason Wang Is the change log left with any particular reason ? Nope, will add the log. Thanks --- drivers/vhost/vhost.c | 46 --

Re: [RFC PATCH V2 4/5] vhost: introduce helpers to get the size of metadata area

2019-03-06 Thread Jason Wang
On 2019/3/6 下午6:56, Christophe de Dinechin wrote: On 6 Mar 2019, at 08:18, Jason Wang wrote: Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 46 -- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/

Re: [RFC PATCH V2 2/5] vhost: fine grain userspace memory accessors

2019-03-06 Thread Jason Wang
On 2019/3/6 下午6:45, Christophe de Dinechin wrote: On 6 Mar 2019, at 08:18, Jason Wang wrote: This is used to hide the metadata address from virtqueue helpers. This will allow to implement a vmap based fast accessing to metadata. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 94 +++

[PATCH v2] appletalk: Correctly check return value of register_snap_client

2019-03-06 Thread Yue Haibing
From: YueHaibing register_snap_client may return NULL, all the callers check it, but only print a warning. This will result in NULL pointer dereference in unregister_snap_client and other places. It has always been used like this since v2.6 Reported-by: Dan Carpenter Signed-off-by: YueHaibing

Re: [PATCH 2/8] aio_poll_wake(): don't set ->woken if we ignore the wakeup

2019-03-06 Thread Al Viro
On Thu, Mar 07, 2019 at 12:03:10AM +, Al Viro wrote: > From: Al Viro > > In case of early wakeups, aio_poll() assumes that aio_poll_complete() > has either already happened or is imminent. In that case we do not > want to put iocb on the list of cancellables. However, ignored > wakeups need

Re: [PATCH 3/8] aio_poll(): sanitize the logics after vfs_poll(), get rid of leak on error

2019-03-06 Thread zhengbin (A)
+ if (async && !apt.error) --->may be this should be if (!async && !apt.error) ? On 2019/3/7 8:03, Al Viro wrote: > From: Al Viro > > We want iocb_put() happening on errors, to balance the extra reference > we'd taken. As it is, we end up with a leak. The rules should be > * erro

Re: [PATCH] appletalk: Correctly handle return value of register_snap_client

2019-03-06 Thread YueHaibing
On 2019/3/7 2:17, David Miller wrote: > From: Yue Haibing > Date: Wed, 6 Mar 2019 15:27:40 +0800 > >> @@ -879,15 +879,17 @@ static struct notifier_block aarp_notifier = { >> >> static unsigned char aarp_snap_id[] = { 0x00, 0x00, 0x00, 0x80, 0xF3 }; >> >> -void __init aarp_proto_init(void) >>

Re: [net-next PATCH v2] net/rds: Accept peer connection reject messages due to incompatible version

2019-03-06 Thread Yanjun Zhu
On 2019/3/7 9:55, Santosh Shilimkar wrote: On 3/6/2019 5:49 PM, Gerd Rausch wrote: Prior to commit d021fabf525ff ("rds: rdma: add consumer reject") function "rds_rdma_cm_event_handler_cmn" would always honor a rejected connection attempt by issuing a "rds_conn_drop". The commit mentioned a

[PATCH v3] net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm

2019-03-06 Thread Su Yanjun
For rcu protected pointers, we'd better add '__rcu' for them. Once added '__rcu' tag for rcu protected pointer, the sparse tool reports warnings. net/xfrm/xfrm_user.c:1198:39: sparse:expected struct sock *sk net/xfrm/xfrm_user.c:1198:39: sparse:got struct sock [noderef] *nlsk [...] So i

Re: [net-next PATCH v2] net/rds: Accept peer connection reject messages due to incompatible version

2019-03-06 Thread Santosh Shilimkar
On 3/6/2019 5:49 PM, Gerd Rausch wrote: Prior to commit d021fabf525ff ("rds: rdma: add consumer reject") function "rds_rdma_cm_event_handler_cmn" would always honor a rejected connection attempt by issuing a "rds_conn_drop". The commit mentioned above added a "break", eliminating the "fallth

Re: [PATCH bpf] bpf: only test gso type on gso packets

2019-03-06 Thread Y Song
On Wed, Mar 6, 2019 at 1:15 PM Willem de Bruijn wrote: > > From: Willem de Bruijn > > BPF can adjust gso only for tcp bytestreams. Fail on other gso types. > > But only on gso packets. It does not touch this field if !gso_size. Could you specify which field you are referring here? gso_type, gso_s

Re: [PATCH 1/8] aio: make sure file is pinned

2019-03-06 Thread Linus Torvalds
On Wed, Mar 6, 2019 at 5:20 PM Al Viro wrote: > > I'll try to massage that series on top of your patch; I still hate the > post-vfs_poll() logics in aio_poll() ;-/ Give me about half an hour > and I'll have something to post. No inherent hurry, I sent the ping just to make sure it hadn't gotten

[PATCH v3] xfrm: Reset secpath in xfrm failure

2019-03-06 Thread Myungho Jung
In esp4_gro_receive() and esp6_gro_receive(), secpath can be allocated without adding xfrm state to xvec. Then, sp->xvec[sp->len - 1] would fail and result in dereferencing invalid pointer in esp4_gso_segment() and esp6_gso_segment(). Reset secpath if xfrm function returns error. Fixes: 7785bba299

Re: [PATCH 1/8] aio: make sure file is pinned

2019-03-06 Thread Al Viro
On Thu, Mar 07, 2019 at 12:48:28AM +, Al Viro wrote: > On Thu, Mar 07, 2019 at 12:41:59AM +, Al Viro wrote: > > On Wed, Mar 06, 2019 at 04:23:04PM -0800, Linus Torvalds wrote: > > > On Wed, Mar 6, 2019 at 4:03 PM Al Viro wrote: > > > > > > > > From: Al Viro > > > > > > > > "aio: remove th

Re: [PATCH v2] xfrm: Reset secpath in xfrm failure

2019-03-06 Thread Myungho Jung
On Wed, Mar 06, 2019 at 02:31:25PM -0800, Eric Dumazet wrote: > > > On 03/06/2019 01:55 PM, Myungho Jung wrote: > > In esp4_gro_receive() and esp6_gro_receive(), secpath can be allocated > > without adding xfrm state to xvec. Then, sp->xvec[sp->len - 1] would > > fail and result in dereferencing

Re: [PATCH bpf 2/2] libbpf: force fixdep compilation at the start of the build

2019-03-06 Thread Y Song
On Wed, Mar 6, 2019 at 1:14 PM Stanislav Fomichev wrote: > > libbpf targets don't explicitly depend on fixdep target, so when > we do 'make -j$(nproc)', there is a high probability, that some > objects will be built before fixdep binary is available. > > Fix this by running sub-make; this makes su

Re: [PATCH bpf 1/2] selftests: bpf: fix compilation with out-of-tree $(OUTPUT)

2019-03-06 Thread Y Song
On Wed, Mar 6, 2019 at 1:14 PM Stanislav Fomichev wrote: > > A bunch of related changes lumped together: > * Create prog_tests and verifier output directories; these don't exist with > out-of-tree $(OUTPUT) > * Add missing -I (via separate TEST_{PROGS,VERIFIER}_CFLAGS) for the main tree > ($(P

Re: [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test

2019-03-06 Thread Y Song
On Wed, Mar 6, 2019 at 3:25 PM Stanislav Fomichev wrote: > > CHECK macro implicitly uses duration. We call CHECK() a couple of times > before duration is initialized from bpf_prog_test_run(). > Explicitly set duration to 0 to avoid compiler warnings. > > Fixes: 740f8a657221 ("selftests/bpf: make s

Re: [PATCH 1/8] aio: make sure file is pinned

2019-03-06 Thread Al Viro
On Thu, Mar 07, 2019 at 12:41:59AM +, Al Viro wrote: > On Wed, Mar 06, 2019 at 04:23:04PM -0800, Linus Torvalds wrote: > > On Wed, Mar 6, 2019 at 4:03 PM Al Viro wrote: > > > > > > From: Al Viro > > > > > > "aio: remove the extra get_file/fput pair in io_submit_one" was > > > too optimistic -

Re: [PATCH 1/8] aio: make sure file is pinned

2019-03-06 Thread Al Viro
On Wed, Mar 06, 2019 at 04:23:04PM -0800, Linus Torvalds wrote: > On Wed, Mar 6, 2019 at 4:03 PM Al Viro wrote: > > > > From: Al Viro > > > > "aio: remove the extra get_file/fput pair in io_submit_one" was > > too optimistic - not dereferencing file pointer after e.g. > > ->write_iter() returns i

Re: [PATCH 1/8] aio: make sure file is pinned

2019-03-06 Thread Linus Torvalds
On Wed, Mar 6, 2019 at 4:03 PM Al Viro wrote: > > From: Al Viro > > "aio: remove the extra get_file/fput pair in io_submit_one" was > too optimistic - not dereferencing file pointer after e.g. > ->write_iter() returns is not enough; that reference might've been > the only thing that kept alive ob

[PATCH 2/8] aio_poll_wake(): don't set ->woken if we ignore the wakeup

2019-03-06 Thread Al Viro
From: Al Viro In case of early wakeups, aio_poll() assumes that aio_poll_complete() has either already happened or is imminent. In that case we do not want to put iocb on the list of cancellables. However, ignored wakeups need to be treated as if wakeup has not happened at all. Trivially fixed

[PATCH 5/8] make aio_read()/aio_write() return int

2019-03-06 Thread Al Viro
From: Al Viro that ssize_t is a rudiment of earlier calling conventions; it's been used only to pass 0 and -E... since last autumn. Signed-off-by: Al Viro --- fs/aio.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index ee062253e303..5dd5f

[PATCH 1/8] aio: make sure file is pinned

2019-03-06 Thread Al Viro
From: Al Viro "aio: remove the extra get_file/fput pair in io_submit_one" was too optimistic - not dereferencing file pointer after e.g. ->write_iter() returns is not enough; that reference might've been the only thing that kept alive objects that are referenced *before* the method returns. Such

[PATCH 3/8] aio_poll(): sanitize the logics after vfs_poll(), get rid of leak on error

2019-03-06 Thread Al Viro
From: Al Viro We want iocb_put() happening on errors, to balance the extra reference we'd taken. As it is, we end up with a leak. The rules should be * error: iocb_put() to deal with the extra ref, return error, let the caller do another iocb_put(). * async: iocb_put() to deal w

[PATCH 4/8] aio_poll(): get rid of weird refcounting

2019-03-06 Thread Al Viro
From: Al Viro The only reason for taking the extra ref to iocb is that we want to access it after vfs_poll() and an early wakeup could have it already completed by the time vfs_poll() returns. That's very easy to avoid, though - we need to know which lock to grab and, having grabbed it, we need

[PATCH 8/8] aio: move sanity checks and request allocation to io_submit_one()

2019-03-06 Thread Al Viro
From: Al Viro makes for somewhat cleaner control flow in __io_submit_one() Signed-off-by: Al Viro --- fs/aio.c | 86 +++- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index af51b1360305..6993581b

[PATCH 6/8] move dropping ->ki_eventfd into iocb_put()

2019-03-06 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/aio.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 5dd5f35d054c..5837a29e63fe 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1066,6 +1066,8 @@ static struct kioctx *lookup_ioctx(unsigned lon

[PATCH 7/8] deal with get_reqs_available() in aio_get_req() itself

2019-03-06 Thread Al Viro
From: Al Viro simplifies the caller Signed-off-by: Al Viro --- fs/aio.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 5837a29e63fe..af51b1360305 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1029,6 +1029,11 @@ static inline struct aio_kio

Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces

2019-03-06 Thread Liran Alon
> On 6 Mar 2019, at 23:42, si-wei liu wrote: > > > > On 3/6/2019 1:36 PM, Samudrala, Sridhar wrote: >> >> On 3/6/2019 1:26 PM, si-wei liu wrote: >>> >>> >>> On 3/6/2019 4:04 AM, Jiri Pirko wrote: > --- a/net/core/failover.c > +++ b/net/core/failover.c > @@ -16,6 +16,11 @@

[PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test

2019-03-06 Thread Stanislav Fomichev
CHECK macro implicitly uses duration. We call CHECK() a couple of times before duration is initialized from bpf_prog_test_run(). Explicitly set duration to 0 to avoid compiler warnings. Fixes: 740f8a657221 ("selftests/bpf: make sure signal interrupts BPF_PROG_TEST_RUN") Signed-off-by: Stanislav

Re: [Linuxptp-devel] strangeness

2019-03-06 Thread Paul Thomas
On Fri, Mar 1, 2019 at 1:24 AM Harini Katakam wrote: > > +netdev > > Hi Paul, > On Fri, Mar 1, 2019 at 12:29 AM Richard Cochran > wrote: > > > > On Thu, Feb 28, 2019 at 12:33:26PM -0500, Paul Thomas wrote: > > > Yes changing it to TSTAMP_ALL_PTP_FRAMES instead of TSTAMP_ALL_FRAMES > > > does seem

Re: TAHI testing fails for IPv6 Fragments in Kernel 4.9

2019-03-06 Thread Captain Wiggum
Thank you all for the reply. The problem started with 4.9.133, and persists to latest 4.9 today. I will work on the bisect approach to find the bad commit(s). It will take a few days. I will reply back when I have more info. On Wed, Mar 6, 2019 at 3:34 PM Eric Dumazet wrote: > > > > On 03/06/2019

Re: TAHI testing fails for IPv6 Fragments in Kernel 4.9

2019-03-06 Thread David Miller
From: Eric Dumazet Date: Wed, 6 Mar 2019 14:34:25 -0800 > That was Florian patch that was later reverted, right ? > > 0ed4229b08c13c84a3c301a08defdc9e7f4467e6 ipv6: defrag: drop non-last frags > smaller than min mtu > > -> reverted in > > d4289fcc9b16b89619ee1c54f829e05e56de8b9a net: IP6 def

Re: TAHI testing fails for IPv6 Fragments in Kernel 4.9

2019-03-06 Thread Eric Dumazet
On 03/06/2019 02:28 PM, David Miller wrote: > From: Captain Wiggum > Date: Wed, 6 Mar 2019 15:26:43 -0700 > >> We are using the TAHI Self-test tools from IPv6 Ready Logo Program: >> https://www.ipv6ready.org/?page=documents&tag=ipv6-core-protocols >> >> The test passed up to 4.9.133, then fail

Re: [PATCH v2] xfrm: Reset secpath in xfrm failure

2019-03-06 Thread Eric Dumazet
On 03/06/2019 01:55 PM, Myungho Jung wrote: > In esp4_gro_receive() and esp6_gro_receive(), secpath can be allocated > without adding xfrm state to xvec. Then, sp->xvec[sp->len - 1] would > fail and result in dereferencing invalid pointer in esp4_gso_segment() > and esp6_gso_segment(). Reset sec

Re: TAHI testing fails for IPv6 Fragments in Kernel 4.9

2019-03-06 Thread Florian Fainelli
On 3/6/19 2:26 PM, Captain Wiggum wrote: > We are using the TAHI Self-test tools from IPv6 Ready Logo Program: > https://www.ipv6ready.org/?page=documents&tag=ipv6-core-protocols > > The test passed up to 4.9.133, then fails ever since. > > The are about 20 failing test cases regarding IPv6 fragm

Re: TAHI testing fails for IPv6 Fragments in Kernel 4.9

2019-03-06 Thread David Miller
From: Captain Wiggum Date: Wed, 6 Mar 2019 15:26:43 -0700 > We are using the TAHI Self-test tools from IPv6 Ready Logo Program: > https://www.ipv6ready.org/?page=documents&tag=ipv6-core-protocols > > The test passed up to 4.9.133, then fails ever since. > > The are about 20 failing test cases r

TAHI testing fails for IPv6 Fragments in Kernel 4.9

2019-03-06 Thread Captain Wiggum
We are using the TAHI Self-test tools from IPv6 Ready Logo Program: https://www.ipv6ready.org/?page=documents&tag=ipv6-core-protocols The test passed up to 4.9.133, then fails ever since. The are about 20 failing test cases regarding IPv6 fragments, where the kernel is issuing an ICMPv6 parameter

[PATCH v2] xfrm: Reset secpath in xfrm failure

2019-03-06 Thread Myungho Jung
In esp4_gro_receive() and esp6_gro_receive(), secpath can be allocated without adding xfrm state to xvec. Then, sp->xvec[sp->len - 1] would fail and result in dereferencing invalid pointer in esp4_gso_segment() and esp6_gso_segment(). Reset secpath if xfrm function returns error. Fixes: 7785bba299

Re: [PATCH] connector: fix unsafe usage of ->real_parent

2019-03-06 Thread Evgeniy Polyakov
Hi 06.03.2019, 09:46, "Li RongQing" : > proc_exit_connector() uses ->real_parent lockless. This is not > safe that its parent can go away at any moment, so use RCU to > protect it, and ensure that this task is not released. > > Fixes: b086ff87251b4a4 ("connector: add parent pid and tgid to coredu

Re: [PATCH v1 iproute2-next 1/4] rdma: add helper rd_sendrecv_msg()

2019-03-06 Thread Steve Wise
On 3/4/2019 8:13 AM, Steve Wise wrote: > Hey Leon, adding this to rd_recv_msg(): > > @@ -693,10 +693,28 @@ int rd_recv_msg(struct rd *rd, mnl_cb_t callback, void > *data, unsigned int seq) > ret = mnl_cb_run(buf, ret, seq, portid, callback, data); > } while (ret > 0); > >

Re: [PATCH] xfrm: Reset secpath in xfrm failure

2019-03-06 Thread Myungho Jung
On Wed, Mar 06, 2019 at 12:35:43PM +0100, Steffen Klassert wrote: > On Wed, Mar 06, 2019 at 04:33:08PM +0900, Myungho Jung wrote: > > In esp4_gro_receive() and esp6_gro_receive(), secpath can be allocated > > without adding xfrm state to xvec. Then, sp->xvec[sp->len - 1] would > > fail and result i

Re: [PATCH 2/2] ip6mr: Make cache queue length configurable

2019-03-06 Thread Chris Packham
On 7/03/19 9:20 AM, Brodie Greenfield wrote: > We want to be able to keep more spaces available in our queue for > processing incoming IPv6 multicast traffic (adding (S,G) entries) - this > lets us learn more groups faster, rather than dropping them at this stage. > > Signed-off-by: Brodie Greenfi

[PATCH 1/2] ipmr: Make cache queue length configurable

2019-03-06 Thread Brodie Greenfield
We want to be able to keep more spaces available in our queue for processing incoming multicast traffic (adding (S,G) entries) - this lets us learn more groups faster, rather than dropping them at this stage. Signed-off-by: Brodie Greenfield --- Documentation/networking/ip-sysctl.txt | 8 +++

[PATCH 0/2] Make ipmr queue length configurable

2019-03-06 Thread Brodie Greenfield
We want to have some more space in our queue for processing incoming multicast packets, so we can process more of them without dropping them prematurely. It is useful to be able to increase this limit on higher-spec platforms that can handle more items. For the particular use case here at Allied T

[PATCH 2/2] ip6mr: Make cache queue length configurable

2019-03-06 Thread Brodie Greenfield
We want to be able to keep more spaces available in our queue for processing incoming IPv6 multicast traffic (adding (S,G) entries) - this lets us learn more groups faster, rather than dropping them at this stage. Signed-off-by: Brodie Greenfield --- Documentation/networking/ip-sysctl.txt | 8 ++

[PATCH RFC v2] mac80211: debugfs option to force TX status frames

2019-03-06 Thread Julius Niedworok
At Technical University of Munich we use MAC 802.11 TX status frames to perform several measurements in MAC 802.11 setups. With ath based drivers this was possible until commit d94a461d7a7df6 ("ath9k: use ieee80211_tx_status_noskb where possible") as the driver ignored the IEEE80211_TX_CTL_REQ_TX_

[PATCH bpf 2/2] libbpf: force fixdep compilation at the start of the build

2019-03-06 Thread Stanislav Fomichev
libbpf targets don't explicitly depend on fixdep target, so when we do 'make -j$(nproc)', there is a high probability, that some objects will be built before fixdep binary is available. Fix this by running sub-make; this makes sure that fixdep dependency is properly accounted for. For the same is

[PATCH bpf 1/2] selftests: bpf: fix compilation with out-of-tree $(OUTPUT)

2019-03-06 Thread Stanislav Fomichev
A bunch of related changes lumped together: * Create prog_tests and verifier output directories; these don't exist with out-of-tree $(OUTPUT) * Add missing -I (via separate TEST_{PROGS,VERIFIER}_CFLAGS) for the main tree ($(PWD) != $(OUTPUT) for out-of-tree) * Add libbpf.a dependency for test_p

Re: [PATCH mlx5-next] net/mlx5: ODP support for XRC transport is not enabled by default in FW

2019-03-06 Thread Jason Gunthorpe
On Mon, Feb 25, 2019 at 08:54:39AM +0200, Leon Romanovsky wrote: > From: Moni Shoua > > ODP support for XRC transport is not enabled by default in FW, > so we need separate ODP checks to enable/disable it. > > While that, rewrite the set of ODP SRQ support capabilities in way > that tests each f

[PATCH net-next] 8139too : Add support for U.S. Robotics USR997901A 10/100 Cardbus NIC

2019-03-06 Thread Matthew Whitehead
Add PCI vendor and device identifier for U.S. Robotics USR997901A 10/100 Cardbus NIC. Tested on real hardware. Signed-off-by: Matthew Whitehead --- drivers/net/ethernet/realtek/8139too.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/eth

[PATCH bpf] bpf: only test gso type on gso packets

2019-03-06 Thread Willem de Bruijn
From: Willem de Bruijn BPF can adjust gso only for tcp bytestreams. Fail on other gso types. But only on gso packets. It does not touch this field if !gso_size. Fixes: b90efd225874 ("bpf: only adjust gso_size on bytestream protocols") Signed-off-by: Willem de Bruijn --- Stupid bug on my part

Re: [PATCH net] fou, fou6: avoid uninit-value in gue_err() and gue6_err()

2019-03-06 Thread Stefano Brivio
On Wed, 6 Mar 2019 10:41:00 -0800 Eric Dumazet wrote: > My prior commit missed the fact that these functions > were using udp_hdr() (aka skb_transport_header()) > to get access to GUE header. Ouch, I totally missed this too. :/ > Since use pskb_transport_may_pull() does not exist yet, Nit: s/

Re: [PATCH net] tcp: do not report TCP_CM_INQ of 0 for closed connections

2019-03-06 Thread David Miller
From: Soheil Hassas Yeganeh Date: Wed, 6 Mar 2019 13:01:36 -0500 > From: Soheil Hassas Yeganeh > > Returning 0 as inq to userspace indicates there is no more data to > read, and the application needs to wait for EPOLLIN. For a connection > that has received FIN from the remote peer, however, t

Re: [PATCH net] net: hsr: fix memory leak in hsr_dev_finalize()

2019-03-06 Thread David Miller
From: Mao Wenan Date: Wed, 6 Mar 2019 22:45:01 +0800 > If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to > add port, it directly returns res and forgets to free the node > that allocated in hsr_create_self_node(), and forgets to delete > the node->mac_list linked in hsr->self_node_db. ... >

Re: [PATCH mlx5-next] net/mlx5: Fix DCT creation bad flow

2019-03-06 Thread Leon Romanovsky
On Wed, Mar 06, 2019 at 08:52:16PM +0200, Jason Gunthorpe wrote: > On Wed, Mar 06, 2019 at 07:20:50PM +0200, Leon Romanovsky wrote: > > From: Yishai Hadas > > > > In case the DCT creation command has succeeded a DRAIN must be issued > > before calling DESTROY. > > > > In addition, the original cod

Re: [PATCH net] net: sched: flower: insert new filter to idr after setting its mask

2019-03-06 Thread David Miller
From: Vlad Buslov Date: Wed, 6 Mar 2019 16:22:12 +0200 > When adding new filter to flower classifier, fl_change() inserts it to > handle_idr before initializing filter extensions and assigning it a mask. > Normally this ordering doesn't matter because all flower classifier ops > callbacks assume

Re: [PATCH mlx5-next] net/mlx5: Fix DCT creation bad flow

2019-03-06 Thread Jason Gunthorpe
On Wed, Mar 06, 2019 at 07:20:50PM +0200, Leon Romanovsky wrote: > From: Yishai Hadas > > In case the DCT creation command has succeeded a DRAIN must be issued > before calling DESTROY. > > In addition, the original code used the wrong parameter for the DESTROY > command, 'in' instead of 'din',

Re: [PATCH] tcp: detecting the misuse of .sendpage for Slab objects

2019-03-06 Thread David Miller
From: Vasily Averin Date: Wed, 6 Mar 2019 14:10:22 +0300 > sendpage was not designed for processing of the Slab pages, > in some situations it can trigger BUG_ON on receiving side. > > Signed-off-by: Vasily Averin Applied.

Re: [PATCH 2/2] appletalk: Add atalk.h header files to MAINTAINERS file

2019-03-06 Thread David Miller
From: Arnd Bergmann Date: Wed, 6 Mar 2019 11:52:37 +0100 > Add the path names here so that git-send-email can pick up the > netdev@vger.kernel.org Cc line automatically for a patch that > only touches the headers. > > Signed-off-by: Arnd Bergmann Applied.

Re: [PATCH 1/2] appletalk: Fix compile regression

2019-03-06 Thread David Miller
From: Arnd Bergmann Date: Wed, 6 Mar 2019 11:52:36 +0100 > A bugfix just broke compilation of appletalk when CONFIG_SYSCTL > is disabled: > > In file included from net/appletalk/ddp.c:65: > net/appletalk/ddp.c: In function 'atalk_init': > include/linux/atalk.h:164:34: error: expected expression

Re: [PATCH net] iptunnel: NULL pointer deref for ip_md_tunnel_xmit

2019-03-06 Thread David Miller
From: Alan Maguire Date: Wed, 6 Mar 2019 10:25:42 + (GMT) > Naresh Kamboju noted the following oops during execution of selftest > tools/testing/selftests/bpf/test_tunnel.sh on x86_64: ... > I'm also seeing the same failure on x86_64, and it reproduces > consistently. > > From poking around

[PATCH net] fou, fou6: avoid uninit-value in gue_err() and gue6_err()

2019-03-06 Thread Eric Dumazet
My prior commit missed the fact that these functions were using udp_hdr() (aka skb_transport_header()) to get access to GUE header. Since use pskb_transport_may_pull() does not exist yet, we have to add transport_offset to our pskb_may_pull() calls. BUG: KMSAN: uninit-value in gue_err+0x514/0xfa0

Re: [RFC PATCH V2 4/5] vhost: introduce helpers to get the size of metadata area

2019-03-06 Thread Souptick Joarder
On Wed, Mar 6, 2019 at 12:48 PM Jason Wang wrote: > > Signed-off-by: Jason Wang Is the change log left with any particular reason ? > --- > drivers/vhost/vhost.c | 46 -- > 1 file changed, 28 insertions(+), 18 deletions(-) > > diff --git a/drivers/vho

Re: [PATCH net v2] ipv4/route: fail early when inet dev is missing

2019-03-06 Thread David Miller
From: Paolo Abeni Date: Wed, 6 Mar 2019 10:42:53 +0100 > If a non local multicast packet reaches ip_route_input_rcu() while > the ingress device IPv4 private data (in_dev) is NULL, we end up > doing a NULL pointer dereference in IN_DEV_MFORWARD(). > > Since the later call to ip_route_input_mc()

Re: [PATCH net] net: hns3: Fix a logical vs bitwise typo

2019-03-06 Thread David Miller
From: Dan Carpenter Date: Wed, 6 Mar 2019 11:12:34 +0300 > There were a couple logical ORs accidentally mixed in with the bitwise > ORs. > > Fixes: e8149933b1fa ("net: hns3: remove hnae3_get_bit in data path") > Signed-off-by: Dan Carpenter > --- > Very recent bug. Applied.

Re: [PATCH net 3/3] sctp: call sctp_auth_init_hmacs() in sctp_sock_migrate()

2019-03-06 Thread Neil Horman
On Sun, Mar 03, 2019 at 05:54:55PM +0800, Xin Long wrote: > New ep's auth_hmacs should be set if old ep's is set, in case that > net->sctp.auth_enable has been changed to 0 by users and new ep's > auth_hmacs couldn't be set in sctp_endpoint_init(). > > It can even crash kernel by doing: > > 1.

Re: [PATCH net 2/3] sctp: move up sctp_auth_init_hmacs() in sctp_endpoint_init()

2019-03-06 Thread Neil Horman
On Sun, Mar 03, 2019 at 05:54:54PM +0800, Xin Long wrote: > sctp_auth_init_hmacs() is called only when ep->auth_enable is set. > It better to move up sctp_auth_init_hmacs() and remove auth_enable > check in it and check auth_enable only once in sctp_endpoint_init(). > > Signed-off-by: Xin Long >

Re: [PATCH net 1/3] sctp: sctp_sock_migrate() returns error if sctp_bind_addr_dup() fails

2019-03-06 Thread Neil Horman
On Sun, Mar 03, 2019 at 05:54:53PM +0800, Xin Long wrote: > It should fail to create the new sk if sctp_bind_addr_dup() fails > when accepting or peeloff an association. > > Signed-off-by: Xin Long > --- > net/sctp/socket.c | 34 -- > 1 file changed, 24 insertions

Re: [PATCH] appletalk: Correctly handle return value of register_snap_client

2019-03-06 Thread David Miller
From: Yue Haibing Date: Wed, 6 Mar 2019 15:27:40 +0800 > @@ -879,15 +879,17 @@ static struct notifier_block aarp_notifier = { > > static unsigned char aarp_snap_id[] = { 0x00, 0x00, 0x00, 0x80, 0xF3 }; > > -void __init aarp_proto_init(void) > +int __init aarp_proto_init(void) > { > aa

BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!

2019-03-06 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:cf08baa29613 Add linux-next specific files for 20190306 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=15bc76c720 kernel config: https://syzkaller.appspot.com/x/.config?x=c8b6073d992e8217

Re: [PATCH] tools: testing: selftests: Remove duplicate headers

2019-03-06 Thread Souptick Joarder
On Mon, Mar 4, 2019 at 4:19 PM Souptick Joarder wrote: > > On Tue, Feb 26, 2019 at 10:59 AM Souptick Joarder > wrote: > > > > On Tue, Feb 26, 2019 at 7:18 AM Michael Ellerman > > wrote: > > > > > > Souptick Joarder writes: > > > > Remove duplicate headers which are included twice. > > > > > >

[PATCH net] tcp: do not report TCP_CM_INQ of 0 for closed connections

2019-03-06 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Returning 0 as inq to userspace indicates there is no more data to read, and the application needs to wait for EPOLLIN. For a connection that has received FIN from the remote peer, however, the application must continue reading until getting EOF (return value of 0 from

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-06 Thread Jakub Kicinski
On Wed, 6 Mar 2019 13:20:37 +0100, Jiri Pirko wrote: > Tue, Mar 05, 2019 at 06:15:34PM CET, jakub.kicin...@netronome.com wrote: > >On Tue, 5 Mar 2019 12:06:01 +0100, Jiri Pirko wrote: > >> >> >as ports. Can we invent a new command (say "partition"?) that'd take > >> >> >the bus info where the pa

Re: [PATCH] net/rds: Accept peer connection reject messages due to incompatible version

2019-03-06 Thread Santosh Shilimkar
On 3/5/2019 11:04 PM, Gerd Rausch wrote: Prior to commit d021fabf525ff ("rds: rdma: add consumer reject") function "rds_rdma_cm_event_handler_cmn" would always honor a rejected connection attempt by issuing a "rds_conn_drop". The commit mentioned above added a "break", eliminating the "fallthro

[PATCH mlx5-next] IB/mlx5: Use mlx5 core to create/destroy a DEVX DCT

2019-03-06 Thread Leon Romanovsky
From: Yishai Hadas To prevent a hardware memory leak when a DEVX DCT object is destroyed without calling DRAIN DCT before, (e.g. under cleanup flow), need to manage its creation and destruction via mlx5 core. In that case the DRAIN DCT command will be called and only once that it will be complet

[PATCH mlx5-next] net/mlx5: Fix DCT creation bad flow

2019-03-06 Thread Leon Romanovsky
From: Yishai Hadas In case the DCT creation command has succeeded a DRAIN must be issued before calling DESTROY. In addition, the original code used the wrong parameter for the DESTROY command, 'in' instead of 'din', which caused another creation try instead of destroying. Cc: # 4.15 Fixes: 57

Re: [PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-06 Thread Stefan Hajnoczi
On Wed, Mar 06, 2019 at 11:10:41AM +0200, Adalbert Lazăr wrote: > On Wed, 6 Mar 2019 08:41:04 +, Stefan Hajnoczi wrote: > > On Tue, Mar 05, 2019 at 08:01:45PM +0200, Adalbert Lazăr wrote: > > The pkt argument is the received packet that we must reply to. > > The reply packet is allocated just

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-06 Thread Michael S. Tsirkin
On Wed, Mar 06, 2019 at 02:18:12AM -0500, Jason Wang wrote: > It was noticed that the copy_user() friends that was used to access > virtqueue metdata tends to be very expensive for dataplane > implementation like vhost since it involves lots of software checks, > speculation barrier, hardware featu

Re: [PATCH] tcp: detecting the misuse of .sendpage for Slab objects

2019-03-06 Thread Eric Dumazet
On 03/06/2019 03:10 AM, Vasily Averin wrote: > sendpage was not designed for processing of the Slab pages, > in some situations it can trigger BUG_ON on receiving side. > > Signed-off-by: Vasily Averin > --- > net/ipv4/tcp.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/net/ip

Re: [PATCH v3 bpf-next 1/2] bpf: Fix bpf_tcp_sock and bpf_sk_fullsock issue related to bpf_sk_release

2019-03-06 Thread Lorenz Bauer
On Mon, 4 Mar 2019 at 17:43, Martin Lau wrote: > > On Mon, Mar 04, 2019 at 10:33:46AM +0100, Daniel Borkmann wrote: > > On 03/02/2019 09:21 PM, Martin Lau wrote: > > > On Sat, Mar 02, 2019 at 10:03:03AM -0800, Alexei Starovoitov wrote: > > >> On Sat, Mar 02, 2019 at 08:10:10AM -0800, Martin KaFai

[PATCH net-next] net: sched: fix potential use-after-free in __tcf_chain_put()

2019-03-06 Thread Vlad Buslov
When used with unlocked classifier that have filters attached to actions with goto chain, __tcf_chain_put() for last non action reference can race with calls to same function from action cleanup code that releases last action reference. In this case action cleanup handler could free the chain if it

Re: [ovs-dev] openvswitch crash on i386

2019-03-06 Thread Juerg Haefliger
On Tue, 5 Mar 2019 11:58:42 -0800 Joe Stringer wrote: > On Tue, Mar 5, 2019 at 2:12 AM Christian Ehrhardt > wrote: > > > > On Tue, Mar 5, 2019 at 10:58 AM Juerg Haefliger > > wrote: > > > > > > Hi, > > > > > > Running the following commands in a loop will crash an i386 5.0 kernel > > > typica

[PATCH net] net: hsr: fix memory leak in hsr_dev_finalize()

2019-03-06 Thread Mao Wenan
If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to add port, it directly returns res and forgets to free the node that allocated in hsr_create_self_node(), and forgets to delete the node->mac_list linked in hsr->self_node_db. BUG: memory leak unreferenced object 0x8881cfa0c780 (size 64):

[PATCH net] net: sched: flower: insert new filter to idr after setting its mask

2019-03-06 Thread Vlad Buslov
When adding new filter to flower classifier, fl_change() inserts it to handle_idr before initializing filter extensions and assigning it a mask. Normally this ordering doesn't matter because all flower classifier ops callbacks assume rtnl lock protection. However, when filter has an action that doe

Re: [PATCH net] iptunnel: NULL pointer deref for ip_md_tunnel_xmit

2019-03-06 Thread Nicolas Dichtel
Le 06/03/2019 à 11:25, Alan Maguire a écrit : > Naresh Kamboju noted the following oops during execution of selftest > tools/testing/selftests/bpf/test_tunnel.sh on x86_64: > > [ 274.120445] BUG: unable to handle kernel NULL pointer dereference > at > [ 274.128285] #PF error: [I

Re: [PATCH net] gre: fix kernel panic when using lw tunnel

2019-03-06 Thread Nicolas Dichtel
Le 06/03/2019 à 11:32, Nicolas Dichtel a écrit : > There was several problems: > - skb_dst(skb) can be NULL when the packet comes from a gretap tunnel; > - skb_dst(skb)->ops may point to md_dst_ops, which doesn't set ->mtu >handler, thus calling dst_mtu() leads to a panic. > > I also wonder

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-06 Thread Jiri Pirko
Tue, Mar 05, 2019 at 06:15:34PM CET, jakub.kicin...@netronome.com wrote: >On Tue, 5 Mar 2019 12:06:01 +0100, Jiri Pirko wrote: >> >> >as ports. Can we invent a new command (say "partition"?) that'd take >> >> >the bus info where the partition is to be spawned? >> >> >> >> Got it. But the ques

  1   2   >