Re: [PATCH net-next 0/2] ATU and VTU irq fixes

2018-01-16 Thread David Miller
From: Andrew Lunn Date: Mon, 15 Jan 2018 23:45:56 +0100 > Further testing and core review found two sets of bugs. > > Core review found a cut/paste error in the irq setup code. > > A board which does not have an interrupt line from the switch to the > SoC, and experiancing an

Re: DPAA Ethernet problems with mainstream Linux kernels

2018-01-16 Thread Christian Zigotzky
Hi All, I compiled the RC8 of kernel 4.15 for the X5000 without PAMU support today. Download: http://www.xenosoft.de/uImage_without_pamu.tar.gz Please test it on your AmigaOne X5000. Thanks, Christian On 16 January 2018 at 6:33PM, Madalin-cristian Bucur wrote: The PAMU related errors may

Re: [PATCH net-next 2/8] net: sched: cls_api: handle generic cls errors

2018-01-16 Thread David Ahern
On 1/16/18 9:20 AM, Alexander Aring wrote: > This patch adds extack support for generic cls handling. The extack > will be set deeper to each called function which is not part of netdev > core api. > > Cc: David Ahern > Signed-off-by: Alexander Aring > ---

Re: [PATCH net-next 2/8] net: sched: cls_api: handle generic cls errors

2018-01-16 Thread Jamal Hadi Salim
On 18-01-16 06:58 PM, David Ahern wrote: On 1/16/18 9:20 AM, Alexander Aring wrote: } if (n->nlmsg_type != RTM_NEWTFILTER || !(n->nlmsg_flags & NLM_F_CREATE)) { + NL_SET_ERR_MSG(extack, "Need both RTM_NEWTFILTER and

Re: [PATCH net-next 2/8] net: sched: cls_api: handle generic cls errors

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 9:20 AM, Alexander Aring wrote: > @@ -1117,8 +1146,10 @@ int tcf_exts_validate(struct net *net, struct > tcf_proto *tp, struct nlattr **tb, > } > #else > if ((exts->action && tb[exts->action]) || > - (exts->police &&

Re: [PATCH bpf] bpf: reject stores into ctx via st and xadd

2018-01-16 Thread Alexei Starovoitov
On Tue, Jan 16, 2018 at 11:30:10PM +0100, Daniel Borkmann wrote: > Alexei found that verifier does not reject stores into context > via BPF_ST instead of BPF_STX. And while looking at it, we > also should not allow XADD variant of BPF_STX. > > The context rewriter is only assuming either

Re: [PATCH] samples/bpf: Fix trailing semicolon

2018-01-16 Thread Daniel Borkmann
On 01/16/2018 03:15 PM, Luis de Bethencourt wrote: > The trailing semicolon is an empty statement that does no operation. > Removing it since it doesn't do anything. > > Signed-off-by: Luis de Bethencourt Applied to bpf-next, thanks Luis!

[PATCH net-next] net: stmmac: Fix reception of Broadcom switches tags

2018-01-16 Thread Florian Fainelli
Broadcom tags inserted by Broadcom switches put a 4 byte header after the MAC SA and before the EtherType, which may look like some sort of 0 length LLC/SNAP packet (tcpdump and wireshark do think that way). With ACS enabled in stmmac the packets were truncated to 8 bytes on reception, whereas

[PATCH net-next] ipv6: mcast: remove dead code

2018-01-16 Thread Eric Dumazet
From: Eric Dumazet Since commit 41033f029e39 ("snmp: Remove duplicate OUTMCAST stat increment") one line of code became unneeded. Signed-off-by: Eric Dumazet ---  net/ipv6/mcast.c |2 --  1 file changed, 2 deletions(-) diff --git a/net/ipv6/mcast.c

[PATCH bpf-next 6/6] nfp: bpf: reject program on instructions unknown to the JIT compiler

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet If an eBPF instruction is unknown to the driver JIT compiler, we can reject the program at verification time. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Reviewed-by:

[PATCH bpf-next 3/6] tools: bpftool: add -DPACKAGE when including bfd.h

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang bfd.h is requiring including of config.h except when PACKAGE or PACKAGE_VERSION are defined. /* PR 14072: Ensure that config.h is included first. */ #if !defined PACKAGE && !defined PACKAGE_VERSION #error config.h must be included before this

[PATCH bpf-next 2/6] bpf: annotate bpf_insn_print_t with __printf

2018-01-16 Thread Jakub Kicinski
Functions of type bpf_insn_print_t take printf-like format string, mark the type accordingly. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- kernel/bpf/disasm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH bpf-next 5/6] nfp: bpf: print map lookup problems into verifier log

2018-01-16 Thread Jakub Kicinski
Use the verifier log to output error messages if map lookup can't be offloaded. Signed-off-by: Jakub Kicinski Acked-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 14 -- 1 file changed, 8

[PATCH bpf-next 4/6] libbpf: fix string comparison for guessing eBPF program type

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet libbpf is able to deduce the type of a program from the name of the ELF section in which it is located. However, the comparison is made on the first n characters, n being determined with sizeof() applied to the reference string (e.g. "xdp").

Re: kmem_cache_attr (was Re: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting)

2018-01-16 Thread Matthew Wilcox
On Tue, Jan 16, 2018 at 12:17:01PM -0600, Christopher Lameter wrote: > Draft patch of how the data structs could change. kmem_cache_attr is read > only. Looks good. Although I would add Kees' user feature: struct kmem_cache_attr { char name[16]; unsigned int size;

[PATCH bpf-next v3 08/11] nfp: bpf: plumb extack into functions related to XDP offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Pass a pointer to an extack object to nfp_app_xdp_offload() in order to prepare for extack usage in the nfp driver. Next step will be to forward this extack pointer to nfp_net_bpf_offload(), once this function is able to use it for printing

[PATCH bpf-next v3 04/11] net: sched: cls_u32: propagate extack support for filter offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_u32. This makes it possible to use netlink extack messages in the future at replacement time for this filter, although it

[PATCH bpf-next v3 01/11] net: sched: add extack support to change() classifier operation

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Add an extra argument to `->change()` operation for passing a pointer to a struct netlink_ext_ack. Update the operation for all classifiers accordingly. Extack is not used at this point. Signed-off-by: Quentin Monnet

[PATCH bpf-next v3 07/11] net: sched: create tc_can_offload_extack() wrapper

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Create a wrapper around tc_can_offload() that takes an additional extack pointer argument in order to output an error message if TC offload is disabled on the device. In this way, the error message is handled by the core and can be the same for

[PATCH bpf-next v3 02/11] net: sched: cls_flower: propagate extack support for filter offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_flower. This makes it possible to use netlink extack messages in the future at replacement time for this filter, although

Re: [PATCH net-next 0/2] ATU and VTU irq fixes

2018-01-16 Thread David Miller
From: David Miller Date: Tue, 16 Jan 2018 15:18:33 -0500 (EST) > From: Andrew Lunn > Date: Mon, 15 Jan 2018 23:45:56 +0100 > >> Further testing and core review found two sets of bugs. >> >> Core review found a cut/paste error in the irq setup code. >> >>

Re: general protection fault in skb_segment

2018-01-16 Thread Willem de Bruijn
On Tue, Jan 2, 2018 at 12:23 PM, Willem de Bruijn wrote: >> Actually, changes just to inet_gso_segment and ipv6_gso_segment >> will suffice: >> >>bool udpfrag = false, fixedid = false, gso_partial, encap; >> struct sk_buff *segs = ERR_PTR(-EINVAL);

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-16 Thread Andrew Lunn
> > You appear to be using an old kernel. Take a look at: > > Not really, I am using 4.14.x and I don't think that is old. Development for 4.14 stopped somewhere around the beginning of September. So there has been over 4 months of work since then. We are clearly interested in fixing bugs in

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Jamal Hadi Salim
On 18-01-16 05:41 PM, Jakub Kicinski wrote: On Tue, 16 Jan 2018 17:12:57 -0500, Jamal Hadi Salim wrote: On 18-01-16 04:46 PM, Jakub Kicinski wrote: On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wrote: [..] I would say precedence should be Jiri's patches, Alex's patches and then

[PATCH bpf-next 1/3] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang For host JIT, there are "jited_len"/"bpf_func" fields in struct bpf_prog used by all host JIT targets to get jited image and it's length. While for offload, targets are likely to have different offload mechanisms that these info are kept in device

[PATCH bpf-next 2/3] nfp: bpf: set new jit info fields

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang This patch set those new jit info fields introduced in this patch set. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang --- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 10 +-

[PATCH bpf-next 0/3] bpf: add dumping and disassembler for non-host JITs

2018-01-16 Thread Jakub Kicinski
Hi, Currently bpftool could disassemble host jited image, for example x86_64, using libbfd. However it couldn't disassemble offload jited image. There are two reasons: 1. bpf_obj_get_info_by_fd/struct bpf_prog_info couldn't get the address of jited image and image's length. 2. Even

[PATCH bpf-next 3/3] tools: bpftool: improve architecture detection by using ifindex

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang The current architecture detection method in bpftool is designed for host case. For offload case, we can't use the architecture of "bpftool" itself. Instead, we could call the existing "ifindex_to_name_ns" to get DEVNAME, then read pci id from

[GIT] Networking

2018-01-16 Thread David Miller
1) Two read past end of buffer fixes in AF_KEY, from Eric Biggers. 2) Memory leak in key_notify_policy(), from Steffen Klassert. 3) Fix overflow with bpf arrays, from Daniel Borkmann. 4) Fix RDMA regression with mlx5 due to mlx5 no longer using pci_irq_get_affinity(), from Saeed Mahameed.

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Jakub Kicinski
On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wrote: > Hi, > > this patch adds extack support for TC classifier subsystem. The first > patch fixes some code style issues for this patch series pointed out > by checkpatch. The other patches until the last one prepares extack > handling for

[PATCH] cfg80211: fix station info handling bugs

2018-01-16 Thread Johannes Berg
From: Johannes Berg Fix two places where the structure isn't initialized to zero, and thus can't be filled properly by the driver. Fixes: 4a4b8169501b ("cfg80211: Accept multiple RSSI thresholds for CQM") Fixes: 9930380f0bd8 ("cfg80211: implement IWRATE") Signed-off-by:

Re: [PATCH net-next 8/8] net: sched: cls_u32: add extack support

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 9:20 AM, Alexander Aring wrote: > - if (root_ht == ht) > + if (root_ht == ht) { > + NL_SET_ERR_MSG(extack, "Not allowd to delete root node"); s/allowd/allowed/

Re: [PATCH net-next 7/8] net: sched: cls: add extack support for tc_setup_cb_call

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 9:20 AM, Alexander Aring wrote: > int tc_setup_cb_call(struct tcf_block *block, struct tcf_exts *exts, > -enum tc_setup_type type, void *type_data, bool err_stop) > +enum tc_setup_type type, void *type_data, bool

[bpf-next PATCH 2/3] libbpf: cleanup Makefile, remove unused elements

2018-01-16 Thread Jesper Dangaard Brouer
The plugin_dir_SQ variable is not used, remove it. The function update_dir is also unused, remove it. The variable $VERSION_FILES is empty, remove it. These all originates from the introduction of the Makefile, and is likely a copy paste from tools/lib/traceevent/Makefile. Fixes: 1b76c13e4b36

[bpf-next PATCH 3/3] libbpf: Makefile set specified permission mode

2018-01-16 Thread Jesper Dangaard Brouer
The third parameter to do_install was not used by $(INSTALL) command. Fix this by only setting the -m option when the third parameter is supplied. The use of a third parameter was introduced in commit eb54e522a000 ("bpf: install libbpf headers on 'make install'"). Without this change, the

[bpf-next PATCH 0/3] libbpf: cleanups to Makefile

2018-01-16 Thread Jesper Dangaard Brouer
This patchset contains some small improvements and cleanup for the Makefile in tools/lib/bpf/. It worries me that the libbpf.so shared library is not versioned, but it not addressed in this patchset. --- Jesper Dangaard Brouer (3): libbpf: install the header file libbpf.h libbpf:

Re: [RFC bpf-next PATCH] bpf: add comments to BPF ld/ldx sizes

2018-01-16 Thread Daniel Borkmann
On 01/16/2018 12:31 PM, Jesper Dangaard Brouer wrote: > Doc BPF ld/ldx size defines, as it help me understand the code in filter.c. > > Signed-off-by: Jesper Dangaard Brouer > --- > 0 files changed > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index

[bpf-next PATCH 1/3] libbpf: install the header file libbpf.h

2018-01-16 Thread Jesper Dangaard Brouer
It seems like an oversight not to install the header file for libbpf, given the libbpf.so + libbpf.a files are installed. Signed-off-by: Jesper Dangaard Brouer --- tools/lib/bpf/Makefile |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] bnxt_en: don't update cpr->rx_bytes with uninitialized length len

2018-01-16 Thread David Miller
From: Colin King Date: Tue, 16 Jan 2018 10:22:50 + > From: Colin Ian King > > Currently in the cases where cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP or > CMP_TYPE_RX_L2_TPA_END_CMP the exit path updates cpr->rx_bytes with an >

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Jakub Kicinski
On Tue, 16 Jan 2018 17:12:57 -0500, Jamal Hadi Salim wrote: > On 18-01-16 04:46 PM, Jakub Kicinski wrote: > > On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wrote: > > [..] > > > Ugh, this is going to conflict with our series too :( (and I CCed you > > on ours) > > > > Would it be OK

Re: [PATCH -next] bpf: cpumap: make some functions static

2018-01-16 Thread Daniel Borkmann
On 01/16/2018 12:27 PM, Wei Yongjun wrote: > Fixes the following sparse warnings: > > kernel/bpf/cpumap.c:146:6: warning: > symbol '__cpu_map_queue_destructor' was not declared. Should it be static? > kernel/bpf/cpumap.c:225:16: warning: > symbol 'cpu_map_build_skb' was not declared. Should it

Re: [patch net-next v10 00/13] net: sched: allow qdiscs to share filter block instances

2018-01-16 Thread David Ahern
On 1/16/18 7:33 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the filters added to qdiscs are independent. So for example if you > have 2 netdevices and you create ingress qdisc on both and you want to add > identical filter rules both, you need to add them twice.

[PATCH bpf-next 1/6] bpf: offload: make bpf_offload_dev_match() reject host+host case

2018-01-16 Thread Jakub Kicinski
Daniel suggests it would be more logical for bpf_offload_dev_match() to return false is either the program or the map are not offloaded, rather than treating the both not offloaded case as a "matching CPU/host device". This makes no functional difference today, since verifier only calls

[PATCH bpf-next 0/6] bpf: various fixes and improvements

2018-01-16 Thread Jakub Kicinski
Hi! This series combines a number of random improvements ranging from libbpf to nfp driver. NFP patches make better use of the verifier log. There is a requested adjustment to the map offload code, and a warning fix for a W=1 build to the disassembler. Quentin also fixes the libbpf program

[PATCH] Net: ethernet: ti: netcp: Fix inbound ping crash if MTU size is greater than 1500

2018-01-16 Thread Rex Chang
In the receive queue for 4096 bytes fragments, the page address set in the SW data0 field of the descriptor is not the one we got when doing the reassembly in receive. The page structure was retrieved from the wrong descriptor into SW data0 which is then causing a page fault when UDP checksum is

[PATCH bpf-next v3 09/11] nfp: bpf: use extack support to improve debugging

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Use the recently added extack support for eBPF offload in the driver. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/main.c

[PATCH bpf-next v3 11/11] selftests/bpf: add checks on extack messages for eBPF hw offload tests

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Add checks to test that netlink extack messages are correctly displayed in some expected error cases for eBPF offload to netdevsim with TC and XDP. iproute2 may be built without libmnl support, in which case the extack messages will not be

[PATCH bpf-next v3 05/11] net: sched: cls_bpf: plumb extack support in filter for hardware offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Pass the extack pointer obtained in the `->change()` filter operation to cls_bpf_offload() and then to cls_bpf_offload_cmd(). This makes it possible to use this extack pointer in drivers offloading BPF programs in a future patch. Signed-off-by:

[PATCH bpf-next v3 03/11] net: sched: cls_matchall: propagate extack support for filter offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_matchall. This makes it possible to use netlink extack messages in the future at replacement time for this filter,

[PATCH bpf-next v3 00/11] net: sched: add extack support for cls offload

2018-01-16 Thread Jakub Kicinski
Hi! This series adds extack to cls offloads, as such it could arguably be targeted at net-next. Unfortunately, git am is not able to deal cleanly with minor conflicts on the nfp patches.. Since the series is really about cls_bpf I hope it's OK if it went via the bpf-next tree. There is a very

[PATCH bpf-next v3 06/11] net: sched: add extack support for offload via tc_cls_common_offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Add extack support for hardware offload of classifiers. In order to achieve this, a pointer to a struct netlink_ext_ack is added to the struct tc_cls_common_offload that is passed to the callback for setting up the classifier. Function

[PATCH bpf-next v3 10/11] netdevsim: add extack support for TC eBPF offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Use the recently added extack support for TC eBPF filters in netdevsim. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- drivers/net/netdevsim/bpf.c | 35

Re: [patch net-next v10 00/13] net: sched: allow qdiscs to share filter block instances

2018-01-16 Thread Jamal Hadi Salim
On 18-01-16 10:33 AM, Jiri Pirko wrote: From: Jiri Pirko For patches 1-9: Reviewed-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim cheers, jamal

[PATCH net] net: validate untrusted gso packets

2018-01-16 Thread Willem de Bruijn
From: Willem de Bruijn Validate gso packet type and headers on kernel entry. Reuse the info gathered by skb_probe_transport_header. Syzbot found two bugs by passing bad gso packets in packet sockets. Untrusted user packets are limited to a small set of gso types in

Re: KASAN: use-after-free Read in psock_write_space

2018-01-16 Thread Tom Herbert
On Tue, Jan 16, 2018 at 12:40 PM, syzbot wrote: > syzkaller has found reproducer for the following crash on > a8750ddca918032d6349adbf9a4b6555e7db20da > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc

Re: [PATCH net-next 8/8] net: sched: cls_u32: add extack support

2018-01-16 Thread Jakub Kicinski
On Tue, 16 Jan 2018 12:20:27 -0500, Alexander Aring wrote: > @@ -780,14 +787,18 @@ static int u32_set_parms(struct net *net, struct > tcf_proto *tp, > u32 handle = nla_get_u32(tb[TCA_U32_LINK]); > struct tc_u_hnode *ht_down = NULL, *ht_old; > > - if

[PATCH v3 net-next 0/4] l2tp: set l2specific_len based on l2specific_type

2018-01-16 Thread Lorenzo Bianconi
Do not rely on l2specific_len value provided by userspace but set sublayer length according to l2specific_type. Mark L2TP_ATTR_L2SPEC_LEN attribute as not used Changes since v2: - drop the patch related to a fix in the switch default case in l2tp_nl_cmd_session_create() - use L2SPECTYPE_NONE as

[PATCH bpf] bpf: reject stores into ctx via st and xadd

2018-01-16 Thread Daniel Borkmann
Alexei found that verifier does not reject stores into context via BPF_ST instead of BPF_STX. And while looking at it, we also should not allow XADD variant of BPF_STX. The context rewriter is only assuming either BPF_LDX_MEM- or BPF_STX_MEM-type operations, thus reject anything other than that

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Daniel Borkmann
Hey David, and others, [+Alexei] On 01/17/2018 12:27 AM, Jamal Hadi Salim wrote: > On 18-01-16 05:41 PM, Jakub Kicinski wrote: >> On Tue, 16 Jan 2018 17:12:57 -0500, Jamal Hadi Salim wrote: >>> On 18-01-16 04:46 PM, Jakub Kicinski wrote: On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring

[PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-16 Thread Kai-Heng Feng
r8153 on Dell TB15/16 dock corrupts rx packets. This change is suggested by Realtek. They guess that the XHCI controller doesn't have enough buffer, and their guesswork is correct, once the RX aggregation gets disabled, the issue is gone. ASMedia is currently working on a real sulotion for this

Re: [PATCH net-next v5 0/4] dwmac-meson8b: clock fixes for Meson8b

2018-01-16 Thread Yixun Lan
On 01/16/18 01:10, Martin Blumenstingl wrote: > Hi Dave, > > this series is now successfully tested, thus we think it's ready to be > applied to your net-next tree. > > Emiliano reported [0] that he couldn't get dwmac-meson8b to work on his > Odroid-C1. This is the (hopefully) final version of

[PATCH net-next V3 0/2] tun: allow to attach eBPF filter

2018-01-16 Thread Jason Wang
Hi all: This series tries to implement eBPF socket filter for tun. This could be used for implementing efficient virtio-net receive filter for vhost-net. Thanks Changes from V2: - fix typo - remove unnecessary double check Changes from V1: - trim more bytes if vlan tag is existed to make sure

[PATCH net-next V3 1/2] tuntap: rename struct tun_steering_prog to struct tun_prog

2018-01-16 Thread Jason Wang
To be reused by other eBPF program other than queue selection. Signed-off-by: Jason Wang --- drivers/net/tun.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 2fba3be..76197ed

Re: kernel BUG at net/core/skbuff.c:LINE! (2)

2018-01-16 Thread Xin Long
On Tue, Jan 16, 2018 at 4:22 AM, syzbot wrote: > syzkaller has found reproducer for the following crash on > b625c1ff82272e26c76570d3c7123419ec345b20 >

[PATCH net-next V3 2/2] tun: allow to attach ebpf socket filter

2018-01-16 Thread Jason Wang
This patch allows userspace to attach eBPF filter to tun. This will allow to implement VM dataplane filtering in a more efficient way compared to cBPF filter by allowing either qemu or libvirt to attach eBPF filter to tun. Signed-off-by: Jason Wang --- drivers/net/tun.c

[PATCH net 1/1] net/tls: Only attach to sockets in ESTABLISHED state

2018-01-16 Thread Ilya Lesokhin
Calling accept on a TCP socket with a TLS ulp attached results in two sockets that share the same ulp context. The ulp context is freed while a socket is destroyed, so after one of the sockets is released, the second second will trigger a use after free when it tries to access the ulp context

Re: [PATCH net-next v5 0/4] dwmac-meson8b: clock fixes for Meson8b

2018-01-16 Thread Jerome Brunet
On Tue, 2018-01-16 at 16:25 +0800, Yixun Lan wrote: > > On 01/16/18 01:10, Martin Blumenstingl wrote: > > Hi Dave, > > > > this series is now successfully tested, thus we think it's ready to be > > applied to your net-next tree. > > > > Emiliano reported [0] that he couldn't get dwmac-meson8b

Re: [PATCH][next] bnxt_en: ensure len is ininitialized to zero

2018-01-16 Thread Colin Ian King
On 12/01/18 22:38, Andy Gospodarek wrote: > On Fri, Jan 12, 2018 at 10:11:17AM -0800, Michael Chan wrote: >> On Fri, Jan 12, 2018 at 9:46 AM, Colin King wrote: >>> From: Colin Ian King >>> >>> In the case where cmp_type ==

Re: [PATCH v2 net-next 1/5] l2tp: fix switch default error handling in l2tp_nl_cmd_session_create()

2018-01-16 Thread Guillaume Nault
On Mon, Jan 15, 2018 at 10:18:53PM +0100, Lorenzo Bianconi wrote: > > On Sun, Jan 14, 2018 at 03:50:54PM +0100, Lorenzo Bianconi wrote: > >> Although this issue is harmless since that code path is protected by the > >> check on l2tp_nl_cmd_ops[]/l2tp_nl_cmd_ops[]->session_create(), fix error > >>

Re: [PATCH v7 5/8] can: m_can: Add PM Support

2018-01-16 Thread Faiz Abbas
Hi, On Monday 15 January 2018 07:25 PM, Marc Kleine-Budde wrote: > On 01/10/2018 11:55 AM, Faiz Abbas wrote: >> From: Franklin S Cooper Jr >> >> Add support for CONFIG_PM which is the new way to handle managing clocks. >> >> Move the clock management to pm_runtime_resume() and

[PATCH] [RESEND net] fm10k: mark PM functions as __maybe_unused

2018-01-16 Thread Arnd Bergmann
A cleanup of the PM code left an incorrect #ifdef in place, leading to a harmless build warning: drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2502:12: error: 'fm10k_suspend' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2475:12: error: 'fm10k_resume'

Re: [PATCH net-next] kcm: do not attach sockets if sk_user_data is already used

2018-01-16 Thread Guillaume Nault
On Sun, Jan 14, 2018 at 11:32:57AM +, James Chapman wrote: > SIOCKCMATTACH writes a connected socket's sk_user_data for its own > use. Prevent it doing so if the socket's sk_user_data is already set > since some sockets (e.g. encapsulated sockets) use sk_user_data > internally. > > diff --git

[PATCH v8 2/5] dt-bindings: can: can-transceiver: Document new binding

2018-01-16 Thread Faiz Abbas
From: Franklin S Cooper Jr Add documentation to describe usage of the new can-transceiver binding. This new binding is applicable for any CAN device therefore it exists as its own document. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori

[PATCH v8 4/5] can: m_can: Add PM Support

2018-01-16 Thread Faiz Abbas
Add support for CONFIG_PM which is the new way to handle managing clocks. Move the clock management to pm_runtime_resume() and pm_runtime_suspend() callbacks for the driver. CONFIG_PM is required by OMAP based devices to handle clock management. Therefore, this allows future Texas Instruments

[PATCHv4 4/5] ARM: dts: imx6q-b650v3: Add switch port configuration

2018-01-16 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information:

Re: [PATCHv3 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-16 Thread Sebastian Reichel
Hi, On Mon, Jan 15, 2018 at 11:57:18PM +0100, Andrew Lunn wrote: > > int dsa_port_fixed_link_register_of(struct dsa_port *dp) > > { > > struct device_node *dn = dp->dn; > > @@ -305,6 +354,10 @@ int dsa_port_fixed_link_register_of(struct dsa_port > > *dp) > >

[PATCH net-next] bnxt_en: uninitialized variable in bnxt_rx_pkt()

2018-01-16 Thread Dan Carpenter
There are a couple failure paths where "len" is used uninitialized. It means we record the number of rx_packets incorrectly. Fixes: 6a8788f25625 ("bnxt_en: add support for software dynamic interrupt moderation") Signed-off-by: Dan Carpenter diff --git

Re: [PATCH net-next v5 0/4] dwmac-meson8b: clock fixes for Meson8b

2018-01-16 Thread Martin Blumenstingl
Hi Jerome, Hi Yixun, On Tue, Jan 16, 2018 at 10:37 AM, Jerome Brunet wrote: > On Tue, 2018-01-16 at 16:25 +0800, Yixun Lan wrote: >> >> On 01/16/18 01:10, Martin Blumenstingl wrote: >> > Hi Dave, >> > >> > this series is now successfully tested, thus we think it's ready to

Re: [PATCH bpf-next v2 09/11] nfp: bpf: use extack support to improve debugging

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 03:08:43AM CET, jakub.kicin...@netronome.com wrote: >From: Quentin Monnet > >Use the recently added extack support for eBPF offload in the driver. > >Signed-off-by: Quentin Monnet >Reviewed-by: Jakub Kicinski

[PATCH] bnxt_en: don't update cpr->rx_bytes with uninitialized length len

2018-01-16 Thread Colin King
From: Colin Ian King Currently in the cases where cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP or CMP_TYPE_RX_L2_TPA_END_CMP the exit path updates cpr->rx_bytes with an uninitialized length len. Fix this by adding a new exit path that does not update the cpr stats with the

Re: [PATCH 2/3] tcp: Add ESP encapsulation support

2018-01-16 Thread Steffen Klassert
On Fri, Jan 12, 2018 at 08:38:01AM -0800, Eric Dumazet wrote: > On Fri, 2018-01-12 at 00:21 +1100, Herbert Xu wrote: > > This patch adds the plumbing in TCP for ESP encapsulation support > > per RFC8229. > > > > The patch mostly deals with inbound processing, as well as enabling > > TCP

[PATCH -next] bpf: cpumap: make some functions static

2018-01-16 Thread Wei Yongjun
Fixes the following sparse warnings: kernel/bpf/cpumap.c:146:6: warning: symbol '__cpu_map_queue_destructor' was not declared. Should it be static? kernel/bpf/cpumap.c:225:16: warning: symbol 'cpu_map_build_skb' was not declared. Should it be static? kernel/bpf/cpumap.c:340:26: warning: symbol

Re: [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration

2018-01-16 Thread Martin Blumenstingl
On Sun, Jan 14, 2018 at 10:48 PM, Martin Blumenstingl wrote: > Tests (using an oscilloscope and an Odroid-C1 board with a RTL8211F > RGMII PHY) have shown that the PRG_ETH0 register behaves as follows: > - bit 4 is a mux to choose between two parent clocks.

[PATCH v8 0/5] Add MCAN Support for Dra76 platform

2018-01-16 Thread Faiz Abbas
This patch series adds support for M_CAN on the TI Dra76 platform. Device tree patches will be sent separately. A bunch of patches were sent before by Franklin Cooper . I have clubbed the series together and rebased to the latest kernel. v8 changes: Rebased to

[PATCH v8 5/5] can: m_can: Support higher speed CAN-FD bitrates

2018-01-16 Thread Faiz Abbas
From: Franklin S Cooper Jr During test transmitting using CAN-FD at high bitrates (> 2 Mbps) would fail. Scoping the signals I noticed that only a single bit was being transmitted and with a bit more investigation realized the actual MCAN IP would go back to initialization mode

[PATCH v8 1/5] dt-bindings: can: m_can: Document new can transceiver binding

2018-01-16 Thread Faiz Abbas
From: Franklin S Cooper Jr Add information regarding can-transceiver binding. This is especially important for MCAN since the IP allows CAN FD mode to run significantly faster than what most transceivers are capable of. Signed-off-by: Franklin S Cooper Jr

[PATCH v8 3/5] can: m_can: Move allocation of net device to probe

2018-01-16 Thread Faiz Abbas
With the version no longer required to allocate the net device, it can be moved to probe and the alloc_m_can_dev() function can be simplified. Therefore, move the allocation of net device to probe and change alloc_m_can_dev() to setup_m_can_dev(). Signed-off-by: Faiz Abbas

[PATCH v3 1/2] net: Fix possible race in peernet2id_alloc()

2018-01-16 Thread Kirill Tkhai
peernet2id_alloc() is racy without rtnl_lock() as refcount_read(>count) under net->nsid_lock does not guarantee, peer is alive: rcu_read_lock() peernet2id_alloc().. spin_lock_bh(>nsid_lock) .. refcount_read(>count) (!= 0) .. ..

[PATCH v3 2/2] net: Remove spinlock from get_net_ns_by_id()

2018-01-16 Thread Kirill Tkhai
idr_find() is safe under rcu_read_lock() and maybe_get_net() guarantees that net is alive. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |2 -- 1 file changed, 2 deletions(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index

[PATCHv4 2/5] ARM: dts: imx6q-bx50v3: Add internal switch

2018-01-16 Thread Sebastian Reichel
B850v3, B650v3 and B450v3 all have a GPIO bit banged MDIO bus to communicate with a Marvell switch. On all devices the switch is connected to a PCI based network card, which needs to be referenced by DT, so this also adds the common PCI root node. Signed-off-by: Sebastian Reichel

[PATCHv4 0/5] GEHC Bx50 Switch Support

2018-01-16 Thread Sebastian Reichel
Hi, This adds support for the internal switch found in GE Healthcare B450v3, B650v3 and B850v3. All devices use a GPIO bitbanged MDIO bus to communicate with the switch and a PCIe based network card for exchanging network data. The cpu network data link requires, that the switch's internal phy

[PATCHv4 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-16 Thread Sebastian Reichel
This adds support for enabling the internal PHY for a 'cpu' port. It has been tested on GE B850v3, B650v3 and B450v3, which have a built-in MV88E6240 switch hardwired to a PCIe based network card making use of the internal PHY. Since mv88e6xxx driver resets the chip during probe, the PHY is

RE: [PATCH net 1/1] net/tls: Only attach to sockets in ESTABLISHED state

2018-01-16 Thread Ilya Lesokhin
I'm sorry, I've noticed that I have a typo in my comment. It should read: /*The TLS ulp is currently supported only for TCP sockets * in ESTABLISHED state. * Supporting sockets in LISTEN state will require us * to modify the accept implementation to clone rather then * share the ulp context.

Re: [PATCH v2 net-next 0/5] l2tp: set l2specific_len based on l2specific_type

2018-01-16 Thread Guillaume Nault
On Tue, Jan 16, 2018 at 12:45:06PM +0100, Lorenzo Bianconi wrote: > > On Sun, Jan 14, 2018 at 03:50:53PM +0100, Lorenzo Bianconi wrote: > >> Do not rely on l2specific_len value provided by userspace but set sublayer > >> length according to l2specific_type. > >> Fix a harmless issue in the switch

Re: [PATCH v7 4/8] can: m_can: Move allocation of net device to probe

2018-01-16 Thread Faiz Abbas
Hi, On Monday 15 January 2018 07:22 PM, Marc Kleine-Budde wrote: > On 01/10/2018 11:55 AM, Faiz Abbas wrote: >> With the version no longer required to allocate the net device, it can >> be moved to probe and the alloc_m_can_dev() function can be simplified. >> >> Therefore, move the allocation of

[PATCH] net: fs_enet: do not call phy_stop() in interrupts

2018-01-16 Thread Christophe Leroy
In case of TX timeout, fs_timeout() calls phy_stop(), which triggers the following BUG_ON() as we are in interrupt. [92708.199889] kernel BUG at drivers/net/phy/mdio_bus.c:482! [92708.204985] Oops: Exception in kernel mode, sig: 5 [#1] [92708.210119] PREEMPT [92708.212107] CMPC885 [92708.214216]

Re: [PATCH bpf-next v2 02/11] net: sched: prepare extack support for offload via tc_cls_common_offload

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 03:08:36AM CET, jakub.kicin...@netronome.com wrote: >From: Quentin Monnet > >Prepare for extack support for hardware offload of classifiers. In order >to achieve this, a pointer to a struct netlink_ext_ack is added to the >struct

Re: [PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-16 Thread Guillaume Nault
On Mon, Jan 15, 2018 at 10:11:04PM +0100, Lorenzo Bianconi wrote: > > On Mon, Jan 15, 2018 at 07:43:18PM +0100, Lorenzo Bianconi wrote: > >> > On Sun, Jan 14, 2018 at 03:50:56PM +0100, Lorenzo Bianconi wrote: > >> >> --- a/net/l2tp/l2tp_core.h > >> >> +++ b/net/l2tp/l2tp_core.h > >> >> @@ -302,6

[PATCHv4 3/5] ARM: dts: imx6q-b850v3: Add switch port configuration

2018-01-16 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors ("ID", "IX", "ePort 1", "ePort 2"). The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using

[PATCHv4 5/5] ARM: dts: imx6q-b450v3: Add switch port configuration

2018-01-16 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information:

  1   2   3   >