Re: [PATCH RFC 3/3] udp: Support UDP fraglist GRO/GSO.

2019-01-24 Thread Steffen Klassert
On Tue, Jan 08, 2019 at 04:00:01PM +0100, Paolo Abeni wrote: > > I think we could still avoid the lookup when no vxlan/GRO sockets are > present moving the lookup into udp{4,6}_gro_receive. Very roughly > something alike: > > diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c > index f7

Re: [PATCH 1/2] Bluetooth: Annotate implicit fall through in l2cap_config_rsp

2019-01-24 Thread Marcel Holtmann
Hi Mathieu, > There is a plan to build the kernel with -Wimplicit-fallthrough and > this place in the code produced a warning (W=1). > > This commit removes the following warning: > > net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through > [-Wimplicit-fallthrough=] > > C

Re: [PATCH] Bluetooth: make hw_err static, reduces object code size

2019-01-24 Thread Marcel Holtmann
Hi Colin, > Don't populate the const array hw_err on the stack but instead make > it static. Makes the object code smaller by 45 bytes: > > Before: > text data bss dec hex filename > 100880 210901088 123058 1e0b2 linux/net/bluetooth/hci_core.o > > After: >

Re: [PATCH v6 3/4] Bluetooth: Allow driver specific cmd timeout handling

2019-01-24 Thread Marcel Holtmann
Hi Rajat, > Add a hook to allow the BT driver to do device or command specific > handling in case of timeouts. This is to be used by Intel driver to > reset the device after certain number of timeouts. > > Signed-off-by: Rajat Jain > --- > v6: Dropped the "sent command" parameter from cmd_timeou

Re: [PATCH v6 2/4] usb: assign ACPI companions for embedded USB devices

2019-01-24 Thread Marcel Holtmann
Hi Rajat, > USB devices permanently connected to USB ports may be described in ACPI > tables and share ACPI devices with ports they are connected to. See [1] > for details. > > This will allow us to describe sideband resources for devices, such as, > for example, hard reset line for BT USB contro

Re: [PATCH v6 1/4] usb: split code locating ACPI companion into port and device

2019-01-24 Thread Marcel Holtmann
Hi Rajat, > In preparation for handling embedded USB devices let's split > usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and > usb_acpi_find_companion_for_port(). > > Signed-off-by: Dmitry Torokhov > Signed-off-by: Rajat Jain > Acked-by: Greg Kroah-Hartman > Tested-by: Su

Re: [PATCH v6 4/4] Bluetooth: btusb: Use the cmd_timeout method to reset the Intel BT chip

2019-01-24 Thread Marcel Holtmann
Hi Rajat, > If the platform provides it, use the reset gpio to reset the Intel BT > chip, as part of cmd_timeout handling. This has been found helpful on > Intel bluetooth controllers where the firmware gets stuck and the only > way out is a hard reset pin provided by the platform. > > Signed-off

[PATCH 08/10] vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel

2019-01-24 Thread Steffen Klassert
From: Su Yanjun Recently we run a network test over ipcomp virtual tunnel.We find that if a ipv4 packet needs fragment, then the peer can't receive it. We deep into the code and find that when packet need fragment the smaller fragment will be encapsulated by ipip not ipcomp. So when the ipip pac

[PATCH 09/10] xfrm: refine validation of template and selector families

2019-01-24 Thread Steffen Klassert
From: Florian Westphal The check assumes that in transport mode, the first templates family must match the address family of the policy selector. Syzkaller managed to build a template using MODE_ROUTEOPTIMIZATION, with ipv4-in-ipv6 chain, leading to following splat: BUG: KASAN: stack-out-of-bou

[PATCH 02/10] xfrm: policy: use hlist rcu variants on inexact insert, part 2

2019-01-24 Thread Steffen Klassert
From: Florian Westphal This function was modeled on the 'exact' insert one, which did not use the rcu variant either. When I fixed the 'exact' insert I forgot to propagate this to my development tree, so the inexact variant retained the bug. Fixes: 9cf545ebd591d ("xfrm: policy: store inexact po

[PATCH 05/10] xfrm: policy: fix reinsertion on node merge

2019-01-24 Thread Steffen Klassert
From: Florian Westphal "newpos" has wrong scope. It must be NULL on each iteration of the loop. Otherwise, when policy is to be inserted at the start, we would instead insert at point found by the previous loop-iteration instead. Also, we need to unlink the policy before we reinsert it to the n

[PATCH 06/10] selftests: xfrm: alter htresh to trigger move of policies to hash table

2019-01-24 Thread Steffen Klassert
From: Florian Westphal ... and back to inexact tree. Repeat ping test after each htresh change: lookup results must not change. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- tools/testing/selftests/net/xfrm_policy.sh | 44 -- 1 file changed, 40 insert

[PATCH 10/10] xfrm: Make set-mark default behavior backward compatible

2019-01-24 Thread Steffen Klassert
From: Benedict Wong Fixes 9b42c1f179a6, which changed the default route lookup behavior for tunnel mode SAs in the outbound direction to use the skb mark, whereas previously mark=0 was used if the output mark was unspecified. In mark-based routing schemes such as Android’s, this change in default

pull request (net): ipsec 2019-01-25

2019-01-24 Thread Steffen Klassert
1) Several patches to fix the fallout from the recent tree based policy lookup work. From Florian Westphal. 2) Fix VTI for IPCOMP for 'not compressed' IPCOMP packets. We need an extra IPIP handler to process these packets correctly. From Su Yanjun. 3) Fix validation of template and selec

[PATCH 01/10] selftests: xfrm: add block rules with adjacent/overlapping subnets

2019-01-24 Thread Steffen Klassert
From: Florian Westphal The existing script lacks a policy pattern that triggers 'tree node merges' in the kernel. Consider adding policy affecting following subnet: pol1: dst 10.0.0.0/22 pol2: dst 10.0.0.0/23 # adds to existing 10.0.0.0/22 node -> no problems here. But now, lets consider rever

[PATCH 07/10] xfrm: policy: fix infinite loop when merging src-nodes

2019-01-24 Thread Steffen Klassert
From: Florian Westphal With very small change to test script we can trigger softlockup due to bogus assignment of 'p' (policy to be examined) on restart. Previously the two to-be-merged nodes had same address/prefixlength pair, so no erase/reinsert was necessary, we only had to append the list f

[PATCH 04/10] xfrm: policy: delete inexact policies from inexact list on hash rebuild

2019-01-24 Thread Steffen Klassert
From: Florian Westphal An xfrm hash rebuild has to reset the inexact policy list before the policies get re-inserted: A change of hash thresholds will result in policies to get moved from inexact tree to the policy hash table. If the thresholds are increased again later, they get moved from hash

[PATCH 03/10] xfrm: policy: increment xfrm_hash_generation on hash rebuild

2019-01-24 Thread Steffen Klassert
From: Florian Westphal Hash rebuild will re-set all the inexact entries, then re-insert them. Lookups that can occur in parallel will therefore not find any policies. This was safe when lookups were still guarded by rwlock. After rcu-ification, lookups check the hash_generation seqcount to detec

[PATCH iproute2-next 1/2] uapi: add xdp_diag.h

2019-01-24 Thread bjorn . topel
From: Björn Töpel Import xdp_diag.h that was introduced in Linux kernel commit a36b38aa2af6 ("xsk: add sock_diag interface for AF_XDP"). Signed-off-by: Björn Töpel --- include/uapi/linux/xdp_diag.h | 72 +++ 1 file changed, 72 insertions(+) create mode 100644 i

[PATCH iproute2-next 2/2] ss: add AF_XDP support

2019-01-24 Thread bjorn . topel
From: Björn Töpel AF_XDP is an address family that is optimized for high performance packet processing. This patch adds AF_XDP support to ss(8) so that sockets can be queried and monitored. Signed-off-by: Björn Töpel --- man/man8/ss.8 | 9 ++- misc/ss.c | 168 +++

[PATCH iproute2-next 0/2] ss: AF_XDP monitoring support

2019-01-24 Thread bjorn . topel
From: Björn Töpel Hi! This short series teaches ss about AF_XDP monitoring support using the sock_diag interface. The AF_XDP monitoring support was merged to kernel in commit dbbd79ae166f ("Merge branch 'af-xdp-sock-diag'"), via the bpf-next tree. Note libc has to know about AF_XDP for iproute

Re: [PATCH stable 4.4 05/11] ip: use rb trees for IP frag queue.

2019-01-24 Thread Greg KH
On Fri, Jan 25, 2019 at 09:50:35AM +0800, maowenan wrote: > > > On 2019/1/25 1:58, Greg KH wrote: > > On Wed, Jan 23, 2019 at 10:19:40AM +0800, Mao Wenan wrote: > >> From: Peter Oskolkov > >> > >> [ Upstream commit fa0f527358bd900ef92f925878ed6bfbd51305cc ] > > > > This commit is not in the 4.1

Re: [PATCH net-next] bridge: remove duplicated include from br_multicast.c

2019-01-24 Thread David Miller
From: YueHaibing Date: Fri, 25 Jan 2019 10:59:09 +0800 > Remove duplicated include. > > Signed-off-by: YueHaibing Applied.

Re: WoL broken in r8169.c since kernel 4.19

2019-01-24 Thread Heiner Kallweit
Hi Marc, thanks a lot for the detailed analysis. That this ethtool sequence ethtool -s wol d ethtool -s wol g helps makes me think that the following patch should help too. Could you please test? There's an old story why this call is missing. Certain notebooks immediately woke up again if WoL

Re: [PATCH net] ibmveth: Do not process frames after calling napi_reschedule

2019-01-24 Thread David Miller
From: Thomas Falcon Date: Thu, 24 Jan 2019 11:17:01 -0600 > The IBM virtual ethernet driver's polling function continues > to process frames after rescheduling NAPI, resulting in a warning > if it exhausted its budget. Do not restart polling after calling > napi_reschedule. Instead let frames be

Re: [PATCH] net: dev_is_mac_header_xmit() true for ARPHRD_RAWIP

2019-01-24 Thread David Miller
From: Maciej Żenczykowski Date: Thu, 24 Jan 2019 03:07:02 -0800 > From: Maciej Żenczykowski > > __bpf_redirect() and act_mirred checks this boolean > to determine whether to prefix an ethernet header. > > Signed-off-by: Maciej Żenczykowski Applied.

Re: [PATCH net-next] mlxfw: Replace license text with SPDX identifiers and adjust copyrights

2019-01-24 Thread David Miller
From: Shalom Toledo Date: Thu, 24 Jan 2019 07:33:05 + > Signed-off-by: Shalom Toledo > Acked-by: Jiri Pirko Applied.

Re: [PATCH] net: usb: asix: ax88772_bind return error when hw_reset fail

2019-01-24 Thread David Miller
From: Zhang Run Date: Thu, 24 Jan 2019 13:48:49 +0800 > The ax88772_bind() should return error code immediately when the PHY > was not reset properly through ax88772a_hw_reset(). > Otherwise, The asix_get_phyid() will block when get the PHY > Identifier from the PHYSID1 MII registers through asi

Re: [PATCH] tipc: remove dead code in struct tipc_topsrv

2019-01-24 Thread David Miller
From: Zhaolong Zhang Date: Thu, 24 Jan 2019 10:06:41 +0800 > max_rcvbuf_size is no longer used since commit "414574a0af36". > > Signed-off-by: Zhaolong Zhang Applied.

Re: [PATCH net 1/1] MAINTAINERS: Update cavium networking drivers

2019-01-24 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Wed, 23 Jan 2019 18:03:20 -0800 > Following Marvell's acquisition of Cavium, we need to update all the > Cavium drivers maintainer's entries to point to our new e-mail addresses. > > Signed-off-by: Sudarsana Reddy Kalluru > Signed-off-by: Ameen Rahman Appli

Re: [PATCH net-next 0/2] tcp_bbr: Improving TCP BBR performance for WiFi and cellular networks

2019-01-24 Thread David Miller
From: Priyaranjan Jha Date: Wed, 23 Jan 2019 12:04:52 -0800 > Ack aggregation is quite prevalent with wifi, cellular and cable modem > link tchnologies, ACK decimation in middleboxes, and common offloading > techniques such as TSO and GRO, at end hosts. Previously, BBR was often > cwnd-limited in

Re: [PATCH net-next] r8169: factor out disabling ALDPS

2019-01-24 Thread David Miller
From: Heiner Kallweit Date: Wed, 23 Jan 2019 20:39:09 +0100 > Chip versions from RTL8168g onward use the same sequence to disable > ALDPS (Advanced Link-Down Power Saving). So let's factor this out. > > Signed-off-by: Heiner Kallweit Applied.

Re: [PATCH net-next] r8169: factor out PHY init sequence adjusting 10M and ALDPS

2019-01-24 Thread David Miller
From: Heiner Kallweit Date: Wed, 23 Jan 2019 20:47:30 +0100 > Few chip versions use the same sequence to adjust 10M and ALDPS, so > let's factor it out. This patch also fixes a (most likely) typo in > rtl8168g_1_hw_phy_config. There bit 8 in reg 0x14 on page 0x0bcc > was set and not cleared. Acco

Re: [GIT PULL] Hyper-V hv_netvsc commits for 5.0

2019-01-24 Thread David Miller
From: Sasha Levin Date: Wed, 23 Jan 2019 13:30:29 -0500 > Three patches from Haiyang Zhang to fix settings hash key using ethtool, > and Adrian Vladu's first patch fixing a few spelling mistakes. Pulled, thanks.

Re: [PATCH bpf-next v3 12/16] ppc: bpf: implement jitting of JMP32

2019-01-24 Thread Sandipan Das
Hi Jiong, On 25/01/19 5:40 AM, Jiong Wang wrote: > This patch implements code-gen for new JMP32 instructions on ppc. > > For JMP32 | JSET, instruction encoding for PPC_RLWINM_DOT is added to check > the result of ANDing low 32-bit of operands. > > Cc: Naveen N. Rao > Cc: Sandipan Das > Signed-

Re: [PATCH net-next v3 0/4] net: phy: improve starting PHY

2019-01-24 Thread David Miller
From: Heiner Kallweit Date: Wed, 23 Jan 2019 07:25:38 +0100 > This patch series improves few aspects of starting the PHY. > > v2: > - improve a warning in patch 4 > v3: > - extend commit message for patch 2 Series applied, thanks Heiner.

Re: [PATCH net-next] bonding: count master 3ad stats separately

2019-01-24 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 23 Jan 2019 19:14:50 +0200 > I made a dumb mistake when I summed up the slave stats, obviously slaves > can come and go which would make the master stats unreliable. > Count and export the master stats separately. > > Fixes: a258aeacd7f0 ("bonding: add suppor

Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()

2019-01-24 Thread David Miller
From: Wei Yongjun Date: Wed, 23 Jan 2019 06:19:18 + > In case of error, the function devm_clk_get() returns ERR_PTR() and > never returns NULL. The NULL test in the return value check should be > replaced with IS_ERR(). > > Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")

Re: [PATCH net-next 0/7] Devlink health updates

2019-01-24 Thread David Miller
From: Jiri Pirko Date: Tue, 22 Jan 2019 17:58:21 +0100 > Tue, Jan 22, 2019 at 04:57:17PM CET, era...@mellanox.com wrote: >>This patchset fixes some comments that were received for the devlink >>health series, mostly around the devlink health buffers API. >> >>It offers a new devlink<->driver API

Re: [PATCH] net: amd8111e: clean up two minor indentation issues

2019-01-24 Thread David Miller
From: Colin King Date: Tue, 22 Jan 2019 14:37:55 + > From: Colin Ian King > > Two statements are incorrecly indented, fix these by removing a space. > > Signed-off-by: Colin Ian King Applied.

Re: [PATCH net-next v4 0/4] Introduce ENETC ethernet drivers

2019-01-24 Thread David Miller
From: Claudiu Manoil Date: Tue, 22 Jan 2019 15:29:53 +0200 > ENETC is a multi-port virtualized Ethernet controller supporting GbE > designs and Time-Sensitive Networking (TSN) functionality. > ENETC is operating as an SR-IOV multi-PF capable Root Complex Integrated > Endpoint (RCIE). As such, it

Re: WoL broken in r8169.c since kernel 4.19

2019-01-24 Thread Marc Haber
Hi Heiner, On Tue, Jan 22, 2019 at 07:47:45PM +0100, Heiner Kallweit wrote: > Which version of 4.18 are you running that is ok? To check the code .. I pull over drivers/net/ethernet/realtek/r8169.c from an unpacked 4.18.16 source tree. It sets RTL8169_VERSION "2.3LK-NAPI". The last commit in this

Re: [PATCH net-next] net/mlx4_core: A write memory barrier is sufficient in EQ ci update

2019-01-24 Thread David Miller
From: Tariq Toukan Date: Tue, 22 Jan 2019 15:25:50 +0200 > Soften the memory barrier call of mb() by a sufficient wmb() in the > consumer index update of the event queues. > > Suggested-by: Eric Dumazet > Signed-off-by: Tariq Toukan Applied, thank you.

Re: pull-request: can 2019-01-22

2019-01-24 Thread David Miller
From: Marc Kleine-Budde Date: Tue, 22 Jan 2019 14:21:12 +0100 > this is a pull request of 4 patches for net/master. > > The first patch by is by Manfred Schlaegl and reverts a patch that caused > wrong > warning messages in certain use cases. The next patch is by Oliver Hartkopp > for > the bc

Re: [PATCH net 0/2] mlx4_core fixes for 5.0-rc

2019-01-24 Thread David Miller
From: Tariq Toukan Date: Tue, 22 Jan 2019 15:19:43 +0200 > This patchset includes two fixes for the mlx4_core driver. > > First patch by Aya fixes inaccurate parsing of some FW fields, mistakenly > including additional (mostly reserved) bits. > > Second patch by Jack fixes a wrong (yet harmless

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Alexei Starovoitov
On 1/24/19 8:31 PM, Paul E. McKenney wrote: > On Fri, Jan 25, 2019 at 04:27:02AM +, Alexei Starovoitov wrote: >> On 1/24/19 6:38 PM, Alexei Starovoitov wrote: For programs created with CAP_SYS_ADMIN, things get more tricky because you can create your own functions and call them r

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Paul E. McKenney
On Fri, Jan 25, 2019 at 04:27:02AM +, Alexei Starovoitov wrote: > On 1/24/19 6:38 PM, Alexei Starovoitov wrote: > >> For programs created with CAP_SYS_ADMIN, > >> things get more tricky because you can create your own functions and > >> call them repeatedly; I'm not sure whether the pessimal ru

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Alexei Starovoitov
On 1/24/19 6:38 PM, Alexei Starovoitov wrote: >> For programs created with CAP_SYS_ADMIN, >> things get more tricky because you can create your own functions and >> call them repeatedly; I'm not sure whether the pessimal runtime there >> becomes exponential, or whether there is some check that catc

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Paul E. McKenney
On Fri, Jan 25, 2019 at 02:46:55AM +0100, Jann Horn wrote: > On Fri, Jan 25, 2019 at 2:22 AM Paul E. McKenney > wrote: > > On Thu, Jan 24, 2019 at 04:05:16PM -0800, Alexei Starovoitov wrote: > > > On Thu, Jan 24, 2019 at 03:42:32PM -0800, Paul E. McKenney wrote: > > > > On Thu, Jan 24, 2019 at 07

Re: [PATCH net-next] libceph, ceph: use struct_size() in kmalloc()

2019-01-24 Thread Gustavo A. R. Silva
On 1/17/19 8:17 AM, Ilya Dryomov wrote: > On Tue, Jan 15, 2019 at 8:41 PM Gustavo A. R. Silva > wrote: >> >> One of the more common cases of allocation size calculations is finding >> the size of a structure that has a zero-sized array at the end, along >> with memory for some number of element

RE: [PATCH -next] ptp: fix debugfs_simple_attr.cocci warnings

2019-01-24 Thread Y.b. Lu
> -Original Message- > From: YueHaibing > Sent: Friday, January 25, 2019 10:29 AM > To: Y.b. Lu ; Richard Cochran > ; da...@davemloft.net > Cc: YueHaibing ; netdev@vger.kernel.org; > kernel-janit...@vger.kernel.org > Subject: [PATCH -next] ptp: fix debugfs_simple_attr.cocci warnings >

[PATCH net-next] net: hns3: Fix potential NULL dereference on allocation error

2019-01-24 Thread YueHaibing
hclge_mac_update_stats_complete doesn't check for NULL returns of kcalloc, it may result in an Oops. Fixes: d174ea75c96a ("net: hns3: add statistics for PFC frames and MAC control frames") Signed-off-by: YueHaibing --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++ 1 file chan

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-24 Thread Michael S. Tsirkin
On Wed, Jan 23, 2019 at 05:55:57PM +0800, 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 net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-24 Thread Michael S. Tsirkin
On Thu, Jan 24, 2019 at 12:07:54PM +0800, Jason Wang wrote: > > Meanwhile, could you pls post data comparing this last patch with the > > below? This removes the speculation barrier replacing it with a > > (useless but at least more lightweight) data dependency. > > > SMAP off > > Your patch: 7

[PATCH net-next] bridge: remove duplicated include from br_multicast.c

2019-01-24 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- net/bridge/br_multicast.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 2c46c7a..780757b 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -35,7 +35,6

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Alexei Starovoitov
On Thu, Jan 24, 2019 at 06:44:20PM -0800, Eric Dumazet wrote: > > > On 01/24/2019 06:34 PM, Alexei Starovoitov wrote: > > On Thu, Jan 24, 2019 at 06:29:55PM -0800, Eric Dumazet wrote: > >> > >> > >> On 01/24/2019 03:58 PM, Alexei Starovoitov wrote: > >>> On Thu, Jan 24, 2019 at 07:01:09PM +0100,

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Alexei Starovoitov
On Fri, Jan 25, 2019 at 01:18:04AM +0100, Jann Horn wrote: > On Fri, Jan 25, 2019 at 12:59 AM Alexei Starovoitov > wrote: > > On Thu, Jan 24, 2019 at 07:01:09PM +0100, Peter Zijlstra wrote: > > > Thanks for having kernel/locking people on Cc... > > > > > > On Wed, Jan 23, 2019 at 08:13:55PM -0800,

[PATCH -next] selftests: bpf: remove duplicated include

2019-01-24 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- tools/testing/selftests/bpf/test_flow_dissector.c | 2 -- tools/testing/selftests/bpf/test_maps.c | 1 - tools/testing/selftests/bpf/test_sockmap.c| 1 - 3 files changed, 4 deletions(-) diff --git a/tools/testing/selftes

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Eric Dumazet
On 01/24/2019 06:34 PM, Alexei Starovoitov wrote: > On Thu, Jan 24, 2019 at 06:29:55PM -0800, Eric Dumazet wrote: >> >> >> On 01/24/2019 03:58 PM, Alexei Starovoitov wrote: >>> On Thu, Jan 24, 2019 at 07:01:09PM +0100, Peter Zijlstra wrote: >> and from NMI ... >>> >>> progs are not preempta

[PATCH stable 4.4 v2 10/11] ip: frags: fix crash in ip_do_fragment()

2019-01-24 Thread Mao Wenan
From: Taehee Yoo [ Upstream commit 5d407b071dc369c26a38398326ee2be53651cfe4 ] A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union me

[PATCH stable 4.4 v2 07/11] ip: add helpers to process in-order fragments faster.

2019-01-24 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit 353c9cb360874e737fb000545f783df756c06f9a ] This patch introduces several helper functions/macros that will be used in the follow-up patch. No runtime changes yet. The new logic (fully implemented in the second patch) is as follows: * Nodes in the rb-tree

[PATCH stable 4.4 v2 11/11] ipv4: frags: precedence bug in ip_expire()

2019-01-24 Thread Mao Wenan
From: Dan Carpenter [ Upstream commit 70837ffe3085c9a91488b52ca13ac84424da1042 ] We accidentally removed the parentheses here, but they are required because '!' has higher precedence than '&'. Fixes: fa0f527358bd ("ip: use rb trees for IP frag queue.") Signed-off-by: Dan Carpenter Signed-off-b

[PATCH stable 4.4 v2 01/11] net: speed up skb_rbtree_purge()

2019-01-24 Thread Mao Wenan
From: Eric Dumazet [ Upstream commit 7c90584c66cc4b033a3b684b0e0950f79e7b7166 ] As measured in my prior patch ("sch_netem: faster rb tree removal"), rbtree_postorder_for_each_entry_safe() is nice looking but much slower than using rb_next() directly, except when tree is small enough to fit in CP

[PATCH stable 4.4 v2 09/11] net: ipv4: do not handle duplicate fragments as overlapping

2019-01-24 Thread Mao Wenan
From: Michal Kubecek [ Upstream commit ade446403bfb79d3528d56071a84b15351a139ad ] Since commit 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.") IPv4 reassembly code drops the whole queue whenever an overlapping fragment is received. However, the test is written in a way whi

[PATCH stable 4.4 v2 02/11] ip: discard IPv4 datagrams with overlapping segments.

2019-01-24 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit 7969e5c40dfd04799d4341f1b7cd266b6e47f227 ] This behavior is required in IPv6, and there is little need to tolerate overlapping fragments in IPv4. This change simplifies the code and eliminates potential DDoS attack vectors. Tested: ran ip_defrag selftest (

[PATCH stable 4.4 v2 03/11] net: modify skb_rbtree_purge to return the truesize of all purged skbs.

2019-01-24 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit 385114dec8a49b5e5945e77ba7de6356106713f4 ] Tested: see the next patch is the series. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: Eric Dumazet Cc: Florian Westphal Signed-off-by: David S. Miller Signed-off-by: Mao Wenan ---

[PATCH stable 4.4 v2 05/11] ip: use rb trees for IP frag queue.

2019-01-24 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit fa0f527358bd900ef92f925878ed6bfbd51305cc ] Similar to TCP OOO RX queue, it makes sense to use rb trees to store IP fragments, so that OOO fragments are inserted faster. Tested: - a follow-up patch contains a rather comprehensive ip defrag self-test (fun

[PATCH stable 4.4 v2 04/11] inet: frags: get rif of inet_frag_evicting()

2019-01-24 Thread Mao Wenan
From: Eric Dumazet [ Upstream commit 399d1404be660d355192ff4df5ccc3f4159ec1e4 ] This refactors ip_expire() since one indentation level is removed. Note: in the future, we should try hard to avoid the skb_clone() since this is a serious performance cost. Under DDOS, the ICMP message wont be sent

[PATCH stable 4.4 v2 08/11] ip: process in-order fragments efficiently

2019-01-24 Thread Mao Wenan
From: Peter Oskolkov [ Upstream commit a4fd284a1f8fd4b6c59aa59db2185b1e17c5c11c ] This patch changes the runtime behavior of IP defrag queue: incoming in-order fragments are added to the end of the current list/"run" of in-order fragments at the tail. On some workloads, UDP stream performance i

[PATCH stable 4.4 v2 06/11] ipv6: defrag: drop non-last frags smaller than min mtu

2019-01-24 Thread Mao Wenan
From: Florian Westphal [ Upstream commit 0ed4229b08c13c84a3c301a08defdc9e7f4467e6 ] don't bother with pathological cases, they only waste cycles. IPv6 requires a minimum MTU of 1280 so we should never see fragments smaller than this (except last frag). v3: don't use awkward "-offset + len" v2:

[PATCH stable 4.4 v2 00/11] fix FragmentSmack in stable branch (CVE-2018-5391)

2019-01-24 Thread Mao Wenan
There is one CVE: CVE-2018-5391 kernel: IP fragments with random offsets allow a remote denial of service (FragmentSmack), A fix is a merge commit in the Linux kernel tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c30f1fc041b74ecdb072dd44f858750414b8b19f con

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Alexei Starovoitov
On Fri, Jan 25, 2019 at 02:46:55AM +0100, Jann Horn wrote: > On Fri, Jan 25, 2019 at 2:22 AM Paul E. McKenney > wrote: > > On Thu, Jan 24, 2019 at 04:05:16PM -0800, Alexei Starovoitov wrote: > > > On Thu, Jan 24, 2019 at 03:42:32PM -0800, Paul E. McKenney wrote: > > > > On Thu, Jan 24, 2019 at 07

[RFC PATCH iproute2 2/5] act_ct: first import

2019-01-24 Thread Marcelo Ricardo Leitner
Signed-off-by: Marcelo Ricardo Leitner --- include/uapi/linux/tc_act/tc_ct.h | 30 +++ tc/Makefile | 1 + tc/m_ct.c | 314 ++ 3 files changed, 345 insertions(+) create mode 100644 include/uapi/linux/tc_act/tc_ct.h crea

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Alexei Starovoitov
On Thu, Jan 24, 2019 at 06:29:55PM -0800, Eric Dumazet wrote: > > > On 01/24/2019 03:58 PM, Alexei Starovoitov wrote: > > On Thu, Jan 24, 2019 at 07:01:09PM +0100, Peter Zijlstra wrote: > > >> and from NMI ... > > > > progs are not preemptable and map syscall accessors have bpf_prog_active > >

[RFC PATCH iproute2 0/5] Initial, PoC implementation of sw datapath of tc+CT

2019-01-24 Thread Marcelo Ricardo Leitner
Same comments as for the kernel patches. Whatever is not in accordance to the planning RFC, is because it is still in progress. Marcelo Ricardo Leitner (5): flower: add support for CT fields act_ct: first import act_ct: add support for commit flag act/ct: add support for force flag act/c

[RFC PATCH iproute2 4/5] act/ct: add support for force flag

2019-01-24 Thread Marcelo Ricardo Leitner
Signed-off-by: Marcelo Ricardo Leitner --- include/uapi/linux/tc_act/tc_ct.h | 1 + tc/m_ct.c | 10 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/tc_act/tc_ct.h b/include/uapi/linux/tc_act/tc_ct.h index 37b95cda1dedd283b024

[RFC PATCH iproute2 3/5] act_ct: add support for commit flag

2019-01-24 Thread Marcelo Ricardo Leitner
Signed-off-by: Marcelo Ricardo Leitner --- include/uapi/linux/tc_act/tc_ct.h | 6 ++ tc/m_ct.c | 14 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/tc_act/tc_ct.h b/include/uapi/linux/tc_act/tc_ct.h index d08a5afdc4

[RFC PATCH 0/6] Initial, PoC implementation of sw datapath of tc+CT

2019-01-24 Thread Marcelo Ricardo Leitner
We have been working on the sw datapath of tc+CT. We may not have much yet, but this should help to shed some light on what is needed, sw-datapath-wise speaking. Lets grease the wheels! Some key features are still missing like proper handling of conntrack labels, indexing all CT entries on a given

[RFC PATCH iproute2 5/5] act/ct: add support for clear flag

2019-01-24 Thread Marcelo Ricardo Leitner
Same comment as in the kernel patch: parsing and argument checking should be done better here. Signed-off-by: Marcelo Ricardo Leitner --- include/uapi/linux/tc_act/tc_ct.h | 1 + tc/m_ct.c | 7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/

[RFC PATCH 2/6] net/sched: flower: add support for matching on ConnTrack

2019-01-24 Thread Marcelo Ricardo Leitner
Hook on flow dissector's new interface on ConnTrack from previous patch. Signed-off-by: Marcelo Ricardo Leitner --- include/uapi/linux/pkt_cls.h | 9 + net/sched/cls_flower.c | 33 + 2 files changed, 42 insertions(+) diff --git a/include/uapi/linux

[RFC PATCH 1/6] flow_dissector: add support for matching on ConnTrack

2019-01-24 Thread Marcelo Ricardo Leitner
This a preliminary patch to add support on flow dissector for matching on ConnTrack information. 2 FIXMEs in place: - reusing nf_conn_labels may not be feasible, as we don't want to pull too much of ConnTrack into flow dissector. - CT may be there, but it may not be using labels. As hashing zero

[RFC PATCH 6/6] net/sched: act_ct: allow sending a packet through conntrack multiple times

2019-01-24 Thread Marcelo Ricardo Leitner
The first time it may use conntrack to track the tunnel information, then jump into another chain, and go through conntrack again so that the inner header is tracked. This commit clears previous conntrack info if any so that we can submit it to conntrack again. Header offsets are supposed to be u

[RFC PATCH 3/6] net/sched: add CT action

2019-01-24 Thread Marcelo Ricardo Leitner
This is where most of the code is and the main pain points. The implementation is using spinlock on the datapath for now just for simplicity. Lets get the basics done and then move forward. Open points: - nf_ct_netns_get() accepts IPv4, IPv6 or both. It would be interesting to match on what was

[RFC PATCH 4/6] net/sched: act_ct: add support for force flag

2019-01-24 Thread Marcelo Ricardo Leitner
OvS ct action has this 'force' flag, which basically forces ConnTrack to consider that this packet, this specific direction, is the original one. Implement that similarly: if the ct entry is there and the direction is not the expected one, destroy it and create a new one. Signed-off-by: Marcelo R

[RFC PATCH iproute2 1/5] flower: add support for CT fields

2019-01-24 Thread Marcelo Ricardo Leitner
Except ct_label, just a place holder for now. Parsing of ct_state definitely should be handled better. Signed-off-by: Marcelo Ricardo Leitner --- include/uapi/linux/pkt_cls.h | 9 ++ tc/f_flower.c| 158 ++- 2 files changed, 165 insertions(+), 2

[RFC PATCH 5/6] net/sched: act_ct: add support for clear flag

2019-01-24 Thread Marcelo Ricardo Leitner
OvS ct action supports a 'clear' flag: it removes any ConnTrack marking in the packet. Implement it similarly here: drop the reference and return. Note that the packet is also marked as UNTRACKED. Yes, parsing should ensure that clear is not used with any other flags as they are mutually exclusive

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-24 Thread Jason Wang
On 2019/1/24 下午12:53, Michael S. Tsirkin wrote: - How hard is it to figure out which mode uses which code. It's as simple as tracing __get_user() usage in vhost process? Thanks Well there are now mtu notifiers etc etc. It's hardly as well contained as that. We can setup filter out exactl

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Eric Dumazet
On 01/24/2019 03:58 PM, Alexei Starovoitov wrote: > On Thu, Jan 24, 2019 at 07:01:09PM +0100, Peter Zijlstra wrote: >> and from NMI ... > > progs are not preemptable and map syscall accessors have bpf_prog_active > counters. > So nmi/kprobe progs will not be running when syscall is running. >

Re: [PATCH net] sctp: set flow sport from saddr only when it's 0

2019-01-24 Thread David Miller
From: Xin Long Date: Tue, 22 Jan 2019 02:42:41 +0800 > Now sctp_transport_pmtu() passes transport->saddr into .get_dst() to set > flow sport from 'saddr'. However, transport->saddr is set only when > transport->dst exists in sctp_transport_route(). > > If sctp_transport_pmtu() is called without

Re: [PATCH net] sctp: set chunk transport correctly when it's a new asoc

2019-01-24 Thread David Miller
From: Xin Long Date: Tue, 22 Jan 2019 02:42:09 +0800 > In the paths: > > sctp_sf_do_unexpected_init() -> > sctp_make_init_ack() > sctp_sf_do_dupcook_a/b()() -> > sctp_sf_do_5_1D_ce() > > The new chunk 'retval' transport is set from the incoming chunk 'chunk' > transport. However, 'r

Re: [PATCH net] sctp: improve the events for sctp stream adding

2019-01-24 Thread David Miller
From: Xin Long Date: Tue, 22 Jan 2019 02:40:12 +0800 > This patch is to improve sctp stream adding events in 2 places: > > 1. In sctp_process_strreset_addstrm_out(), move up SCTP_MAX_STREAM > and in stream allocation failure checks, as the adding has to > succeed after reconf_timer s

Re: [PATCH net] sctp: improve the events for sctp stream reset

2019-01-24 Thread David Miller
From: Xin Long Date: Tue, 22 Jan 2019 02:39:34 +0800 > This patch is to improve sctp stream reset events in 4 places: > > 1. In sctp_process_strreset_outreq(), the flag should always be set with > SCTP_STREAM_RESET_INCOMING_SSN instead of OUTGOING, as receiver's in > stream is reset

Re: [PATCH stable 4.4 06/11] ipv6: defrag: drop non-last frags smaller than min mtu

2019-01-24 Thread maowenan
On 2019/1/25 2:31, Greg KH wrote: > On Wed, Jan 23, 2019 at 10:19:41AM +0800, Mao Wenan wrote: >> From: Florian Westphal >> >> [ Upstream commit 0ed4229b08c13c84a3c301a08defdc9e7f4467e6 ] >> >> don't bother with pathological cases, they only waste cycles. >> IPv6 requires a minimum MTU of 1280

[PATCH -next] ptp: fix debugfs_simple_attr.cocci warnings

2019-01-24 Thread YueHaibing
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: script

[PATCH v2] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-24 Thread Atsushi Nemoto
From: Tomonori Sakita If fill_level was not zero and status was not BUSY, result of "tx_prod - tx_cons - inuse" might be zero. Subtracting 1 unconditionally results invalid negative return value on this case. Make sure not to return an negative value. Signed-off-by: Tomonori Sakita Signed-off-b

Re: [PATCH v2] ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel

2019-01-24 Thread David Miller
From: we...@ucloud.cn Date: Sat, 19 Jan 2019 13:11:25 +0800 > From: wenxu > > ip l add dev tun type gretap key 1000 > ip a a dev tun 10.0.0.1/24 > > Packets with tun-id 1000 can be recived by tun dev. But packet can't > be sent through dev tun for non-tunnel-dst > > With this patch: tunnel-dst

Re: [PATCH stable 4.4 05/11] ip: use rb trees for IP frag queue.

2019-01-24 Thread maowenan
On 2019/1/25 1:58, Greg KH wrote: > On Wed, Jan 23, 2019 at 10:19:40AM +0800, Mao Wenan wrote: >> From: Peter Oskolkov >> >> [ Upstream commit fa0f527358bd900ef92f925878ed6bfbd51305cc ] > > This commit is not in the 4.14.y tree, any specific reason why not? I found the commit 6b921536f1707a24

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Jann Horn
On Fri, Jan 25, 2019 at 2:22 AM Paul E. McKenney wrote: > On Thu, Jan 24, 2019 at 04:05:16PM -0800, Alexei Starovoitov wrote: > > On Thu, Jan 24, 2019 at 03:42:32PM -0800, Paul E. McKenney wrote: > > > On Thu, Jan 24, 2019 at 07:56:52PM +0100, Peter Zijlstra wrote: > > > > On Thu, Jan 24, 2019 at

Re: [PATCH net-next 1/7] net: tls: Save iv in tls_rec for async crypto requests

2019-01-24 Thread David Miller
From: Dave Watson Date: Thu, 24 Jan 2019 22:34:29 + > Later patches touch the same code, so would need to be in both to > avoid merge conflicts. Dave, here is the way you should handle this. Submit this patch for net. Let me know that something you want to submit for net-next depends upon

Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-24 Thread Paul E. McKenney
On Thu, Jan 24, 2019 at 04:05:16PM -0800, Alexei Starovoitov wrote: > On Thu, Jan 24, 2019 at 03:42:32PM -0800, Paul E. McKenney wrote: > > On Thu, Jan 24, 2019 at 07:56:52PM +0100, Peter Zijlstra wrote: > > > On Thu, Jan 24, 2019 at 07:01:09PM +0100, Peter Zijlstra wrote: > > > > > > > > Thanks f

  1   2   3   4   >