Re: [PATCH] p54: memset(0) whole array

2016-10-15 Thread Christian Lamparter
On Friday, October 14, 2016 11:23:09 AM CEST Jiri Slaby wrote: > gcc 7 complains: > drivers/net/wireless/intersil/p54/fwio.c: In function 'p54_scan': > drivers/net/wireless/intersil/p54/fwio.c:491:4: warning: 'memset' used with > length equal to number of elements without multiplication by

Re: net/sctp: BUG: KASAN: stack-out-of-bounds in memcmp

2016-10-15 Thread Baozeng Ding
Hello Xin Long, On 2016/10/14 19:13, Xin Long wrote: > On Sat, Aug 20, 2016 at 3:51 PM, Baozeng Ding wrote: >> Hello all, >> The following program triggers stack-out-of-bounds in memcmp. The kernel >> version is 4.8.0-rc1+ (on Aug 13 commit >>

Re: Need help with mdiobus_register and phy

2016-10-15 Thread Florian Fainelli
On October 14, 2016 7:25:14 PM CEST, Andrew Lunn wrote: >> So after calling BMCR_PDOWN, the PHYSID1 and PHYSID2 registers are >> no longer readable. Is that expected? > >You are making two changes here. Is it the SGMII power down which is >causing the id registers to return

userspace build broken by include changes

2016-10-15 Thread Pascal Terjan
rp-pppoe plugin of ppp no longer builds: In file included from pppoe.h:87:0, from plugin.c:29: /usr/include/linux/in.h:28:3: error: redeclaration of enumerator 'IPPROTO_IP' IPPROTO_IP = 0, /* Dummy protocol for TCP */ ^ /usr/include/netinet/in.h:42:5: note: previous

linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3

2016-10-15 Thread Pascal Terjan
It is no longer possible to include + userspace headers using time, for example , this broke for example the build of linux-atm. Reproducer: $ cat test.c #include #include $ gcc -c test.c In file included from /usr/include/sys/select.h:43:0, from

[RFC v2 1/2] proc connector: add namespace events

2016-10-15 Thread Alban Crequy
From: Alban Crequy The act of a process creating or joining a namespace via clone(), unshare() or setns() is a useful signal for monitoring applications. I am working on a monitoring application that keeps track of all the containers and all processes inside each container.

[RFC v2 2/2] proc connector: add a "get feature" op

2016-10-15 Thread Alban Crequy
From: Alban Crequy As more kinds of events are being added in the proc connector, userspace needs a way to detect whether the kernel supports those new events. When a kind of event is not supported, userspace should report an error propertly, or fallback to other methods

[RFC v2 0/2] proc connector: get namespace events

2016-10-15 Thread Alban Crequy
This is v2 of the patch set to add namespace events in the proc connector. The act of a process creating or joining a namespace via clone(), unshare() or setns() is a useful signal for monitoring applications. I am working on a monitoring application that keeps track of all the containers and

Re: [PATCH 0/2] net: Fix compiler warnings

2016-10-15 Thread tndave
On 10/15/2016 02:48 PM, David Miller wrote: From: Tushar Dave Date: Fri, 14 Oct 2016 17:06:04 -0700 Recently, ATU (iommu) changes are submitted to linux-sparc that enables 64bit DMA on SPARC. However, this change also makes 'incompatible pointer type' compiler

[PATCH RFC] ixgbe: ixgbe_atr() must check if network header is available in headlen

2016-10-15 Thread Sowmini Varadhan
For some Tx paths (e.g., tpacket_snd()), ixgbe_atr may be passed down an sk_buff that has the network and transport header in the paged data, so it needs to make sure these headers are available in the headlen bytes to calculate the l4_proto. This patch bails out if the headlen is "too short",

Re: [PATCH v2] r8169: set coherent DMA mask as well as streaming DMA mask

2016-10-15 Thread David Miller
From: Ard Biesheuvel Date: Fri, 14 Oct 2016 14:40:33 +0100 > PCI devices that are 64-bit DMA capable should set the coherent > DMA mask as well as the streaming DMA mask. On some architectures, > these are managed separately, and so the coherent DMA mask will be > left

Re: [PATCH 0/2] net: Fix compiler warnings

2016-10-15 Thread David Miller
From: Tushar Dave Date: Fri, 14 Oct 2016 17:06:04 -0700 > Recently, ATU (iommu) changes are submitted to linux-sparc that > enables 64bit DMA on SPARC. However, this change also makes > 'incompatible pointer type' compiler warnings inevitable on sunqe > and sunbmac

Re: [PATCH v2] vmxnet3: avoid assumption about invalid dma_pa in vmxnet3_set_mc()

2016-10-15 Thread David Miller
From: Alexey Khoroshilov Date: Sat, 15 Oct 2016 00:01:20 +0300 > vmxnet3_set_mc() checks new_table_pa returned by dma_map_single() > with dma_mapping_error(), but even there it assumes zero is invalid pa > (it assumes dma_mapping_error(...,0) returns true if new_table is

Re: [PATCH] ipvlan: constify l3mdev_ops structure

2016-10-15 Thread David Miller
From: Julia Lawall Date: Sat, 15 Oct 2016 17:40:30 +0200 > This l3mdev_ops structure is only stored in the l3mdev_ops field of a > net_device structure. This field is declared const, so the l3mdev_ops > structure can be declared as const also. Additionally drop the >

Re: [patch] stmmac: fix an error code in stmmac_ptp_register()

2016-10-15 Thread David Miller
From: Dan Carpenter Date: Fri, 14 Oct 2016 22:26:11 +0300 > PTR_ERR(NULL) is success. We have to preserve the error code earlier. > > Fixes: 7086605a6ab5 ("stmmac: fix error check when init ptp") > Signed-off-by: Dan Carpenter Good catch,

Re: [PATCH] net: qcom/emac: disable interrupts before calling phy_disconnect

2016-10-15 Thread David Miller
From: Timur Tabi Date: Fri, 14 Oct 2016 14:14:35 -0500 > There is a race condition that can occur if EMAC interrupts are > enabled when phy_disconnect() is called. phy_disconnect() sets > adjust_link to NULL. When an interrupt occurs, the ISR might > call

Re: [PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround

2016-10-15 Thread Robert Jarzmik
Sorry David, I just noticed you weren't in the "To:" of this serie, but I won't forget you for the v3 I need to release anyway (https://lkml.org/lkml/2016/10/15/104). Robert Jarzmik writes: > + lp->half_word_align4 = > + machine_is_mainstone() ||

Re: [PATCH v3] net: Require exact match for TCP socket lookups if dif is l3mdev

2016-10-15 Thread David Miller
From: David Ahern Date: Sat, 15 Oct 2016 17:07:53 -0600 > I believe at netconf someone mentioned it would be a great day when > something is done for IPv6 first and IPv4 was a follow on. Here you > go. :-) :-) > I can rename the existing one to skb_l3mdev_slave_6 and

Re: [PATCH v2] r8169: set coherent DMA mask as well as streaming DMA mask

2016-10-15 Thread David Miller
From: Ard Biesheuvel Date: Fri, 14 Oct 2016 14:48:51 +0100 > >> On 14 Oct 2016, at 14:42, David Laight wrote: >> >> From: Of Ard Biesheuvel >>> Sent: 14 October 2016 14:41 >>> PCI devices that are 64-bit DMA capable should set the coherent

Re: [PATCH v3] net: Require exact match for TCP socket lookups if dif is l3mdev

2016-10-15 Thread David Ahern
On 10/15/16 3:46 PM, David Miller wrote: > From: David Ahern > Date: Fri, 14 Oct 2016 12:29:19 -0700 > >> +/* can not be used in TCP layer after tcp_v6_fill_cb */ >> +static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff >> *skb) >> +{ >> +#if

Re: [PATCH v2 net-next 0/2] ila: Cache a route in ILA lwt structure

2016-10-15 Thread David Miller
From: Tom Herbert Date: Fri, 14 Oct 2016 11:25:35 -0700 > Add a dst_cache to ila_lwt structure. This holds a cached route for the > translated address. In ila_output we now perform a route lookup after > translation and if possible (destination in original route is full 128

linux-next: manual merge of the net tree with Linus' tree

2016-10-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net tree got a conflict in: drivers/net/ethernet/qlogic/Kconfig between commit: 2e0cbc4dd077 ("qedr: Add RoCE driver framework") from Linus' tree and commit: 0189efb8f4f8 ("qed*: Fix Kconfig dependencies with INFINIBAND_QEDR") from the net tree.

Re: [PATCH v3] net: Require exact match for TCP socket lookups if dif is l3mdev

2016-10-15 Thread David Miller
From: David Ahern Date: Fri, 14 Oct 2016 12:29:19 -0700 > +/* can not be used in TCP layer after tcp_v6_fill_cb */ > +static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff > *skb) > +{ > +#if defined(CONFIG_NET_L3_MASTER_DEV) > + if

Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3

2016-10-15 Thread Mikko Rapeli
On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote: > It is no longer possible to include + userspace > headers using time, for example , this broke for example > the build of linux-atm. > > Reproducer: > > $ cat test.c > #include > #include If possible, please reverse the order

Re: Need help with mdiobus_register and phy

2016-10-15 Thread Timur Tabi
Andrew Lunn wrote: 1) Take the SerDes power down out of the suspend code for the at803x. 2) Assume MII_PHYID1/2 registers are not guaranteed to be available when the PHY is powered down. So get_phy_id should first read MII_BMCR. If it gets 0x, assume there is no PHY there. If the PDOWN bit

[PATCH] ipvlan: constify l3mdev_ops structure

2016-10-15 Thread Julia Lawall
This l3mdev_ops structure is only stored in the l3mdev_ops field of a net_device structure. This field is declared const, so the l3mdev_ops structure can be declared as const also. Additionally drop the __read_mostly annotation. The semantic patch that adds const is as follows:

Re: [patch net-next RFC 4/6] Introduce sample tc action

2016-10-15 Thread Roopa Prabhu
On 10/15/16, 9:34 AM, Roopa Prabhu wrote: > On 10/12/16, 5:41 AM, Jiri Pirko wrote: >> From: Yotam Gigi >> >> This action allow the user to sample traffic matched by tc classifier. >> The sampling consists of choosing packets randomly, truncating them, >> adding some

[PATCH v2 2/3] net: smc91x: take into account half-word workaround

2016-10-15 Thread Robert Jarzmik
For device-tree builds, platforms such as mainstone, idp and stargate2 must have their u16 writes all aligned on 32 bit boundaries. This is already enabled in platform data builds, and this patch adds it to device-tree builds. Signed-off-by: Robert Jarzmik --- Since v1:

Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3

2016-10-15 Thread Mikko Rapeli
On Sat, Oct 15, 2016 at 03:33:22PM +0100, Pascal Terjan wrote: > On 15 October 2016 at 15:09, Mikko Rapeli wrote: > > On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote: > >> It is no longer possible to include + userspace > >> headers using time, for example ,

[PATCH net] net: pktgen: remove rcu locking in pktgen_change_name()

2016-10-15 Thread Eric Dumazet
From: Eric Dumazet After Jesper commit back in linux-3.18, we trigger a lockdep splat in proc_create_data() while allocating memory from pktgen_change_name(). This patch converts t->if_lock to a mutex, since it is now only used from control path, and adds proper locking to

Re: [PATCH 1/2] rds: Remove unused rds_conn_error

2016-10-15 Thread Santosh Shilimkar
On 10/15/2016 11:53 AM, Joe Perches wrote: This macro's last use was removed in commit d769ef81d5b59 ("RDS: Update rds_conn_shutdown to work with rds_conn_path") so make the macro and the __rds_conn_error function definition and declaration disappear. Signed-off-by: Joe Perches

Re: [PATCH 2/2] rds: Remove duplicate prefix from rds_conn_path_error use

2016-10-15 Thread Santosh Shilimkar
On 10/15/2016 11:53 AM, Joe Perches wrote: rds_conn_path_error already prefixes "RDS:" to the output. Signed-off-by: Joe Perches --- Acked-by: Santosh Shilimkar

Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3

2016-10-15 Thread Pascal Terjan
On 15 October 2016 at 15:09, Mikko Rapeli wrote: > On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote: >> It is no longer possible to include + userspace >> headers using time, for example , this broke for example >> the build of linux-atm. >> >> Reproducer: >>

Re: [PATCH] ethtool: Zero memory allocated for statistics

2016-10-15 Thread David Miller
From: Vlad Tsyrklevich Date: Sat, 15 Oct 2016 15:11:08 + > I agree that we should propagate those errors and I'll prepare a new change > to do so for phy_driver.get_stats(), ethtool_ops.self_test(), and > ethtool_ops.get_ethtool_stats(). However, I still think this

Re: [patch net-next RFC 4/6] Introduce sample tc action

2016-10-15 Thread Roopa Prabhu
On 10/12/16, 5:41 AM, Jiri Pirko wrote: > From: Yotam Gigi > > This action allow the user to sample traffic matched by tc classifier. > The sampling consists of choosing packets randomly, truncating them, > adding some informative metadata regarding the interface and the

[PATCH] crypto: ccm - avoid scatterlist for MAC encryption

2016-10-15 Thread Ard Biesheuvel
The CCM code goes out of its way to perform the CTR encryption of the MAC using the subordinate CTR driver. To this end, it tweaks the input and output scatterlists so the aead_req 'odata' and/or 'auth_tag' fields [which may live on the stack] are prepended to the CTR payload. This involves

[net:master 10/15] net/ipv6/addrconf.c:1251:14-30: WARNING: Unsigned expression compared with zero: tmp_prefered_lft < 0

2016-10-15 Thread Julia Lawall
I haven't checked the entire context, but it could be useful to look at line 1251. julia -- Forwarded message -- Date: Sun, 16 Oct 2016 01:34:18 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: [net:master

[PATCH v2 0/3] support smc91x on mainstone and devicetree

2016-10-15 Thread Robert Jarzmik
This serie aims at bringing support to mainstone board on a device-tree based build, as what is already in place for legacy mainstone. The bulk of the mainstone "specific" behavior is that a u16 write doesn't work on a address of the form 4*n + 2, while it works on 4*n. The legacy workaround was

Re: [PATCH] ethtool: Zero memory allocated for statistics

2016-10-15 Thread Vlad Tsyrklevich
I agree that we should propagate those errors and I'll prepare a new change to do so for phy_driver.get_stats(), ethtool_ops.self_test(), and ethtool_ops.get_ethtool_stats(). However, I still think this change should be adopted. 3/5 of the cases here are reachable without any special capabilities

[PATCH 2/2] rds: Remove duplicate prefix from rds_conn_path_error use

2016-10-15 Thread Joe Perches
rds_conn_path_error already prefixes "RDS:" to the output. Signed-off-by: Joe Perches --- net/rds/threads.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/rds/threads.c b/net/rds/threads.c index e42df11bf30a..e36e333a0aa0 100644 ---

[PATCH 0/2] rds: logging neatening

2016-10-15 Thread Joe Perches
Joe Perches (2): rds: Remove unused rds_conn_error rds: Remove duplicate prefix from rds_conn_path_error use net/rds/connection.c | 15 --- net/rds/rds.h| 4 net/rds/threads.c| 3 +-- 3 files changed, 1 insertion(+), 21 deletions(-) -- 2.10.0.rc2.1.g053435c

[PATCH 1/2] rds: Remove unused rds_conn_error

2016-10-15 Thread Joe Perches
This macro's last use was removed in commit d769ef81d5b59 ("RDS: Update rds_conn_shutdown to work with rds_conn_path") so make the macro and the __rds_conn_error function definition and declaration disappear. Signed-off-by: Joe Perches --- net/rds/connection.c | 15

[PATCH v2 1/3] net: smc91x: isolate u16 writes alignment workaround

2016-10-15 Thread Robert Jarzmik
Writes to u16 has a special handling on 3 PXA platforms, where the hardware wiring forces these writes to be u32 aligned. This patch isolates this handling for PXA platforms as before, but enables this "workaround" to be set up dynamically, which will be the case in device-tree build types. This

Re: Need help with mdiobus_register and phy

2016-10-15 Thread Andrew Lunn
On Sat, Oct 15, 2016 at 09:39:12AM -0500, Timur Tabi wrote: > Florian Fainelli wrote: > >After reading the spec again, it does not appear to me that a PHY > >with PDOWN set is guaranteed or even required to respond to other > >register reads such as MII_PHYID1/2, in which case we may have to >

Re: userspace build broken by include changes

2016-10-15 Thread Mikko Rapeli
Hi, On Sat, Oct 15, 2016 at 12:40:43PM +0100, Pascal Terjan wrote: > rp-pppoe plugin of ppp no longer builds: > > In file included from pppoe.h:87:0, > from plugin.c:29: > /usr/include/linux/in.h:28:3: error: redeclaration of enumerator 'IPPROTO_IP' >IPPROTO_IP = 0, /*

[PATCH v2 3/3] net: smsc91x: add u16 workaround for pxa platforms

2016-10-15 Thread Robert Jarzmik
Add a workaround for mainstone, idp and stargate2 boards, for u16 writes which must be aligned on 32 bits addresses. Signed-off-by: Robert Jarzmik Cc: Jeremy Linton --- Since v1: rename dt property to pxa-u16-align4 change the binding

Re: Need help with mdiobus_register and phy

2016-10-15 Thread Timur Tabi
Florian Fainelli wrote: After reading the spec again, it does not appear to me that a PHY with PDOWN set is guaranteed or even required to respond to other register reads such as MII_PHYID1/2, in which case we may have to implement a MDIO bus reset routine which clears PDOWN for all PHYs that we

Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3

2016-10-15 Thread Pascal Terjan
On 15 October 2016 at 16:10, Mikko Rapeli wrote: > On Sat, Oct 15, 2016 at 03:33:22PM +0100, Pascal Terjan wrote: >> On 15 October 2016 at 15:09, Mikko Rapeli wrote: >> > On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote: >> >> It is no

Re: [PATCH] net: limit a number of namespaces which can be cleaned up concurrently

2016-10-15 Thread Eric W. Biederman
Andrei Vagin writes: > On Thu, Oct 13, 2016 at 10:06:28PM -0500, Eric W. Biederman wrote: >> Andrei Vagin writes: >> >> > On Thu, Oct 13, 2016 at 10:49:38AM -0500, Eric W. Biederman wrote: >> >> Andrei Vagin writes: >> >> >> >> >

Re: [rds-devel] [PATCH 2/2] rds: Remove duplicate prefix from rds_conn_path_error use

2016-10-15 Thread Sowmini Varadhan
On (10/15/16 11:53), Joe Perches wrote: > > rds_conn_path_error already prefixes "RDS:" to the output. > > Signed-off-by: Joe Perches Acked-by: Sowmini Varadhan

Re: [rds-devel] [PATCH 1/2] rds: Remove unused rds_conn_error

2016-10-15 Thread Sowmini Varadhan
On (10/15/16 11:53), Joe Perches wrote: > This macro's last use was removed in commit d769ef81d5b59 > ("RDS: Update rds_conn_shutdown to work with rds_conn_path") > so make the macro and the __rds_conn_error function definition > and declaration disappear. > > Signed-off-by: Joe Perches