Re: [PATCH net-next 2/4] nfp: register ports as devlink ports

2017-05-24 Thread Jiri Pirko
Tue, May 23, 2017 at 05:12:45PM CEST, jakub.kicin...@netronome.com wrote: >Extend nfp_port to contain devlink_port structures. Register the >ports to allow users inspecting device ports. > >Signed-off-by: Jakub Kicinski >Reviewed-by: Simon Horman

Re: [PATCH] net: fix potential null pointer dereference

2017-05-24 Thread Pablo Neira Ayuso
On Tue, May 23, 2017 at 06:18:37PM -0500, Gustavo A. R. Silva wrote: > Add null check to avoid a potential null pointer dereference. > > Addresses-Coverity-ID: 1408831 > Signed-off-by: Gustavo A. R. Silva Acked-by: Pablo Neira Ayuso This is a fix

[PATCH] nfc: Ensure presence of required attributes in the activate_target netlink handler

2017-05-24 Thread Mateusz Jurczyk
Check that the NFC_ATTR_TARGET_INDEX and NFC_ATTR_PROTOCOLS attributes (in addition to NFC_ATTR_DEVICE_INDEX) are provided by the netlink client prior to accessing them. This prevents potential unhandled NULL pointer dereference exceptions which can be triggered by malicious user-mode programs, if

Re: [PATCH net-next v9 5/5] virtio_net: check return value of skb_to_sgvec always

2017-05-24 Thread Jason A. Donenfeld
I'm shocked this somehow made it into the commit. I wonder how that happened? Anyway, fixed in my git repo, and will be part of the next series. (Unless DaveM wants to fix it up trivially when/if he merges this v9, which would be faster.) Barring that, does this look good to you? Could I have

[PATCH v2] drivers: phy: Add Cortina CS4340 driver

2017-05-24 Thread Bogdan Purcareata
Add basic support for Cortina PHY drivers. Support only CS4340 for now. The phys are not compatible with IEEE 802.3 clause 45 registers. Implement proper read_status support, so that phy polling does not cause bus register access errors. The driver should be described using the "ethernet-phy-id"

[PATCH] nfc: Fix the sockaddr length sanitization in llcp_sock_connect

2017-05-24 Thread Mateusz Jurczyk
Fix the sockaddr length verification in the connect() handler of NFC/LLCP sockets, to compare against the size of the actual structure expected on input (sockaddr_nfc_llcp) instead of its shorter version (sockaddr_nfc). Both structures are defined in include/uapi/linux/nfc.h. The fields specific

Re: [PATCH v2] drivers: phy: Add Cortina CS4340 driver

2017-05-24 Thread Andrew Lunn
On Wed, May 24, 2017 at 09:25:48AM +, Bogdan Purcareata wrote: > Add basic support for Cortina PHY drivers. Support only CS4340 for now. > The phys are not compatible with IEEE 802.3 clause 45 registers. Implement > proper read_status support, so that phy polling does not cause bus > register

Re: [PATCH net-next v9 5/5] virtio_net: check return value of skb_to_sgvec always

2017-05-24 Thread Sergei Shtylyov
Hello! On 5/23/2017 7:05 PM, Jason A. Donenfeld wrote: Signed-off-by: Jason A. Donenfeld Cc: "Michael S. Tsirkin" Cc: Jason Wang --- drivers/net/virtio_net.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

Re: [PATCH net-next v3 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-05-24 Thread Andrey Jr. Melnikov
In gmane.linux.kernel sean.w...@mediatek.com wrote: > From: Sean Wang > MT7530 is a 7-ports Gigabit Ethernet Switch that could be found on > Mediatek router platforms such as MT7623A or MT7623N platform which > includes 7-port Gigabit Ethernet MAC and 5-port Gigabit

[PATCH RESEND v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver

2017-05-24 Thread Stefan Wahren
This patch adds the Ethernet over UART driver for the Qualcomm QCA7000 HomePlug GreenPHY. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/Kconfig | 16 + drivers/net/ethernet/qualcomm/Makefile| 2 +

[PATCH v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver

2017-05-24 Thread Stefan Wahren
This patch adds the Ethernet over UART driver for the Qualcomm QCA7000 HomePlug GreenPHY. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/Kconfig | 16 + drivers/net/ethernet/qualcomm/Makefile| 2 +

Re: Alignment in BPF verifier

2017-05-24 Thread Edward Cree
On 23/05/17 22:27, Daniel Borkmann wrote: > On 05/23/2017 09:45 PM, Alexei Starovoitov wrote: >> On 5/23/17 7:41 AM, Edward Cree wrote: >>> Hmm, that means that we can't do arithmetic on a >>> PTR_TO_MAP_VALUE_OR_NULL, we have to convert it to a PTR_TO_MAP_VALUE >>> first by NULL-checking it.

Re: [PATCH v4 next 1/3] modules:capabilities: allow __request_module() to take a capability argument

2017-05-24 Thread Djalal Harouni
On Tue, May 23, 2017 at 9:19 PM, Kees Cook wrote: > On Tue, May 23, 2017 at 3:29 AM, Djalal Harouni wrote: [...] >> I think if there is an interface request_module_capable() , then code >> will use it. The DCCP code path did not check capabilities at all

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-24 Thread Andrew Lunn
> >Since aneg is mandatory for SGMII this can as well be seen as "link not up", > >not? > > The problem is that even though the link is up, the driver has > returned "0", so the kernel thinks that autonegotiation has not > finished. You need to prove this, that the link is not up. Any by link,

Re: rsi: rsi_91x_core: Use time_after time comparison

2017-05-24 Thread Kalle Valo
Karim Eshapa wrote: > Use time_after kernel macro for time comparison. > > Signed-off-by: Karim Eshapa Patch applied to wireless-drivers-next.git, thanks. c07036f18d93 rsi: rsi_91x_core: Use time_after time comparison --

Re: [v3] libertas: Avoid reading past end of buffer

2017-05-24 Thread Kalle Valo
Kees Cook wrote: > Using memcpy() from a string that is shorter than the length copied means > the destination buffer is being filled with arbitrary data from the kernel > rodata segment. Instead, redefine the stat strings to be ETH_GSTRING_LEN > sizes, like other drivers.

Re: libertas: Remove function entry/exit debugging

2017-05-24 Thread Kalle Valo
Kees Cook wrote: > In at least one place, the enter/exit debugging was not being correctly > matched. Based on mailing list feedback, it was desired to drop all of > these in favor of using ftrace instead. > > Suggested-by: Joe Perches > Suggested-by:

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-24 Thread Timur Tabi
On 5/24/17 8:40 AM, Andrew Lunn wrote: You need to prove this, that the link is not up. Any by link, we mean both the copper and the SGMII link. I can post the log of my iperf run showing that the, when at803x_aneg_done() returns zero, no packets can go through. And then after I change

RE: [PATCH v2] drivers: phy: Add Cortina CS4340 driver

2017-05-24 Thread Bogdan Purcareata
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Wednesday, May 24, 2017 5:26 PM > To: Bogdan Purcareata > Cc: f.faine...@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH v2] drivers: phy: Add

Re: [PATCH net-next v3 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-05-24 Thread Andrew Lunn
> What about JUMBO frames and large MTU support? devlink support? To get the driver merged, it is better to start small, a minimal set of features. Other features can be added later. If these features are important to you, please feel free to submit patches. Andrew

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-24 Thread Timur Tabi
On 5/24/17 2:18 AM, Matthias May wrote: With the patch: When the copper side is seen as up, it also checks if aneg of the SGMII link is done. As far as i know SGMII can not be run without aneg, since it is always Gbit with aneg mandatory. If SGMII aneg is not done, then, well aneg is not done

Re: [v2, 01/10] rt2x00: change function pointers for register accessors

2017-05-24 Thread Kalle Valo
Arnd Bergmann wrote: > This prepares the driver for changing all the 'read' register accessors > to return the value instead of passing it by reference. Since a lot > of them are used in callbacks, this takes care of the callbacks first, > adding a couple of helpers that will be

[PATCHv2 net] netfilter: do not hold dev in ipt_CLUSTERIP

2017-05-24 Thread Xin Long
It's a terrible thing to hold dev in iptables target. When the dev is being removed, unregister_netdevice has to wait for the dev to become free. dmesg will keep logging the err: kernel:unregister_netdevice: waiting for veth0_in to become free. \ Usage count = 1 until iptables rules with

Re: [PATCH v2] drivers: phy: Add Cortina CS4340 driver

2017-05-24 Thread Andrew Lunn
> Yes, I can do that. However, I don't see a "phy" folder under > Documentation/devicetree/bindings/net/. > Should I change the location to > Documentation/devicetree/bindings/net/cortina.txt instead? Ah, sorry, my error. Yes, Documentation/devicetree/bindings/net/cortina.txt. > > I think

Re: [PATCHv2 net-next 4/5] net: dsa: mv88e6xxx: mv88e6390X SERDES support

2017-05-24 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The mv88e6390X family has 8 SERDES lanes. These can be used for 2 > 10Gbps ports, ports 9 or 10. If these ports are used at slower speeds, > the SERDES lanes become available for other ports for 1000Base-X. > > Signed-off-by: Andrew Lunn

Re: [PATCHv2 net-next 3/5] net: dsa: mv88e6xxx: Remove SERDES flag

2017-05-24 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > Now that we use an op for SERDES operations, we don't need a flag for > it. Remove it. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Thanks, Vivien

Re: wlcore: fix 64K page support

2017-05-24 Thread Kalle Valo
Arnd Bergmann wrote: > In the stable linux-3.16 branch, I ran into a warning in the > wlcore driver: > > drivers/net/wireless/ti/wlcore/spi.c: In function 'wl12xx_spi_raw_write': > drivers/net/wireless/ti/wlcore/spi.c:315:1: error: the frame size of 12848 > bytes is larger than

Re: [PATCHv4] wlcore: add wl1285 compatible

2017-05-24 Thread Kalle Valo
Sebastian Reichel wrote: > Motorola Droid 4 uses a WL1285C. With differences between the > chips not being public let's add explicit binding for wl1285 > instead of relying on wl1283 being very similar. > > Reviewed-by: Rob Herring > Acked-by:

RE: [PATCH v2] drivers: phy: Add Cortina CS4340 driver

2017-05-24 Thread Bogdan Purcareata
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Wednesday, May 24, 2017 3:59 PM > To: Bogdan Purcareata > Cc: f.faine...@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH v2] drivers: phy: Add

Aw: Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver

2017-05-24 Thread Lino Sanfilippo
Hi, > Gesendet: Mittwoch, 24. Mai 2017 um 11:06 Uhr > Von: "Stefan Wahren" > An: "Lino Sanfilippo" , "Rob Herring" > , "Mark Rutland" , "David S. > Miller" > Cc:

Re: [PATCH RESEND v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver

2017-05-24 Thread Stefan Wahren
Am 24.05.2017 um 16:21 schrieb Lino Sanfilippo: > Hi, > > >> This patch adds the Ethernet over UART driver for the >> Qualcomm QCA7000 HomePlug GreenPHY. >> >> Signed-off-by: Stefan Wahren >> --- > Reviewed-by: Lino Sanfilippo > Thanks Stefan

Re: [PATCH net-next v3 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-05-24 Thread Andrey Melnikov
2017-05-24 16:20 GMT+03:00 Andrew Lunn : >> What about JUMBO frames and large MTU support? devlink support? > > To get the driver merged, it is better to start small, a minimal set > of features. Other features can be added later. If these features are > important to you, please

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-24 Thread Andrew Lunn
On Wed, May 24, 2017 at 08:48:04AM -0500, Timur Tabi wrote: > On 5/24/17 8:40 AM, Andrew Lunn wrote: > > >You need to prove this, that the link is not up. Any by link, we mean > >both the copper and the SGMII link. > > I can post the log of my iperf run showing that the, when >

Re: [PATCH RESEND v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver

2017-05-24 Thread Lino Sanfilippo
Hi, > This patch adds the Ethernet over UART driver for the > Qualcomm QCA7000 HomePlug GreenPHY. > > Signed-off-by: Stefan Wahren > --- Reviewed-by: Lino Sanfilippo Regards, Lino

Re: [PATCHv2 net-next 5/5] dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable

2017-05-24 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > +static int mv88e6xxx_port_enable(struct dsa_switch *ds, int port, > + struct phy_device *phydev) > +{ > + struct mv88e6xxx_chip *chip = ds->priv; > + int err = 0; > + > + mutex_lock(>reg_lock); > + if

Re: [PATCHv2 net-next 2/5] net: dsa: mv88e6xxx: Refactor mv88e6352 SERDES code into an op

2017-05-24 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The mv88e6390 family has a different SERDES implementation. Refactor > the mv88e6352 code into an ops function, so we can later add the > mv88e6390 code. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot

Re: [PATCH net-next v9 3/5] rxrpc: check return value of skb_to_sgvec always

2017-05-24 Thread David Howells
Jason A. Donenfeld wrote: > Signed-off-by: Jason A. Donenfeld > Cc: David Howells Acked-by: David Howells

[PATCH net-next 1/4] tcp: ULP infrastructure

2017-05-24 Thread Dave Watson
Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP sockets. Based on a similar infrastructure in tcp_cong. The idea is that any ULP can add its own logic by changing the TCP proto_ops structure to its own methods. Example usage: setsockopt(sock, SOL_TCP, TCP_ULP, "tls",

[PATCH net-next 0/4] kernel TLS

2017-05-24 Thread Dave Watson
This series adds support for kernel TLS encryption over TCP sockets. A standard TCP socket is converted to a TLS socket using a setsockopt. Only symmetric crypto is done in the kernel, as well as TLS record framing. The handshake remains in userspace, and the negotiated cipher keys/iv are

Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova

2017-05-24 Thread Alexei Starovoitov
On Tue, May 23, 2017 at 02:44:02PM +0300, Saeed Mahameed wrote: > From: Ilan Tayari > > Mellanox Innova is a NIC with ConnectX and an FPGA on the same > board. The FPGA is a bump-on-the-wire and thus affects operation of > the mlx5_core driver on the ConnectX ASIC. > > Add

Re: [PATCH] nfc: Fix the sockaddr length sanitization in llcp_sock_connect

2017-05-24 Thread Kees Cook
On Wed, May 24, 2017 at 3:26 AM, Mateusz Jurczyk wrote: > Fix the sockaddr length verification in the connect() handler of NFC/LLCP > sockets, to compare against the size of the actual structure expected on > input (sockaddr_nfc_llcp) instead of its shorter version

RE: [PATCH v2] drivers: phy: Add Cortina CS4340 driver

2017-05-24 Thread Bogdan Purcareata
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Wednesday, May 24, 2017 8:03 PM > To: Bogdan Purcareata ; Andrew Lunn > > Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org > Subject: Re: [PATCH v2]

Re: [PATCH] nfc: Ensure presence of required attributes in the activate_target netlink handler

2017-05-24 Thread Kees Cook
On Wed, May 24, 2017 at 3:42 AM, Mateusz Jurczyk wrote: > Check that the NFC_ATTR_TARGET_INDEX and NFC_ATTR_PROTOCOLS attributes (in > addition to NFC_ATTR_DEVICE_INDEX) are provided by the netlink client > prior to accessing them. This prevents potential unhandled NULL

[PATCH net-next] net/packet: remove unused parameter in prb_curr_blk_in_use().

2017-05-24 Thread Rami Rosen
This patch removes unused parameter from prb_curr_blk_in_use() method in net/packet/af_packet.c. Signed-off-by: Rami Rosen --- net/packet/af_packet.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/packet/af_packet.c

[PATCH net-next] rxrpc: Support network namespacing

2017-05-24 Thread David Howells
Support network namespacing in AF_RXRPC with the following changes: (1) All the local endpoint, peer and call lists, locks, counters, etc. are moved into the per-namespace record. (2) All the connection tracking is moved into the per-namespace record with the exception of the client

[PATCH net-next 3/4] tls: kernel TLS support

2017-05-24 Thread Dave Watson
Software implementation of transport layer security, implemented using ULP infrastructure. tcp proto_ops are replaced with tls equivalents of sendmsg and sendpage. Only symmetric crypto is done in the kernel, keys are passed by setsockopt after the handshake is complete. All control messages

[PATCH net-next 4/4] tls: Documentation

2017-05-24 Thread Dave Watson
Add documentation for the tcp ULP tls interface. Signed-off-by: Boris Pismenny Signed-off-by: Dave Watson --- Documentation/networking/tls.txt | 120 +++ 1 file changed, 120 insertions(+) create mode 100644

[PATCH net-next 2/4] tcp: export do_tcp_sendpages and tcp_rate_check_app_limited functions

2017-05-24 Thread Dave Watson
Export do_tcp_sendpages and tcp_rate_check_app_limited, since tls will need to sendpages while the socket is already locked. tcp_sendpage is exported, but requires the socket lock to not be held already. Signed-off-by: Aviad Yehezkel Signed-off-by: Ilya Lesokhin

[PATCH net] tcp: avoid fastopen API to be used on AF_UNSPEC

2017-05-24 Thread Wei Wang
From: Wei Wang Fastopen API should be used to perform fastopen operations on the TCP socket. It does not make sense to use fastopen API to perform disconnect by calling it with AF_UNSPEC. The fastopen data path is also prone to race conditions and bugs when using with

Re: [PATCHv2 net-next 1/5] net: dsa: mv88e6xxx: Move phy functions into phy.[ch]

2017-05-24 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The upcoming SERDES support will need to make use of PHY functions. Move > them out into a file of there own. No code changes. their [...] > +int mv88e6xxx_phy_page_get(struct mv88e6xxx_chip *chip, int phy, u8 page);

Re: [Patch net-next] net_sched: only create filter chains for new filters/actions

2017-05-24 Thread Cong Wang
On Tue, May 23, 2017 at 11:37 PM, Jiri Pirko wrote: > Tue, May 23, 2017 at 06:42:37PM CEST, xiyou.wangc...@gmail.com wrote: >>tcf_chain_get() always creates a new filter chain if not found >>in existing ones. This is totally unnecessary when we get or >>delete filters, new chain

Re: [PATCH] rhashtable: Fix missing elements when inserting.

2017-05-24 Thread Taehee Yoo
2017-05-25 1:13 GMT+09:00 Taehee Yoo : > 2017-05-24 13:36 GMT+09:00 Herbert Xu : >> Taehee Yoo wrote: >>> rhltable_insert_key() inserts a node into list of element, >>> if node's key is duplicated, so that it becomes the chain

Re: [PATCH] rhashtable: Fix missing elements when inserting.

2017-05-24 Thread Taehee Yoo
2017-05-24 13:36 GMT+09:00 Herbert Xu : > Taehee Yoo wrote: >> rhltable_insert_key() inserts a node into list of element, >> if node's key is duplicated, so that it becomes the chain of >> element(as known as rhead). Also bucket table points that

Re: [PATCH net-next v9 5/5] virtio_net: check return value of skb_to_sgvec always

2017-05-24 Thread Sergei Shtylyov
On 05/24/2017 02:34 PM, Jason A. Donenfeld wrote: I'm shocked this somehow made it into the commit. I wonder how that happened? Sorry for not noticing this when it first appeared. Anyway, fixed in my git repo, and will be part of the next series. (Unless DaveM wants to fix it up

Re: Deleting a dynamic mac entry..

2017-05-24 Thread Manohar Kumar
Thanks, Toshiaki. What is the right way to set the default_pvid using the bridge command ? I tried this, which fails.. root@net-3:~# ip link set dev vxlan0 name untagged type vlan id 0 RTNETLINK answers: Operation not supported root@net-3:~# All the interfaces in the bridge are untagged.

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-24 Thread Timur Tabi
On 05/24/2017 09:09 AM, Andrew Lunn wrote: > It could be, the copper side is up, but the SGMII side is down, at the > point at803x_aneg_done() is called. So it is correctly returning > 0. Sometime later the SGMII side goes up, but there is not a second > interrupt. Hence the phy core does not know

Re: [PATCH v2 net-next 00/11] qed/qede: Mostly-cleanup series

2017-05-24 Thread David Miller
From: Yuval Mintz Date: Tue, 23 May 2017 09:41:17 +0300 > This series contains some cleanup of the qed and qede code: > - #1 contains mostly static/endian changes in order to allow qede to >pass sparse compilation cleanly. > - #2, #5 and #6 are either semantic or

Re: [PATCH v2] net: fec: add post PHY reset delay DT property

2017-05-24 Thread David Miller
From: Quentin Schulz Date: Tue, 23 May 2017 11:48:08 +0200 > Some PHY require to wait for a bit after the reset GPIO has been > toggled. This adds support for the DT property `phy-reset-post-delay` > which gives the delay in milliseconds to wait after reset. >

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-24 Thread Andrew Lunn
On Wed, May 24, 2017 at 01:58:09PM -0500, Timur Tabi wrote: > On 05/24/2017 09:09 AM, Andrew Lunn wrote: > > It could be, the copper side is up, but the SGMII side is down, at the > > point at803x_aneg_done() is called. So it is correctly returning > > 0. Sometime later the SGMII side goes up, but

[PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-24 Thread Florian Fainelli
There is currently no way for a program scanning /sys to know whether a network device is attached to a particular PHY device, just like the PHY device is not pointed back to its attached network device. Create a symbolic link in the network device's namespace named "phydev" which points to the

[PATCH net-next 3/3] net: sysfs: Document PHY device sysfs attributes

2017-05-24 Thread Florian Fainelli
Document the different sysfs attributes that exist for PHY devices: attached_dev, phy_has_fixups, phy_id and phy_interface. Signed-off-by: Florian Fainelli --- Documentation/ABI/testing/sysfs-class-net-phydev | 32 1 file changed, 32 insertions(+)

Re: [PATCH] net/phy: fix mdio-octeon dependency and build

2017-05-24 Thread David Miller
From: Randy Dunlap Date: Tue, 23 May 2017 08:19:49 -0700 > From: Randy Dunlap > > Fix build errors by making this driver depend on OF_MDIO, like > several other similar drivers do. > > drivers/built-in.o: In function `octeon_mdiobus_remove': >

Re: [kernel-hardening] [PATCH v4 next 0/3] modules: automatic module loading restrictions

2017-05-24 Thread Djalal Harouni
On Tue, May 23, 2017 at 9:48 AM, Solar Designer wrote: >> >>> On Mon, May 22, 2017 at 2:08 PM, Solar Designer >> >>> wrote: >> >>> > On Mon, May 22, 2017 at 01:57:03PM +0200, Djalal Harouni wrote: >> >>> >> *) When modules_autoload_mode is set to (2),

Re: [PATCH net-next] geneve: fix fill_info when using collect_metadata

2017-05-24 Thread Pravin Shelar
On Tue, May 23, 2017 at 3:37 PM, Eric Garver wrote: > Since 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") fill_info > does not return UDP_ZERO_CSUM6_RX when using COLLECT_METADATA. This is > because it uses ip_tunnel_info_af() with the device level info, which is > not

Re: [PATCH net 0/2] sctp: a bunch of fixes for processing dupcookie

2017-05-24 Thread David Miller
From: Xin Long Date: Tue, 23 May 2017 13:28:53 +0800 > After introducing transport hashtable and per stream info into sctp, > some regressions were caused when processing dupcookie, this patchset > is to fix them. Series applied, thanks.

Re: [pull request][net 0/8] Mellanox, mlx5 fixes 2017-05-23

2017-05-24 Thread David Miller
From: Saeed Mahameed Date: Tue, 23 May 2017 17:16:02 +0300 > This series contains some fixes for the mlx5 driver and one small patch that > adds csum actions accessors in include/net/tc_act/tc_csum.h needed by some of > mlx5 fixes patches. > > Details are below. > > Please

[PATCH net-next 5/8] net: ipv4: Save trie prefix to fib lookup result

2017-05-24 Thread Roopa Prabhu
From: David Ahern Prefix is needed for returning matching route spec on get route request. Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu --- include/net/ip_fib.h | 1 + net/ipv4/fib_trie.c | 1 + 2 files changed, 2

[PATCH net-next 3/8] net: ipv4: Remove event arg to rt_fill_info

2017-05-24 Thread Roopa Prabhu
From: David Ahern rt_fill_info has 1 caller with the event set to RTM_NEWROUTE. Given that remove the arg and use RTM_NEWROUTE directly in rt_fill_info. Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu ---

[PATCH net-next 8/8] net: ipv6: RTM_GETROUTE: return matched fib result when requested

2017-05-24 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds support to return matched fib result when RTM_F_FIB_MATCH flag is specified in RTM_GETROUTE request. This is useful for user-space applications/controllers wanting to query a matching route. Signed-off-by: Roopa Prabhu

[PATCH net-next 0/8] net: extend RTM_GETROUTE to return fib result

2017-05-24 Thread Roopa Prabhu
From: Roopa Prabhu This series adds a new RTM_F_FIB_MATCH flag to return matched fib result with RTM_GETROUTE. This is useful for applications and protocols in userspace wanting to query the selected route. examples (with patched iproute2): ipv4: $ip route show

[PATCH net-next 1/8] net: ipv4: refactor __ip_route_output_key_hash

2017-05-24 Thread Roopa Prabhu
From: David Ahern A later patch wants access to the fib result on an output route lookup with the rcu lock held. Refactor __ip_route_output_key_hash, pushing the logic between rcu_read_lock ... rcu_read_unlock into a new helper that takes the fib_result as an input arg. To

[PATCH net-next 2/8] net: ipv4: refactor ip_route_input_noref

2017-05-24 Thread Roopa Prabhu
From: David Ahern A later patch wants access to the fib result on an input route lookup with the rcu lock held. Refactor ip_route_input_noref pushing the logic between rcu_read_lock ... rcu_read_unlock into a new helper that takes the fib_result as an input arg.

Re: [PATCH net-next 2/4] nfp: register ports as devlink ports

2017-05-24 Thread Jakub Kicinski
On Wed, 24 May 2017 14:35:14 +0200, Jiri Pirko wrote: > >+void nfp_devlink_port_unregister(struct nfp_port *port) > >+{ > >+/* Due to unpleasant lock ordering we may see the port go away before > >+ * we have fully probed. > > Could you elaborate on this a bit more please? It's

Re: [PATCH] net: rtnetlink: bail out from rtnl_fdb_dump() on parse error

2017-05-24 Thread Greg Rose
On Tue, 2017-05-23 at 13:20 +0200, Alexander Potapenko wrote: > rtnl_fdb_dump() failed to check the result of nlmsg_parse(), which led > to contents of |ifm| being uninitialized because nlh->nlmsglen was too > small to accommodate |ifm|. The uninitialized data may affect some > branches and result

RE: [PATCH net-next 1/8] net: ipv4: refactor __ip_route_output_key_hash

2017-05-24 Thread Rosen, Rami
Hi, Rupa /David Ahern, First, thanks for this patch set! Second, it seems to me that something might be incorrect here. You have these additions in this patch (1/8): ... +struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *flp, +

[PATCH net-next 2/3] net: sysfs: Document "phydev" symbolic link

2017-05-24 Thread Florian Fainelli
Now that we link the network device to its PHY device, document this sysfs symbolic link. Signed-off-by: Florian Fainelli --- Documentation/ABI/testing/sysfs-class-net | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-net

[PATCH net-next 0/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-24 Thread Florian Fainelli
Hi David, Andrew, This patch series addresses a device topology shortcoming where a program scanning /sys would not be able to establish a mapping between the network device and the PHY device. In the process it turned out that no PHY device documentation existed for sysfs attributes. Thanks!

[PATCH net-next 6/8] net: ipv4: add new RTM_F_FIB_MATCH flag for use with RTM_GETROUTE

2017-05-24 Thread Roopa Prabhu
From: Roopa Prabhu This flag when specified will return matched fib result in response to a RTM_GETROUTE query. Signed-off-by: Roopa Prabhu --- include/uapi/linux/rtnetlink.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH net-next 4/8] net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup

2017-05-24 Thread Roopa Prabhu
From: David Ahern Convert inet_rtm_getroute to use ip_route_input_rcu and ip_route_output_key_hash_rcu passing the fib_result arg to both. The rcu lock is held through the creation of the response, so the rtable/dst does not need to be attached to the skb and is passed to

[PATCH net-next 7/8] net: ipv4: RTM_GETROUTE: return matched fib result when requested

2017-05-24 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds support to return matched fib result when RTM_F_FIB_MATCH flag is specified in RTM_GETROUTE request. This is useful for user-space applications/controllers wanting to query a matching route. Signed-off-by: Roopa Prabhu

Re: pull-request: mac80211 2017-05-23

2017-05-24 Thread David Miller
From: Johannes Berg Date: Tue, 23 May 2017 14:42:55 +0200 > I have just two fixes here, one of the scheduled scan issue that > Sander Eikelenboom found, and the other properly makes mesh more > strictly check its extension headers. > > Please pull and let me know if

Re: [PATCH] net: rtnetlink: bail out from rtnl_fdb_dump() on parse error

2017-05-24 Thread David Miller
From: Alexander Potapenko Date: Tue, 23 May 2017 13:20:28 +0200 > rtnl_fdb_dump() failed to check the result of nlmsg_parse(), which led > to contents of |ifm| being uninitialized because nlh->nlmsglen was too > small to accommodate |ifm|. The uninitialized data may affect

Re: [PATCH net] net/mlx4: Fix the check in attaching steering rules

2017-05-24 Thread David Miller
From: Tariq Toukan Date: Tue, 23 May 2017 15:50:07 +0300 > diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c > b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c > index ae5fdc2df654..00a7cd3dcc2e 100644 > --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c >

Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes

2017-05-24 Thread David Miller
From: Stefan Wahren Date: Tue, 23 May 2017 15:12:37 +0200 > Most of the includes in qca_7k.c are unnecessary so we better remove them. > > Signed-off-by: Stefan Wahren > --- > drivers/net/ethernet/qualcomm/qca_7k.c | 4 > 1 file changed, 4

[PATCH net v2 5/5] bpf: add various verifier test cases

2017-05-24 Thread Daniel Borkmann
This patch adds various verifier test cases: 1) A test case for the pruning issue when tracking alignment is used. 2) Various PTR_TO_MAP_VALUE_OR_NULL tests to make sure pointer arithmetic turns such register into UNKNOWN_VALUE type. 3) Test cases for the special treatment of LD_ABS/LD_IND

[PATCH net v2 1/5] bpf: fix incorrect pruning decision when alignment must be tracked

2017-05-24 Thread Daniel Borkmann
Currently, when we enforce alignment tracking on direct packet access, the verifier lets the following program pass despite doing a packet write with unaligned access: 0: (61) r2 = *(u32 *)(r1 +76) 1: (61) r3 = *(u32 *)(r1 +80) 2: (61) r7 = *(u32 *)(r1 +8) 3: (bf) r0 = r2 4: (07) r0 +=

[PATCH net v2 0/5] Various BPF fixes

2017-05-24 Thread Daniel Borkmann
Follow-up to fix incorrect pruning when alignment tracking is in use and to properly clear regs after call to not leave stale data behind, also a fix that adds bpf_clone_redirect to the bpf_helper_changes_pkt_data helper and exposes correct map_flags for lpm map into fdinfo. For details, please

[PATCH net v2 3/5] bpf: add bpf_clone_redirect to bpf_helper_changes_pkt_data

2017-05-24 Thread Daniel Borkmann
The bpf_clone_redirect() still needs to be listed in bpf_helper_changes_pkt_data() since we call into bpf_try_make_head_writable() from there, thus we need to invalidate prior pkt regs as well. Fixes: 36bbef52c7eb ("bpf: direct packet write and access for helpers for clsact progs")

Re: [PATCH net-next 7/8] net: ipv4: RTM_GETROUTE: return matched fib result when requested

2017-05-24 Thread David Ahern
On 5/24/17 12:19 PM, Roopa Prabhu wrote: > @@ -2746,8 +2748,15 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, > struct nlmsghdr *nlh, > if (rtm->rtm_flags & RTM_F_LOOKUP_TABLE) > table_id = rt->rt_table_id; > > - err = rt_fill_info(net, dst, src, table_id, ,

[PATCH net-next 2/6] net: lwtunnel: Add extack to encap attr validation

2017-05-24 Thread David Ahern
Pass extack down to lwtunnel_valid_encap_type and lwtunnel_valid_encap_type_attr. Add messages for unknown or unsupported encap types. Signed-off-by: David Ahern --- include/net/lwtunnel.h | 13 + net/core/lwtunnel.c | 18 +-

[PATCH net-next 1/6] net: ipv4: Add extack message for invalid prefix or length

2017-05-24 Thread David Ahern
Add extack error message for invalid prefix length and invalid prefix. Example of the latter is a route spec containing 172.16.100.1/24, where the /24 mask means the lower 8-bits should be 0. Amazing how easy that one is to overlook when an EINVAL is returned. Signed-off-by: David Ahern

[PATCH net-next 6/6] net: mpls: minor cleanups

2017-05-24 Thread David Ahern
Noticed these doing the extack support: - nla_get_via is only used in af_mpls.c so remove from internal.h - err is initialized to EINVAL in mpls_nh_build_from_cfg but then set again before it is checked. Remove the EINVAL setting Signed-off-by: David Ahern ---

[PATCH net-next 5/6] net: mpls: Add extack messages for route add and delete failures

2017-05-24 Thread David Ahern
Add error messages for failures in adding and deleting mpls routes. This covers most of the annoying EINVAL errors. Signed-off-by: David Ahern --- net/mpls/af_mpls.c | 136 +--- net/mpls/internal.h | 2 +- 2 files changed, 98

[PATCH net-next 3/6] net: plumb extack arg down to lwtunnel build state

2017-05-24 Thread David Ahern
Pass extack arg down to lwtunnel_build_state and the build_state callbacks. Add messages for failures in lwtunnel_build_state, and add the extarg to nla_parse where possible in the build_state callbacks. Signed-off-by: David Ahern --- include/linux/netlink.h | 10 ++

[PATCH net-next 4/6] net: Fill in extack for mpls lwt encap

2017-05-24 Thread David Ahern
Fill in extack for errors in build_state for mpls lwt encap including passing extack to nla_get_labels and adding error messages for failures in it. Signed-off-by: David Ahern --- net/mpls/af_mpls.c | 49 ++--

Re: [PATCH net-next 8/8] net: ipv6: RTM_GETROUTE: return matched fib result when requested

2017-05-24 Thread David Ahern
Since you have to do a v2 ... On 5/24/17 12:19 PM, Roopa Prabhu wrote: > @@ -3622,6 +3623,7 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, > struct nlmsghdr *nlh, > memset(, 0, sizeof(fl6)); > rtm = nlmsg_data(nlh); > fl6.flowlabel = ip6_make_flowinfo(rtm->rtm_tos,

[PATCH net v2 2/5] bpf: properly reset caller saved regs after helper call and ld_abs/ind

2017-05-24 Thread Daniel Borkmann
Currently, after performing helper calls, we clear all caller saved registers, that is r0 - r5 and fill r0 depending on struct bpf_func_proto specification. The way we reset these regs can affect pruning decisions in later paths, since we only reset register's imm to 0 and type to NOT_INIT.

[PATCH net v2 4/5] bpf: fix wrong exposure of map_flags into fdinfo for lpm

2017-05-24 Thread Daniel Borkmann
trie_alloc() always needs to have BPF_F_NO_PREALLOC passed in via attr->map_flags, since it does not support preallocation yet. We check the flag, but we never copy the flag into trie->map.map_flags, which is later on exposed into fdinfo and used by loaders such as iproute2. Latter uses this in

[PATCH] test_bpf: Add a couple of tests for BPF_JSGE.

2017-05-24 Thread David Daney
Some JITs can optimize comparisons with zero. Add a couple of BPF_JSGE tests against immediate zero. Signed-off-by: David Daney --- lib/test_bpf.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c

Re: [PATCH net-next 3/3] net: sysfs: Document PHY device sysfs attributes

2017-05-24 Thread Florian Fainelli
On 05/24/2017 04:07 PM, Florian Fainelli wrote: > Hi Andrew, > > On 05/24/2017 01:10 PM, Andrew Lunn wrote: >>> +What: /sys/class/mdio_bus///phy_interface >>> +Date: February 2014 >>> +KernelVersion: 3.15 >>> +Contact: netdev@vger.kernel.org >>> +Description: >>> +

  1   2   >