[Linux-kernel-mentees] [PATCH net v2] Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()

2020-09-09 Thread Peilin Ye
`num_reports` is not being properly checked. A malformed event packet with a large `num_reports` number makes hci_le_direct_adv_report_evt() read out of bounds. Fix it. Cc: sta...@vger.kernel.org Fixes: 2f010b55884e ("Bluetooth: Add support for handling LE Direct Advertising Report events") Repor

Re: [PATCH] hdlc_ppp: add range checks in ppp_cp_parse_cr()

2020-09-09 Thread Dan Carpenter
On Wed, Sep 09, 2020 at 05:37:37AM +0800, nan chen wrote: > Looks like the judgment of len The judgment cannot avoid the memory overflow of the memcpy below. > case LCP_OPTION_ACCM: /* async control character > map */ > + if (len < sizeof(valid

Re: [PATCH] perf tools: Do not use deprecated bpf_program__title

2020-09-09 Thread Jiri Olsa
On Tue, Sep 08, 2020 at 01:11:36PM -0700, Andrii Nakryiko wrote: > On Mon, Sep 7, 2020 at 10:57 AM Jiri Olsa wrote: > > > > The bpf_program__title function got deprecated in libbpf, > > use the suggested alternative. > > > > Fixes: 521095842027 ("libbpf: Deprecate notion of BPF program "title" in

Re: [PATCH bpf-next] perf: stop using deprecated bpf_program__title()

2020-09-09 Thread Jiri Olsa
On Tue, Sep 08, 2020 at 11:01:27AM -0700, Andrii Nakryiko wrote: > Switch from deprecated bpf_program__title() API to > bpf_program__section_name(). Also drop unnecessary error checks because > neither bpf_program__title() nor bpf_program__section_name() can fail or > return NULL. > > Fixes: 52109

Re: [PATCH net-next v2 2/2] mlx4: make sure to always set the port type

2020-09-09 Thread Tariq Toukan
On 9/9/2020 1:21 AM, Jakub Kicinski wrote: Even tho mlx4_core registers the devlink ports, it's mlx4_en and mlx4_ib which set their type. In situations where one of the two is not built yet the machine has ports of given type we see the devlink warning from devlink_port_type_warn() trigger. H

Re: [PATCH] rtl8xxxu: prevent potential memory leak

2020-09-09 Thread Kalle Valo
Chris Chiu wrote: > Free the skb if usb_submit_urb fails on rx_urb. And free the urb > no matter usb_submit_urb succeeds or not in rtl8xxxu_submit_int_urb. > > Signed-off-by: Chris Chiu Patch applied to wireless-drivers-next.git, thanks. 86279456a4d4 rtl8xxxu: prevent potential memory leak -

Re: [PATCH] mwifiex: remove function pointer check

2020-09-09 Thread Kalle Valo
t...@redhat.com wrote: > From: Tom Rix > > clang static analyzer reports this problem > > init.c:739:8: warning: Called function pointer > is null (null dereference) > ret = adapter->if_ops.check_fw_status( ... > ^ > > In mwifiex_dnld_fw,

Re: [PATCH v2] brcmsmac: fix memory leak in wlc_phy_attach_lcnphy

2020-09-09 Thread Kalle Valo
Keita Suzuki wrote: > When wlc_phy_txpwr_srom_read_lcnphy fails in wlc_phy_attach_lcnphy, > the allocated pi->u.pi_lcnphy is leaked, since struct brcms_phy will be > freed in the caller function. > > Fix this by calling wlc_phy_detach_lcnphy in the error handler of > wlc_phy_txpwr_srom_read_lcnp

Re: [PATCH v2] rtlwifi: switch from 'pci_' to 'dma_' API

2020-09-09 Thread Kalle Valo
Christophe JAILLET wrote: > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > The only file where some GFP_ flags ar

(pch_gbe): transmit queue 0 timed out

2020-09-09 Thread Marc Leeman
Hi I'd like to get some feedback on an issue that has popped up on newer systems (with increased load). The system uses an older CPU (Atom) that uses an integrated MAC. When flooding the NIC with multicast traffic (and multiple listeners), we get the following: - Aug 16 01:21:55 dss kernel:

Re: [PATCH bpf-next 0/2] bpf: detect build errors for man pages for bpftool and eBPF helpers

2020-09-09 Thread Quentin Monnet
On 09/09/2020 04:48, Andrii Nakryiko wrote: > On Mon, Sep 7, 2020 at 9:40 AM Quentin Monnet wrote: >> >> This set aims at improving the checks for building bpftool's documentation >> (including the man page for eBPF helper functions). The first patch lowers >> the log-level from rst2man and fix th

Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-09 Thread Quentin Monnet
On 09/09/2020 04:25, Andrii Nakryiko wrote: > On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet wrote: >> >> The function used to dump a map entry in bpftool is a bit difficult to >> follow, as a consequence to earlier refactorings. There is a variable >> ("num_elems") which does not appear to be nece

[PATCH] i40e: report correct VF link speed when link state is set to enable

2020-09-09 Thread Stefan Assmann
When the virtual link state was set to "enable" ethtool would report link speed as 4Mb/s regardless of the underlying device. Report the correct link speed. Example from a XXV710 NIC. Before: $ ip link set ens3f0 vf 0 state auto $ ethtool enp8s2 | grep Speed Speed: 25000Mb/s $ ip link

Re: [PATCH bpf-next 1/3] tools: bpftool: print optional built-in features along with version

2020-09-09 Thread Quentin Monnet
On 09/09/2020 00:20, Andrii Nakryiko wrote: > On Mon, Sep 7, 2020 at 7:50 AM Quentin Monnet wrote: >> >> On 04/09/2020 22:45, Andrii Nakryiko wrote: >>> On Fri, Sep 4, 2020 at 1:57 PM Quentin Monnet wrote: Bpftool has a number of features that can be included or left aside during c

Re: [RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication

2020-09-09 Thread Jason Wang
On 2020/9/9 上午12:37, Cornelia Huck wrote: Then you need something that is functional equivalent to virtio PCI which is actually the concept of vDPA (e.g vDPA provides alternatives if the queue_sel is hard in the EP implementation). It seems I really need to read up on vDPA more... do you have

Re: [PATCH v2 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled

2020-09-09 Thread Marco Felsch
On 20-09-08 18:58, Florian Fainelli wrote: > > > On 9/8/2020 4:25 AM, Marco Felsch wrote: > > Don't enable the interrupt if the platform disable the energy detection > > by "smsc,disable-energy-detect". > > > > Signed-off-by: Marco Felsch > > Reviewed-by: Andrew Lunn > > --- > > v2: > > - Add

[PATCH v2 07/20] ethernet: dlink: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/dlink/sundanc

[PATCH v2 03/20] broadcom: cnic: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/broadcom/cnic

[PATCH v2 00/20] ethernet: convert tasklets to use new

2020-09-09 Thread Allen Pais
Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts all the crypto modules to use the new tasklet_setup() API This series is based on v5.9-rc4 v2: fix kdoc reported by Jakub Kicinski. Allen Pais (20): ethernet:

[PATCH v2 02/20] ethernet: amd: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/amd/xgbe/xgbe

[PATCH v2 01/20] ethernet: alteon: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/alteon/acenic

[PATCH v2 04/20] ethernet: cadence: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/cadence/macb_

[PATCH v2 05/20] ethernet: cavium: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/cavium/liquid

[PATCH v2 09/20] ethernet: ehea: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/ibm/ehea/ehea

[PATCH v2 10/20] ethernet: ibmvnic: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/ibm/ibmvnic.c

[PATCH v2 06/20] ethernet: chelsio: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/chelsio/cxgb/

[PATCH v2 08/20] ethernet: hinic: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/huawei/hinic/

[PATCH v2 16/20] ethernet: netronome: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/netronome/nfp

[PATCH v2 14/20] ethernet: micrel: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/micrel/ks8842

[PATCH v2 11/20] ethernet: jme: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/jme.c | 40 ++

[PATCH v2 13/20] ethernet: mellanox: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/mellanox/mlx4

[PATCH v2 20/20] ethernet: smsc: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/smsc/smc91x.c

[PATCH v2 15/20] ethernet: natsemi: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/natsemi/ns838

[PATCH v2 19/20] ethernet: silan: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/silan/sc92031

[PATCH v2 12/20] ethernet: marvell: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/marvell/skge.

Re: [PATCH] net: fec: Fix PHY init after phy_reset_after_clk_enable()

2020-09-09 Thread Richard Leitner
On Fri, Sep 04, 2020 at 09:23:26PM +0200, Marek Vasut wrote: > On 9/4/20 9:02 PM, Richard Leitner wrote: > > On Fri, Sep 04, 2020 at 05:26:14PM +0200, Marek Vasut wrote: > >> On 9/4/20 4:02 PM, Andrew Lunn wrote: > >>> On Fri, Sep 04, 2020 at 12:45:44AM +0200, Marek Vasut wrote: > On 9/4/20 12

[PATCH v2 17/20] ethernet: ni: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/ni/nixge.c |

[PATCH v2 18/20] ethernet: qlogic: convert tasklets to use new tasklet_setup() API

2020-09-09 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/qlogic/qed/qe

[net-next] net: i40e: Use the ARRAY_SIZE macro for aq_to_posix

2020-09-09 Thread Wei Xu
Use the ARRAY_SIZE macro to calculate the size of an array. This code was detected with the help of Coccinelle. Signed-off-by: Wei Xu --- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.

memory leak in mgmt_cmd_status

2020-09-09 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:6f6a73c8 Merge tag 'drm-fixes-2020-09-08' of git://anongit.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=152e324590 kernel config: https://syzkaller.appspot.com/x/.config?x=7954285d6e960c0f das

Re: [PATCH net-next v2 3/3] ipmr: Use full VIF ID in netlink cache reports

2020-09-09 Thread Simon Horman
On Tue, Sep 08, 2020 at 10:04:08AM +1200, Paul Davey wrote: > Insert the full 16 bit VIF ID into ipmr Netlink cache reports. > > The VIF_ID attribute has 32 bits of space so can store the full VIF ID > extracted from the high and low byte fields in the igmpmsg. > > Signed-off-by: Paul Davey > --

[net-next] net: iavf: Use the ARRAY_SIZE macro for aq_to_posix

2020-09-09 Thread Wei Xu
Use the ARRAY_SIZE macro to calculate the size of an array. This code was detected with the help of Coccinelle. Signed-off-by: Wei Xu --- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/iavf/iavf_adminq.

Re: [PATCH] vhost_vdpa: remove unnecessary spin_lock in vhost_vring_call

2020-09-09 Thread Jason Wang
On 2020/9/9 下午2:52, Zhu Lingshan wrote: This commit removed unnecessary spin_locks in vhost_vring_call and related operations. Because we manipulate irq offloading contents in vhost_vdpa ioctl code path which is already protected by dev mutex and vq mutex. Signed-off-by: Zhu Lingshan Acked

Re: [PATCH bpf-next] perf: stop using deprecated bpf_program__title()

2020-09-09 Thread Tobias Klauser
On 2020-09-08 at 20:01:27 +0200, Andrii Nakryiko wrote: > Switch from deprecated bpf_program__title() API to > bpf_program__section_name(). Also drop unnecessary error checks because > neither bpf_program__title() nor bpf_program__section_name() can fail or > return NULL. > > Fixes: 521095842027

[PATCH net-next 1/1] net: usb: qmi_wwan: add default rx_urb_size

2020-09-09 Thread Daniele Palmas
Add default rx_urb_size to support QMAP download data aggregation without needing additional setup steps in userspace. The value chosen is the current highest one seen in available modems. The patch has the side-effect of fixing a babble issue in raw-ip mode reported by multiple users. Signed-of

[PATCH] hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD

2020-09-09 Thread Ye Bin
clean follow coccicheck warning: net//hsr/hsr_netlink.c:94:8-42: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD net//hsr/hsr_netlink.c:87:30-57: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD net//hsr/hsr_netlink.c:79:29-53: WARNING avoid newline at end of message in N

Re: [net-next] net: iavf: Use the ARRAY_SIZE macro for aq_to_posix

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 16:51 +0800, Wei Xu wrote: > Use the ARRAY_SIZE macro to calculate the size of an array. > This code was detected with the help of Coccinelle. [] > diff --git a/drivers/net/ethernet/intel/iavf/iavf_adminq.h > b/drivers/net/ethernet/intel/iavf/iavf_adminq.h [] > @@ -120,7 +120

Re: [net-next] net: iavf: Use the ARRAY_SIZE macro for aq_to_posix

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 02:33 -0700, Joe Perches wrote: > On Wed, 2020-09-09 at 16:51 +0800, Wei Xu wrote: > > Use the ARRAY_SIZE macro to calculate the size of an array. > > This code was detected with the help of Coccinelle. > [] > > diff --git a/drivers/net/ethernet/intel/iavf/iavf_adminq.h > > b

[PATCH 13/13] netfilter: nf_tables: add userdata support for nft_object

2020-09-09 Thread Pablo Neira Ayuso
From: "Jose M. Guisado Gomez" Enables storing userdata for nft_object. Initially this will store an optional comment but can be extended in the future as needed. Adds new attribute NFTA_OBJ_USERDATA to nft_object. Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso --- incl

[PATCH 00/13] Netfilter updates for net-next

2020-09-09 Thread Pablo Neira Ayuso
Hi, The following patchset contains Netfilter updates for net-next: 1) Rewrite inner header IPv6 in ICMPv6 messages in ip6t_NPT, from Michael Zhou. 2) do_ip_vs_set_ctl() dereferences uninitialized value, from Peilin Ye. 3) Support for userdata in tables, from Jose M. Guisado. 4) Do not i

[PATCH 03/13] netfilter: nf_tables: add userdata attributes to nft_table

2020-09-09 Thread Pablo Neira Ayuso
From: "Jose M. Guisado Gomez" Enables storing userdata for nft_table. Field udata points to user data and udlen store its length. Adds new attribute flag NFTA_TABLE_USERDATA Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_tables.h|

[PATCH v2 2/2] Bluetooth: sco: expose WBS packet length in socket option

2020-09-09 Thread Joseph Hwang
It is desirable to expose the wideband speech packet length via a socket option to the user space so that the user space can set the value correctly in configuring the sco connection. Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Joseph Hwang --- (no changes sin

[PATCH 12/13] selftests/net: replace obsolete NFT_CHAIN configuration

2020-09-09 Thread Pablo Neira Ayuso
From: Fabian Frederick Replace old parameters with global NFT_NAT from commit db8ab38880e0 ("netfilter: nf_tables: merge ipv4 and ipv6 nat chain types") Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso --- tools/testing/selftests/net/config | 3 +-- 1 file changed, 1 insertion

[PATCH 11/13] netfilter: ebt_stp: Remove unused macro BPDU_TYPE_TCN

2020-09-09 Thread Pablo Neira Ayuso
From: Wang Hai BPDU_TYPE_TCN is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Pablo Neira Ayuso --- net/bridge/netfilter/ebt_stp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/bridge/netfilter/ebt_stp.c b/

[PATCH v2 1/2] Bluetooth: btusb: define HCI packet sizes of USB Alts

2020-09-09 Thread Joseph Hwang
It is desirable to define the HCI packet payload sizes of USB alternate settings so that they can be exposed to user space. Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Joseph Hwang --- Changes in v2: - 1/2: Used sco_mtu instead of a new sco_pkt_len member in h

[PATCH 09/13] netfilter: nft_socket: add wildcard support

2020-09-09 Thread Pablo Neira Ayuso
From: Balazs Scheidler Add NFT_SOCKET_WILDCARD to match to wildcard socket listener. Signed-off-by: Balazs Scheidler Signed-off-by: Pablo Neira Ayuso --- include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_socket.c | 27 2 files changed,

[PATCH 10/13] ipvs: remove dependency on ip6_tables

2020-09-09 Thread Pablo Neira Ayuso
From: Yaroslav Bolyukin This dependency was added because ipv6_find_hdr was in iptables specific code but is no longer required Fixes: f8f626754ebe ("ipv6: Move ipv6_find_hdr() out of Netfilter code.") Fixes: 63dca2c0b0e7 ("ipvs: Fix faulty IPv6 extension header handling in IPVS") Signed-off-by:

[PATCH 08/13] netfilter: xt_HMARK: Use ip_is_fragment() helper

2020-09-09 Thread Pablo Neira Ayuso
From: YueHaibing Use ip_is_fragment() to simpify code. Signed-off-by: YueHaibing Signed-off-by: Pablo Neira Ayuso --- net/netfilter/xt_HMARK.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/xt_HMARK.c b/net/netfilter/xt_HMARK.c index 713fb38541df..8928ec56c3

[PATCH 07/13] netfilter: conntrack: remove unneeded nf_ct_put

2020-09-09 Thread Pablo Neira Ayuso
From: Florian Westphal We can delay refcount increment until we reassign the existing entry to the current skb. A 0 refcount can't happen while the nf_conn object is still in the hash table and parallel mutations are impossible because we hold the bucket lock. Signed-off-by: Florian Westphal S

[PATCH 04/13] netfilter: conntrack: do not increment two error counters at same time

2020-09-09 Thread Pablo Neira Ayuso
From: Florian Westphal The /proc interface for nf_conntrack displays the "error" counter as "icmp_error". It makes sense to not increment "invalid" when failing to handle an icmp packet since those are special. For example, its possible for conntrack to see partial and/or fragmented packets ins

[PATCH 06/13] netfilter: conntrack: add clash resolution stat counter

2020-09-09 Thread Pablo Neira Ayuso
From: Florian Westphal There is a misconception about what "insert_failed" means. We increment this even when a clash got resolved, so it might not indicate a problem. Add a dedicated counter for clash resolution and only increment insert_failed if a clash cannot be resolved. For the old /proc

[PATCH 05/13] netfilter: conntrack: remove ignore stats

2020-09-09 Thread Pablo Neira Ayuso
From: Florian Westphal This counter increments when nf_conntrack_in sees a packet that already has a conntrack attached or when the packet is marked as UNTRACKED. Neither is an error. The former is normal for loopback traffic. The second happens for certain ICMPv6 packets or when nftables/ip(6)

[PATCH 02/13] ipvs: Fix uninit-value in do_ip_vs_set_ctl()

2020-09-09 Thread Pablo Neira Ayuso
From: Peilin Ye do_ip_vs_set_ctl() is referencing uninitialized stack value when `len` is zero. Fix it. Reported-by: syzbot+23b5f9e7caf61d9a3...@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=46ebfb92a8a812621a001ef04d90dfa459520fe2 Suggested-by: Julian Anastasov Signed-o

[PATCH 01/13] netfilter: ip6t_NPT: rewrite addresses in ICMPv6 original packet

2020-09-09 Thread Pablo Neira Ayuso
From: Michael Zhou Detect and rewrite a prefix embedded in an ICMPv6 original packet that was rewritten by a corresponding DNPT/SNPT rule so it will be recognised by the host that sent the original packet. Example Rules in effect on the 1:2:3:4::/64 + 5:6:7:8::/64 side router: * SNPT src-pfx 1:

[PATCH v2 0/2] To support the HFP WBS, a chip vendor may choose a particular

2020-09-09 Thread Joseph Hwang
USB alternate seeting of which the packet size is distinct. The patches are to expose the packet size to user space so that the user space does not need to hard code those values. We have verified this patch on Chromebooks which use - Realtek 8822CE controller with USB alt setting 1 - Intel contro

[PATCH v2 net] hdlc_ppp: add range checks in ppp_cp_parse_cr()

2020-09-09 Thread Dan Carpenter
There are a couple bugs here: 1) If opt[1] is zero then this results in a forever loop. If the value is less than 2 then it is invalid. 2) It assumes that "len" is more than sizeof(valid_accm) or 6 which can result in memory corruption. In the case of LCP_OPTION_ACCM, then we should check

[PATCH] net: wireless: fix unmet direct dependendices config warning when !CRYPTO

2020-09-09 Thread Necip Fazil Yildiran
When LIB80211_CRYPT_CCMP is enabled and CRYPTO is disabled, it results in unmet direct dependencies config warning. The reason is that LIB80211_CRYPT_CCMP selects CRYPTO_AES and CRYPTO_CCM, which are subordinate to CRYPTO. This is reproducible with CRYPTO disabled and R8188EU enabled, where R8188EU

general protection fault in skb_release_data (2)

2020-09-09 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:19162fd4 hv_netvsc: Fix hibernation for mlx5 VF driver git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=163310f190 kernel config: https://syzkaller.appspot.com/x/.config?x=bd46548257448703 dashboard link

KMSAN: uninit-value in skb_release_data (3)

2020-09-09 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:3b3ea602 x86: add failure injection to get/put/clear_user git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=15bdcb3590 kernel config: https://syzkaller.appspot.com/x

[PATCH v3 2/4] net: dsa: microchip: Improve phy mode message

2020-09-09 Thread Paul Barker
Always print the selected phy mode for the CPU port when using the ksz9477 driver. If the phy mode was changed, also print the previous mode to aid in debugging. To make the message more clear, prefix it with the port number which it applies to and improve the language a little. Signed-off-by: Pa

[PATCH v3 4/4] net: dsa: microchip: Implement recommended reset timing

2020-09-09 Thread Paul Barker
The datasheet for the ksz9893 and ksz9477 switches recommend waiting at least 100us after the de-assertion of reset before trying to program the device through any interface. Also switch the existing msleep() call to usleep_range() as recommended in Documentation/timers/timers-howto.rst. The 2ms r

[PATCH v3 0/4] ksz9477 dsa switch driver improvements

2020-09-09 Thread Paul Barker
These changes were made while debugging the ksz9477 driver for use on a custom board which uses the ksz9893 switch supported by this driver. The patches have been runtime tested on top of Linux 5.8.4, I couldn't runtime test them on top of 5.9-rc3 due to unrelated issues. They have been build teste

[PATCH v3 3/4] net: dsa: microchip: Disable RGMII in-band status on KSZ9893

2020-09-09 Thread Paul Barker
We can't assume that the link partner supports the in-band status reporting which is enabled by default on the KSZ9893 when using RGMII for the upstream port. Signed-off-by: Paul Barker Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/dsa/microchip/ksz9477.c | 3 +++ 1 fi

[PATCH v3 1/4] net: dsa: microchip: Make switch detection more informative

2020-09-09 Thread Paul Barker
To make switch detection more informative print the result of the ksz9477/ksz9893 compatibility check. With debug output enabled also print the contents of the Chip ID registers as a 40-bit hex string. As this detection is the first communication with the switch performed by the driver, making it

[PATCH net-next] cxgb4/ch_ipsec: Registering xfrmdev_ops with cxgb4

2020-09-09 Thread Ayush Sawal
As ch_ipsec was removed without clearing xfrmdev_ops and netdev feature(esp-hw-offload). When a recalculation of netdev feature is triggered by changing tls feature(tls-hw-tx-offload) from user request, it causes a page fault due to absence of valid xfrmdev_ops. Fixes: 6dad4e8ab3ec ("chcr: Add sup

Re: [PATCH bpf-next v3 3/8] libbpf: Add BPF_PROG_BIND_MAP syscall and use it on .metadata section

2020-09-09 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Mon, Sep 7, 2020 at 1:49 AM Toke Høiland-Jørgensen wrote: >> >> Andrii Nakryiko writes: >> >> >> May be we should talk about problem statement and goals. >> >> Do we actually need metadata per program or metadata per single .o >> >> or metadata per final .o with mul

Re: [PATCH][next] mt7601u: Use fallthrough pseudo-keyword

2020-09-09 Thread Joe Perches
On Tue, 2020-09-01 at 12:36 -0500, Gustavo A. R. Silva wrote: > Replace the existing /* fall through */ comments and its variants with > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary > fall-through markings when it is the case. [] > diff --git a/drivers/net/wireless/mediatek

Re: [PATCH v2 1/2] Bluetooth: btusb: define HCI packet sizes of USB Alts

2020-09-09 Thread Pali Rohár
On Wednesday 09 September 2020 17:42:01 Joseph Hwang wrote: > It is desirable to define the HCI packet payload sizes of > USB alternate settings so that they can be exposed to user > space. > > Reviewed-by: Alain Michaud > Reviewed-by: Abhishek Pandit-Subedi > Signed-off-by: Joseph Hwang > ---

答复: [PATCH net-next 1/1] net: usb: qmi_wwan: add default rx_urb_size

2020-09-09 Thread 殷张成
Hi Deniele: I have an idea, by now in order to use QMAP, must execute shell command 'echo mux_id > /sys/class/net//add_mux' in user space, maybe we can expand usage of sys attribute 'add_mux', like next: 'echo mux_id mux_size mux_version > /sys/class/net//add_mux'

Re: [PATCH v2 2/2] Bluetooth: sco: expose WBS packet length in socket option

2020-09-09 Thread Pali Rohár
On Wednesday 09 September 2020 17:42:02 Joseph Hwang wrote: > It is desirable to expose the wideband speech packet length via > a socket option to the user space so that the user space can set > the value correctly in configuring the sco connection. Hello! I'm fine with change below, but I would s

Re: [PATCH net-next 1/1] net: usb: qmi_wwan: add default rx_urb_size

2020-09-09 Thread Daniele Palmas
Hi Carl, Il giorno mer 9 set 2020 alle ore 13:09 Carl Yin(殷张成) ha scritto: > > Hi Deniele: > > I have an idea, by now in order to use QMAP, > must execute shell command 'echo mux_id > > /sys/class/net//add_mux' in user space, > maybe we can expand usage of sys attribute '

pull-request: wireless-drivers-2020-09-09

2020-09-09 Thread Kalle Valo
Hi, here's a pull request to net tree, more info below. Please let me know if there are any problems. Kalle The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: Linux 5.9-rc1 (2020-08-16 13:04:57 -0700) are available in the git repository at: git://git.kernel.org/p

[PATCH] net/netfilter: fix a typo for nf_conntrack_proto_dccp.c

2020-09-09 Thread Wang Qing
Change the comment typo: "direcly" -> "directly". Signed-off-by: Wang Qing --- net/netfilter/nf_conntrack_proto_dccp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c index b3f4a33..d9bb0ce ---

[PATCH] drivers/net/ethernet: fix a typo for stmmac_pltfr_suspend

2020-09-09 Thread Wang Qing
Change the comment typo: "direcly" -> "directly". Signed-off-by: Wang Qing --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/st

[PATCH net-next] ath5k: fix 'mode' kernel-doc warning in ath5k_hw_pcu_init()

2020-09-09 Thread Wang Hai
Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath5k/pcu.c:955: warning: Excess function parameter 'mode' description in 'ath5k_hw_pcu_init' This parameter is not in use. Remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/net/wireless/ath/ath5k/

[PATCH v1 net-next] net: phy: mchp: Add support for LAN8814 QUAD PHY

2020-09-09 Thread Divya Koppera
LAN8814 is a low-power, quad-port triple-speed (10BASE-T/100BASETX/1000BASE-T) Ethernet physical layer transceiver (PHY). It supports transmission and reception of data on standard CAT-5, as well as CAT-5e and CAT-6, unshielded twisted pair (UTP) cables. LAN8814 supports industry-standard QSGMII (

Re: [PATCH net-next 1/1] net: usb: qmi_wwan: add default rx_urb_size

2020-09-09 Thread Bjørn Mork
Daniele Palmas writes: > Il giorno mer 9 set 2020 alle ore 13:09 Carl Yin(殷张成) > ha scritto: >> >> Hi Deniele: >> >> I have an idea, by now in order to use QMAP, >> must execute shell command 'echo mux_id > >> /sys/class/net//add_mux' in user space, >> maybe we can expand

Re: [PATCH] net: fec: Fix PHY init after phy_reset_after_clk_enable()

2020-09-09 Thread Andrew Lunn
On Fri, Sep 04, 2020 at 12:45:44AM +0200, Marek Vasut wrote: > On 9/4/20 12:08 AM, Andrew Lunn wrote: > >>> b4 am 20200903043947.3272453-1-f.faine...@gmail.com > >> > >> That might be a fix for the long run, but I doubt there's any chance to > >> backport it all to stable, is there ? > > > > No. F

Re: [PATCH net-next 1/1] net: usb: qmi_wwan: add default rx_urb_size

2020-09-09 Thread Greg KH
On Wed, Sep 09, 2020 at 11:13:02AM +0200, Daniele Palmas wrote: > Add default rx_urb_size to support QMAP download data aggregation > without needing additional setup steps in userspace. > > The value chosen is the current highest one seen in available modems. > > The patch has the side-effect of

Re: [RFT net] net: ipa: fix u32_replace_bits by u32p_xxx version

2020-09-09 Thread Alex Elder
On 9/9/20 7:02 AM, Vadym Kochan wrote: > Hi Alex, > > On Wed, Sep 09, 2020 at 06:53:17AM -0500, Alex Elder wrote: >> On 9/8/20 9:32 AM, Vadym Kochan wrote: >>> Looks like u32p_replace_bits() should be used instead of >>> u32_replace_bits() which does not modifies the value but returns the >>> modi

Re: [RFT net] net: ipa: fix u32_replace_bits by u32p_xxx version

2020-09-09 Thread Vadym Kochan
Hi Alex, On Wed, Sep 09, 2020 at 06:53:17AM -0500, Alex Elder wrote: > On 9/8/20 9:32 AM, Vadym Kochan wrote: > > Looks like u32p_replace_bits() should be used instead of > > u32_replace_bits() which does not modifies the value but returns the > > modified version. > > > > Fixes: 2b9feef2b6c2 ("s

[PATCH net 2/2] wireguard: peerlookup: take lock before checking hash in replace operation

2020-09-09 Thread Jason A. Donenfeld
Eric's suggested fix for the previous commit's mentioned race condition was to simply take the table->lock in wg_index_hashtable_replace(). The table->lock of the hash table is supposed to protect the bucket heads, not the entires, but actually, since all the mutator functions are already taking it

[PATCH net 0/2] wireguard fixes for 5.9-rc5

2020-09-09 Thread Jason A. Donenfeld
Hi Dave, Yesterday, Eric reported a race condition found by syzbot. This series contains two commits, one that fixes the direct issue, and another that addresses the more general issue, as a defense in depth. 1) The basic problem syzbot unearthed was that one particular mutation of handshake->

[PATCH net 1/2] wireguard: noise: take lock when removing handshake entry from table

2020-09-09 Thread Jason A. Donenfeld
Eric reported that syzkaller found a race of this variety: CPU 1 CPU 2 ---|--- wg_index_hashtable_replace(old, ...) | if (hlist_unhashed(&old->index_hash))|

Re: [PATCH net 1/2] net: qrtr: check skb_put_padto() return value

2020-09-09 Thread Manivannan Sadhasivam
On 0909, Eric Dumazet wrote: > If skb_put_padto() returns an error, skb has been freed. > Better not touch it anymore, as reported by syzbot [1] > > Note to qrtr maintainers : this suggests qrtr_sendmsg() > should adjust sock_alloc_send_skb() second parameter > to account for the potential added a

[PATCH bpf-next 2/2] selftests/bpf: Adding test for arg dereference in extension trace

2020-09-09 Thread Jiri Olsa
Adding test that setup following program: SEC("classifier/test_pkt_md_access") int test_pkt_md_access(struct __sk_buff *skb) with its extension: SEC("freplace/test_pkt_md_access") int test_pkt_md_access_new(struct __sk_buff *skb) and tracing that extension with: SEC("fentry/test_pkt_

Re: [PATCH net-next v3 0/6] devlink show controller number

2020-09-09 Thread Jakub Kicinski
On Wed, 9 Sep 2020 07:50:32 +0300 Parav Pandit wrote: > From: Parav Pandit > > Hi Jakub, Dave, > > Currently a devlink instance that supports an eswitch handles eswitch > ports of two type of controllers. > (1) controller discovered on same system where eswitch resides. > This is the case where

Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full

2020-09-09 Thread Jesper Dangaard Brouer
On Tue, 8 Sep 2020 13:32:01 +0300 Maxim Mikityanskiy wrote: > From the driver API perspective, I would prefer to see a simpler API if > possible. The current API exposes things that the driver shouldn't know > (BPF map type), and requires XSK-specific handling. It would be better > if some sp

Re: [PATCH v2] net: phy: call phy_disable_interrupts() in phy_attach_direct() instead

2020-09-09 Thread Andrew Lunn
On Wed, Sep 09, 2020 at 04:18:56AM +, Yoshihiro Shimoda wrote: > Hi David, > > > From: David Miller, Sent: Wednesday, September 9, 2020 12:25 PM > > > > From: Yoshihiro Shimoda > > Date: Wed, 9 Sep 2020 08:55:38 +0900 > > > > > Changes from v1: > > > - Fix build error. > > > > When such

Re: [PATCH net-next] cxgb4/ch_ipsec: Registering xfrmdev_ops with cxgb4

2020-09-09 Thread Jakub Kicinski
On Wed, 9 Sep 2020 16:06:20 +0530 Ayush Sawal wrote: > As ch_ipsec was removed without clearing xfrmdev_ops and netdev > feature(esp-hw-offload). When a recalculation of netdev feature is > triggered by changing tls feature(tls-hw-tx-offload) from user > request, it causes a page fault due to abse

  1   2   3   4   >