Re: Potential issue with f5e64032a799 "net: phy: fix resume handling"

2018-02-03 Thread Florian Fainelli
On 02/03/2018 03:58 PM, Heiner Kallweit wrote: > Am 03.02.2018 um 21:17 schrieb Andrew Lunn: >> On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote: >>> This commit forces callers of phy_resume() and phy_suspend() to hold >>> mutex phydev->lock. This was done for calls to phy_resume()

Re: [PATCH net 1/1 v1] rtnetlink: require unique netns identifier

2018-02-03 Thread David Ahern
On 2/3/18 12:17 PM, Stephen Hemminger wrote: > On Sat, 3 Feb 2018 14:29:04 +0100 > Christian Brauner wrote: > >> +static int rtnl_ensure_unique_netns_attr(const struct sock *sk, >> + struct nlattr *tb[], >> + struct netlink_

Re: Potential issue with f5e64032a799 "net: phy: fix resume handling"

2018-02-03 Thread Heiner Kallweit
Am 03.02.2018 um 21:17 schrieb Andrew Lunn: > On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote: >> This commit forces callers of phy_resume() and phy_suspend() to hold >> mutex phydev->lock. This was done for calls to phy_resume() and >> phy_suspend() in phylib, however there are mor

[RFC PATCH 05/10] net: dsa: mv88e6xxx: add support for GPIO configuration

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff MV88E6352 and later switches support GPIO control through the "Scratch & Misc" global2 register. (Older switches do too, though with a slightly different register interface. Only the 6352-style is implemented here.) Add a new file, global2_scratch.c, for operations in the S

[RFC PATCH 08/10] net: dsa: forward timestamping callbacks to switch drivers

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff Forward the rx/tx timestamp machinery from the dsa infrastructure to the switch driver. On the rx side, defer delivery of skbs until we have an rx timestamp. This mimicks the behavior of skb_defer_rx_timestamp. On the tx side, identify PTP packets, clone them, and pass the

[RFC PATCH 03/10] net: dsa: mv88e6xxx: add accessors for PTP/TAI registers

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff This patch implements support for accessing the Precision Time Protocol and Time Application Interface registers via the AVB register interface in the Global 2 register. The register interface differs slightly between different models; older models use a 3-bit operations fi

[RFC PATCH 07/10] net: dsa: forward hardware timestamping ioctls to switch driver

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff This patch adds support to the dsa slave network device so that switch drivers can implement the SIOC[GS]HWTSTAMP ioctls and the ethtool timestamp-info interface. Signed-off-by: Brandon Streiff Signed-off-by: Andrew Lunn --- include/net/dsa.h | 15 +++ net/ds

[RFC PATCH 02/10] net: dsa: mv88e6xxx: export g2 register accessors

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff Let the mv88e6xxx_g2_* register accessor functions be accessible outside of global2.c. Signed-off-by: Brandon Streiff Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/global2.c | 8 drivers/net/dsa/mv88e6xxx/global2.h | 25 + 2 f

[RFC PATCH 04/10] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff This patch adds basic support for exposing the 32-bit timestamp counter inside the mv88e6xxx switch as a ptp_clock. Adjfine implemented by Richard Cochran. Andrew Lunn: fix return value of PTP stub function. Signed-off-by: Brandon Streiff Signed-off-by: Richard Cochran S

[RFC PATCH 01/10] net: ptp: Add stub for ptp_classify_raw()

2018-02-03 Thread Andrew Lunn
When NET_PTP_CLASSIFY is disabled, a stub function is required in order that drivers compile. Signed-off-by: Andrew Lunn Acked-by: Richard Cochran --- include/linux/ptp_classify.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h

[RFC PATCH 00/10] PTP support for DSA and mv88e6xxx driver.

2018-02-03 Thread Andrew Lunn
This patchset adds support for using the PTP hardware in switches supported by the mv88e6xxx driver. The code was produces in collaboration with Brandon Streiff doing the initial implementation, and then Richard Cochran and Andrew Lunn making further changes and cleanups. The code is sufficient to

[RFC PATCH 06/10] net: dsa: mv88e6xxx: add support for event capture

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff This patch adds support for configuring mv88e6xxx GPIO lines as PTP pins, so that they may be used for time stamping external events or for periodic output. Checkpatch and reverse Christmas tree fixes by Andrew Lunn Periodic output removed by Richard Cochran, until a bette

[RFC PATCH 12/12] net: dsa: mv88e6xxx: Release mutex between each ATU read

2018-02-03 Thread Andrew Lunn
The PTP code needs low latency access to the PTP hardware timestamps. Reading all the ATU entries in one go adds a lot of latency to the PTP code. So take and release the reg_lock mutex for each individual MAC address in the ATU, allowing the PTP thread jump in between. Signed-off-by: Andrew Lunn

[RFC PATCH 09/10] net: dsa: mv88e6xxx: add rx/tx timestamping support

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff This patch implements RX/TX timestamping support. The Marvell PTP hardware supports RX timestamping individual message types, but for simplicity we only support the EVENT receive filter since few if any clients bother with the more specific filter types. checkpatch and rev

[RFC PATCH 10/10] net: dsa: mv88e6xxx: add workaround for 6341 timestamping

2018-02-03 Thread Andrew Lunn
From: Brandon Streiff 88E6341 devices default to timestamping at the PHY, but due to a hardware issue, timestamps via this component are unreliable. For this family, configure the PTP hardware to force the timestamping to occur at the MAC. Signed-off-by: Brandon Streiff Signed-off-by: Andrew Lu

[RFC PATCH 11/12] net: dsa: mv88e6xxx: Release mutex between each statistics read

2018-02-03 Thread Andrew Lunn
The PTP code needs low latency access to the PTP hardware timestamps. Reading all the statistics in one go adds a lot of latency to the PTP code. So take and release the reg_lock mutex for each individual statistics, allowing the PTP thread jump in between. Signed-off-by: Andrew Lunn --- drivers

Re: 88e6161 failed create slave phy

2018-02-03 Thread Andrew Lunn
On Thu, Jan 25, 2018 at 09:15:16PM +0800, ?? wrote: > hello, I am compiling kernel for 88f6281 with 88e6161 switch for 4.9.73.but > the dsa does not work correctly.I think it is a bug because 4.4 and 4.14 > works fine. > both two bindings get the same result (port uninitialized, could not set

Fw: [Bug 198657] New: irda scheduled for removal

2018-02-03 Thread Stephen Hemminger
Begin forwarded message: Date: Sat, 03 Feb 2018 20:24:46 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 198657] New: irda scheduled for removal https://bugzilla.kernel.org/show_bug.cgi?id=198657 Bug ID: 198657 Summary: irda

Re: Potential issue with f5e64032a799 "net: phy: fix resume handling"

2018-02-03 Thread Andrew Lunn
On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote: > This commit forces callers of phy_resume() and phy_suspend() to hold > mutex phydev->lock. This was done for calls to phy_resume() and > phy_suspend() in phylib, however there are more callers in network > drivers. I'd assume that t

Re: [PATCH net 1/1 v1] rtnetlink: require unique netns identifier

2018-02-03 Thread Stephen Hemminger
On Sat, 3 Feb 2018 14:29:04 +0100 Christian Brauner wrote: > +static int rtnl_ensure_unique_netns_attr(const struct sock *sk, > + struct nlattr *tb[], > + struct netlink_ext_ack *extack) > +{ > + int ret = -EINVAL; > +

Re: RFC(V3): Audit Kernel Container IDs

2018-02-03 Thread Casey Schaufler
On 2/2/2018 3:24 PM, Paul Moore wrote: > On Fri, Feb 2, 2018 at 5:19 PM, Simo Sorce wrote: >> On Fri, 2018-02-02 at 16:24 -0500, Paul Moore wrote: >>> On Wed, Jan 10, 2018 at 2:00 AM, Richard Guy Briggs wrote: On 2018-01-09 11:18, Simo Sorce wrote: > On Tue, 2018-01-09 at 07:16 -0500, Ri

Re: [PATCH net v2] cls_u32: fix use after free in u32_destroy_key()

2018-02-03 Thread Paolo Abeni
On Fri, 2018-02-02 at 15:30 +0100, Paolo Abeni wrote: > Li Shuang reported an Oops with cls_u32 due to an use-after-free > in u32_destroy_key(). The use-after-free can be triggered with: > > dev=lo > tc qdisc add dev $dev root handle 1: htb default 10 > tc filter add dev $dev parent 1: prio 5 hand

Re: [PATCH net v2] cls_u32: fix use after free in u32_destroy_key()

2018-02-03 Thread Paolo Abeni
Hi, On Fri, 2018-02-02 at 13:52 -0800, Cong Wang wrote: > On Fri, Feb 2, 2018 at 6:30 AM, Paolo Abeni wrote: > > The problem is that the htnode is freed before the linked knodes and the > > latter will try to access the first at u32_destroy_key() time. > > This change addresses the issue using the

Potential issue with f5e64032a799 "net: phy: fix resume handling"

2018-02-03 Thread Heiner Kallweit
This commit forces callers of phy_resume() and phy_suspend() to hold mutex phydev->lock. This was done for calls to phy_resume() and phy_suspend() in phylib, however there are more callers in network drivers. I'd assume that these other calls issue a warning now because of the lock not being held.

[PATCH net 1/1 v1] rtnetlink: require unique netns identifier

2018-02-03 Thread Christian Brauner
Since we've added support for IFLA_IF_NETNSID for RTM_{DEL,GET,SET,NEW}LINK it is possible for userspace to send us requests with three different properties to identify a target network namespace. This affects at least RTM_{NEW,SET}LINK. Each of them could potentially refer to a different network n

[PATCH net 0/1 v1] rtnetlink: require unique netns identifier

2018-02-03 Thread Christian Brauner
Hey, Since we've added support for IFLA_IF_NETNSID for RTM_{DEL,GET,SET,NEW}LINK it is possible for userspace to send us requests with three different properties to identify a target network namespace. This affects at least RTM_{NEW,SET}LINK. Each of them could potentially refer to a different net

[PATCH V2 net-next] rds: tcp: use rds_destroy_pending() to synchronize netns/module teardown and rds connection/workq management

2018-02-03 Thread Sowmini Varadhan
An rds_connection can get added during netns deletion between lines 528 and 529 of 506 static void rds_tcp_kill_sock(struct net *net) : /* code to pull out all the rds_connections that should be destroyed */ : 528 spin_unlock_irq(&rds_tcp_conn_lock); 529 list_for_each_e

Re: net: hang in unregister_netdevice: waiting for lo to become free

2018-02-03 Thread Xin Long
On Thu, Feb 1, 2018 at 1:49 AM, Xin Long wrote: > On Tue, Jan 30, 2018 at 11:59 PM, David Ahern wrote: >> On 1/30/18 1:57 PM, David Ahern wrote: >>> On 1/30/18 1:08 PM, Daniel Borkmann wrote: On 01/30/2018 07:32 PM, Cong Wang wrote: > On Tue, Jan 30, 2018 at 4:09 AM, Dmitry Vyukov wrote

Re: possible deadlock in rtnl_lock (2)

2018-02-03 Thread Xin Long
On Thu, Feb 1, 2018 at 7:58 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 255442c93843f52b6891b21d0b485bf2c97f93c3 (Thu Feb 1 03:25:25 2018 +) > Merge tag 'docs-4.16' of git://git.lwn.net/linux > > So far this crash happened 1587 times on net-next, upstream

Re: [B.A.T.M.A.N.] [RFC] batman-adv: always assume 2-byte packet alignment

2018-02-03 Thread Sven Eckelmann
On Mittwoch, 24. Januar 2018 14:40:03 CET Sven Eckelmann wrote: [...] > I know your intentions and I understand the problem. But there is the chance > that David Miller will reject this patch - like he did it some years ago > with a similar (not the same) patch: > > "I'm not applying this, p