Re: [RFC][Patch v1 1/3] sched/isolation: API to get num of hosekeeping CPUs

2020-09-17 Thread Jacob Keller
On 9/17/2020 1:11 PM, Bjorn Helgaas wrote: > [+cc Ingo, Peter, Juri, Vincent (scheduler maintainers)] > > s/hosekeeping/housekeeping/ (in subject) > > On Wed, Sep 09, 2020 at 11:08:16AM -0400, Nitesh Narayan Lal wrote: >> Introduce a new API num_housekeeping_cpus(), that can be used to retriev

Re: [RFC][Patch v1 1/3] sched/isolation: API to get num of hosekeeping CPUs

2020-09-17 Thread Nitesh Narayan Lal
On 9/17/20 4:11 PM, Bjorn Helgaas wrote: > [+cc Ingo, Peter, Juri, Vincent (scheduler maintainers)] > > s/hosekeeping/housekeeping/ (in subject) > > On Wed, Sep 09, 2020 at 11:08:16AM -0400, Nitesh Narayan Lal wrote: >> Introduce a new API num_housekeeping_cpus(), that can be used to retrieve >> t

Re: [PATCH] add virtual PHY for PHY-less devices

2020-09-17 Thread Andrew Lunn
On Fri, Sep 18, 2020 at 12:40:10AM +0300, Sergej Bauer wrote: > From: sba...@blackbox.su > > Here is a kernel related part of my work which was helps to develop brand > new PHY device. > > It is migth be helpful for developers work with PHY-less lan743x > (7431:0011 in my case). It's just

Re: [PATCH bpf-next] bpf: Use hlist_add_head_rcu when linking to local_storage

2020-09-17 Thread Song Liu
On Thu, Sep 17, 2020 at 9:57 AM Martin KaFai Lau wrote: > > The local_storage->list will be traversed by rcu reader in parallel. > Thus, hlist_add_head_rcu() is needed in bpf_selem_link_storage_nolock(). > This patch fixes it. > > This part of the code has recently been refactored in bpf-next > an

Re: [PATCH] add virtual PHY for PHY-less devices

2020-09-17 Thread Florian Fainelli
On 9/17/2020 2:40 PM, Sergej Bauer wrote: From: sba...@blackbox.su Here is a kernel related part of my work which was helps to develop brand new PHY device. It is migth be helpful for developers work with PHY-less lan743x (7431:0011 in my case). It's just a fake virtual PHY which c

[PATCH v2] net: use exponential backoff in netdev_wait_allrefs

2020-09-17 Thread Francesco Ruggeri
The combination of aca_free_rcu, introduced in commit 2384d02520ff ("net/ipv6: Add anycast addresses to a global hashtable"), and fib6_info_destroy_rcu, introduced in commit 9b0a8da8c4c6 ("net/ipv6: respect rcu grace period before freeing fib6_info"), can result in an extra rcu grace period being n

Re: [PATCH v3,net-next,0/4] Add Support for Marvell OcteonTX2 Cryptographic

2020-09-17 Thread Jakub Kicinski
On Thu, 17 Sep 2020 18:58:31 +0530 Srujana Challa wrote: > The following series adds support for Marvell Cryptographic Acceleration > Unit(CPT) on OcteonTX2 CN96XX SoC. > This series is tested with CRYPTO_EXTRA_TESTS enabled and > CRYPTO_DISABLE_TESTS disabled. No writeable debugfs files, please.

Re: [RFC PATCH] bpf: Fix potential call bpf_link_free() in atomic context

2020-09-17 Thread Song Liu
On Thu, Sep 17, 2020 at 12:46 AM Muchun Song wrote: > > The in_atomic macro cannot always detect atomic context. In particular, > it cannot know about held spinlocks in non-preemptible kernels. Although, > there is no user call bpf_link_put() with holding spinlock now. Be the > safe side, we can a

Re: [PATCH v8 bpf-next 6/7] bpf: allow for tailcalls in BPF subprograms for x64 JIT

2020-09-17 Thread Alexei Starovoitov
On Thu, Sep 17, 2020 at 3:51 PM Maciej Fijalkowski wrote: > > On Thu, Sep 17, 2020 at 02:03:32PM -0700, Andrii Nakryiko wrote: > > On Wed, Sep 16, 2020 at 3:54 PM Maciej Fijalkowski > > wrote: > > > > > > Relax verifier's restriction that was meant to forbid tailcall usage > > > when subprog coun

Re: [PATCH v8 bpf-next 6/7] bpf: allow for tailcalls in BPF subprograms for x64 JIT

2020-09-17 Thread Maciej Fijalkowski
On Thu, Sep 17, 2020 at 02:03:32PM -0700, Andrii Nakryiko wrote: > On Wed, Sep 16, 2020 at 3:54 PM Maciej Fijalkowski > wrote: > > > > Relax verifier's restriction that was meant to forbid tailcall usage > > when subprog count was higher than 1. > > > > Also, do not max out the stack depth of prog

Re: [PATCH rdma-next v2 0/3] Fix in-kernel active_speed type

2020-09-17 Thread Jason Gunthorpe
On Thu, Sep 17, 2020 at 07:35:20PM +0300, Leon Romanovsky wrote: > On Thu, Sep 17, 2020 at 08:41:54AM -0300, Jason Gunthorpe wrote: > > On Thu, Sep 17, 2020 at 12:02:20PM +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > Changelog: > > > v2: > > > * Changed WARN_ON casting to

Re: [PATCH v2] net: use exponential backoff in netdev_wait_allrefs

2020-09-17 Thread David Miller
From: frugg...@arista.com (Francesco Ruggeri) Date: Thu, 17 Sep 2020 15:19:22 -0700 > static void netdev_wait_allrefs(struct net_device *dev) > { > unsigned long rebroadcast_time, warning_time; > int refcnt; > + unsigned int wait = MIN_MSLEEP; Please preserve the reverse christm

Re: [PATCH V2 net-next 0/6] net: hns3: updates for -next

2020-09-17 Thread David Miller
From: Huazhong Tan Date: Wed, 16 Sep 2020 17:33:44 +0800 > There are some optimizations related to IO path. > > Change since V1: > - fixes a unsuitable handling in hns3_lb_clear_tx_ring() of #6 which > pointed out by Saeed Mahameed. > > previous version: > V1: > https://patchwork.ozlabs.org/

Re: [PATCH bpf-next] bpf: add support for other map types to bpf_map_lookup_and_delete_elem

2020-09-17 Thread Song Liu
On Thu, Sep 17, 2020 at 7:16 AM Luka Oreskovic wrote: > [...] > +++ b/kernel/bpf/syscall.c > @@ -1475,6 +1475,9 @@ static int map_lookup_and_delete_elem(union bpf_attr > *attr) > if (CHECK_ATTR(BPF_MAP_LOOKUP_AND_DELETE_ELEM)) > return -EINVAL; > > + if (attr->flags

Re: [PATCH v3] hv_netvsc: Add validation for untrusted Hyper-V values

2020-09-17 Thread David Miller
From: "Andrea Parri (Microsoft)" Date: Wed, 16 Sep 2020 11:47:27 +0200 > From: Andres Beltran > > For additional robustness in the face of Hyper-V errors or malicious > behavior, validate all values that originate from packets that Hyper-V > has sent to the guest in the host-to-guest ring buffe

Re: [PATCH net-next] net/packet: Fix a comment about mac_header

2020-09-17 Thread David Miller
From: Xie He Date: Wed, 16 Sep 2020 05:23:08 -0700 > 1. Change all "dev->hard_header" to "dev->header_ops" > > 2. On receiving incoming frames when header_ops == NULL: > > The comment only says what is wrong, but doesn't say what is right. > This patch changes the comment to make it clear what

Re: [PATCH net-next] selftests: mptcp: interpret \n as a new line

2020-09-17 Thread David Miller
From: Matthieu Baerts Date: Wed, 16 Sep 2020 15:13:51 +0200 > In case of errors, this message was printed: > > (...) > # read: Resource temporarily unavailable > # client exit code 0, server 3 > # \nnetns ns1-0-BJlt5D socket stat for 10003: > (...) > > Obviously, the idea was to add

Re: [PATCH bpf v1] tools/bpftool: support passing BPFTOOL_VERSION to make

2020-09-17 Thread Song Liu
On Thu, Sep 17, 2020 at 7:58 AM Quentin Monnet wrote: > > On 17/09/2020 12:58, Tony Ambardar wrote: > > This change facilitates out-of-tree builds, packaging, and versioning for > > test and debug purposes. Defining BPFTOOL_VERSION allows self-contained > > builds within the tools tree, since it a

Re: [PATCH net-next] net/sched: Remove unused function qdisc_queue_drop_head()

2020-09-17 Thread David Miller
From: YueHaibing Date: Wed, 16 Sep 2020 22:16:29 +0800 > It is not used since commit a09ceb0e0814 ("sched: remove qdisc->drop") > > Signed-off-by: YueHaibing Applied.

Re: [PATCH net-next] genetlink: Remove unused function genl_err_attr()

2020-09-17 Thread David Miller
From: YueHaibing Date: Wed, 16 Sep 2020 22:17:28 +0800 > It is never used, so can remove it. > > Signed-off-by: YueHaibing Applied.

Re: [PATCH v3,net-next,3/4] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-09-17 Thread kernel test robot
Hi Srujana, I love your patch! Yet something to improve: [auto build test ERROR on cryptodev/master] [also build test ERROR on crypto/master sparc-next/master v5.9-rc5 next-20200917] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to

Re: [PATCH net] cxgb4: fix memory leak during module unload

2020-09-17 Thread David Miller
From: Raju Rangoju Date: Wed, 16 Sep 2020 21:50:39 +0530 > Fix the memory leak in mps during module unload > path by freeing mps reference entries if the list > adpter->mps_ref is not already empty > > Fixes: 28b3870578ef ("cxgb4: Re-work the logic for mps refcounting") > Signed-off-by: Raju Ran

Re: [PATCH net-next v9 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x)

2020-09-17 Thread David Miller
From: Vadym Kochan Date: Wed, 16 Sep 2020 19:30:56 +0300 > Marvell Prestera 98DX3255 integrates up to 24 ports of 1GbE with 8 > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely > wireless SMB deployment. > > Prestera Switchdev is a firmware based driver that operates via PCI bu

Re: [PATCH net] drivers/net/wan/lapbether: Make skb->protocol consistent with the header

2020-09-17 Thread David Miller
From: Xie He Date: Wed, 16 Sep 2020 09:49:18 -0700 > This driver is a virtual driver stacked on top of Ethernet interfaces. > > When this driver transmits data on the Ethernet device, the skb->protocol > setting is inconsistent with the Ethernet header prepended to the skb. > > This causes a us

Re: [PATCH net-next 1/2] net: mdio: mdio-bcm-unimac: Turn on PHY clock before dummy read

2020-09-17 Thread David Miller
From: Florian Fainelli Date: Wed, 16 Sep 2020 13:44:14 -0700 > @@ -160,6 +160,7 @@ static int unimac_mdio_reset(struct mii_bus *bus) > { > struct device_node *np = bus->dev.of_node; > struct device_node *child; > + struct clk *clk; > u32 read_mask = 0; > int addr; Pl

Re: [PATCH net] drivers/net/wan/hdlc: Set skb->protocol before transmitting

2020-09-17 Thread David Miller
From: Xie He Date: Wed, 16 Sep 2020 14:25:07 -0700 > This patch sets skb->protocol before transmitting frames on the HDLC > device, so that a user listening on the HDLC device with an AF_PACKET > socket will see outgoing frames' sll_protocol field correctly set and > consistent with that of incom

Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-17 Thread Vladimir Oltean
On Wed, Sep 16, 2020 at 05:19:26PM -0700, David Miller wrote: > From: Vladimir Oltean > Date: Tue, 15 Sep 2020 21:22:24 +0300 > > > This is a problem because, at least theoretically, another timestampable > > skb might use the same ocelot_port->ts_id before that is incremented. So > > the logic of

Re: [PATCH net] ethtool: add and use message type for tunnel info reply

2020-09-17 Thread David Miller
From: Michal Kubecek Date: Thu, 17 Sep 2020 01:04:10 +0200 (CEST) > Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd > field in genetlink header) for replies to tunnel info netlink request, i.e. > the same value as the request have. This is a problem because we are usin

[PATCH v3] net: use exponential backoff in netdev_wait_allrefs

2020-09-17 Thread Francesco Ruggeri
The combination of aca_free_rcu, introduced in commit 2384d02520ff ("net/ipv6: Add anycast addresses to a global hashtable"), and fib6_info_destroy_rcu, introduced in commit 9b0a8da8c4c6 ("net/ipv6: respect rcu grace period before freeing fib6_info"), can result in an extra rcu grace period being n

Re: [PATCH v2 net-next] netdev: Remove unused functions

2020-09-17 Thread David Miller
From: YueHaibing Date: Thu, 17 Sep 2020 10:19:10 +0800 > There is no callers in tree, so can remove it. > > Signed-off-by: YueHaibing > Reviewed-by: Saeed Mahameed > --- > v2: fix title typo 'funtions' --> 'functions' Applied, thank you.

Re: [PATCH net-next] netlink: add spaces around '&' in netlink_recv/sendmsg()

2020-09-17 Thread David Miller
From: Yang Yingliang Date: Thu, 17 Sep 2020 11:32:23 +0800 > It's hard to read the code without spaces around '&', > for better reading, add spaces around '&'. > > Signed-off-by: Yang Yingliang Applied.

Re: [PATCH net 0/2] net: phy: Unbind fixes

2020-09-17 Thread David Miller
From: Florian Fainelli Date: Wed, 16 Sep 2020 20:43:08 -0700 > This patch series fixes a couple of issues with the unbinding of the PHY > drivers and then bringing down a network interface. The first is a NULL > pointer de-reference and the second was an incorrect warning being > triggered. Seri

Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-17 Thread David Miller
From: Vladimir Oltean Date: Fri, 18 Sep 2020 02:43:40 +0300 > On Wed, Sep 16, 2020 at 05:19:26PM -0700, David Miller wrote: >> From: Vladimir Oltean >> Date: Tue, 15 Sep 2020 21:22:24 +0300 >> >> > This is a problem because, at least theoretically, another timestampable >> > skb might use the sa

Re: [PATCH v3] net: use exponential backoff in netdev_wait_allrefs

2020-09-17 Thread Stephen Hemminger
On Thu, 17 Sep 2020 16:49:53 -0700 frugg...@arista.com (Francesco Ruggeri) wrote: > The combination of aca_free_rcu, introduced in commit 2384d02520ff > ("net/ipv6: Add anycast addresses to a global hashtable"), and > fib6_info_destroy_rcu, introduced in commit 9b0a8da8c4c6 ("net/ipv6: > respect r

Re: [PATCH net-next 0/3] mlxsw: Support dcbnl_setbuffer, dcbnl_getbuffer

2020-09-17 Thread David Miller
From: Ido Schimmel Date: Thu, 17 Sep 2020 09:49:00 +0300 > From: Ido Schimmel > > Petr says: > > On Spectrum, port buffers, also called port headroom, is where packets are > stored while they are parsed and the forwarding decision is being made. For > lossless traffic flows, in case shared buf

Re: [PATCH net v2] hinic: fix potential resource leak

2020-09-17 Thread David Miller
From: Wei Li Date: Thu, 17 Sep 2020 20:29:50 +0800 > In rx_request_irq(), it will just return what irq_set_affinity_hint() > returns. If it is failed, the napi and irq requested are not freed > properly. So add exits for failures to handle these. > > Signed-off-by: Wei Li > --- > v1 -> v2: > -

Re: [PATCH -next v2] dpaa2-eth: Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-17 Thread David Miller
From: Qinglang Miao Date: Thu, 17 Sep 2020 20:45:08 +0800 > Signed-off-by: Qinglang Miao > --- > v2: based on linux-next(20200917), and can be applied to > mainline cleanly now. Applied.

Re: [PATCH -next v2] net: hsr: Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-17 Thread David Miller
From: Qinglang Miao Date: Thu, 17 Sep 2020 20:45:07 +0800 > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Qinglang Miao > --- > v2: based on linux-next(20200917), and can be applied to > mainline cleanly now. Applied.

Re: [PATCH net-next] selftests: Set default protocol for raw sockets in nettest

2020-09-17 Thread David Miller
From: David Ahern Date: Thu, 17 Sep 2020 09:13:33 -0600 > IPPROTO_IP (0) is not valid for raw sockets. Default the protocol for > raw sockets to IPPROTO_RAW if the protocol has not been set via the -P > option. > > Signed-off-by: David Ahern Applied, thanks David.

Re: [PATCH] add virtual PHY for PHY-less devices

2020-09-17 Thread Sergej Bauer
Hi Andrew To tell the truth, I thought that fixed_phy is only for devices with a Device Trees and I never met DTS on x86 machines... So it looks like there realy no any significant advantage _except_ of ability to use ethtool and ioctl to set speed and rx-all/fcs flags without removing module.

Re: [PATCH net-next 1/2] net: mdio: mdio-bcm-unimac: Turn on PHY clock before dummy read

2020-09-17 Thread Florian Fainelli
On 9/17/2020 4:40 PM, David Miller wrote: From: Florian Fainelli Date: Wed, 16 Sep 2020 13:44:14 -0700 @@ -160,6 +160,7 @@ static int unimac_mdio_reset(struct mii_bus *bus) { struct device_node *np = bus->dev.of_node; struct device_node *child; + struct clk *clk;

Re: [PATCH v3] net: use exponential backoff in netdev_wait_allrefs

2020-09-17 Thread Francesco Ruggeri
On Thu, Sep 17, 2020 at 5:02 PM Stephen Hemminger wrote: > Is there anyway to make RCU trigger faster? This is a case of the networking code requiring multiple cascading grace periods (functions executing at the end of a period scheduling more functions for the end of the next period), so it's a

[net-next v6 4/5] netdevsim: add support for flash_update overwrite mask

2020-09-17 Thread Jacob Keller
The devlink interface recently gained support for a new "overwrite mask" parameter that allows specifying how various sub-sections of a flash component are modified when updating. Add support for this to netdevsim, to enable easily testing the interface. Make the allowed overwrite mask values cont

[net-next v6 3/5] devlink: introduce flash update overwrite mask

2020-09-17 Thread Jacob Keller
Sections of device flash may contain settings or device identifying information. When performing a flash update, it is generally expected that these settings and identifiers are not overwritten. However, it may sometimes be useful to allow overwriting these fields when performing a flash update. S

[net-next v6 0/5] devlink flash update overwrite mask

2020-09-17 Thread Jacob Keller
This series introduces support for a new attribute to the flash update command: DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK. This attribute is a bitfield which allows userspace to specify what set of subfields to overwrite when performing a flash update for a device. The intention is to support the

[net-next v6 5/5] ice: add support for flash update overwrite mask

2020-09-17 Thread Jacob Keller
Support the recently added DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK parameter in the ice flash update handler. Convert the overwrite mask bitfield into the appropriate preservation level used by the firmware when updating. Because there is no equivalent preservation level for overwriting only iden

[net-next v6 2/5] devlink: convert flash_update to use params structure

2020-09-17 Thread Jacob Keller
The devlink core recently gained support for checking whether the driver supports a flash_update parameter, via `supported_flash_update_params`. However, parameters are specified as function arguments. Adding a new parameter still requires modifying the signature of the .flash_update callback in al

[net-next v6 1/5] devlink: check flash_update parameter support in net core

2020-09-17 Thread Jacob Keller
When implementing .flash_update, drivers which do not support per-component update are manually checking the component parameter to verify that it is NULL. Without this check, the driver might accept an update request with a component specified even though it will not honor such a request. Instead

Re: [PATCH net-next] net: remove comments on struct rtnl_link_stats

2020-09-17 Thread David Miller
From: Jakub Kicinski Date: Thu, 17 Sep 2020 10:51:32 -0700 > We removed the misleading comments from struct rtnl_link_stats64 > when we added proper kdoc. struct rtnl_link_stats has the same > inline comments, so remove them, too. > > Signed-off-by: Jakub Kicinski Applied, thank you.

Re: [PATCH] add virtual PHY for PHY-less devices

2020-09-17 Thread Sergej Bauer
Hi Florian The fixed-PHY driver looks a little bit hardly tunable, please look at https://www.lkml.org/lkml/2020/9/17/1424 This is not my idea. This is a request of HW team, and I thnk it will be useful for someone else. But I'll try to combine fixed-phy with virtual-PHY tomorrow. It just to r

Re: [PATCH net] nfp: use correct define to return NONE fec

2020-09-17 Thread David Miller
From: Jakub Kicinski Date: Thu, 17 Sep 2020 10:52:57 -0700 > struct ethtool_fecparam carries bitmasks not bit numbers. > We want to return 1 (NONE), not 0. > > Fixes: 0d0870938337 ("nfp: implement ethtool FEC mode settings") > Signed-off-by: Jakub Kicinski Applied and queued up for -stable, th

Re: [PATCH v2 net-next] ionic: add DIMLIB to Kconfig

2020-09-17 Thread David Miller
From: Shannon Nelson Date: Thu, 17 Sep 2020 13:33:35 -0700 >>> ld.lld: error: undefined symbol: net_dim_get_rx_moderation >>>> referenced by ionic_lif.c:52 > (drivers/net/ethernet/pensando/ionic/ionic_lif.c:52) >>>> net/ethernet/pensando/ionic/ionic_lif.o:(ionic_dim_work) in archive > d

Re: [PATCH net-next 1/1] net/smc: fix double kfree in smc_listen_work()

2020-09-17 Thread David Miller
From: Karsten Graul Date: Thu, 17 Sep 2020 22:46:02 +0200 > From: Ursula Braun > > If smc_listen_rmda_finish() returns with an error, the storage > addressed by 'buf' is freed a second time. > Consolidate freeing under a common label and jump to that label. > > Fixes: 6bb14e48ee8d ("net/smc: d

Re: [PATCH net-next] mptcp: fix integer overflow in mptcp_subflow_discard_data()

2020-09-17 Thread David Miller
From: Paolo Abeni Date: Thu, 17 Sep 2020 23:07:24 +0200 > Christoph reported an infinite loop in the subflow receive path > under stress condition. > > If there are multiple subflows, each of them using a large send > buffer, the delta between the sequence number used by > MPTCP-level retransmis

Re: [PATCH net-next 1/2] net: mdio: mdio-bcm-unimac: Turn on PHY clock before dummy read

2020-09-17 Thread David Miller
From: Florian Fainelli Date: Thu, 17 Sep 2020 17:18:42 -0700 > > > On 9/17/2020 4:40 PM, David Miller wrote: >> From: Florian Fainelli >> Date: Wed, 16 Sep 2020 13:44:14 -0700 >> >>> @@ -160,6 +160,7 @@ static int unimac_mdio_reset(struct mii_bus *bus) >>> { >>> struct device_node *np =

[PATCH v2 net 5/8] net: mscc: ocelot: error checking when calling ocelot_init()

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean ocelot_init() allocates memory, resets the switch and polls for a status register, things which can fail. Stop probing the driver in that case, and propagate the error result. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur --- Changes in v2: Stopped leaking th

[PATCH v2 net 7/8] net: mscc: ocelot: unregister net devices on unbind

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean This driver was not unregistering its network interfaces on unbind. Now it is. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur --- Changes in v2: No longer call mscc_ocelot_release_ports from the regular exit path of mscc_ocelot_init_ports, which was incorrect.

[PATCH v2 net 6/8] net: mscc: ocelot: refactor ports parsing code into a dedicated function

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean mscc_ocelot_probe() is already pretty large and hard to follow. So move the code for parsing ports in a separate function. This makes it easier for the next patch to just call mscc_ocelot_release_ports from the error path of mscc_ocelot_init_ports. Signed-off-by: Vladimir

[PATCH v2 net 8/8] net: mscc: ocelot: deinitialize only initialized ports

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean Currently mscc_ocelot_init_ports() will skip initializing a port when it doesn't have a phy-handle, so the ocelot->ports[port] pointer will be NULL. Take this into consideration when tearing down the driver, and add a new function ocelot_deinit_port() to the switch library,

[PATCH v2 net 3/8] net: dsa: seville: fix buffer size of the queue system

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean The VSC9953 Seville switch has 2 megabits of buffer split into 4360 words of 60 bytes each. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur --- Changes in v2: None. drivers/net/dsa/ocelot/seville_vsc9953.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH bpf v1] tools/bpftool: support passing BPFTOOL_VERSION to make

2020-09-17 Thread Tony Ambardar
On Thu, 17 Sep 2020 at 16:27, Song Liu wrote: > > On Thu, Sep 17, 2020 at 7:58 AM Quentin Monnet wrote: > > > > On 17/09/2020 12:58, Tony Ambardar wrote: > > > This change facilitates out-of-tree builds, packaging, and versioning for > > > test and debug purposes. Defining BPFTOOL_VERSION allows

[PATCH v2 net 0/8] Bugfixes in Microsemi Ocelot switch driver

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean This is a series of 8 assorted patches for "net", on the drivers for the VSC7514 MIPS switch (Ocelot-1), the VSC9953 PowerPC (Seville), and a few more that are common to all supported devices since they are in the common library portion. Vladimir Oltean (8): net: mscc: oc

[PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean The TX-timestampable skb is added late to the ocelot_port->tx_skbs. It is in a race with the TX timestamp IRQ, which checks that queue trying to match the timestamp with the skb by the ts_id. The skb should be added to the queue before the IRQ can fire. Fixes: 4e3b0468e6d7

[PATCH v2 net 2/8] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean The ocelot_port->ts_id is used to: (a) populate skb->cb[0] for matching the TX timestamp in the PTP IRQ with an skb. (b) populate the REW_OP from the injection header of the ongoing skb. Only then is ocelot_port->ts_id incremented. This is a problem because, at least th

[PATCH v2 net 4/8] net: mscc: ocelot: check for errors on memory allocation of ports

2020-09-17 Thread Vladimir Oltean
From: Vladimir Oltean Do not proceed probing if we couldn't allocate memory for the ports array, just error out. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur --- Changes in v2: Stopped leaking the 'ports' OF node. drivers/net/ethernet/mscc/ocelot_vsc7514.c | 4 1 file chan

[PATCH v5 net-next 4/5] ionic: update the fw update api

2020-09-17 Thread Shannon Nelson
Add the rest of the firmware api bits needed to support the driver running a firmware update. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_if.h| 33 ++- .../net/ethernet/pensando/ionic/ionic_main.c | 4 +++ 2 files changed, 29 insertions(+), 8 del

[PATCH v5 net-next 1/5] devlink: add timeout information to status_notify

2020-09-17 Thread Shannon Nelson
Add a timeout element to the DEVLINK_CMD_FLASH_UPDATE_STATUS netlink message for use by a userland utility to show that a particular firmware flash activity may take a long but bounded time to finish. Also add a handy helper for drivers to make use of the new timeout value. UI usage hints: - if

[PATCH v5 net-next 3/5] netdevsim: devlink flash timeout message

2020-09-17 Thread Shannon Nelson
Add a simple devlink flash timeout message to exercise the message mechanism. Signed-off-by: Shannon Nelson --- drivers/net/netdevsim/dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index 32f339fedb21..e41f85c75699 100644 ---

[PATCH v5 net-next 5/5] ionic: add devlink firmware update

2020-09-17 Thread Shannon Nelson
Add support for firmware update through the devlink interface. This update copies the firmware object into the device, asks the current firmware to install it, then asks the firmware to select the new firmware for the next boot-up. The install and select steps are launched as asynchronous requests

[PATCH v5 net-next 0/5] ionic: add devlink dev flash support

2020-09-17 Thread Shannon Nelson
Add support for using devlink's dev flash facility to update the firmware on an ionic device, and add a new timeout parameter to the devlink flash netlink message. For long-running flash commands, we add a timeout element to the dev flash notify message in order for a userland utility to display a

[PATCH v5 net-next 2/5] devlink: collect flash notify params into a struct

2020-09-17 Thread Shannon Nelson
The dev flash status notify function parameter lists are getting rather long, so add a struct to be filled and passed rather than continuously changing the function signatures. Signed-off-by: Shannon Nelson Reviewed-by: Jacob Keller --- include/net/devlink.h | 19 +++ net/core/devli

Re: [PATCH] random32: Use rcuidle variant for tracepoint

2020-09-17 Thread Steven Rostedt
[ Late reply, due to Plumbers followed by a much needed vacation and then drowning in 3 weeks of unread email! ] On Fri, 21 Aug 2020 17:35:32 +0200 Marco Elver wrote: > So, if the _rcuidle() variant here doesn't break your usecase, there > should be no harm in using the _rcuidle() variant. T

Re: [PATCH net-next] genetlink: Remove unused function genl_err_attr()

2020-09-17 Thread Yuehaibing
On 2020/9/18 2:34, Cong Wang wrote: > On Wed, Sep 16, 2020 at 9:33 AM YueHaibing wrote: >> >> It is never used, so can remove it. > > This is a bit confusing, it was actually used before, see commit > ab0d76f6823cc3a4e2. Yes,thanks for reminding, will be careful later. > . >

Re: [PATCH] add virtual PHY for PHY-less devices

2020-09-17 Thread Florian Fainelli
(please do not top-post) On 9/17/2020 5:17 PM, Sergej Bauer wrote: Hi Andrew To tell the truth, I thought that fixed_phy is only for devices with a Device Trees and I never met DTS on x86 machines... fixed_phy existed long before Device Tree was popular and you can register a fixed PHY de

Re: [PATCH net-next v2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-17 Thread Andrew Lunn
On Wed, Sep 16, 2020 at 07:04:13PM -0700, Florian Fainelli wrote: > The internal Gigabit PHY on Broadcom STB chips has a digital clock which > drives its MDIO interface among other things, the driver now requests > and manage that clock during .probe() and .remove() accordingly. > > Because the PH

Re: [PATCH v4] perf metricgroup: Fix uncore metric expressions

2020-09-17 Thread Namhyung Kim
Hi Arnaldo, On Fri, Sep 18, 2020 at 5:39 AM Arnaldo Carvalho de Melo wrote: > > Em Thu, Sep 17, 2020 at 01:18:07PM -0700, Ian Rogers escreveu: > > A metric like DRAM_BW_Use has on SkylakeX events uncore_imc/cas_count_read/ > > and uncore_imc/case_count_write/. These events open 6 events per socke

Re: [PATCH v3 net-next 1/9] net: devlink: regions: Add a priv member to the regions ops struct

2020-09-17 Thread Florian Fainelli
On 9/9/2020 4:58 PM, Andrew Lunn wrote: The driver may have multiple regions which can be dumped using one function. However, for this to work, additional information is needed. Add a priv member to the ops structure for the driver to use however it likes. Signed-off-by: Andrew Lunn Review

Re: [PATCH v3 net-next 4/9] net: dsa: Add devlink regions support to DSA

2020-09-17 Thread Florian Fainelli
On 9/9/2020 4:58 PM, Andrew Lunn wrote: Allow DSA drivers to make use of devlink regions, via simple wrappers. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

[PATCH AUTOSEL 5.4 111/330] Bluetooth: Fix refcount use-after-free issue

2020-09-17 Thread Sasha Levin
From: Manish Mandlik [ Upstream commit 6c08fc896b60893c5d673764b0668015d76df462 ] There is no lock preventing both l2cap_sock_release() and chan->ops->close() from running at the same time. If we consider Thread A running l2cap_chan_timeout() and Thread B running l2cap_sock_release(), expected

[PATCH AUTOSEL 5.4 166/330] ath10k: use kzalloc to read for ath10k_sdio_hif_diag_read

2020-09-17 Thread Sasha Levin
From: Wen Gong [ Upstream commit 402f2992b4d62760cce7c689ff216ea3bf4d6e8a ] When use command to read values, it crashed. command: dd if=/sys/kernel/debug/ieee80211/phy0/ath10k/mem_value count=1 bs=4 skip=$((0x100233)) It will call to ath10k_sdio_hif_diag_read with address = 0x4008cc and buf_l

[PATCH AUTOSEL 5.4 244/330] net: openvswitch: use u64 for meter bucket

2020-09-17 Thread Sasha Levin
From: Tonghao Zhang [ Upstream commit e57358873bb5d6caa882b9684f59140912b37dde ] When setting the meter rate to 4+Gbps, there is an overflow, the meters don't work as expected. Cc: Pravin B Shelar Cc: Andy Zhou Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. M

[PATCH AUTOSEL 5.4 264/330] tipc: fix memory leak in service subscripting

2020-09-17 Thread Sasha Levin
From: Tuong Lien [ Upstream commit 0771d7df819284d46cf5cfb57698621b503ec17f ] Upon receipt of a service subscription request from user via a topology connection, one 'sub' object will be allocated in kernel, so it will be able to send an event of the service if any to the user correspondingly th

[PATCH AUTOSEL 5.4 329/330] net: openvswitch: use div_u64() for 64-by-32 divisions

2020-09-17 Thread Sasha Levin
From: Tonghao Zhang [ Upstream commit 659d4587fe7233bfdff303744b20d6f41ad04362 ] Compile the kernel for arm 32 platform, the build warning found. To fix that, should use div_u64() for divisions. | net/openvswitch/meter.c:396: undefined reference to `__udivdi3' [add more commit msg, change repor

[PATCH AUTOSEL 5.4 300/330] wlcore: fix runtime pm imbalance in wl1271_tx_work

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 9604617e998b49f7695fea1479ed82421ef8c9f0 ] There are two error handling paths in this functon. When wlcore_tx_work_locked() returns an error code, we should decrease the runtime PM usage counter the same way as the error handling path beginning from pm_runtime

[PATCH AUTOSEL 4.19 045/206] ipv6_route_seq_next should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit 4fc427e0515811250647d44de38d87d7b0e0790f ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.19 043/206] neigh_stat_seq_next() should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit 1e3f9f073c47bee7c23e77316b07bc12338c5bba ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.19 095/206] Bluetooth: guard against controllers sending zero'd events

2020-09-17 Thread Sasha Levin
From: Alain Michaud [ Upstream commit 08bb4da90150e2a225f35e0f642cdc463958d696 ] Some controllers have been observed to send zero'd events under some conditions. This change guards against this condition as well as adding a trace to facilitate diagnosability of this condition. Signed-off-by: A

[PATCH AUTOSEL 4.19 160/206] Bluetooth: Handle Inquiry Cancel error after Inquiry Complete

2020-09-17 Thread Sasha Levin
From: Sonny Sasaka [ Upstream commit adf1d6926444029396861413aba8a0f2a805742a ] After sending Inquiry Cancel command to the controller, it is possible that Inquiry Complete event comes before Inquiry Cancel command complete event. In this case the Inquiry Cancel command will have status of Comma

[PATCH AUTOSEL 4.14 063/127] Bluetooth: L2CAP: handle l2cap config request during open state

2020-09-17 Thread Sasha Levin
From: Howard Chung [ Upstream commit 96298f640104e4cd9a913a6e50b0b981829b94ff ] According to Core Spec Version 5.2 | Vol 3, Part A 6.1.5, the incoming L2CAP_ConfigReq should be handled during OPEN state. The section below shows the btmon trace when running L2CAP/COS/CFD/BV-12-C before and after

[PATCH AUTOSEL 4.9 33/90] skbuff: fix a data race in skb_queue_len()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 86b18aaa2b5b5bb48e609cd591b3d2d0fdbe0442 ] sk_buff.qlen can be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_dgram_sendmsg read to 0x8a1b1d8a81c0 of 4 bytes by task 5371 on cpu 96: unix_dgram_sendms

[PATCH AUTOSEL 4.9 18/90] neigh_stat_seq_next() should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit 1e3f9f073c47bee7c23e77316b07bc12338c5bba ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.4 20/64] Bluetooth: Fix refcount use-after-free issue

2020-09-17 Thread Sasha Levin
From: Manish Mandlik [ Upstream commit 6c08fc896b60893c5d673764b0668015d76df462 ] There is no lock preventing both l2cap_sock_release() and chan->ops->close() from running at the same time. If we consider Thread A running l2cap_chan_timeout() and Thread B running l2cap_sock_release(), expected

[PATCH AUTOSEL 4.4 19/64] ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter

2020-09-17 Thread Sasha Levin
From: Mert Dirik [ Upstream commit 5b362498a79631f283578b64bf6f4d15ed4cc19a ] Add the required USB ID for running SMCWUSBT-G2 wireless adapter (SMC "EZ Connect g"). This device uses ar5523 chipset and requires firmware to be loaded. Even though pid of the device is 4507, this patch adds it as 4

[PATCH AUTOSEL 4.4 55/64] e1000: Do not perform reset in reset_task if we are already down

2020-09-17 Thread Sasha Levin
From: Alexander Duyck [ Upstream commit 49ee3c2ab5234757bfb56a0b3a3cb422f427e3a3 ] We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks th

[PATCH AUTOSEL 4.4 49/64] Bluetooth: Handle Inquiry Cancel error after Inquiry Complete

2020-09-17 Thread Sasha Levin
From: Sonny Sasaka [ Upstream commit adf1d6926444029396861413aba8a0f2a805742a ] After sending Inquiry Cancel command to the controller, it is possible that Inquiry Complete event comes before Inquiry Cancel command complete event. In this case the Inquiry Cancel command will have status of Comma

[PATCH AUTOSEL 4.4 47/64] atm: fix a memory leak of vcc->user_back

2020-09-17 Thread Sasha Levin
From: Cong Wang [ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ] In lec_arp_clear_vccs() only entry->vcc is freed, but vcc could be installed on entry->recv_vcc too in lec_vcc_added(). This fixes the following memory leak: unreferenced object 0x8880d9266b90 (size 16): comm "a

[PATCH AUTOSEL 4.4 37/64] SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'

2020-09-17 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit b25b60d7bfb02a74bc3c2d998e09aab159df8059 ] 'maxlen' is the total size of the destination buffer. There is only one caller and this value is 256. When we compute the size already used and what we would like to add in the buffer, the trailling NULL chara

[PATCH AUTOSEL 4.4 23/64] skbuff: fix a data race in skb_queue_len()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 86b18aaa2b5b5bb48e609cd591b3d2d0fdbe0442 ] sk_buff.qlen can be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_dgram_sendmsg read to 0x8a1b1d8a81c0 of 4 bytes by task 5371 on cpu 96: unix_dgram_sendms

[PATCH AUTOSEL 4.4 32/64] Bluetooth: L2CAP: handle l2cap config request during open state

2020-09-17 Thread Sasha Levin
From: Howard Chung [ Upstream commit 96298f640104e4cd9a913a6e50b0b981829b94ff ] According to Core Spec Version 5.2 | Vol 3, Part A 6.1.5, the incoming L2CAP_ConfigReq should be handled during OPEN state. The section below shows the btmon trace when running L2CAP/COS/CFD/BV-12-C before and after

[PATCH AUTOSEL 4.4 22/64] Bluetooth: prefetch channel before killing sock

2020-09-17 Thread Sasha Levin
From: Hillf Danton [ Upstream commit 2a154903cec20fb64ff4d7d617ca53c16f8fd53a ] Prefetch channel before killing sock in order to fix UAF like BUG: KASAN: use-after-free in l2cap_sock_release+0x24c/0x290 net/bluetooth/l2cap_sock.c:1212 Read of size 8 at addr 8880944904a0 by task syz-fuzze

<    1   2   3   4   5   >