[PATCH net] team: Free BPF filter when unregistering netdev

2019-03-02 Thread Ido Schimmel
When team is used in loadbalance mode a BPF filter can be used to provide a hash which will determine the Tx port. When the netdev is later unregistered the filter is not freed which results in memory leaks [1]. Fix by freeing the program and the corresponding filter when unregistering the netdev

[PATCH net] ip6mr: Do not call __IP6_INC_STATS() from preemptible context

2019-03-02 Thread Ido Schimmel
Similar to commit 44f49dd8b5a6 ("ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context."), we cannot assume preemption is disabled when incrementing the counter and accessing a per-CPU variable. Preemption can be enabled when we add a route in process co

Re: [PATCH] rsi: Fix NULL pointer dereference in kmalloc

2019-03-02 Thread Joe Perches
On Sat, 2019-03-02 at 14:31 -0600, Aditya Pakki wrote: > kmalloc can fail in rsi_register_rates_channels but memcpy still attempts > to write to channels. The patch checks and avoids such a situation. [] > diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c > b/drivers/net/wireless/rsi/rsi_91

Re: [PATCH] net/bluetooth: Fix bound check in event handling

2019-03-02 Thread Tomas Bortoli
Hi Marcel, On 3/2/19 5:46 PM, Marcel Holtmann wrote: > Hi Tomas, > >> hci_inquiry_result_with_rssi_evt() can perform out of bound reads >> on skb->data as a bound check is missing. >> >> Signed-off-by: Tomas Bortoli >> Reported-by: syzbot+cec7a50c412a2c03f...@syzkaller.appspotmail.com >> Reporte

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

2019-03-02 Thread David Miller
From: Eric Dumazet Date: Thu, 28 Feb 2019 12:55:43 -0800 > In the series fc8b81a5981f ("Merge branch 'lockless-qdisc-series'") > John made the assumption that the data path had no need to read > the qdisc qlen (number of packets in the qdisc). > > It is true when pfifo_fast is used as the root q

Re: [pull request][net-next 00/17] Mellanox, mlx5 updates 2019-03-01

2019-03-02 Thread David Miller
From: Saeed Mahameed Date: Fri, 1 Mar 2019 12:08:31 -0800 > This series adds multi path offloads support and 2 small updates > to mlx5 driver. > > For more information please see tag log below. > > I am terribly sorry for the 2 extra patches, but mostly Roi's and Eran's > patches are very smal

Re: [PATCH bpf-next 2/4] bpf/verifier: fix code formatting

2019-03-02 Thread Andrii Nakryiko
On Fri, Mar 1, 2019 at 11:24 AM Alexei Starovoitov wrote: > > On 2/28/19 5:37 PM, Andrii Nakryiko wrote: > > -#define REALLOC_STATE_FN(NAME, COUNT, FIELD, SIZE) \ > > -static int realloc_##NAME##_state(struct bpf_func_state *state, int size, \ > > -

Re: [PATCH 00/29] Netfilter/IPVS updates for net-next

2019-03-02 Thread David Miller
From: Pablo Neira Ayuso Date: Sat, 2 Mar 2019 19:34:28 +0100 > The following patchset contains Netfilter/IPVS updates for net-next: ... > You can pull these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git Pulled, thanks Pablo.

Re: pull request: bluetooth-next 2019-03-02

2019-03-02 Thread David Miller
From: Johan Hedberg Date: Sat, 2 Mar 2019 21:00:57 +0100 > Here's one more bluetooth-next pull request for the 5.1 kernel: > > - Added support for MediaTek MT7663U and MT7668U UART devices > - Cleanups & fixes to the hci_qca driver > - Fixed wakeup pin behavior for QCA6174A controller > > Pl

Re: [PATCH] isdn: mISDN: Fix potential NULL pointer dereference of kzalloc

2019-03-02 Thread Kangjie Lu
On 3/2/19 3:26 PM, Gustavo A. R. Silva wrote: On 3/2/19 3:20 PM, Aditya Pakki wrote: Allocating memory via kzalloc for phi may fail and causes a NULL pointer dereference. This patch avoids such a scenario. Was this detected by Coccinelle? It was detected by an LLVM-based static analyzer

Re: [PATCH] isdn: mISDN: Fix potential NULL pointer dereference of kzalloc

2019-03-02 Thread Gustavo A. R. Silva
On 3/2/19 3:20 PM, Aditya Pakki wrote: > Allocating memory via kzalloc for phi may fail and causes a > NULL pointer dereference. This patch avoids such a scenario. > Was this detected by Coccinelle? If so, please mention it in the commit log. Thanks -- Gustavo > Signed-off-by: Aditya Pakki

[PATCH] isdn: mISDN: Fix potential NULL pointer dereference of kzalloc

2019-03-02 Thread Aditya Pakki
Allocating memory via kzalloc for phi may fail and causes a NULL pointer dereference. This patch avoids such a scenario. Signed-off-by: Aditya Pakki --- drivers/isdn/hardware/mISDN/hfcsusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/i

Re: [PATCH net] qmi_wwan: Add support for Quectel EG12/EM12

2019-03-02 Thread Kristian Evensen
On Sat, Mar 2, 2019 at 4:00 PM Bjørn Mork wrote: > I am not too happy about the double device id matching with extra magic > applied. outside the device id table. It does not scale, and it does > not play well at all with dynamic IDs. But I guess it's acceptable for > two devices when it was ok

[mt76/mt7603/mac] Question about missing variable assignment

2019-03-02 Thread Gustavo A. R. Silva
Hi all, The following piece of code in drivers/net/wireless/mediatek/mt76/mt7603/mac.c is missing a variable assignment before line 1058. Notice that there is a potential execution path in which variable *i* is compared against magic number 15 at line 1075 without being initialized previously (th

Re: [PATCH net-next] net: dsa: mv88e6xxx: support in-band signalling with external PHY for 1000BaseX/2500BaseX

2019-03-02 Thread Heiner Kallweit
On 02.03.2019 21:45, Andrew Lunn wrote: >> I briefly looked at the SFP connector and there don't seem to be pins for >> out-of-band signalling. So there must be some inband signalling. > > Hi Heiner > > Optical SFPs have an i2c bus with an 'EEPROM' on it. The EEPROM > contains information about t

Re: [PATCH net-next] net: dsa: mv88e6xxx: support in-band signalling with external PHY for 1000BaseX/2500BaseX

2019-03-02 Thread Andrew Lunn
> I briefly looked at the SFP connector and there don't seem to be pins for > out-of-band signalling. So there must be some inband signalling. Hi Heiner Optical SFPs have an i2c bus with an 'EEPROM' on it. The EEPROM contains information about the SFP, including its maximum bit-rate. The Linux SF

[PATCH] rsi: Fix NULL pointer dereference in kmalloc

2019-03-02 Thread Aditya Pakki
kmalloc can fail in rsi_register_rates_channels but memcpy still attempts to write to channels. The patch checks and avoids such a situation. Signed-off-by: Aditya Pakki --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wi

Re: [PATCH net-next] net: dsa: mv88e6xxx: support in-band signalling with external PHY for 1000BaseX/2500BaseX

2019-03-02 Thread Heiner Kallweit
On 02.03.2019 21:34, Heiner Kallweit wrote: > On 02.03.2019 21:13, Andrew Lunn wrote: >> On Sat, Mar 02, 2019 at 04:57:32PM +0100, Heiner Kallweit wrote: >>> Propagate the external PHY settings also in 1000BaseX and >>> 2500BaseX mode. >> >> Hi Heiner >> > Hi Andrew > >> I don't think this is need

Re: [PATCH net-next] net: dsa: mv88e6xxx: support in-band signalling with external PHY for 1000BaseX/2500BaseX

2019-03-02 Thread Heiner Kallweit
On 02.03.2019 21:13, Andrew Lunn wrote: > On Sat, Mar 02, 2019 at 04:57:32PM +0100, Heiner Kallweit wrote: >> Propagate the external PHY settings also in 1000BaseX and >> 2500BaseX mode. > > Hi Heiner > Hi Andrew > I don't think this is needed. 1000BaseX and 2500BaseX does not support > inband s

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

2019-03-02 Thread Martin Lau
On Sat, Mar 02, 2019 at 10:03:03AM -0800, Alexei Starovoitov wrote: > On Sat, Mar 02, 2019 at 08:10:10AM -0800, Martin KaFai Lau wrote: > > Lorenz Bauer [thanks!] reported that a ptr returned by bpf_tcp_sock(sk) > > can still be accessed after bpf_sk_release(sk). > > Both bpf_tcp_sock() and bpf_sk_

Re: [PATCH net] net: vrf: fix remove vrf module error when there's no reference

2019-03-02 Thread David Ahern
On 3/2/19 5:31 AM, linmiaohe wrote: > From: Miaohe Lin > > If we insmod vrf.ko, there is no way to remove it because of lack of > module_exit. > I think we may need it. > > Signed-off-by: Miaohe Lin > --- > drivers/net/vrf.c | 8 > 1 file changed, 8 insertions(+) The ability to unlo

Re: [PATCH net-next] net: dsa: mv88e6xxx: support in-band signalling with external PHY for 1000BaseX/2500BaseX

2019-03-02 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 04:57:32PM +0100, Heiner Kallweit wrote: > Propagate the external PHY settings also in 1000BaseX and > 2500BaseX mode. Hi Heiner I don't think this is needed. 1000BaseX and 2500BaseX does not support inband signalling. So the mac_config() call for these modes should includ

pull request: bluetooth-next 2019-03-02

2019-03-02 Thread Johan Hedberg
Hi Dave, Here's one more bluetooth-next pull request for the 5.1 kernel: - Added support for MediaTek MT7663U and MT7668U UART devices - Cleanups & fixes to the hci_qca driver - Fixed wakeup pin behavior for QCA6174A controller Please let me know if there are any issues pulling. Thanks. Joha

Re: [oss-drivers] Re: [PATCH net-next v2 0/7] devlink: expose PF and VF representors as ports

2019-03-02 Thread Jakub Kicinski
On Sat, 2 Mar 2019 11:13:37 +0100, Jiri Pirko wrote: > >This is the conceptual image of devlink instances: > > > >HOST A || HOST B > > || > >PF A | V | V | V | V || PF B| V | V | V > >

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

2019-03-02 Thread Jakub Kicinski
On Sat, 2 Mar 2019 10:41:16 +0100, Jiri Pirko wrote: > Fri, Mar 01, 2019 at 07:04:50PM CET, jakub.kicin...@netronome.com wrote: > >PCI endpoint corresponds to a PCI device, but such device > >can have one more more logical device ports associated with it. > >We need a way to distinguish those. Add

[PATCH][next] net/mlx5e: Remove redundant assignment

2019-03-02 Thread Gustavo A. R. Silva
Remove redundant assignment to tun_entropy->enabled. Addesses-Coverity-ID: 1477328 ("Unused value") Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation") Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++-

Re: [PATCH bpf-next v3 0/7] selftests: bpf: break up test_progs

2019-03-02 Thread Alexei Starovoitov
On Fri, Mar 01, 2019 at 07:42:12PM -0800, Stanislav Fomichev wrote: > Recently we had linux-next bpf/bpf-next conflict when we added new > functionality to the test_progs.c at the same location. Let's split > test_progs.c the same way we recently split test_verifier.c. > > I follow the same patten

Re: [PATCH net-next v2 3/7] nfp: register devlink ports of all reprs

2019-03-02 Thread Jakub Kicinski
On Sat, 2 Mar 2019 09:43:47 +0100, Jiri Pirko wrote: > Fri, Mar 01, 2019 at 07:04:49PM CET, jakub.kicin...@netronome.com wrote: > >Register all representors as devlink ports. > > > >The port_index is slightly tricky to figure out, we use a bit of > >arbitrary math to create unique IDs for PCI ports

Re: [PATCH v3 bpf-next 0/5] bpf: Host Bandwidth Manager (HBM)

2019-03-02 Thread Alexei Starovoitov
On Fri, Mar 01, 2019 at 12:38:44PM -0800, brakmo wrote: > Host Bandwidth Manager is a framework for limiting the bandwidth used > by v2 cgroups. It consists of 1 BPF helper, a sample BPF program to > limit egress bandwdith as well as a sample user program and script to > simplify HBM testing. > >

Re: Realtek r8822be kernel module does not negotiate 802.11ac connection

2019-03-02 Thread Larry Finger
On 3/2/19 12:09 PM, David R. Bergstein wrote: Larry, I tried using iw but it gives the same reading for bit rate.  In regard to the firmware, it was not installed via "make install" so I did it manually. David, There was a typo in the Makefile. 'make install' now installs the firmware correc

[PATCH 24/29] netfilter: nf_tables: check the result of dereferencing base_chain->stats

2019-03-02 Thread Pablo Neira Ayuso
From: Li RongQing Check the result of dereferencing base_chain->stats, instead of result of this_cpu_ptr with NULL. base_chain->stats maybe be changed to NULL when a chain is updated and a new NULL counter can be attached. And we do not need to check returning of this_cpu_ptr since base_chain->

[PATCH 22/29] ipvs: get sctphdr by sctphoff in sctp_csum_check

2019-03-02 Thread Pablo Neira Ayuso
From: Xin Long sctp_csum_check() is called by sctp_s/dnat_handler() where it calls skb_make_writable() to ensure sctphdr to be linearized. So there's no need to get sctphdr by calling skb_header_pointer() in sctp_csum_check(). Signed-off-by: Xin Long Reviewed-by: Marcelo Ricardo Leitner Acked

[PATCH 23/29] netfilter: bridge: Don't sabotage nf_hook calls for an l3mdev slave

2019-03-02 Thread Pablo Neira Ayuso
From: David Ahern Followup to a173f066c7cf ("netfilter: bridge: Don't sabotage nf_hook calls from an l3mdev"). Some packets (e.g., ndisc) do not have the skb device flipped to the l3mdev (e.g., VRF) device. Update ip_sabotage_in to not drop packets for slave devices too. Currently, neighbor solic

[PATCH 26/29] netfilter: xt_IDLETIMER: fix sysfs callback function type

2019-03-02 Thread Pablo Neira Ayuso
From: Sami Tolvanen Use struct device_attribute instead of struct idletimer_tg_attr, and the correct callback function type to avoid indirect call mismatches with Control Flow Integrity checking. Signed-off-by: Sami Tolvanen Signed-off-by: Pablo Neira Ayuso --- net/netfilter/xt_IDLETIMER.c |

[PATCH 21/29] netfilter: convert the proto argument from u8 to u16

2019-03-02 Thread Pablo Neira Ayuso
From: Li RongQing The proto in struct xt_match and struct xt_target is u16, when calling xt_check_target/match, their proto argument is u8, and will cause truncation, it is harmless to ip packet, since ip proto is u8 if a etable's match/target has proto that is u16, will cause the check failure.

[PATCH 20/29] netfilter: nft_tunnel: Add dst_cache support

2019-03-02 Thread Pablo Neira Ayuso
From: wenxu The metadata_dst does not initialize the dst_cache field, this causes problems to ip_md_tunnel_xmit() since it cannot use this cache, hence, Triggering a route lookup for every packet. Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_tunnel.c | 7 +++

[PATCH 29/29] netfilter: nf_tables: merge ipv4 and ipv6 nat chain types

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal Merge the ipv4 and ipv6 nat chain type. This is the last missing piece which allows to provide inet family support for nat in a follow patch. The kconfig knobs for ipv4/ipv6 nat chain are removed, the nat chain type will be built unconditionally if NFT_NAT expression is en

[PATCH 25/29] netfilter: nf_conntrack: ensure that CONNTRACK_LOCKS is power of 2

2019-03-02 Thread Pablo Neira Ayuso
From: Li RongQing CONNTRACK_LOCKS is divisor when computer array index, if it is power of 2, compiler will optimize modulo operation as bitwise AND, or else modulo will lower performance. Suggested-by: Florian Westphal Signed-off-by: Li RongQing Signed-off-by: Pablo Neira Ayuso --- net/netfi

[PATCH 27/29] netfilter: nf_tables: nat: merge nft_redir protocol specific modules

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal before: text data bss dec hex filename 990832 01822 71e nft_redir.ko 697896 01593 639 nft_redir_ipv4.ko 713896 01609 649 nft_redir_ipv6.ko after: text data bss dec hex

[PATCH 28/29] netfilter: nf_tables: nat: merge nft_masq protocol specific modules

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal The family specific masq modules are way too small to warrant an extra module, just place all of them in nft_masq. before: text data bss dec hex filename 1001 832 01833 729 nft_masq.ko 766 896 01662 67e nft_masq_

[PATCH 11/29] netfilter: nat: remove l3proto struct

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal All l3proto function pointers have been removed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_nat_l3proto.h | 8 - net/netfilter/nf_nat_core.c| 54 -- net/netfilter/nf_nat_

[PATCH 12/29] netfilter: nat: remove nf_nat_l3proto.h and nf_nat_core.h

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal The l3proto name is gone, its header file is the last trace. While at it, also remove nf_nat_core.h, its very small and all users include nf_nat.h too. before: textdata bss dec hex filename 2294816124136 286967018 nf_nat.ko after removal

[PATCH 15/29] netfilter: nft_set_hash: fix lookups with fixed size hash on big endian

2019-03-02 Thread Pablo Neira Ayuso
Call jhash_1word() for the 4-bytes key case from the insertion and deactivation path, otherwise big endian arch set lookups fail. Fixes: 446a8268b7f5 ("netfilter: nft_set_hash: add lookup variant for fixed size hashtable") Reported-by: Florian Westphal Tested-by: Florian Westphal Signed-off-by:

[PATCH 14/29] netfilter: remove unneeded switch fall-through

2019-03-02 Thread Pablo Neira Ayuso
From: Li RongQing Empty case is fine and does not switch fall-through Signed-off-by: Li RongQing Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_nat_core.c| 2 +- net/netfilter/nf_tables_core.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/net/netfilter/nf_nat

[PATCH 18/29] ipvs: change some data types from int to bool

2019-03-02 Thread Pablo Neira Ayuso
From: Andrea Claudi Change the data type of the following variables from int to bool across ipvs code: - found - loop - need_full_dest - need_full_svc - payload_csum Also change the following functions to use bool full_entry param instead of int: - ip_vs_genl_parse_dest() - ip_vs

[PATCH 19/29] netfilter: conntrack: tcp: only close if RST matches exact sequence

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal TCP resets cause instant transition from established to closed state provided the reset is in-window. Endpoints that implement RFC 5961 require resets to match the next expected sequence number. RST segments that are in-window (but that do not match RCV.NXT) are ignored, a

[PATCH 17/29] netfilter: nft_set_hash: remove nft_hash_key()

2019-03-02 Thread Pablo Neira Ayuso
hashtable is never used for 2-byte keys, remove nft_hash_key(). Fixes: e240cd0df481 ("netfilter: nf_tables: place all set backends in one single module") Reported-by: Florian Westphal Tested-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_set_hash.c | 13 ++

[PATCH 10/29] netfilter: nat: remove csum_recalc hook

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal We can now use direct calls. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_nat_l3proto.h | 7 +++ net/netfilter/nf_nat_helper.c | 12 net/netfilter/nf_nat_proto.c | 22 +

[PATCH 13/29] netfilter: conntrack: avoid same-timeout update

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal No need to dirty a cache line if timeout is unchanged. Also, WARN() is useless here: we crash on 'skb->len' access if skb is NULL. Last, ct->timeout is u32, not 'unsigned long' so adapt the function prototype accordingly. Signed-off-by: Florian Westphal Signed-off-by: Pa

[PATCH 16/29] netfilter: nft_set_hash: bogus element self comparison from deactivation path

2019-03-02 Thread Pablo Neira Ayuso
Use the element from the loop iteration, not the same element we want to deactivate otherwise this branch always evaluates true. Fixes: 6c03ae210ce3 ("netfilter: nft_set_hash: add non-resizable hashtable implementation") Reported-by: Florian Westphal Tested-by: Florian Westphal Signed-off-by: P

[PATCH 07/29] netfilter: nat: remove nf_nat_l4proto.h

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal after ipv4/6 nat tracker merge, there are no external callers, so make last function static and remove the header. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_nat_l4proto.h | 16 net/netfilter/nf_nat_hel

[PATCH 01/29] netfilter: nft_compat: use .release_ops and remove list of extension

2019-03-02 Thread Pablo Neira Ayuso
Add .release_ops, that is called in case of error at a later stage in the expression initialization path, ie. .select_ops() has been already set up operations and that needs to be undone. This allows us to unwind .select_ops from the error path, ie. release the dynamic operations for this extension

[PATCH 00/29] Netfilter/IPVS updates for net-next

2019-03-02 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter/IPVS updates for net-next: 1) Add .release_ops to properly unroll .select_ops, use it from nft_compat. After this change, we can remove list of extensions too to simplify this codebase. 2) Update amanda conntrack helper to support v3.4, f

[PATCH 04/29] netfilter: nat: merge ipv4 and ipv6 masquerade functionality

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal Before: textdata bss dec hex filename 1391614124128 194564c00 nf_nat.ko 4510 968 45482156a nf_nat_ipv4.ko 5146 944 8609817d2 nf_nat_ipv6.ko After: textdata bss dec hex filename

[PATCH 03/29] netfilter: ebtables: remove BUGPRINT messages

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal They are however frequently triggered by syzkaller, so remove them. ebtables userspace should never trigger any of these, so there is little value in making them pr_debug (or ratelimited). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- net/bridge/

[PATCH 06/29] netfilter: nat: merge nf_nat_ipv4,6 into nat core

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal before: textdata bss dec hex filename 1656615764136 222785706 nf_nat.ko 3598 844 04442115a nf_nat_ipv6.ko 3187 844 04031 fbf nf_nat_ipv4.ko after: textdata bss dec hex filename

[PATCH 09/29] netfilter: nat: remove csum_update hook

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal We can now use direct calls. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_nat_l3proto.h | 5 --- net/netfilter/nf_nat_proto.c | 69 ++ 2 files changed, 36 insertions(+), 38 delet

[PATCH 02/29] netfilter: nf_conntrack_amanda: add support for STATE streams

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Tham The Amanda CONNECT command has been updated to establish an optional fourth connection [0]. Previously, a CONNECT command would look like: CONNECT DATA port0 MESG port1 INDEX port2 nf_conntrack_amanda analyses the CONNECT command string in order to learn the port numbers

[PATCH 05/29] netfilter: nat: move nlattr parse and xfrm session decode to core

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal None of these functions calls any external functions, moving them allows to avoid both the indirection and a need to export these symbols. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_nat_l3proto.h | 9 -- net/ipv4/ne

[PATCH 08/29] netfilter: nat: remove l3 manip_pkt hook

2019-03-02 Thread Pablo Neira Ayuso
From: Florian Westphal We can now use direct calls. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_nat_l3proto.h | 9 - net/netfilter/nf_nat_core.c| 17 - net/netfilter/nf_nat_proto.c | 28 ++

Re: Realtek r8822be kernel module does not negotiate 802.11ac connection

2019-03-02 Thread David R. Bergstein
Larry, I tried using iw but it gives the same reading for bit rate.  In regard to the firmware, it was not installed via "make install" so I did it manually. Sincerely, David R. Bergstein On 3/2/19 12:58 PM, Larry Finger wrote: >> Larry, >> >> Sorry about all these extra replies.  Shortly after

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

2019-03-02 Thread Alexei Starovoitov
On Sat, Mar 02, 2019 at 08:10:10AM -0800, Martin KaFai Lau wrote: > Lorenz Bauer [thanks!] reported that a ptr returned by bpf_tcp_sock(sk) > can still be accessed after bpf_sk_release(sk). > Both bpf_tcp_sock() and bpf_sk_fullsock() have the same issue. > This patch addresses them together. > > A

Re: Realtek r8822be kernel module does not negotiate 802.11ac connection

2019-03-02 Thread Larry Finger
On 3/1/19 9:52 PM, David R. Bergstein wrote: Larry, Sorry about all these extra replies.  Shortly after I sent my last message my access point started recognizing the connection as 802.11ac with PHY Rate / Modulation Rate of 866.6 Mbps.  What is somewhat misleading is the information reported by

Re: [GIT] Networking

2019-03-02 Thread pr-tracker-bot
The pull request you sent on Sat, 02 Mar 2019 01:08:23 -0800 (PST): > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git refs/heads/master has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c93d9218ea561d6a91b23449cfd637ddec91dc23 Thank you! -- Deet-doot-dot, I

Re: [PATCH v2 net 0/4] tls: Fix issues in tls_device

2019-03-02 Thread Boris Pismenny
On 03/02/19 02:52, David Miller wrote: > From: Boris Pismenny > Date: Wed, 27 Feb 2019 17:38:02 +0200 > >> This series fixes issues encountered in tls_device code paths, >> which were introduced recently. >> >> Additionally, this series includes a fix for tls software only receive flow, >> which

Re: [PATCH] net/bluetooth: Fix bound check in event handling

2019-03-02 Thread Marcel Holtmann
Hi Tomas, > hci_inquiry_result_with_rssi_evt() can perform out of bound reads > on skb->data as a bound check is missing. > > Signed-off-by: Tomas Bortoli > Reported-by: syzbot+cec7a50c412a2c03f...@syzkaller.appspotmail.com > Reported-by: syzbot+660883c56e2fa65d4...@syzkaller.appspotmail.com > -

Re: [PATCH 3/8] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth

2019-03-02 Thread Martin Blumenstingl
Hi Alex, On Sat, Mar 2, 2019 at 10:30 AM 陆朱伟 wrote: > > Hi Martin, > Thanks for your information. thank you for the quick reply! > The config is related to eFuse in chips. I'm sorry that the details can't be > open. > Only some special configurations are related to the host platforms, such as

[PATCH net-next 2/5] net: phy: remove gen10g_suspend and gen10g_resume

2019-03-02 Thread Heiner Kallweit
phy_suspend() and phy_resume() are no-ops anyway if no callback is defined. Therefore we don't need these stubs. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-c45.c | 14 -- include/linux/phy.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/drivers/net/phy/phy

[PATCH net-next 5/5] net: phy: remove gen10g_no_soft_reset

2019-03-02 Thread Heiner Kallweit
genphy_no_soft_reset and gen10g_no_soft_reset are both the same no-ops, one is enough. Signed-off-by: Heiner Kallweit --- drivers/net/phy/cortina.c| 2 +- drivers/net/phy/marvell10g.c | 4 ++-- drivers/net/phy/phy-c45.c| 9 + drivers/net/phy/teranetics.c | 2 +- include/linux/phy

[PATCH net-next 3/5] net: phy: remove gen10g_config_init

2019-03-02 Thread Heiner Kallweit
ETHTOOL_LINK_MODE_1baseT_Full_BIT is set anyway in the supported and advertising bitmap because it's part of PHY_10GBIT_FEATURES. And all users of gen10g_config_init use PHY_10GBIT_FEATURES. Signed-off-by: Heiner Kallweit --- drivers/net/phy/cortina.c| 1 - drivers/net/phy/phy-c45.c

[PATCH net-next 4/5] net: phy: don't export gen10g_read_status

2019-03-02 Thread Heiner Kallweit
gen10g_read_status is deprecated, therefore stop exporting it. We don't want to encourage anybody to use it. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-c45.c | 3 +-- include/linux/phy.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/phy/phy-c4

[PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done

2019-03-02 Thread Heiner Kallweit
Now that we have it let's use genphy_c45_aneg_done() in phy_aneg_done(). Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 69dc64a4d..3745220c5 100644 --- a

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

2019-03-02 Thread Martin KaFai Lau
Lorenz Bauer [thanks!] reported that a ptr returned by bpf_tcp_sock(sk) can still be accessed after bpf_sk_release(sk). Both bpf_tcp_sock() and bpf_sk_fullsock() have the same issue. This patch addresses them together. A simple reproducer looks like this: sk = bpf_sk_lookup_tcp(); /* if (!sk) ...

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

2019-03-02 Thread Martin KaFai Lau
This set addresses issue about accessing invalid ptr returned from bpf_tcp_sock() and bpf_sk_fullsock() after bpf_sk_release(). v3: - reset reg->refcount_id for the is_null case in mark_ptr_or_null_reg() v2: - Remove refcount_id arg from release_reference() because id == refcount_id - Add a WAR

[PATCH v3 bpf-next 2/2] bpf: Test ref release issue in bpf_tcp_sock and bpf_sk_fullsock.

2019-03-02 Thread Martin KaFai Lau
Adding verifier tests to ensure the ptr returned from bpf_tcp_sock() and bpf_sk_fullsock() cannot be accessed after bpf_sk_release() is called. It is derived from a reproducer test from Lorenz Bauer. Cc: Lorenz Bauer Signed-off-by: Martin KaFai Lau --- .../selftests/bpf/verifier/ref_tracking.c

[PATCH net-next 0/5] net: phy: clean up the old gen10g functions

2019-03-02 Thread Heiner Kallweit
The old gen10g_ functions are mainly stubs and have been superseded by genphy_c45_ equivalents. So lets remove / hide the old functions as far as possible. Heiner Kallweit (5): net: phy: use genphy_c45_aneg_done in genphy_aneg_done net: phy: remove gen10g_suspend and gen10g_resume net: phy:

[PATCH net-next] net: dsa: mv88e6xxx: support in-band signalling with external PHY for 1000BaseX/2500BaseX

2019-03-02 Thread Heiner Kallweit
Propagate the external PHY settings also in 1000BaseX and 2500BaseX mode. Signed-off-by: Heiner Kallweit --- drivers/net/dsa/mv88e6xxx/serdes.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c b/drivers/net/dsa/mv88e6xxx/serdes.c ind

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

2019-03-02 Thread Martin Lau
On Fri, Mar 01, 2019 at 09:07:48AM -0800, Martin Lau wrote: > > How about resetting reg->refcount_id in mark_ptr_or_null_reg as well? > I don't think so. release_reg_references() would not work then. After a second thought, 'reg->refcount_id = 0' should be done for the is_null case. I will respin

Re: [PATCH RFC] mac80211: Use IFF_ECHO to force delivery of tx_status frames

2019-03-02 Thread Julius Niedworok
> On 01.03.2019 09:32, Johannes Berg wrote: > > Thus, I don't think this was ever intended for any cross-interface > behaviour, even if it may be on the same physical NIC. Now we got your point. We are sorry for the confusion - it seems we understood that wrong. > Not all drivers can and do t

Re: [PATCH net] qmi_wwan: Add support for Quectel EG12/EM12

2019-03-02 Thread Bjørn Mork
Kristian Evensen writes: > Quectel EG12 (module)/EM12 (M.2 card) is a Cat. 12 LTE modem. The modem > behaves in the same way as the EP06, so the "set DTR"-quirk must be > applied and the diagnostic-interface check performed. Since the > diagnostic-check now applies to more modems, I have renamed

[PATCH net-next] net/sched: act_tunnel_key: Fix double free dst_cache

2019-03-02 Thread wenxu
From: wenxu dst_cache_destroy will be called in dst_release dst_release-->dst_destroy_rcu-->dst_destroy-->metadata_dst_free -->dst_cache_destroy It should not call dst_cache_destroy before dst_release Fixes: 41411e2fd6b8 ("net/sched: act_tunnel_key: Add dst_cache support") Signed-off-by: wenxu

Re: [PATCH net 1/2] net: phy: Use C45 Helpers in phy_read_status()

2019-03-02 Thread Heiner Kallweit
On 02.03.2019 15:11, Andrew Lunn wrote: > On Fri, Mar 01, 2019 at 07:14:20PM -0800, Florian Fainelli wrote: >> >> >> On 3/1/2019 2:54 AM, Jose Abreu wrote: >>> Currently phy_read_status() considers that either the PHY driver has the >>> read_status() callback or uses the generic callback. >>> >>> F

Re: [PATCH net] net: dsa: mv8e6xxx: fix number of internal PHYs for 88E6390(X)

2019-03-02 Thread Heiner Kallweit
On 01.03.2019 23:31, Andrew Lunn wrote: > On Fri, Mar 01, 2019 at 07:40:59PM +0100, Heiner Kallweit wrote: >> Ports 9 and 10 don't have internal PHY's but are (dependent on the >> version) SERDES/SGMII/XAUI/RXAUI ports. > > Hi Heiner > > All members of the MV88E6XXX_FAMILY_6390 are 11 ports, but

Re: [PATCH v2 net] net: dsa: mv8e6xxx: fix number of internal PHYs for 88E6x90 family

2019-03-02 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 10:06:05AM +0100, Heiner Kallweit wrote: > Ports 9 and 10 don't have internal PHY's but are (dependent on the > version) SERDES/SGMII/XAUI/RXAUI ports. > > v2: > - fix it for all 88E6x90 family members > > Fixes: bc3931557d1d ("net: dsa: mv88e6xxx: Add number of internal P

Re: [PATCH net 1/2] net: phy: Use C45 Helpers in phy_read_status()

2019-03-02 Thread Andrew Lunn
On Fri, Mar 01, 2019 at 07:14:20PM -0800, Florian Fainelli wrote: > > > On 3/1/2019 2:54 AM, Jose Abreu wrote: > > Currently phy_read_status() considers that either the PHY driver has the > > read_status() callback or uses the generic callback. > > > > For C45 PHYs we need to use the gen10g_read

[PATCH net] qmi_wwan: Add support for Quectel EG12/EM12

2019-03-02 Thread Kristian Evensen
Quectel EG12 (module)/EM12 (M.2 card) is a Cat. 12 LTE modem. The modem behaves in the same way as the EP06, so the "set DTR"-quirk must be applied and the diagnostic-interface check performed. Since the diagnostic-check now applies to more modems, I have renamed the function from quectel_ep06_diag

[PATCH net] net: vrf: fix remove vrf module error when there's no reference

2019-03-02 Thread linmiaohe
From: Miaohe Lin If we insmod vrf.ko, there is no way to remove it because of lack of module_exit. I think we may need it. Signed-off-by: Miaohe Lin --- drivers/net/vrf.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 7c1430ed0244..0e93

Re: [PATCH net-next v2 0/7] devlink: expose PF and VF representors as ports

2019-03-02 Thread Jiri Pirko
Fri, Mar 01, 2019 at 07:04:46PM CET, jakub.kicin...@netronome.com wrote: >Hi! > >This series is a long overdue follow up to Jiri's work on providing >a common .ndo_phys_port_name implementation based on devlink ports. > >First devlink port flavours for PF and VF ports are added, and >registered by

Re: [PATCH bpf] bpf: fix sanitation rewrite in case of non-pointers

2019-03-02 Thread Sergei Shtylyov
Hello! On 02.03.2019 0:05, Daniel Borkmann wrote: Marek reported that he saw an issue with the below snippet in that timing measurements where off when loaded as unpriv while results Were? were reasonable when loaded as privileged: [...] uint64_t a = bpf_ktime_get_ns(); u

Re: Realtek r8822be kernel module does not negotiate 802.11ac connection

2019-03-02 Thread Arend Van Spriel
Op 2 maart 2019 04:52:46 schreef "David R. Bergstein" : Larry, Sorry about all these extra replies.  Shortly after I sent my last message my access point started recognizing the connection as 802.11ac with PHY Rate / Modulation Rate of 866.6 Mbps.  What is somewhat misleading is the informatio

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

2019-03-02 Thread Jiri Pirko
Fri, Mar 01, 2019 at 07:04:50PM CET, jakub.kicin...@netronome.com wrote: >PCI endpoint corresponds to a PCI device, but such device >can have one more more logical device ports associated with it. >We need a way to distinguish those. Add a PCI subport in the >dumps and print the info in phys_port_n

答复: [PATCH 3/8] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth

2019-03-02 Thread 陆朱伟
Hi Martin, Thanks for your information. The config is related to eFuse in chips. I'm sorry that the details can't be open. Only some special configurations are related to the host platforms, such as UART working baudrate, hardware flow control, PCM settings, etc. These are the settings for HCI U

[GIT] Networking

2019-03-02 Thread David Miller
1) Fix refcount leak in act_ipt during replace, from Davide Caratti. 2) Set task state properly in tun during blocking reads, from Timur Celik. 3) Leaked reference in DSA, from Wen Yang. 4) NULL deref in act_tunnel_key, from Vlad Buslov. 5) cipso_v4_erro can reference the skb IPCB in inapp

[PATCH v2 net] net: dsa: mv8e6xxx: fix number of internal PHYs for 88E6x90 family

2019-03-02 Thread Heiner Kallweit
Ports 9 and 10 don't have internal PHY's but are (dependent on the version) SERDES/SGMII/XAUI/RXAUI ports. v2: - fix it for all 88E6x90 family members Fixes: bc3931557d1d ("net: dsa: mv88e6xxx: Add number of internal PHYs") Signed-off-by: Heiner Kallweit --- drivers/net/dsa/mv88e6xxx/chip.c | 1

Re: pull-request: wireless-drivers-next 2019-03-01

2019-03-02 Thread David Miller
From: Kalle Valo Date: Fri, 01 Mar 2019 16:55:59 +0200 > as Linus gave us one more week here are few more patches to net-next for > 5.1. Please let me know if there are any problems. Pulled, thanks Kalle.

Re: [PATCH net] net: sit: fix memory leak in sit_init_net()

2019-03-02 Thread David Miller
From: Mao Wenan Date: Fri, 1 Mar 2019 23:06:40 +0800 > If register_netdev() is failed to register sitn->fb_tunnel_dev, > it will go to err_reg_dev and forget to free netdev(sitn->fb_tunnel_dev). ... > Signed-off-by: Mao Wenan Applied and queued up for -stable, thank you.

Re: [PATCH net-next v2 3/7] nfp: register devlink ports of all reprs

2019-03-02 Thread Jiri Pirko
Fri, Mar 01, 2019 at 07:04:49PM CET, jakub.kicin...@netronome.com wrote: >Register all representors as devlink ports. > >The port_index is slightly tricky to figure out, we use a bit of >arbitrary math to create unique IDs for PCI ports. > >Signed-off-by: Jakub Kicinski >--- > .../net/ethernet/net

[PATCH net] net: hns3: add rmb() for rx description

2019-03-02 Thread Huazhong Tan
From: Jian Shen HW can not guarantee complete write desc->rx.size, even though HNS3_RXD_VLD_B has been set. Driver needs to add rmb() instruction to make sure desc->rx.size is always valid. Fixes: e55970950556 ("net: hns3: Add handling of GRO Pkts not fully RX'ed in NAPI poll") Signed-off-by: J

Re: [PATCH net] net: dsa: mv88e6xxx: Fix statistics on mv88e6161

2019-03-02 Thread David Miller
From: Andrew Lunn Date: Fri, 1 Mar 2019 23:43:39 +0100 > Despite what the datesheet says, the silicon implements the older way > of snapshoting the statistics. Change the op. > > Reported-by: chris.he...@zii.aero > Tested-by: chris.he...@zii.aero > Fixes: 0ac64c394900 ("net: dsa: mv88e6xxx: mv8

Re: [PATCH net-next] net: ipv4: Fix NULL pointer dereference in route lookup

2019-03-02 Thread David Miller
From: Ido Schimmel Date: Fri, 1 Mar 2019 13:38:43 + > When calculating the multipath hash for input routes the flow info is > not available and therefore should not be used. > > Fixes: 24ba14406c5c ("route: Add multipath_hash in flowi_common to make > user-define hash") > Signed-off-by: Ido

  1   2   >