Re: [PATCH 0/4] mwifiex PCI/wake-up interrupt fixes

2019-03-08 Thread Kalle Valo
Marc Zyngier writes: > For quite some time, I wondered why the PCI mwifiex device built in my > Chromebook was unable to use the good old legacy interrupts. But as MSIs > were working fine, I never really bothered investigating. I finally had a > look, and the result isn't very pretty. > > On thi

Re: [PATCH 2/2] net: bonding: fix incorrect type in assignment

2019-03-08 Thread Bo YU
On Fri, Mar 8, 2019 at 2:51 PM Jay Vosburgh wrote: > > Bo YU wrote: > > >There are some warning when: > > > >sudo make C=1 CF=-D__CHECK_ENDIAN__ drivers/net/bonding/ > > > >drivers/net/bonding/bond_main.c:2438:40: warning: incorrect type in > >assignment (different base types) > >drivers/net/bon

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

2019-03-08 Thread Jason Wang
On 2019/3/7 下午11:34, Michael S. Tsirkin wrote: On Thu, Mar 07, 2019 at 10:45:57AM +0800, Jason Wang wrote: 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++) + s

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

2019-03-08 Thread Jason Wang
On 2019/3/8 上午3:16, Andrea Arcangeli wrote: On Thu, Mar 07, 2019 at 12:56:45PM -0500, Michael S. Tsirkin wrote: On Thu, Mar 07, 2019 at 10:47:22AM -0500, Michael S. Tsirkin wrote: On Wed, Mar 06, 2019 at 02:18:12AM -0500, Jason Wang wrote: +static const struct mmu_notifier_ops vhost_mmu_noti

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

2019-03-08 Thread Jason Wang
On 2019/3/8 上午3:17, Jerome Glisse wrote: On Thu, Mar 07, 2019 at 12:56:45PM -0500, Michael S. Tsirkin wrote: On Thu, Mar 07, 2019 at 10:47:22AM -0500, Michael S. Tsirkin wrote: On Wed, Mar 06, 2019 at 02:18:12AM -0500, Jason Wang wrote: +static const struct mmu_notifier_ops vhost_mmu_notifie

Re: [PATCH 0/4] mwifiex PCI/wake-up interrupt fixes

2019-03-08 Thread Marc Zyngier
On 08/03/2019 08:26, Kalle Valo wrote: > Marc Zyngier writes: > >> For quite some time, I wondered why the PCI mwifiex device built in my >> Chromebook was unable to use the good old legacy interrupts. But as MSIs >> were working fine, I never really bothered investigating. I finally had a >> loo

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

2019-03-08 Thread Jason Wang
On 2019/3/8 上午5:27, Andrea Arcangeli wrote: Hello Jerome, On Thu, Mar 07, 2019 at 03:17:22PM -0500, Jerome Glisse wrote: So for the above the easiest thing is to call set_page_dirty() from the mmu notifier callback. It is always safe to use the non locking variant from such callback. Well it

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

2019-03-08 Thread Jason Wang
On 2019/3/8 上午11:45, Jerome Glisse wrote: On Thu, Mar 07, 2019 at 10:43:12PM -0500, Michael S. Tsirkin wrote: On Thu, Mar 07, 2019 at 10:40:53PM -0500, Jerome Glisse wrote: On Thu, Mar 07, 2019 at 10:16:00PM -0500, Michael S. Tsirkin wrote: On Thu, Mar 07, 2019 at 09:55:39PM -0500, Jerome Gl

Re: [PATCH 0/4] mwifiex PCI/wake-up interrupt fixes

2019-03-08 Thread Kalle Valo
Marc Zyngier writes: > On 08/03/2019 08:26, Kalle Valo wrote: >> Marc Zyngier writes: >> >>> dt-bindings/marvell-8xxx: Allow wake-up interrupt to be placed in a >>> separate node >>> mwifiex: Fetch wake-up interrupt from 'wake-up' subnode when it exists >>> mwifiex: Flag wake-up inter

Re: [PATCH bpf 1/2] xsk: fix to reject invalid flags in xsk_bind

2019-03-08 Thread Maciej Fijalkowski
On Fri, 8 Mar 2019 08:57:26 +0100 Björn Töpel wrote: > From: Björn Töpel > > Passing a non-existing flag in the sxdp_flags member of struct > sockaddr_xdp was, incorrectly, silently ignored. This patch addresses > that behavior, and rejects any non-existing flags. > > We have examined existin

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Hallo Dan, Am 05.03.19 um 16:52 schrieb Dan Murphy: > Create a m_can platform framework that peripherial > devices can register to and use common code and register sets. > The peripherial devices may provide read/write and configuration > support of the IP. > > Signed-off-by: Dan Murphy > --- >

Re: [PATCH bpf 1/2] xsk: fix to reject invalid flags in xsk_bind

2019-03-08 Thread Björn Töpel
On Fri, 8 Mar 2019 at 11:00, Maciej Fijalkowski wrote: > > On Fri, 8 Mar 2019 08:57:26 +0100 > Björn Töpel wrote: > > > From: Björn Töpel > > > > Passing a non-existing flag in the sxdp_flags member of struct > > sockaddr_xdp was, incorrectly, silently ignored. This patch addresses > > that beh

Re: [PATCH v7 2/4] can: m_can: Rename m_can_priv to m_can_classdev

2019-03-08 Thread Wolfgang Grandegger
Am 05.03.19 um 16:52 schrieb Dan Murphy: > Rename the common m_can_priv class structure to > m_can_classdev as this is more descriptive. > > Signed-off-by: Dan Murphy > --- > > v7 - Fixed remaining checkpatch issues, renamed priv to cdev - > https://lore.kernel.org/patchwork/patch/1047219/ >

Re: [PATCH bpf 1/2] xsk: fix to reject invalid flags in xsk_bind

2019-03-08 Thread Maciej Fijalkowski
On Fri, 8 Mar 2019 11:11:05 +0100 Björn Töpel wrote: > On Fri, 8 Mar 2019 at 11:00, Maciej Fijalkowski > wrote: > > > > On Fri, 8 Mar 2019 08:57:26 +0100 > > Björn Töpel wrote: > > > > > From: Björn Töpel > > > > > > Passing a non-existing flag in the sxdp_flags member of struct > > > socka

Re: NULL pointer dereference in nft_set_elem_destroy()

2019-03-08 Thread Florian Westphal
Dmitrii Tcvetkov wrote: > After upgrade to 5.0 on XPS 13 9360 I get NULL pointer dereference in > dmesg (attached). Distro is Arch Linux, kernel is built with custom > config (attached), but distro kernel[1] reproduces the issue on the > laptop as well. > > Bisect led me to commit f6ac858589768 (

Re: [PATCH net] net: sched: put back q.qlen into a single location

2019-03-08 Thread Paolo Abeni
Hi, Thank you for fixing this! On Thu, 2019-02-28 at 12:55 -0800, Eric Dumazet wrote: > Later (net-next) we might revert this patch by tracking all these > qlen uses and replace them by a more efficient method (not having > to access a precise qlen, but an empty/non_empty status that might > be l

Re: [PATCH bpf 1/2] xsk: fix to reject invalid flags in xsk_bind

2019-03-08 Thread Björn Töpel
On Fri, 8 Mar 2019 at 11:46, Maciej Fijalkowski wrote: > [...] > > > > + flags = sxdp->sxdp_flags; > > > > + if (flags & ~(XDP_SHARED_UMEM | XDP_COPY | XDP_ZEROCOPY)) > > > > + return -EINVAL; > > > > + > > > > > > What about setting more than one flag at a time? Is it allowed/

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

2019-03-08 Thread zhengbin (A)
So, what should we do? On 2019/3/7 10:18, Al Viro wrote: > 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 io

We want to buy your products

2019-03-08 Thread COSTCO WHOLESALE UK
Dear , COSTCO UK LIMITED are looking to buy your products and partner with your company, can you please send us your Catalog or your website to learn more about your products or prices list by email and if we can make some order with you and start a long-term partnership. could your company

Re: [RFC net-next 0/8] Introducing subdev bus and devlink extension

2019-03-08 Thread Kirti Wankhede
On 3/8/2019 4:01 AM, Parav Pandit wrote: > > >> -Original Message- >> From: Kirti Wankhede >> Sent: Thursday, March 7, 2019 4:02 PM >> To: Parav Pandit ; Jakub Kicinski >> >> Cc: Or Gerlitz ; netdev@vger.kernel.org; linux- >> ker...@vger.kernel.org; michal.l...@markovi.net; da...@dav

Re: [PATCH net] sctp: remove sched init from sctp_stream_init

2019-03-08 Thread Neil Horman
On Fri, Mar 08, 2019 at 03:49:16PM +0800, Xin Long wrote: > syzbot reported a NULL-ptr deref caused by that sched->init() in > sctp_stream_init() set stream->rr_next = NULL. > > kasan: GPF could be caused by NULL-ptr deref or user memory access > RIP: 0010:sctp_sched_rr_dequeue+0xd3/0x170 net/

Re: [PATCH v7 2/4] can: m_can: Rename m_can_priv to m_can_classdev

2019-03-08 Thread Dan Murphy
Wolfgang On 3/8/19 4:25 AM, Wolfgang Grandegger wrote: > > > Am 05.03.19 um 16:52 schrieb Dan Murphy: >> Rename the common m_can_priv class structure to >> m_can_classdev as this is more descriptive. >> >> Signed-off-by: Dan Murphy >> --- >> >> v7 - Fixed remaining checkpatch issues, renamed pr

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
Wolfgang On 3/8/19 4:10 AM, Wolfgang Grandegger wrote: > Hallo Dan, > > Am 05.03.19 um 16:52 schrieb Dan Murphy: >> Create a m_can platform framework that peripherial >> devices can register to and use common code and register sets. >> The peripherial devices may provide read/write and configurat

[PATCH net] rxrpc: Fix client call connect/disconnect race

2019-03-08 Thread David Howells
rxrpc_disconnect_client_call() reads the call's connection ID protocol value (call->cid) as part of that function's variable declarations. This is bad because it's not inside the locked section and so may race with someone granting use of the channel to the call. This manifests as an assertion fa

Re: [PATCH] ath11k: fix bugon.cocci warnings

2019-03-08 Thread Kalle Valo
Julia Lawall writes: > From: kbuild test robot > > Use BUG_ON instead of if condition followed by BUG. > > Generated by: scripts/coccinelle/misc/bugon.cocci > > Fixes: c105b7abf400 ("ath11k: collect DDR dump after fw crash") > CC: Venkateswara Naralasetty > Signed-off-by: kbuild test robot > S

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

2019-03-08 Thread Michael S. Tsirkin
On Fri, Mar 08, 2019 at 04:58:44PM +0800, Jason Wang wrote: > > On 2019/3/8 上午3:17, Jerome Glisse wrote: > > On Thu, Mar 07, 2019 at 12:56:45PM -0500, Michael S. Tsirkin wrote: > > > On Thu, Mar 07, 2019 at 10:47:22AM -0500, Michael S. Tsirkin wrote: > > > > On Wed, Mar 06, 2019 at 02:18:12AM -050

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

2019-03-08 Thread Paul Moore
On Fri, Mar 8, 2019 at 1:31 AM maowenan wrote: > On 2019/3/8 4:36, Paul Moore wrote: > > On Wed, Mar 6, 2019 at 9:44 PM Mao Wenan wrote: > >> > >> If netlbl_sock_setattr() is failed, it directly returns rc and forgets > >> to free secattr. > >> > >> BUG: memory leak > >> unreferenced object 0xfff

Re: [PATCH v3 bpf]: libbpf: fixing leak when kernel does not support btf

2019-03-08 Thread Daniel Borkmann
On 03/08/2019 06:18 AM, Nikita V. Shirokov wrote: > we could end up in situation when we have object file w/ all btf > info but kernel does not support btf yet. in this situation currently > libbpf just set obj->btf to NULL w/o freeing it first. > this patch if fixing it by making sure to run btf__

Re: [PATCH bpf 1/2] xsk: fix to reject invalid flags in xsk_bind

2019-03-08 Thread Daniel Borkmann
On 03/08/2019 12:06 PM, Björn Töpel wrote: > On Fri, 8 Mar 2019 at 11:46, Maciej Fijalkowski > wrote: [...] So maybe check here also that only one particular flag is set by doing: if (hweight32(flags & (XDP_SHARED_UMEM | XDP_COPY | XDP_ZEROCOPY)) > 1) return -EINVAL; >>

Re: [PATCH V3] bpf: fix warning about using plain integer as NULL

2019-03-08 Thread Daniel Borkmann
On 03/08/2019 07:45 AM, Bo YU wrote: > Sparse warning below: > > sudo make C=2 CF=-D__CHECK_ENDIAN__ M=net/bpf/ > CHECK net/bpf//test_run.c > net/bpf//test_run.c:19:77: warning: Using plain integer as NULL pointer > ./include/linux/bpf-cgroup.h:295:77: warning: Using plain integer as NULL > poi

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Hello Dan, Am 08.03.19 um 13:44 schrieb Dan Murphy: > Wolfgang > > On 3/8/19 4:10 AM, Wolfgang Grandegger wrote: >> Hallo Dan, >> >> Am 05.03.19 um 16:52 schrieb Dan Murphy: >>> Create a m_can platform framework that peripherial >>> devices can register to and use common code and register sets. >

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

2019-03-08 Thread maowenan
On 2019/3/8 21:20, Paul Moore wrote: > On Fri, Mar 8, 2019 at 1:31 AM maowenan wrote: >> On 2019/3/8 4:36, Paul Moore wrote: >>> On Wed, Mar 6, 2019 at 9:44 PM Mao Wenan wrote: If netlbl_sock_setattr() is failed, it directly returns rc and forgets to free secattr. BUG:

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-08 Thread Christoph Hellwig
On Wed, Mar 06, 2019 at 02:18:07AM -0500, Jason Wang wrote: > This series tries to access virtqueue metadata through kernel virtual > address instead of copy_user() friends since they had too much > overheads like checks, spec barriers or even hardware feature > toggling. This is done through setup

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Hello Dan, thinking more about it... Am 08.03.19 um 14:29 schrieb Wolfgang Grandegger: > Hello Dan, > > Am 08.03.19 um 13:44 schrieb Dan Murphy: >> Wolfgang >> >> On 3/8/19 4:10 AM, Wolfgang Grandegger wrote: >>> Hallo Dan, >>> >>> Am 05.03.19 um 16:52 schrieb Dan Murphy: Create a m_can pla

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

2019-03-08 Thread Jerome Glisse
On Fri, Mar 08, 2019 at 04:50:36PM +0800, Jason Wang wrote: > > On 2019/3/8 上午3:16, Andrea Arcangeli wrote: > > On Thu, Mar 07, 2019 at 12:56:45PM -0500, Michael S. Tsirkin wrote: > > > On Thu, Mar 07, 2019 at 10:47:22AM -0500, Michael S. Tsirkin wrote: > > > > On Wed, Mar 06, 2019 at 02:18:12AM -

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

2019-03-08 Thread Jerome Glisse
On Fri, Mar 08, 2019 at 07:56:04AM -0500, Michael S. Tsirkin wrote: > On Fri, Mar 08, 2019 at 04:58:44PM +0800, Jason Wang wrote: > > > > On 2019/3/8 上午3:17, Jerome Glisse wrote: > > > On Thu, Mar 07, 2019 at 12:56:45PM -0500, Michael S. Tsirkin wrote: > > > > On Thu, Mar 07, 2019 at 10:47:22AM -0

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

2019-03-08 Thread Jiri Pirko
Fri, Mar 08, 2019 at 03:52:02AM CET, jakub.kicin...@netronome.com wrote: >On Thu, 7 Mar 2019 10:48:16 +0100, Jiri Pirko wrote: >> Wed, Mar 06, 2019 at 06:56:38PM CET, jakub.kicin...@netronome.com wrote: >> >On Wed, 6 Mar 2019 13:20:37 +0100, Jiri Pirko wrote: >> >For creating subdevices, I don't

Re: [PATCH net] route: set the deleted fnhe fnhe_daddr to 0 in ip_del_fnhe to fix a race

2019-03-08 Thread David Ahern
On 3/7/19 11:50 PM, Xin Long wrote: > The race occurs in __mkroute_output() when 2 threads lookup a dst: > > CPU A CPU B > find_exception() > find_exception() [fnhe expires] > ip_del_fnhe() [fnhe is deleted] > rt_bind_exception(

[PATCH net] vxlan: Fix GRO cells race condition between receive and link delete

2019-03-08 Thread Stefano Brivio
If we receive a packet while deleting a VXLAN device, there's a chance vxlan_rcv() is called at the same time as vxlan_dellink(). This is fine, except that vxlan_dellink() should never ever touch stuff that's still in use, such as the GRO cells list. Otherwise, vxlan_rcv() crashes while queueing p

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
Wolfgang On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: > Hello Dan, > > thinking more about it... > > Am 08.03.19 um 14:29 schrieb Wolfgang Grandegger: >> Hello Dan, >> >> Am 08.03.19 um 13:44 schrieb Dan Murphy: >>> Wolfgang >>> >>> On 3/8/19 4:10 AM, Wolfgang Grandegger wrote: Hallo Dan,

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

2019-03-08 Thread Christoph Hellwig
On Fri, Mar 08, 2019 at 03:36:50AM +, Al Viro wrote: > See vfs.git#work.aio; the crucial bits are in these commits: > keep io_event in aio_kiocb > get rid of aio_complete() res/res2 arguments > move aio_complete() to final iocb_put(), try to fix aio_poll() logics > The first t

Re: [PATCH net] netfilter: set skb transport_header before calling sctp_compute_cksum

2019-03-08 Thread Pablo Neira Ayuso
Hi, On Sun, Mar 03, 2019 at 04:17:21PM +0800, Xin Long wrote: > sctp_hdr(skb) only works when skb->transport_header is set > properly. > > But in the path of nf_conntrack_in: > > sctp_packet() -> sctp_error() -> sctp_compute_cksum(). > > skb->transport_header is not guaranteed to be right val

Re: [PATCH] netfilter: nf_ct_helper: Fix possible panic when nf_conntrack_helper_unregister is used in an unloadable module

2019-03-08 Thread Pablo Neira Ayuso
On Fri, Mar 01, 2019 at 01:56:06PM +0800, Su Yanjun wrote: > From: Su Yanjun > > Because nf_conntrack_helper_unregister maybe used in an unloadable module, > it uses 'synchronize_rcu' which may cause kernel panic. > > According to the artical: > RCU and Unloadable Modules > https://lwn.net/Artic

Re: [PATCH] netfilter: nf_conntrack_sip: fix IPV6 dependency

2019-03-08 Thread Pablo Neira Ayuso
hi Arnd, Cc'ing Alin Nastac. On Mon, Mar 04, 2019 at 09:40:12PM +0100, Arnd Bergmann wrote: > With CONFIG_IPV6=m and CONFIG_NF_CONNTRACK_SIP=y, we now get a link failure: > > net/netfilter/nf_conntrack_sip.o: In function `process_sdp': > nf_conntrack_sip.c:(.text+0x4344): undefined reference to

[PATCH net] selinux: add the missing walk_size + len check in selinux_sctp_bind_connect

2019-03-08 Thread Xin Long
As does in __sctp_connect(), when checking addrs in a while loop, after get the addr len according to sa_family, it's necessary to do the check walk_size + af->sockaddr_len > addrs_size to make sure it won't access an out-of-bounds addr. The same thing is needed in selinux_sctp_bind_connect(), oth

Re: [PATCH] netfilter: nf_conntrack_sip: fix IPV6 dependency

2019-03-08 Thread Alin Năstac
Hi Pablo, On Fri, Mar 8, 2019 at 5:04 PM Pablo Neira Ayuso wrote: > > hi Arnd, > > Cc'ing Alin Nastac. > > On Mon, Mar 04, 2019 at 09:40:12PM +0100, Arnd Bergmann wrote: > > With CONFIG_IPV6=m and CONFIG_NF_CONNTRACK_SIP=y, we now get a link failure: > > > > net/netfilter/nf_conntrack_sip.o: In fu

[PATCH] net/ipv6: Skip policy check to improve compliance

2019-03-08 Thread Andrew Boyer
From: Farrell Woods The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the UNH INTACT suite) that occurs specifically when IPsec is in use. The test iterates through the set of unassigned protocol numbers (currently, 143 through 252) and inserts these into the next header field of

Re: [PATCH v3 bpf]: libbpf: fixing leak when kernel does not support btf

2019-03-08 Thread Martin Lau
On Fri, Mar 08, 2019 at 05:18:14AM +, Nikita V. Shirokov wrote: > we could end up in situation when we have object file w/ all btf > info but kernel does not support btf yet. in this situation currently > libbpf just set obj->btf to NULL w/o freeing it first. > this patch if fixing it by making

Cadence/macb ethernet driver bug on nonlinear skb buffers

2019-03-08 Thread Klaus Doth
Hi, I think I found a bug in the cadence / macb ethernet driver. It seems the macb_pad_and_fcs function in macb_main.c does not handle cases of fragmented/paged sk-buffers correctly, as sometimes a memmove and afterwards skb_put_u8 is done on fragmented buffers. skb_put_u8 then fails as it check

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

2019-03-08 Thread Marcelo Ricardo Leitner
On Fri, Mar 08, 2019 at 11:48:10AM +0800, Xin Long wrote: > On Fri, Mar 8, 2019 at 2:25 AM Marcelo Ricardo Leitner > wrote: > > > > 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 a

Re: [PATCH net 0/3] sctp: process the error returned from sctp_sock_migrate()

2019-03-08 Thread Marcelo Ricardo Leitner
On Sun, Mar 03, 2019 at 05:54:52PM +0800, Xin Long wrote: > This patchset is to process the errs returned by sctp_auth_init_hmacs() > and sctp_bind_addr_dup() from sctp_sock_migrate(). And also fix a panic > caused by new ep->auth_hmacs was not set due to net->sctp.auth_enable > changed by sysctl b

Re: [PATCH net] sctp: remove sched init from sctp_stream_init

2019-03-08 Thread Marcelo Ricardo Leitner
On Fri, Mar 08, 2019 at 07:21:36AM -0500, Neil Horman wrote: > On Fri, Mar 08, 2019 at 03:49:16PM +0800, Xin Long wrote: > > syzbot reported a NULL-ptr deref caused by that sched->init() in > > sctp_stream_init() set stream->rr_next = NULL. > > > > kasan: GPF could be caused by NULL-ptr deref or

Re: [PATCH net] vxlan: Fix GRO cells race condition between receive and link delete

2019-03-08 Thread Eric Dumazet
On 03/08/2019 07:40 AM, Stefano Brivio wrote: > If we receive a packet while deleting a VXLAN device, there's a chance > vxlan_rcv() is called at the same time as vxlan_dellink(). This is fine, > except that vxlan_dellink() should never ever touch stuff that's still in > use, such as the GRO cel

Re: [PATCH net] selinux: add the missing walk_size + len check in selinux_sctp_bind_connect

2019-03-08 Thread Marcelo Ricardo Leitner
On Sat, Mar 09, 2019 at 12:07:34AM +0800, Xin Long wrote: > As does in __sctp_connect(), when checking addrs in a while loop, after > get the addr len according to sa_family, it's necessary to do the check > walk_size + af->sockaddr_len > addrs_size to make sure it won't access > an out-of-bounds a

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Hello, Am 08.03.19 um 16:48 schrieb Dan Murphy: > Wolfgang > > On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: >> Hello Dan, >> >> thinking more about it... >> >> Am 08.03.19 um 14:29 schrieb Wolfgang Grandegger: >>> Hello Dan, >>> >>> Am 08.03.19 um 13:44 schrieb Dan Murphy: Wolfgang >>>

RE: [RFC net-next 0/8] Introducing subdev bus and devlink extension

2019-03-08 Thread Parav Pandit
> -Original Message- > From: Kirti Wankhede > Sent: Friday, March 8, 2019 6:19 AM > To: Parav Pandit ; Jakub Kicinski > > Cc: Or Gerlitz ; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; michal.l...@markovi.net; da...@davemloft.net; > gre...@linuxfoundation.org; Jiri Pirko ; Al

Re: [PATCH net] pptp: dst_release sk_dst_cache in pptp_sock_destruct

2019-03-08 Thread Eric Dumazet
On 03/07/2019 11:25 PM, Xin Long wrote: > sk_setup_caps() is called to set sk->sk_dst_cache in pptp_connect, > so we have to dst_release(sk->sk_dst_cache) in pptp_sock_destruct, > otherwise, the dst refcnt will leak. > > It can be reproduced by this syz log: > > r1 = socket$pptp(0x18, 0x1, 0

Re: [PATCH net] pptp: dst_release sk_dst_cache in pptp_sock_destruct

2019-03-08 Thread Eric Dumazet
On 03/08/2019 09:17 AM, Eric Dumazet wrote: > > > On 03/07/2019 11:25 PM, Xin Long wrote: >> sk_setup_caps() is called to set sk->sk_dst_cache in pptp_connect, >> so we have to dst_release(sk->sk_dst_cache) in pptp_sock_destruct, >> otherwise, the dst refcnt will leak. >> >> It can be reproduc

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: > Hello, > > Am 08.03.19 um 16:48 schrieb Dan Murphy: >> Wolfgang >> >> On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: >>> Hello Dan, >>> >>> thinking more about it... >>> >>> Am 08.03.19 um 14:29 schrieb Wolfgang Grandegger: Hello Dan,

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Hello Dan, Am 08.03.19 um 18:25 schrieb Dan Murphy: > On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: >> Hello, >> >> Am 08.03.19 um 16:48 schrieb Dan Murphy: >>> Wolfgang >>> >>> On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: Hello Dan, thinking more about it... Am 08.03.19

Re: [PATCH net 03/16] net/sched: act_csum: validate the control action inside init()

2019-03-08 Thread Davide Caratti
On Thu, 2019-03-07 at 17:56 +0100, Davide Caratti wrote: > On Thu, 2019-03-07 at 14:51 +, Vlad Buslov wrote: > > [...] hi Vlad, > > On Thu 07 Mar 2019 at 15:56, Davide Caratti wrote: > > > so, I think that the answer to your question: > > > > > > On Wed, 2019-02-27 at 17:50 -0800, Cong Wan

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
On 3/8/19 11:40 AM, Wolfgang Grandegger wrote: > Hello Dan, > > Am 08.03.19 um 18:25 schrieb Dan Murphy: >> On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: >>> Hello, >>> >>> Am 08.03.19 um 16:48 schrieb Dan Murphy: Wolfgang On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: > Hello D

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Am 08.03.19 um 18:52 schrieb Dan Murphy: > On 3/8/19 11:40 AM, Wolfgang Grandegger wrote: >> Hello Dan, >> >> Am 08.03.19 um 18:25 schrieb Dan Murphy: >>> On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: Hello, Am 08.03.19 um 16:48 schrieb Dan Murphy: > Wolfgang > > On 3

Re: [Linuxptp-devel] strangeness

2019-03-08 Thread Paul Thomas
Hi Harini, On Fri, Mar 8, 2019 at 1:08 AM Harini Katakam wrote: > > Hi Paul, > On Fri, Mar 8, 2019 at 12:33 AM Paul Thomas wrote: > > > > On Thu, Mar 7, 2019 at 12:32 AM Harini Katakam wrote: > > > > > > Hi Paul, > > > On Thu, Mar 7, 2019 at 4:38 AM Paul Thomas wrote: > > > > > > > > On Fri, M

Re: [PATCH net] route: set the deleted fnhe fnhe_daddr to 0 in ip_del_fnhe to fix a race

2019-03-08 Thread David Miller
From: Xin Long Date: Fri, 8 Mar 2019 14:50:54 +0800 > The race occurs in __mkroute_output() when 2 threads lookup a dst: > > CPU A CPU B > find_exception() > find_exception() [fnhe expires] > ip_del_fnhe() [fnhe is deleted] >

[PATCH] net/ipv6: Skip policy check to improve compliance

2019-03-08 Thread Andrew Boyer
From: Farrell Woods The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the UNH INTACT suite) that occurs specifically when IPsec is in use. The test iterates through the set of unassigned protocol numbers (currently, 143 through 252) and inserts these into the next header field of

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

2019-03-08 Thread Jakub Kicinski
On Fri, 8 Mar 2019 15:54:21 +0100, Jiri Pirko wrote: > Fri, Mar 08, 2019 at 03:52:02AM CET, jakub.kicin...@netronome.com wrote: > >On Thu, 7 Mar 2019 10:48:16 +0100, Jiri Pirko wrote: > >> Wed, Mar 06, 2019 at 06:56:38PM CET, jakub.kicin...@netronome.com wrote: > >> >On Wed, 6 Mar 2019 13:20:37

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

2019-03-08 Thread Andrea Arcangeli
On Fri, Mar 08, 2019 at 05:13:26PM +0800, Jason Wang wrote: > Actually not wrapping around,  the pages for used ring was marked as > dirty after a round of virtqueue processing when we're sure vhost wrote > something there. Thanks for the clarification. So we need to convert it to set_page_dirty

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

2019-03-08 Thread Andrea Arcangeli
On Fri, Mar 08, 2019 at 04:58:44PM +0800, Jason Wang wrote: > Can I simply can set_page_dirty() before vunmap() in the mmu notifier > callback, or is there any reason that it must be called within vumap()? I also don't see any problem in doing it before vunmap. As far as the mmu notifier and set_

Re: [PATCH net] sctp: remove sched init from sctp_stream_init

2019-03-08 Thread David Miller
From: Xin Long Date: Fri, 8 Mar 2019 15:49:16 +0800 > syzbot reported a NULL-ptr deref caused by that sched->init() in > sctp_stream_init() set stream->rr_next = NULL. > > kasan: GPF could be caused by NULL-ptr deref or user memory access > RIP: 0010:sctp_sched_rr_dequeue+0xd3/0x170 net/sct

Re: [PATCH net] rxrpc: Fix client call connect/disconnect race

2019-03-08 Thread David Miller
From: David Howells Date: Fri, 08 Mar 2019 12:48:39 + > rxrpc_disconnect_client_call() reads the call's connection ID protocol > value (call->cid) as part of that function's variable declarations. This > is bad because it's not inside the locked section and so may race with > someone grantin

Re: [PATCH net] vxlan: Fix GRO cells race condition between receive and link delete

2019-03-08 Thread David Miller
From: Stefano Brivio Date: Fri, 8 Mar 2019 16:40:57 +0100 > If we receive a packet while deleting a VXLAN device, there's a chance > vxlan_rcv() is called at the same time as vxlan_dellink(). This is fine, > except that vxlan_dellink() should never ever touch stuff that's still in > use, such as

Re: [PATCH] net/ipv6: Skip policy check to improve compliance

2019-03-08 Thread David Miller
Why did you post this twice?

Re: [PATCH net 0/3] sctp: process the error returned from sctp_sock_migrate()

2019-03-08 Thread David Miller
From: Marcelo Ricardo Leitner Date: Fri, 8 Mar 2019 14:00:03 -0300 > On Sun, Mar 03, 2019 at 05:54:52PM +0800, Xin Long wrote: >> This patchset is to process the errs returned by sctp_auth_init_hmacs() >> and sctp_bind_addr_dup() from sctp_sock_migrate(). And also fix a panic >> caused by new ep-

Re: [PATCH net-next] net: phy: improve handling link_change_notify callback

2019-03-08 Thread David Miller
From: Heiner Kallweit Date: Sun, 3 Mar 2019 19:58:57 +0100 > Currently the Phy driver's link_change_notify callback is called > whenever the state machine is run (every second if polling), no matter > whether the state changed or not. This isn't needed and may confuse > users considering the name

Re: [PATCH] net: dsa: Add support for port mac address

2019-03-08 Thread David Miller
From: xiaofeis Date: Tue, 5 Mar 2019 16:16:53 +0800 > Allow port network device's mac address to be retrieved from the > device tree. > > Signed-off-by: xiaofeis You're not "adding support" you are adding documentation for support that already exists. Please phrase your commit message and su

Re: [PATCH V3 0/6] stmmac: add some fixes for stm32

2019-03-08 Thread David Miller
From: Christophe Roullier Date: Tue, 5 Mar 2019 09:29:22 +0100 > For common stmmac: > - Add support to set CSR Clock range selection in DT > For stm32mpu: > - Glue codes to support magic packet > - Glue codes to support all PHY config : > PHY_MODE (MII,GMII, RMII,

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

2019-03-08 Thread Andrea Arcangeli
Hello Jeson, On Fri, Mar 08, 2019 at 04:50:36PM +0800, Jason Wang wrote: > Just to make sure I understand here. For boosting through huge TLB, do > you mean we can do that in the future (e.g by mapping more userspace > pages to kenrel) or it can be done by this series (only about three 4K > pag

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

2019-03-08 Thread Jerome Glisse
On Fri, Mar 08, 2019 at 02:48:45PM -0500, Andrea Arcangeli wrote: > Hello Jeson, > > On Fri, Mar 08, 2019 at 04:50:36PM +0800, Jason Wang wrote: > > Just to make sure I understand here. For boosting through huge TLB, do > > you mean we can do that in the future (e.g by mapping more userspace > >

Re: [PATCH v3 bpf]: libbpf: fixing leak when kernel does not support btf

2019-03-08 Thread Daniel Borkmann
On 03/08/2019 05:45 PM, Martin Lau wrote: > On Fri, Mar 08, 2019 at 05:18:14AM +, Nikita V. Shirokov wrote: >> we could end up in situation when we have object file w/ all btf >> info but kernel does not support btf yet. in this situation currently >> libbpf just set obj->btf to NULL w/o freein

[BUG] BPF splat on latest kernels

2019-03-08 Thread Eric Dumazet
Running test_progs on a LOCKDEP enabled kernel (latest David Miller net tree) I got the following splat. It is not immediately obvious to me. Any idea ? [ 4169.908826] == [ 4169.914996] WARNING: possible circular locking dependency detected [ 4

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
On 3/8/19 12:06 PM, Wolfgang Grandegger wrote: > > > Am 08.03.19 um 18:52 schrieb Dan Murphy: >> On 3/8/19 11:40 AM, Wolfgang Grandegger wrote: >>> Hello Dan, >>> >>> Am 08.03.19 um 18:25 schrieb Dan Murphy: On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: > Hello, > > Am 08.03.19

[RFC][Proposal] BPF Control MAP

2019-03-08 Thread Saeed Mahameed
In this proposal I am going to address the lack of a unified user API for accessing and manipulating BPF system attributes, while this proposal is generic and will work on any BPF subsystem (eBPF attach points), I will mostly focus on XDP use cases. So lately I started working on three different X

Re: [PATCH 1/2] net: bonding: fix restricted __be16 degrades to integer

2019-03-08 Thread Jay Vosburgh
Bo YU wrote: >There are some warning when: > >sudo make C=1 CF=-D__CHECK_ENDIAN__ drivers/net/bonding/ > >drivers/net/bonding/bond_main.c:2385:26: warning: restricted __be16 degrades >to integer >drivers/net/bonding/bond_main.c:2391:20: warning: restricted __be16 degrades >to integer >... >driv

Re: [PATCH] net: stmmac: Avoid one more sometimes uninitialized Clang warning

2019-03-08 Thread Nick Desaulniers
On Thu, Mar 7, 2019 at 8:02 PM Nathan Chancellor wrote: > > When building with -Wsometimes-uninitialized, Clang warns: > > drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:111:2: error: variable > 'ns' is used uninitialized whenever 'if' condition is false > [-Werror,-Wsometimes-uninitialized] > d

[PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
Commit 7716682cc58e ("tcp/dccp: fix another race at listener dismantle") let inet_csk_reqsk_queue_add() fail, and adjusted {tcp,dccp}_check_req() accordingly. However, TFO and syncookies weren't modified, thus leaking allocated resources on error. Contrary to tcp_check_req(), in both syncookies an

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 01:09 PM, Guillaume Nault wrote: > Commit 7716682cc58e ("tcp/dccp: fix another race at listener > dismantle") let inet_csk_reqsk_queue_add() fail, and adjusted > {tcp,dccp}_check_req() accordingly. However, TFO and syncookies > weren't modified, thus leaking allocated resources on

Re: NULL pointer dereference in nft_set_elem_destroy()

2019-03-08 Thread Dmitrii Tcvetkov
On Fri, 8 Mar 2019 11:50:39 +0100 Florian Westphal wrote: > Dmitrii Tcvetkov wrote: > > After upgrade to 5.0 on XPS 13 9360 I get NULL pointer dereference > > in dmesg (attached). Distro is Arch Linux, kernel is built with > > custom config (attached), but distro kernel[1] reproduces the issue >

Re: [Linuxptp-devel] strangeness

2019-03-08 Thread Paul Thomas
On Fri, Mar 8, 2019 at 1:07 PM Paul Thomas wrote: > > Hi Harini, > > On Fri, Mar 8, 2019 at 1:08 AM Harini Katakam wrote: > > > > Hi Paul, > > On Fri, Mar 8, 2019 at 12:33 AM Paul Thomas wrote: > > > > > > On Thu, Mar 7, 2019 at 12:32 AM Harini Katakam wrote: > > > > > > > > Hi Paul, > > > > On

[RFC net-next v1 0/3] Support mlx5 mediated devices in host

2019-03-08 Thread Parav Pandit
Use case: - A user wants to create/delete hardware linked sub devices without using SR-IOV. These devices for a pci device can be netdev (optional rdma device) or other devices. Such sub devices share some of the PCI device resources and also have their own dedicated resources. A user wants

[RFC net-next v1 2/3] net/mlx5: Add mdev sub device life cycle command support

2019-03-08 Thread Parav Pandit
Implement mdev hooks to to create mediated devices using mdev driver. Actual mlx5_core driver in the host is expected to bind to these devices using standard device driver model. mdev devices are created using sysfs file as below example. $ uuidgen 49d0e9ac-61b8-4c91-957e-6f6dbc42557d $ echo 49d

[RFC net-next v1 3/3] net/mlx5: Add mdev driver to bind to mdev devices

2019-03-08 Thread Parav Pandit
Add a mdev driver to probe the mdev devices and create fake netdevice for it. Similar to pci driver, when new mdev are created/removed or when user triggers binding a mdev to mlx5_core driver by writing mdev device id to /sys/bus/mdev/drivers/mlx5_core/bind,unbind files, mlx5_core driver's probe()

[RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Parav Pandit
Inherit dma mask of parent device in child mdev devices, so that protocol stack can use right dma mask while doing dma mappings. Signed-off-by: Parav Pandit --- drivers/vfio/mdev/mdev_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: > > > On 03/08/2019 01:09 PM, Guillaume Nault wrote: > > @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, > > struct sk_buff *skb, > > refcount_set(&req->rsk_refcnt, 1); > > tcp_sk(child)-

Re: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Alex Williamson
On Fri, 8 Mar 2019 16:07:54 -0600 Parav Pandit wrote: > Inherit dma mask of parent device in child mdev devices, so that > protocol stack can use right dma mask while doing dma mappings. > > Signed-off-by: Parav Pandit > --- > drivers/vfio/mdev/mdev_core.c | 4 > 1 file changed, 4 insert

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 02:22 PM, Guillaume Nault wrote: > On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: >> >> >> On 03/08/2019 01:09 PM, Guillaume Nault wrote: >>> @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, >>> struct sk_buff *skb, >>> refcount_set

Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space

2019-03-08 Thread Gerd Rausch
On 07/03/2019 17.37, santosh.shilim...@oracle.com wrote: >> --- a/net/rds/connection.c >> +++ b/net/rds/connection.c >> @@ -736,6 +736,7 @@ static int rds_conn_info_visitor(struct rds_conn_path >> *cp, void *buffer) >>   cinfo->next_rx_seq = cp->cp_next_rx_seq; >>   cinfo->laddr = conn->c_

Re: [PATCH] net: add missing documentation in linux/skbuff.h

2019-03-08 Thread David Miller
From: Pedro Tammela Date: Tue, 5 Mar 2019 11:35:54 -0300 > This patch adds missing documentation for some inline functions on > linux/skbuff.h. The patch is incomplete and a lot more can be added, > just wondering if it's of interest of the netdev developers. > > Also fixed some whitespaces. >

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 02:34:07PM -0800, Eric Dumazet wrote: > > > On 03/08/2019 02:22 PM, Guillaume Nault wrote: > > On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: > >> > >> > >> On 03/08/2019 01:09 PM, Guillaume Nault wrote: > >>> @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie

Re: [PATCH v1 net] lan743x: Fix RX Kernel Panic

2019-03-08 Thread David Miller
From: Bryan Whitehead Date: Tue, 5 Mar 2019 14:46:04 -0500 > @@ -2060,8 +2068,19 @@ static int lan743x_rx_process_packet(struct lan743x_rx > *rx) > /* packet is available */ > if (first_index == last_index) { > /* single buffer packet */ > +

  1   2   >