Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Dmitry Vyukov
On Sun, Mar 3, 2019 at 4:19 PM Al Viro wrote: > > On Sun, Mar 03, 2019 at 01:55:02PM +, Al Viro wrote: > > > Maybe unrelated to this bug, but... What's to prevent a wakeup > > that happens just after we'd been added to a waitqueue by ->poll() > > triggering aio_poll_wake(), which gets to aio_

Re: [PATCH] net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm

2019-03-03 Thread kbuild test robot
Hi Su, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] [also build test WARNING on v5.0 next-20190301] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

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

2019-03-03 Thread Jiri Pirko
Sat, Mar 02, 2019 at 08:07:24PM CET, jakub.kicin...@netronome.com wrote: >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 fi

Re: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_add

2019-03-03 Thread Dmitry Vyukov
On Mon, Sep 10, 2018 at 10:31 AM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:f6f3bac08ff9 tools/bpf: bpftool: add net support > git tree: bpf-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1794005640 > kernel config: https://sy

Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours

2019-03-03 Thread Jiri Pirko
Mon, Mar 04, 2019 at 05:59:04AM CET, pa...@mellanox.com wrote: > > >> -Original Message- >> From: netdev-ow...@vger.kernel.org On >> Behalf Of Jiri Pirko >> Sent: Wednesday, February 27, 2019 6:17 AM >> To: Jakub Kicinski >> Cc: da...@davemloft.net; oss-driv...@netronome.com; >> netdev@vg

RE: Question about setting speed and duplex failed after auto-negotiation disabled on marvell phy

2019-03-03 Thread liweihang
> -Original Message- > From: Michal Vokáč [mailto:michal.vo...@ysoft.com] > Sent: Friday, March 01, 2019 8:58 PM > To: liweihang > Cc: netdev@vger.kernel.org; da...@davemloft.net; linyunsheng > ; Zhuangyuzeng (Yisen) > ; Salil Mehta ; > lipeng (Y) ; shenjian (K) > Subject: Re: Question

Re: [PATCH] net: dsa: read mac address from DT for slave device

2019-03-03 Thread Vinod Koul
On 04-03-19, 11:46, xiaof...@codeaurora.org wrote: > On 2019-02-22 22:26, Andrew Lunn wrote: > > On Fri, Feb 22, 2019 at 06:28:15PM +0530, Vinod Koul wrote: > > > From: Xiaofei Shen > > > > > > Before creating a slave netdevice, get the mac address from DTS and > > > apply in case it is valid. >

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Roi Dayan
On 04/03/2019 03:26, Tonghao Zhang wrote: > On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: >> >> >> >> On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >>> From: Tonghao Zhang >>> >>> If we try to set VFs mac address on a VF (not PF) net device, >>> the kernel will be crash. The commands a

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Roi Dayan
On 04/03/2019 03:04, Tonghao Zhang wrote: > On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: >> >> >> >> On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >>> From: Tonghao Zhang >>> >>> If we try to set VFs mac address on a VF (not PF) net device, >>> the kernel will be crash. The commands a

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

2019-03-03 Thread Jiri Pirko
Sun, Mar 03, 2019 at 08:35:51AM CET, ido...@mellanox.com wrote: >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

[PATCH] sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79

2019-03-03 Thread Kai-Heng Feng
Some sky2 chips fire IRQ after S3, before the driver is fully resumed: [ 686.804877] do_IRQ: 1.37 No irq handler for vector This is likely a platform bug that device isn't fully quiesced during S3. Use MSI-X, maskable MSI or INTx can prevent this issue from happening. Since MSI-X and maskable MSI

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

2019-03-03 Thread Leon Romanovsky
On Sun, Mar 03, 2019 at 03:20:57PM +, Roi Dayan wrote: > > > On 02/03/2019 21:39, Gustavo A. R. Silva wrote: > > Remove redundant assignment to tun_entropy->enabled. > > > > Addesses-Coverity-ID: 1477328 ("Unused value") > > Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunne

Re: [PATCH net-next 0/8] mlxsw: minimal: Add ethtool and resource query support

2019-03-03 Thread David Miller
From: Ido Schimmel Date: Sun, 3 Mar 2019 09:12:06 + > Vadim says: > > The minimal driver is chip independent and uses I2C bus for chip access. > Its purpose is to support chassis management on systems equipped with > Mellanox switch ASICs. For example, from a BMC (Board Management > Controll

net-next is CLOSED

2019-03-03 Thread David Miller
Please only bug fixes as we progress through the merge window. I'll announce when net-next is open again. Follow me on social media: https://twitter.com/davem_dokebi Thank you.

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

2019-03-03 Thread David Miller
From: Boris Pismenny Date: Sat, 2 Mar 2019 17:05:59 + > > 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, t

Re: [PATCH bpf-next v2 1/7] bpf: implement lookup-free direct value access

2019-03-03 Thread Andrii Nakryiko
On Thu, Feb 28, 2019 at 3:31 PM Daniel Borkmann wrote: > > This generic extension to BPF maps allows for directly loading an > address residing inside a BPF map value as a single BPF ldimm64 > instruction. > > The idea is similar to what BPF_PSEUDO_MAP_FD does today, which > is a special src_reg f

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

2019-03-03 Thread David Miller
From: Heiner Kallweit Date: Sat, 2 Mar 2019 17:09:06 +0100 > 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. Series applied, thanks Heiner.

[PATCH] net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm

2019-03-03 Thread Su Yanjun
For rcu protected pointers, we'd bettter add '__rcu' for them. No functional change. Signed-off-by: Su Yanjun --- include/net/netns/xfrm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index 59f45b1..d2a36fb 100644 --- a/

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

2019-03-03 Thread David Miller
From: Kristian Evensen Date: Sat, 2 Mar 2019 13:32:26 +0100 > 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 app

[PATCH iproute2-next] bridge: fdb: add support for src_vni option

2019-03-03 Thread Roopa Prabhu
From: Roopa Prabhu We already print src_vni for a fdb entry when present. This patch adds the ability to set src_vni on a fdb entry. When not specified, kernel will use vni specified on the vxlan device. This can be used on a vxlan fdb entry when the vxlan device is in external or collect metadat

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

2019-03-03 Thread 陆朱伟
Hi Martin, You're right about the config blob. Thanks for your invitation to the discussion. In my option, specifying the properties of the connection to the chip would be better. Thanks, BRs, Alex Lu. -邮件原件- 发件人: Martin Blumenstingl [mailto:martin.blumensti...@googlemail.com] 发送时间: 201

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

2019-03-03 Thread David Miller
From: Heiner Kallweit Date: Sat, 2 Mar 2019 10:06:05 +0100 > 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"

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

2019-03-03 Thread David Miller
From: Huazhong Tan Date: Sat, 2 Mar 2019 16:49:30 +0800 > 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: A

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

2019-03-03 Thread Parav Pandit
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Jiri Pirko > Sent: Saturday, March 2, 2019 4:14 AM > To: Jakub Kicinski > Cc: da...@davemloft.net; netdev@vger.kernel.org; oss- > driv...@netronome.com > Subject: Re: [PATCH net-next v2 0/7] devlink: expose PF and

Re: [PATCH] net-sysfs: Fix mem leak in netdev_register_kobject

2019-03-03 Thread David Miller
From: Yue Haibing Date: Sat, 2 Mar 2019 10:34:55 +0800 > From: YueHaibing > > syzkaller report this: > BUG: memory leak > unreferenced object 0x88837a71a500 (size 256): > comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s) > hex dump (first 32 bytes): > 00 00 00 00 ad

Re: [PATCH] fsl/fman: Use vsprintf extension %pM

2019-03-03 Thread David Miller
From: Joe Perches Date: Fri, 01 Mar 2019 16:37:25 -0800 > Make logging of an ethernet address more consistent with > the rest of the kernel. > > Miscellanea: > > The %02hx use also did not quite match the u8 definition > of addr though that did not actually matter given normal > integer promoti

RE: [PATCH net-next 6/8] devlink: introduce port's peer netdevs

2019-03-03 Thread Parav Pandit
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Jiri Pirko > Sent: Wednesday, February 27, 2019 7:08 AM > To: Jakub Kicinski > Cc: da...@davemloft.net; oss-driv...@netronome.com; > netdev@vger.kernel.org > Subject: Re: [PATCH net-next 6/8] devlink: introduce po

Re: [PATCH] net: ipv6: add socket option IPV6_ROUTER_ALERT_ISOLATE

2019-03-03 Thread David Miller
From: frugg...@arista.com (Francesco Ruggeri) Date: Fri, 01 Mar 2019 15:31:03 -0800 > By default IPv6 socket with IPV6_ROUTER_ALERT socket option set will > receive all IPv6 RA packets from all namespaces. > IPV6_ROUTER_ALERT_ISOLATE socket option restricts packets received by > the socket to be o

Re: [PATCH net] net: dsa: mv88e6xxx: handle unknown duplex modes gracefully in mv88e6xxx_port_set_duplex

2019-03-03 Thread David Miller
From: Heiner Kallweit Date: Fri, 1 Mar 2019 19:53:57 +0100 > When testing another issue I faced the problem that > mv88e6xxx_port_setup_mac() failed due to DUPLEX_UNKNOWN being passed > as argument to mv88e6xxx_port_set_duplex(). We should handle this case > gracefully and return -EOPNOTSUPP, lik

RE: [PATCH net-next 4/8] devlink: allow subports on devlink PCI ports

2019-03-03 Thread Parav Pandit
> -Original Message- > From: Jiri Pirko > Sent: Wednesday, February 27, 2019 6:38 AM > To: Jakub Kicinski > Cc: da...@davemloft.net; oss-driv...@netronome.com; > netdev@vger.kernel.org; Parav Pandit ; Jason > Gunthorpe > Subject: Re: [PATCH net-next 4/8] devlink: allow subports on devl

RE: [PATCH net-next 2/8] devlink: add PF and VF port flavours

2019-03-03 Thread Parav Pandit
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Jiri Pirko > Sent: Wednesday, February 27, 2019 6:17 AM > To: Jakub Kicinski > Cc: da...@davemloft.net; oss-driv...@netronome.com; > netdev@vger.kernel.org > Subject: Re: [PATCH net-next 2/8] devlink: add PF and V

Re: [PATCH] net: fixup address-space warnings in compat_mc_{get,set}sockopt()

2019-03-03 Thread David Miller
From: Ben Dooks Date: Fri, 1 Mar 2019 18:39:44 + > Add __user attributes in some of the casts in this function to avoid > the following sparse warnings: > > net/compat.c:592:57: warning: cast removes address space of expression > net/compat.c:592:57: warning: incorrect type in initializer (

Re: [PATCH net-next v2] net: dsa: Use prepare/commit phase in dsa_slave_vlan_rx_add_vid()

2019-03-03 Thread David Miller
From: Florian Fainelli Date: Fri, 1 Mar 2019 10:37:25 -0800 > We were skipping the prepare phase which causes some problems with at > least a couple of drivers: > > - mv88e6xxx chooses to skip programming VID = 0 with -EOPNOTSUPP in > the prepare phase, but we would still try to force this VI

Re: [PATCH v2 0/2] dpaa2-eth: add XDP_REDIRECT support

2019-03-03 Thread David Miller
From: Ioana Ciornei Date: Fri, 1 Mar 2019 17:47:23 + > The first patch adds different software annotation types for Tx frames > depending on frame type while the second one actually adds support for basic > XDP_REDIRECT. > > Changes in v2: > - add missing xdp_do_flush_map() call Series ap

RE: [RFC net-next 0/8] Introducing subdev bus and devlink extension

2019-03-03 Thread Parav Pandit
> -Original Message- > From: Jakub Kicinski > Sent: Friday, March 1, 2019 2:04 PM > To: Parav Pandit ; Or Gerlitz > Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; > michal.l...@markovi.net; da...@davemloft.net; > gre...@linuxfoundation.org; Jiri Pirko > Subject: Re: [RFC ne

Re: [PATCH net-next v1 0/3] sched: Patches from out-of-tree version of sch_cake

2019-03-03 Thread David Miller
From: Toke Høiland-Jørgensen Date: Fri, 01 Mar 2019 16:04:05 +0100 > This series includes a couple of patches with updates from the out-of-tree > version of sch_cake. The first one is a fix to the fairness scheduling when > dual-mode fairness is enabled. The second patch is an additional feature

Re: [PATCH bpf-next] bpf: fix memory leak in bpf_lwt_xmit_reroute

2019-03-03 Thread Willem de Bruijn
On Sun, Mar 3, 2019 at 9:55 PM Willem de Bruijn wrote: > > On Fri, Mar 1, 2019 at 9:27 PM David Ahern wrote: > > > > On 2/28/19 10:57 AM, Peter Oskolkov wrote: > > > David: I'm not sure how to test GSO (I assume we are talking about GSO > > > here) in > > > the selftest: the encapping code sets S

Re: [PATCH] net: dsa: read mac address from DT for slave device

2019-03-03 Thread xiaofeis
On 2019-02-28 11:54, Florian Fainelli wrote: On 2/27/2019 6:23 PM, xiaof...@codeaurora.org wrote: On 2019-02-27 11:13, Florian Fainelli wrote: On 2/26/2019 6:04 PM, xiaof...@codeaurora.org wrote: On 2019-02-26 15:45, xiaof...@codeaurora.org wrote: On 2019-02-26 01:27, Florian Fainelli wrote:

[PATCH] net: xfrm: Fix potential oops in xfrm_user_rcv_msg and array out of bounds

2019-03-03 Thread Su Yanjun
When i review xfrm_user.c code, i found some potentical bug in it. In xfrm_user_rcvmsg if type parameter from user space is set to XFRM_MSG_MAX or XFRM_MSG_NEWSADINFO or XFRM_MSG_NEWSPDINFO. It will cause xfrm_user_rcv_msg referring to null entry in xfrm_dispatch array. Signed-off-by: Su Yanjun

Re: [PATCH] net: dsa: read mac address from DT for slave device

2019-03-03 Thread xiaofeis
On 2019-02-22 22:26, Andrew Lunn wrote: On Fri, Feb 22, 2019 at 06:28:15PM +0530, Vinod Koul wrote: From: Xiaofei Shen Before creating a slave netdevice, get the mac address from DTS and apply in case it is valid. Signed-off-by: Xiaofei Shen Signed-off-by: Vinod Koul Hi Xiaofei, Vinod It

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Tonghao Zhang
On Sun, Mar 3, 2019 at 10:17 PM Roi Dayan wrote: > > > > On 03/03/2019 16:12, Roi Dayan wrote: > > > > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > >> From: Tonghao Zhang > >> > >> If we try to set VFs rate on a VF (not PF) net device, the kernel > >> will be crash. The commands are

Re: [PATCH bpf-next] bpf: fix memory leak in bpf_lwt_xmit_reroute

2019-03-03 Thread Willem de Bruijn
On Fri, Mar 1, 2019 at 9:27 PM David Ahern wrote: > > On 2/28/19 10:57 AM, Peter Oskolkov wrote: > > David: I'm not sure how to test GSO (I assume we are talking about GSO > > here) in > > the selftest: the encapping code sets SKB_GSO_DODGY flag, and veth does > > not support > > dodginess: "tx-gs

Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Al Viro
On Sun, Mar 03, 2019 at 02:23:33PM -0800, Linus Torvalds wrote: OK, having dug through the archives, the reasons were not strong. So that part is OK... > @@ -1060,6 +1071,8 @@ static inline void iocb_put(struct aio_kiocb *iocb) > { > if (refcount_read(&iocb->ki_refcnt) == 0 || >

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

2019-03-03 Thread Tony Chuang
> -Original Message- > From: Arend Van Spriel [mailto:arend.vanspr...@broadcom.com] > > > 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 86

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

2019-03-03 Thread linmiaohe
On 2019/3/3 4:15, David Ahern wrote: > 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 fil

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Tonghao Zhang
On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: > > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > If we try to set VFs mac address on a VF (not PF) net device, > > the kernel will be crash. The commands are show as below: > > > > $ echo 2 > /sys/class/ne

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Tonghao Zhang
On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: > > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > If we try to set VFs mac address on a VF (not PF) net device, > > the kernel will be crash. The commands are show as below: > > > > $ echo 2 > /sys/class/ne

Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Linus Torvalds
On Sun, Mar 3, 2019 at 12:30 PM Al Viro wrote: > > On Sun, Mar 03, 2019 at 11:44:33AM -0800, Linus Torvalds wrote: > > > > I'm assuming you're talking about the second vfs_poll() in > > aio_poll_complete_work()? The one we call before we check for > > "rew->cancelled" properly under the spinlock?

Re: [PATCH v2 0/4] Macb power management support for ZynqMP

2019-03-03 Thread David Miller
From: Harini Katakam Date: Fri, 1 Mar 2019 16:20:31 +0530 > This series adds support for macb suspend/resume with system power down. > In relation to the above, this series also updates mdio_read/write > function for PM and adds tsu clock management. Series applied to net-next, thank you.

Re: [PATCH v1 net-next 0/3] net: dsa: microchip: add KSZ9893 switch support

2019-03-03 Thread David Miller
From: Date: Thu, 28 Feb 2019 19:57:21 -0800 > From: Tristram Ha > > This series of patches is to modify the KSZ9477 DSA driver to support > running KSZ9893 switch. > > The KSZ9893 switch is similar to KSZ9477 except the ingress tail tag has > 1 byte instead of 2 bytes. The XMII register that

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

2019-03-03 Thread John Fastabend
On 2/28/19 12:55 PM, Eric Dumazet wrote: > 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 qdisc, or as direct

Re: [PATCH v2 0/2] appletalk: small cleanup and bugfix

2019-03-03 Thread David Miller
From: Yue Haibing Date: Fri, 1 Mar 2019 10:57:55 +0800 > From: YueHaibing > > v2: > - Add cover letter log > > This patch series mainly fix a use-after-free bug in atalk_proc_exit. > patch 1 use remove_proc_subtree helper to simplify atalk_proc fs code, > also some other cleanup. > patch 2 add

Re: [net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2019-02-28

2019-03-03 Thread David Miller
Please address the DPDK feedback...

Re: [PATCH] net: mscc: Enable all ports in QSGMII

2019-03-03 Thread David Miller
From: Date: Thu, 28 Feb 2019 07:32:22 + > From: Kavya Sree Kotagiri > > When Ocelot phy-mode is QSGMII, all 4 ports involved in > QSGMII shall be kept out of reset and > Tx lanes shall be enabled to pass the data. > > Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") > S

Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Al Viro
On Sun, Mar 03, 2019 at 11:44:33AM -0800, Linus Torvalds wrote: > On Sun, Mar 3, 2019 at 7:18 AM Al Viro wrote: > > > > > Maybe unrelated to this bug, but... What's to prevent a wakeup > > > that happens just after we'd been added to a waitqueue by ->poll() > > > triggering aio_poll_wake(), which

Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Linus Torvalds
On Sun, Mar 3, 2019 at 11:44 AM Linus Torvalds wrote: > > But doesn't it look nice to see > > 2 files changed, 41 insertions(+), 50 deletions(-) > > with actual code reduction, and a fundamental simplification in > handling of the file pointer? A coupl,e of the changes are "useless", and do the

Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Linus Torvalds
On Sun, Mar 3, 2019 at 7:18 AM Al Viro wrote: > > > Maybe unrelated to this bug, but... What's to prevent a wakeup > > that happens just after we'd been added to a waitqueue by ->poll() > > triggering aio_poll_wake(), which gets to aio_poll_complete() > > with its fput() *before* we'd reached the

[PATCH net-next] net: phy: improve handling link_change_notify callback

2019-03-03 Thread Heiner Kallweit
Currently the Phy driver's link_change_notify callback is called whenever the state machine is run (every second if polling), no matter whether the state changed or not. This isn't needed and may confuse users considering the name of the callback. Therefore let's change the behavior and call this c

Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Eric Dumazet
On 03/03/2019 07:18 AM, Al Viro wrote: > Fixes: bfe4037e722ec > Cc: sta...@vger.kernel.org > Signed-off-by: Al Viro > --- > diff --git a/fs/aio.c b/fs/aio.c > index 3083180a54c8..7e88bfabdac2 100644 > --- a/fs/aio.c > +++ b/fs/aio.c > @@ -1767,6 +1767,7 @@ static ssize_t aio_poll(struct aio_ki

Re: [PATCH net-next 0/2] lib: string: add strreplace_nonalnum

2019-03-03 Thread Heiner Kallweit
On 03.03.2019 18:19, Heiner Kallweit wrote: > Add a new function strreplace_nonalnum that replaces all > non-alphanumeric characters. Such functionality is needed e.g. when a > string is supposed to be used in a file name. If '\0' is given as new > character then non-alphanumeric characters are cut

Re: [PATCH net-next 0/2] lib: string: add strreplace_nonalnum

2019-03-03 Thread Heiner Kallweit
On 03.03.2019 18:34, Andrew Lunn wrote: > On Sun, Mar 03, 2019 at 06:19:35PM +0100, Heiner Kallweit wrote: >> There doesn't seem to be a maintainer or mailing list for lib/string.c >> Therefore I hope it's ok to submit this through the netdev tree. > > Hi Heiner > > It is probably a good idea to

Re: [PATCH net-next 2/2] net: phy: aquantia: use new function strreplace_nonalnum

2019-03-03 Thread Heiner Kallweit
On 03.03.2019 18:31, Andrew Lunn wrote: > On Sun, Mar 03, 2019 at 06:21:53PM +0100, Heiner Kallweit wrote: >> Use new function strreplace_nonalnum to simplify the code. > > Hi Heiner > > Both Marvell PHY drivers could use this. > > sfp.c has a variant of this as well. > Thanks! My plan was to p

Re: [PATCH net-next 0/2] lib: string: add strreplace_nonalnum

2019-03-03 Thread Andrew Lunn
On Sun, Mar 03, 2019 at 06:19:35PM +0100, Heiner Kallweit wrote: > There doesn't seem to be a maintainer or mailing list for lib/string.c > Therefore I hope it's ok to submit this through the netdev tree. Hi Heiner It is probably a good idea to Cc: ~/linux$ ./scripts/get_maintainer.pl -f lib/str

Re: [PATCH net-next 2/2] net: phy: aquantia: use new function strreplace_nonalnum

2019-03-03 Thread Andrew Lunn
On Sun, Mar 03, 2019 at 06:21:53PM +0100, Heiner Kallweit wrote: > Use new function strreplace_nonalnum to simplify the code. Hi Heiner Both Marvell PHY drivers could use this. sfp.c has a variant of this as well. Andrew

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

2019-03-03 Thread Eli Britstein
Reviewed-by: Eli Britstein On 3/3/2019 5:20 PM, Roi Dayan wrote: > > On 02/03/2019 21:39, Gustavo A. R. Silva wrote: >> Remove redundant assignment to tun_entropy->enabled. >> >> Addesses-Coverity-ID: 1477328 ("Unused value") >> Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tun

[PATCH net-next 1/2] lib: string: add strreplace_nonalnum

2019-03-03 Thread Heiner Kallweit
Add a new function strreplace_nonalnum that replaces all non-alphanumeric characters. Such functionality is needed e.g. when a string is supposed to be used in a sysfs file name. If '\0' is given as new character then non-alphanumeric characters are cut. Signed-off-by: Heiner Kallweit --- inclu

[PATCH net-next 2/2] net: phy: aquantia: use new function strreplace_nonalnum

2019-03-03 Thread Heiner Kallweit
Use new function strreplace_nonalnum to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/net/phy/aquantia_hwmon.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/phy/aquantia_hwmon.c b/drivers/net/phy/aquantia_hwmon.c index 19c4c280a..d47b3e

[PATCH net-next 0/2] lib: string: add strreplace_nonalnum

2019-03-03 Thread Heiner Kallweit
Add a new function strreplace_nonalnum that replaces all non-alphanumeric characters. Such functionality is needed e.g. when a string is supposed to be used in a file name. If '\0' is given as new character then non-alphanumeric characters are cut. There doesn't seem to be a maintainer or mailing

Re: [PATCH] net: ipv6: add socket option IPV6_ROUTER_ALERT_ISOLATE

2019-03-03 Thread David Ahern
On 3/1/19 4:31 PM, Francesco Ruggeri wrote: > By default IPv6 socket with IPV6_ROUTER_ALERT socket option set will > receive all IPv6 RA packets from all namespaces. > IPV6_ROUTER_ALERT_ISOLATE socket option restricts packets received by > the socket to be only from the socket's namespace. > > Sig

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

2019-03-03 Thread Heiner Kallweit
On 03.03.2019 16:58, Andrew Lunn wrote: > On Sat, Mar 02, 2019 at 05:15:56PM +0100, Heiner Kallweit wrote: >> gen10g_read_status is deprecated, therefore stop exporting it. >> We don't want to encourage anybody to use it. > > Hi Florian, Heiner > Hi Andrew, > We should consider what we want to d

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

2019-03-03 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 05:15:56PM +0100, Heiner Kallweit wrote: > gen10g_read_status is deprecated, therefore stop exporting it. > We don't want to encourage anybody to use it. Hi Florian, Heiner We should consider what we want to do with the generic 10G driver. Can a c45 PHY be expected to wor

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

2019-03-03 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 05:15:56PM +0100, Heiner Kallweit wrote: > gen10g_read_status is deprecated, therefore stop exporting it. > We don't want to encourage anybody to use it. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

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

2019-03-03 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 05:13:11PM +0100, Heiner Kallweit wrote: > genphy_no_soft_reset and gen10g_no_soft_reset are both the same no-ops, > one is enough. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

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

2019-03-03 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 05:11:40PM +0100, Heiner Kallweit wrote: > 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 Kallwe

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

2019-03-03 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 05:10:36PM +0100, Heiner Kallweit wrote: > 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 Reviewed-by: Andrew Lunn Andrew

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

2019-03-03 Thread Andrew Lunn
On Sat, Mar 02, 2019 at 05:10:00PM +0100, Heiner Kallweit wrote: > Now that we have it let's use genphy_c45_aneg_done() in phy_aneg_done(). > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

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

2019-03-03 Thread Roi Dayan
On 02/03/2019 21:39, Gustavo A. R. Silva wrote: > 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") the commit doesn't fix any real issue but

[PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-03 Thread Al Viro
On Sun, Mar 03, 2019 at 01:55:02PM +, Al Viro wrote: > Maybe unrelated to this bug, but... What's to prevent a wakeup > that happens just after we'd been added to a waitqueue by ->poll() > triggering aio_poll_wake(), which gets to aio_poll_complete() > with its fput() *before* we'd reached th

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

2019-03-03 Thread Gustavo A. R. Silva
On 3/3/19 4:05 AM, Felix Fietkau wrote: > On 2019-03-02 22:10, Gustavo A. R. Silva wrote: >> 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

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Roi Dayan
On 03/03/2019 16:12, Roi Dayan wrote: > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >> From: Tonghao Zhang >> >> If we try to set VFs rate on a VF (not PF) net device, the kernel >> will be crash. The commands are show as below: >> >> $ echo 2 > /sys/class/net/$MLX_PF0/device/srio

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Roi Dayan
On 03/03/2019 16:12, Roi Dayan wrote: > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: >> From: Tonghao Zhang >> >> If we try to set VFs rate on a VF (not PF) net device, the kernel >> will be crash. The commands are show as below: >> >> $ echo 2 > /sys/class/net/$MLX_PF0/device/srio

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

2019-03-03 Thread Johannes Berg
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. > > Signed-off-by: Aditya Pakki > --- > drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Roi Dayan
On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > If we try to set VFs rate on a VF (not PF) net device, the kernel > will be crash. The commands are show as below: > > $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs > $ ip link set $MLX_VF0 vf 0 rate 100 a

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

2019-03-03 Thread Al Viro
On Sun, Mar 03, 2019 at 02:22:04AM -0800, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:7d762d69145a afs: Fix manually set volume location server .. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=131d832ac0 > kernel

Re: [PATCH v1 iproute2-next 1/4] rdma: add helper rd_sendrecv_msg()

2019-03-03 Thread Leon Romanovsky
On Wed, Feb 27, 2019 at 02:23:45PM -0600, Steve Wise wrote: > > > > -Original Message- > > From: Steve Wise > > Sent: Tuesday, February 26, 2019 11:14 AM > > To: Leon Romanovsky > > Cc: dsah...@gmail.com; step...@networkplumber.org; > > netdev@vger.kernel.org; linux-r...@vger.kernel.org >

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Roi Dayan
On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > If we try to set VFs mac address on a VF (not PF) net device, > the kernel will be crash. The commands are show as below: > > $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs > $ ip link set $MLX_VF0 vf 0 mac

Re: [PATCH 3/3] net: dsa: Add Vitesse VSC73xx DSA router driver

2019-03-03 Thread Vladimir Oltean
On Sat, 30 Jun 2018 13:05:47, Linus Walleij wrote: > On Thu, Jun 14, 2018 at 6:51 PM Florian Fainelli wrote: > > On 06/14/2018 05:35 AM, Linus Walleij wrote: > > > > using DSA as a best fit so we can easily add VLAN support and maybe > > > later also exploit the internal frame header to get more d

KASAN: use-after-free Read in unix_dgram_poll

2019-03-03 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7d762d69145a afs: Fix manually set volume location server .. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=131d832ac0 kernel config: https://syzkaller.appspot.com/x/.config?x=b76ec970784287c das

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

2019-03-03 Thread Felix Fietkau
On 2019-03-02 22:10, Gustavo A. R. Silva wrote: > 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 num

[PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread xiangxia . m . yue
From: Tonghao Zhang If we try to set VFs rate on a VF (not PF) net device, the kernel will be crash. The commands are show as below: $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs $ ip link set $MLX_VF0 vf 0 rate 100 Fixes: c9497c98901c ("net/mlx5: Add support for setting VF min rate")

[PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread xiangxia . m . yue
From: Tonghao Zhang If we try to set VFs mac address on a VF (not PF) net device, the kernel will be crash. The commands are show as below: $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs $ ip link set $MLX_VF0 vf 0 mac 00:11:22:33:44:00 [exception RIP: mlx5_eswitch_set_vport_mac+41] [ff

[PATCH net 3/3] sctp: call sctp_auth_init_hmacs() in sctp_sock_migrate()

2019-03-03 Thread Xin Long
New ep's auth_hmacs should be set if old ep's is set, in case that net->sctp.auth_enable has been changed to 0 by users and new ep's auth_hmacs couldn't be set in sctp_endpoint_init(). It can even crash kernel by doing: 1. on server: sysctl -w net.sctp.auth_enable=1, sysctl -w n

[PATCH net 2/3] sctp: move up sctp_auth_init_hmacs() in sctp_endpoint_init()

2019-03-03 Thread Xin Long
sctp_auth_init_hmacs() is called only when ep->auth_enable is set. It better to move up sctp_auth_init_hmacs() and remove auth_enable check in it and check auth_enable only once in sctp_endpoint_init(). Signed-off-by: Xin Long --- net/sctp/auth.c| 6 -- net/sctp/endpointola.c | 18 +

[PATCH net 0/3] sctp: process the error returned from sctp_sock_migrate()

2019-03-03 Thread Xin Long
This patchset is to process the errs returned by sctp_auth_init_hmacs() and sctp_bind_addr_dup() from sctp_sock_migrate(). And also fix a panic caused by new ep->auth_hmacs was not set due to net->sctp.auth_enable changed by sysctl before accepting an assoc. Xin Long (3): sctp: sctp_sock_migrate

[PATCH net 1/3] sctp: sctp_sock_migrate() returns error if sctp_bind_addr_dup() fails

2019-03-03 Thread Xin Long
It should fail to create the new sk if sctp_bind_addr_dup() fails when accepting or peeloff an association. Signed-off-by: Xin Long --- net/sctp/socket.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c

[PATCH net-next 8/8] mlxsw: i2c: Extend initialization by querying resources data

2019-03-03 Thread Ido Schimmel
From: Vadim Pasternak Extend initialization flow by query requests for chip resources data in order to obtain chip's specific capabilities, like the number of ports. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/i2c.c

[PATCH net-next 6/8] mlxsw: i2c: Modify input parameter name in initialization API

2019-03-03 Thread Ido Schimmel
From: Vadim Pasternak Change input parameter name "resource" to "res" in mlxsw_i2c_init() in order to align it with mlxsw_pci_init(). Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 2 +- 1 file changed, 1 insert

[PATCH net-next 3/8] mlxsw: minimal: Add ethtool support

2019-03-03 Thread Ido Schimmel
From: Vadim Pasternak The minimal driver is chip independent and uses I2C bus for chip access. Its purpose is to support chassis management on systems equipped with Mellanox switch ASICs. For example from BMC (Board Management Controller) device. Expose a dummy netdev for each front panel port a

[PATCH net-next 5/8] mlxsw: i2c: Fix comment misspelling

2019-03-03 Thread Ido Schimmel
From: Vadim Pasternak Fix comment for mlxsw_i2c_write_cmd(). Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/i

[PATCH net-next 7/8] mlxsw: i2c: Extend input parameters list of command API

2019-03-03 Thread Ido Schimmel
From: Vadim Pasternak Extend input parameters list of command API in mlxsw_i2c_cmd() in order to support initialization commands. Up until now, only access commands were supported by I2C driver. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/e

  1   2   >