Re: [RFC net-next] net: stmmac: should not modify RX descriptor when STMMAC resume

2021-04-20 Thread Jon Hunter
en STMMAC resume back, right? I tested your patch on top of next-20210419 which has Thierry's revert of 9c63faaa931e. So yes this is reverted. Unfortunately, with this change resuming from suspend still does not work. Jon -- nvpublic

[PATCH] ptp: Don't print an error if ptp_kvm is not supported

2021-04-20 Thread Jon Hunter
/arm64") Signed-off-by: Jon Hunter --- drivers/ptp/ptp_kvm_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ptp/ptp_kvm_common.c b/drivers/ptp/ptp_kvm_common.c index 721ddcede5e1..fcae32f56f25 100644 --- a/drivers/ptp/ptp_kvm_common.c +++ b/drivers/

Re: [RFC net-next] net: stmmac: should not modify RX descriptor when STMMAC resume

2021-04-19 Thread Jon Hunter
stmmac_clear_tx_descriptors(priv, queue); > } > } > > @@ -7250,7 +7252,6 @@ int stmmac_resume(struct device *dev) > stmmac_reset_queues_param(priv); > > stmmac_free_tx_skbufs(priv); > - stmmac_clear_descriptors(priv); > > stmmac_hw_setup(ndev, false); > stmmac_init_coalesce(priv); > I have tested this patch, but unfortunately the board still fails to resume correctly. So it appears to suffer with the same issue we saw on the previous implementation. Jon -- nvpublic

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-04-13 Thread Jon Hunter
On 01/04/2021 17:28, Jon Hunter wrote: > > On 31/03/2021 12:41, Joakim Zhang wrote: > > ... > >>> In answer to your question, resuming from suspend does work on this board >>> without your change. We have been testing suspend/resume now on this board >&g

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-04-01 Thread Jon Hunter
rm_smmu_pm_resume <-platform_pm_resume rtcwake-748 [003] ...1 536.856771: stmmac_pltfr_resume <-platform_pm_resume So I don't see any ordering issues that could be causing this. Jon -- nvpublic

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-31 Thread Jon Hunter
ard which fails after this change is made, >>> it has the IOMMU enabled. The other board does not at the moment >>> (although work is in progress to enable). If I add >>> 'iommu.passthrough=1' to cmdline for the failing board, then it works >>> again. So in

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-31 Thread Jon Hunter
nt (although work is in >> progress to enable). If I add 'iommu.passthrough=1' to cmdline for the >> failing >> board, then it works again. So in my case, the problem is linked to the IOMMU >> being enabled. >> >> Does you platform enable the IOMMU? &g

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-30 Thread Jon Hunter
t;> affect this. Sorry. I realised that for the board which fails after this change is made, it has the IOMMU enabled. The other board does not at the moment (although work is in progress to enable). If I add 'iommu.passthrough=1' to cmdline for the failing board, then it works again. So in my case, the problem is linked to the IOMMU being enabled. Does you platform enable the IOMMU? Thanks Jon -- nvpublic

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-25 Thread Jon Hunter
On 25/03/2021 07:53, Joakim Zhang wrote: > >> -Original Message- >> From: Jon Hunter >> Sent: 2021年3月24日 20:39 >> To: Joakim Zhang >> Cc: netdev@vger.kernel.org; Linux Kernel Mailing List >> ; linux-tegra ; >> Jakub Kicinski >> Subj

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-24 Thread Jon Hunter
ess test, there is no issue found. > > Could you please do more test to see where the issue happen? The issue occurs 100% of the time on the failing board and always on the first resume from suspend. Is there any more debug I can enable to track down what the problem is? Jon -- nvpublic

Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-24 Thread Jon Hunter
-eth-dwmac 249.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx I don't see any crash, but then it hangs at some point. Please note that this board is using NFS for mounting the rootfs. Let me know if there is any more info I can provide or tests I can run. Thanks Jon

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-11 Thread Jon Hunter
ing the BRCM PHY resolves that as well. I will ensure that these are enabled going forward. Cheers Jon -- nvpublic

Re: [PATCH v6 12/16] net: tip: fix a couple kernel-doc markups

2021-01-14 Thread Jon Maloy
* @dnode: address of destination node Acked-by: Jon Maloy

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-12 Thread Jon Nettleton
_timers.part.0+0x2bc/0x370 > > > > > [ 714.465578] run_timer_softirq+0x48/0x80 > > > > > [ 714.465583] __do_softirq+0x120/0x36c > > > > > [ 714.465589] irq_exit+0xac/0x100 > > > > > [ 714.465596] __handle_domain_irq+0x8c/0xf0 > >

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-10 Thread Jon Nettleton
Given it is the iommu code that is provoking the warning I should > > probably mention that the board I have requires > > arm-smmu.disable_bypass=0 on the kernel command line in order to boot. > > Also if it matters I am running the latest firmware from Solidrun > > whic

Re: [PATCH net-next 2/4] net: mvpp2: add mvpp2_phylink_to_port() helper

2020-12-10 Thread Jon Nettleton
have been working with Calvin over the past week and a half and the new patchset will be submitted early next week most likely. -Jon > > Andrew

Re: [PATCH net-next 4/6] net: ipa: add support to code for IPA v4.5

2020-12-01 Thread Jon Hunter
te error: value doesn't fit into mask __field_overflow(); \ ^~ ./include/linux/bitfield.h:151:2: note: in expansion of macro ‘MAKE_OP’ MAKE_OP(u##size,u##size,,) ^~~ ./include/linux/bitfield.h:154:1: note: in expansion of macro ‘__MAKE_OP’ __MAKE_OP(32) ^ Cheers Jon -- nvpublic

Re: [net] tipc: fix NULL pointer dereference in tipc_named_rcv

2020-10-09 Thread Jon Maloy
On 10/9/20 12:12 AM, Hoang Huu Le wrote: Hi Jon, Jakub, I tried with your comment. But looks like we got into circular locking and deadlock could happen like this: CPU0CPU1 lock(&n->

Re: [net] tipc: fix NULL pointer dereference in tipc_named_rcv

2020-10-08 Thread Jon Maloy
ipc_named_dequeue() is called, and the same lock is accessible from no.c where node_lost_contact() is executed. The patch and the code becomes simpler. I suggest you post a v2 of this one. ///jon /* Abort any ongoing link failover */ for (i = 0; i < MAX_BEARERS; i++) {

Re: [net-next PATCH v7 1/6] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-29 Thread Jon Nettleton
eir children. This works okay for enumeration and parenting but how do they talk? This is where 2) comes into play. The big problem is that MDIO isn't designated as a SPB (https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/simple-peripheral-bus--spb-) We have GPIO, I2C, SPI, UART, MIPI and a couple of others. While not a silver bullet I think getting MDIO added to the spec would be the next step forward to being able to implement this in Linux with phylink / phylib in a sane manner. Currently SFP definitions are using the SPB to designate the various GPIO and I2C interfaces that are needed to probe devices and handle interrupts. The other alternatives is the ACPI maintainers agree on the _DSD method (would be quickest and should be easy to migrate to SBP if MDIO were adopter), or nothing is done at all (which I know seems to be a popular opinion). -Jon

Re: [net-next PATCH v7 1/6] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-27 Thread Jon Nettleton
ould be wrong, but are Ethernet switches something you expect > to see on ACPI/SBSA platforms? Or is this a legitimate use of the > escape hatch? I think with the rise in adoption of Smart-NICs in datacenters there will definitely be a lot more crossover between ACPI/SBSA and network appliance oriented hardware. -Jon

Re: [PATCH net-next 18/20] net: tipc: kerneldoc fixes

2020-07-13 Thread Jon Maloy
On 7/12/20 7:15 PM, Andrew Lunn wrote: Simple fixes which require no deep knowledge of the code. Cc: Jon Maloy Cc: Ying Xue Signed-off-by: Andrew Lunn --- net/tipc/bearer.c| 2 +- net/tipc/discover.c | 5 ++--- net/tipc/link.c | 6 +++--- net/tipc/msg.c | 2 +- net

Re: [iproute2-next] tipc: fixed a compile warning in tipc/link.c

2020-07-09 Thread Jon Maloy
L); - print_uint(PRINT_ANY, "ratio", " ratio:%u%\n", + print_uint(PRINT_ANY, "ratio", " ratio:%u\n", mnl_attr_get_u32(props[prop_ratio])); break; default: Acked-by: Jon Maloy

Re: [net-next] tipc: update a binding service via broadcast

2020-06-07 Thread Jon Maloy
we add another 'is_not_legacy' bit to all new messages so that those can be distinguished from legacy messages and the latter delivered directly. Signed-off-by: Hoang Huu Le Acked-by: Jon Maloy --- net/tipc/bcast.c | 6 +-- net/tipc/bcast.h | 4 +- net/tipc/l

Re: [PATCH net] tipc: block BH before using dst_cache

2020-05-22 Thread Jon Maloy
On 5/22/20 4:10 PM, Eric Dumazet wrote: On 5/22/20 12:47 PM, Jon Maloy wrote: On 5/22/20 11:57 AM, Eric Dumazet wrote: On 5/22/20 8:01 AM, Jon Maloy wrote: On 5/22/20 2:18 AM, Xin Long wrote: On Fri, May 22, 2020 at 1:55 PM Eric Dumazet wrote: Resend to the list in non HTML form On

Re: [PATCH net] tipc: block BH before using dst_cache

2020-05-22 Thread Jon Maloy
On 5/22/20 11:57 AM, Eric Dumazet wrote: On 5/22/20 8:01 AM, Jon Maloy wrote: On 5/22/20 2:18 AM, Xin Long wrote: On Fri, May 22, 2020 at 1:55 PM Eric Dumazet wrote: Resend to the list in non HTML form On Thu, May 21, 2020 at 10:53 PM Eric Dumazet wrote: On Thu, May 21, 2020 at 10

Re: [PATCH net] tipc: block BH before using dst_cache

2020-05-22 Thread Jon Maloy
eally worth using dst_cache here. Also add tipc-discussion and Jon to CC list. The suggested solution will affect all bearers, not only UDP, so it is not a good. Is there anything preventing us from disabling preemtion inside the scope of the rcu lock? ///jon Thanks. have you checked other p

RE: [patch net-next] net: tipc: prepare attrs in __tipc_nl_compat_dumpit()

2019-10-08 Thread Jon Maloy
Acked. Thanks Jiri. ///jon > -Original Message- > From: Jiri Pirko > Sent: 8-Oct-19 07:02 > To: netdev@vger.kernel.org > Cc: da...@davemloft.net; Jon Maloy ; > ying@windriver.com; johannes.b...@intel.com; mkube...@suse.cz; > ml...@mellanox.com > Subject: [p

Official request

2019-08-24 Thread Jon

[net-next v2 1/1] tipc: clean up skb list lock handling on send path

2019-08-15 Thread Jon Maloy
s where we incorrectly access the spinlock on the send/error path. This patch also reverts commit d12cffe9329f ("tipc: ensure head->lock is initialised") which has now become redundant. CC: Eric Dumazet Reported-by: Chris Packham Acked-by: Ying Xue Signed-off-by: Jon Maloy ---

RE: [net-next 1/1] tipc: clean up skb list lock handling on send path

2019-08-15 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Xin Long > Sent: 15-Aug-19 01:58 > To: Jon Maloy > Cc: da...@davemloft.net; netdev@vger.kernel.org; Tung Quang Nguyen > ; Hoang Huu Le > ; shu...@redhat.com; ying xue > ; eduma...@

[net-next 1/1] tipc: clean up skb list lock handling on send path

2019-08-14 Thread Jon Maloy
s where we incorrectly access the spinlock on the send/error path. This patch also reverts commit d12cffe9329f ("tipc: ensure head->lock is initialised") which has now become redundant. CC: Eric Dumazet Reported-by: Chris Packham Acked-by: Ying Xue Signed-off-by: Jon Maloy --- ne

[net 1/1] tipc: fix unitilized skb list crash

2019-07-30 Thread Jon Maloy
ther down in tipc_sk_filter_rcv() as it should be. Reported-by: Li Shuang Signed-off-by: Jon Maloy --- net/tipc/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index dd8537f..83ae41d 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket

[net-next 1/1] tipc: reduce risk of wakeup queue starvation

2019-07-30 Thread Jon Maloy
e risk of user starvation during link congestion") Reported-by: Tung Nguyen Acked-by: Ying Xue Signed-off-by: Jon Maloy --- net/tipc/link.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 2c27477..dd3155

[net 1/1] tipc: initialize 'validated' field of received packets

2019-07-17 Thread Jon Maloy
t the packet is erroneously perceived as already validated by TIPC. We fix this by initializing the said field to 'false' before performing the initial validation. Signed-off-by: Jon Maloy --- net/tipc/node.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tipc/node.c b/net/

[net-next 1/1] tipc: embed jiffies in macro TIPC_BC_RETR_LIM

2019-06-28 Thread Jon Maloy
The macro TIPC_BC_RETR_LIM is always used in combination with 'jiffies', so we can just as well perform the addition in the macro itself. This way, we get a few shorter code lines and one less line break. Signed-off-by: Jon Maloy --- net/tipc/link.c | 9 - 1 file changed, 4

[net-next 1/1] tipc: rename function msg_get_wrapped() to msg_inner_hdr()

2019-06-25 Thread Jon Maloy
We rename the inline function msg_get_wrapped() to the more comprehensible msg_inner_hdr(). Signed-off-by: Jon Maloy --- net/tipc/bcast.c | 4 ++-- net/tipc/link.c | 2 +- net/tipc/msg.h | 4 ++-- net/tipc/node.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net

[net-next 1/1] tipc: eliminate unnecessary skb expansion during retransmission

2019-06-25 Thread Jon Maloy
We increase the allocated headroom for the buffer copies to be retransmitted. This eliminates the need for the lower stack levels (UDP/IP/L2) to expand the headroom in order to add their own headers. Signed-off-by: Jon Maloy --- net/tipc/link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[net-next 1/1] tipc: simplify stale link failure criteria

2019-06-25 Thread Jon Maloy
e original, additional criteria of 99 failed retransmissions is now redundant, and may in some cases lead to failure detection times in the order of minutes instead of the expected 1.5 sec link tolerance value. We now remove this criteria altogether. Acked-by: Ying Xue Signed-off-by: Jon Maloy ---

RE: [net-next v2] tipc: add loopback device tracking

2019-06-24 Thread Jon Maloy
s and > > send the clones to the loopback interface. The clones are dropped at > > reception and have no functional role except making the traffic visible. > > > > The feature is turned on/off by enabling/disabling the loopback "bearer" > > "eth:lo"

RE: [PATCH net] tipc: add dst_cache support for udp media

2019-06-20 Thread Jon Maloy
Acked-by: Jon Maloy > -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Xin Long > Sent: 20-Jun-19 07:04 > To: network dev > Cc: da...@davemloft.net; Jon Maloy ; Ying Xue > ; tipc-discuss...@lists.sourceforge.net; Paolo > Abeni > Sub

RE: [PATCH net] tipc: change to use register_pernet_device

2019-06-20 Thread Jon Maloy
Acked-by: Jon Maloy > -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Xin Long > Sent: 20-Jun-19 06:39 > To: network dev > Cc: da...@davemloft.net; Jon Maloy ; Ying Xue > ; tipc-discuss...@lists.sourceforge.net > Subject: [PATCH

RE: WARNING: locking bug in icmp_send

2019-03-25 Thread Jon Maloy
Yet another duplicate of syzbot+a25307ad099309f1c...@syzkaller.appspotmail.com A fix has been posted. ///jon > -Original Message- > From: netdev-ow...@vger.kernel.org > On Behalf Of syzbot > Sent: 23-Mar-19 19:03 > To: da...@davemloft.net; Jon Maloy ; > kuz...@ms

[net 1/1] tipc: fix RDM/DGRAM connect() regression

2019-03-04 Thread Jon Maloy
From: Erik Hugne Fix regression bug introduced in commit 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Only signal -EDESTADDRREQ for RDM/DGRAM if we don't have a cached sockaddr. Signed-off-by: Erik Hugne Signed-off-by: Jon Maloy --- net/ti

RE: [Patch net] tipc: check group dests after tipc_wait_for_cond()

2018-12-17 Thread Jon Maloy
Acked-by: Jon Maloy Thank you, Cong. ///jon > -Original Message- > From: Cong Wang > Sent: 17-Dec-18 02:25 > To: netdev@vger.kernel.org > Cc: Cong Wang ; Ying Xue > ; Jon Maloy > Subject: [Patch net] tipc: check group dests after tipc_wait_for_cond() &

RE: KMSAN: uninit-value in __inet6_bind

2018-12-14 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org > On Behalf Of Eric Dumazet > Sent: 14-Dec-18 10:15 > To: Jon Maloy ; Cong Wang > ; Dmitry Vyukov > Cc: syzbot+c56449ed3652e6720...@syzkaller.appspotmail.com; Ying Xue > ; tipc-discuss...@lists.sourcef

RE: KMSAN: uninit-value in __inet6_bind

2018-12-14 Thread Jon Maloy
> -Original Message- > From: Cong Wang > Sent: 12-Dec-18 01:17 > To: Dmitry Vyukov > Cc: syzbot+c56449ed3652e6720...@syzkaller.appspotmail.com; Jon Maloy > ; Ying Xue ; tipc- > discuss...@lists.sourceforge.net; David Miller ; > Alexey Kuznetsov ; LKML ker...

RE: KASAN: use-after-free Read in tipc_group_cong

2018-12-13 Thread Jon Maloy
> -Original Message- > From: Dmitry Vyukov > Sent: 13-Dec-18 04:47 > To: Jon Maloy > Cc: syzbot+9845fed98688e01f4...@syzkaller.appspotmail.com; David Miller > ; LKML ; netdev > ; syzkaller-bugs b...@googlegroups.com>; tipc-discuss...@lists.sourceforge.net; Y

RE: general protection fault in __ip_append_data

2018-12-12 Thread Jon Maloy
> -Original Message- > From: Dmitry Vyukov > Sent: 12-Dec-18 06:03 > To: syzbot+aab62b9c7b12e7c6a...@syzkaller.appspotmail.com; Jon Maloy > ; Ying Xue ; David > Miller ; tipc-discuss...@lists.sourceforge.net > Cc: Alexey Kuznetsov ; LKML ker...@vger.kernel.org>;

RE: KASAN: use-after-free Read in tipc_group_cong

2018-12-12 Thread Jon Maloy
> -Original Message- > From: syzbot > Sent: 12-Dec-18 06:11 > To: da...@davemloft.net; Jon Maloy ; linux- > ker...@vger.kernel.org; netdev@vger.kernel.org; syzkaller- > b...@googlegroups.com; tipc-discuss...@lists.sourceforge.net; > ying@windriver.com > S

RE: [Patch net] tipc: compare remote and local protocols in tipc_udp_enable()

2018-12-12 Thread Jon Maloy
> -Original Message- > From: Cong Wang > Sent: 10-Dec-18 18:24 > To: netdev@vger.kernel.org > Cc: Cong Wang ; Ying Xue > ; Jon Maloy > Subject: [Patch net] tipc: compare remote and local protocols in > tipc_udp_enable() > > When TIPC_NLA_UDP_REMOT

RE: [Patch net] tipc: fix a double kfree_skb()

2018-12-10 Thread Jon Maloy
Acked. Thank you for both your quick fixes, Cong. ///jon > -Original Message- > From: Cong Wang > Sent: 10-Dec-18 15:46 > To: netdev@vger.kernel.org > Cc: Cong Wang ; Ying Xue > ; Jon Maloy > Subject: [Patch net] tipc: fix a double kfree_skb() > > tipc_udp

[net 1/1] tipc: fix lockdep warning during node delete

2018-11-26 Thread Jon Maloy
timer cleanup function use spin_trylock() instead of just spin_lock(), and when it fails to grab the lock it just returns so that the timer handler can terminate its execution. This is safe to do, since tipc_node_stop() anyway is about to delete both the timer and the node instance. Fixes: 6a939f36

RE: [PATCH net] tipc: eliminate possible recursive locking detected by LOCKDEP

2018-10-11 Thread Jon Maloy
Acked-by: Jon Maloy ///jon > -Original Message- > From: Ying Xue > Sent: October 11, 2018 7:58 AM > To: Jon Maloy ; dvyu...@google.com > Cc: da...@davemloft.net; parthasarathy.bhuvara...@ericsson.com; > netdev@vger.kernel.org; linux-ker...@vger.kernel.or

RE: net/tipc: recursive locking in tipc_link_reset

2018-10-11 Thread Jon Maloy
Hi Dmitry, Yes, we are aware of this, the kernel test robot warned us about this a few days ago. I am looking into it. ///jon > -Original Message- > From: Dmitry Vyukov > Sent: October 11, 2018 3:55 AM > To: parthasarathy.bhuvara...@ericsson.com; Jon Maloy > ; David Mi

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Jon Olson
surdly large :) to present a compelling argument in one direction or another. As far as I know there aren't currently any NAPI related ethtool commands (based on a quick perusal of ethtool.h) -- it seems like it would be fairly involved/heavyweight to plumb one solely for this unless NAPI Tx is something many users will want to tune (and for which other drivers would support tuning). -- Jon Olson

[PATCH net-next] ifb: fix packets checksum

2018-05-24 Thread Jon Maxwell
Fixup the checksum for CHECKSUM_COMPLETE when pulling skbs on RX path. Otherwise we get splats when tc mirred is used to redirect packets to ifb. Before fix: nic: hw csum failure Signed-off-by: Jon Maxwell --- drivers/net/ifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-23 Thread Jon Rosen (jrosen)
> -Original Message- > From: Willem de Bruijn [mailto:willemdebruijn.ker...@gmail.com] > Sent: Wednesday, May 23, 2018 9:37 AM > To: Jon Rosen (jrosen) > Cc: David S. Miller ; Willem de Bruijn > ; Eric Dumazet > ; Kees Cook ; David Windsor > ; Rosen, &

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-23 Thread Jon Rosen (jrosen)
> > For the ring, there is no requirement to allocate exactly the amount > > specified by the user request. Safer than relying on shared memory > > and simpler than the extra allocation in this patch would be to allocate > > extra shadow memory at the end of the ring (and not mmap that). > > > > Th

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-23 Thread Jon Rosen (jrosen)
> >>> I think the bigger issues as you've pointed out are the cost of > >>> the additional spin lock and should the additional state be > >>> stored in-band (fewer cache lines) or out-of band (less risk of > >>> breaking due to unpredictable application behavior). > >> > >> We don't need the spinlo

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-22 Thread Jon Rosen (jrosen)
On Monday, May 21, 2018 2:17 PM, Jon Rosen (jrosen) wrote: > On Monday, May 21, 2018 1:07 PM, Willem de Bruijn > wrote: >> On Mon, May 21, 2018 at 8:57 AM, Jon Rosen (jrosen) wrote: ...snip... >> >> A setsockopt for userspace to signal a stricter interpretation of &

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-21 Thread Jon Rosen (jrosen)
On Monday, May 21, 2018 1:07 PM, Willem de Bruijn wrote: >On Mon, May 21, 2018 at 8:57 AM, Jon Rosen (jrosen) wrote: >> On Sunday, May 20, 2018 7:22 PM, Willem de Bruijn >> wrote: >>> On Sun, May 20, 2018 at 6:51 PM, Willem de Bruijn >>> wrote: >>>&g

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-21 Thread Jon Rosen (jrosen)
On Sunday, May 20, 2018 7:22 PM, Willem de Bruijn wrote: > On Sun, May 20, 2018 at 6:51 PM, Willem de Bruijn > wrote: >> On Sat, May 19, 2018 at 8:07 AM, Jon Rosen wrote: >>> Fix PACKET_RX_RING bug for versions TPACKET_V1 and TPACKET_V2 which >>> casues the rin

RE: [PATCH net-next] tipc: eliminate complaint of KMSAN uninit-value in tipc_conn_rcv_sub

2018-05-21 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org > On Behalf Of David Miller > Sent: Saturday, May 19, 2018 23:00 > To: ying@windriver.com > Cc: netdev@vger.kernel.org; Jon Maloy ; > syzkaller-b...@googlegroups.com; tipc-discuss...@lists.sourcefo

RE: [RFC PATCH] packet: mark ring entry as in-use inside spin_lock to prevent RX ring overrun

2018-05-19 Thread Jon Rosen (jrosen)
Forward link to a new proposed patch at: https://www.mail-archive.com/netdev@vger.kernel.org/msg236629.html

[PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-19 Thread Jon Rosen
x27;s fully filled in, passed to user space, and then eventually passed back to the kernel for use with a new packet. Signed-off-by: Jon Rosen --- There is a bug in net/packet/af_packet.c:tpacket_rcv in how it manages the PACKET_RX_RING for versions TPACKET_V1 and TPACKET_V2. This bug makes it pos

[iproute2-next v3 1/1] tipc: fixed node and name table listings

2018-05-17 Thread Jon Maloy
from David Ahern v3: Fixed leaking socket as per comment from David Ahern Signed-off-by: Jon Maloy --- tipc/misc.c | 20 tipc/misc.h | 1 + tipc/nametable.c | 18 ++ tipc/node.c | 19 --- tipc/peer.c | 4 5 files ch

[iproute2-next v2 1/1] tipc: fixed node and name table listings

2018-05-15 Thread Jon Maloy
David Ahern Signed-off-by: Jon Maloy --- tipc/misc.c | 18 ++ tipc/misc.h | 1 + tipc/nametable.c | 18 ++ tipc/node.c | 19 --- tipc/peer.c | 4 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/tipc/

[PATCH net-next v2] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jon Maxwell
ginal sk->sk_mark in __inet_twsk_hashdance() to the new tw->tw_mark location. Then progate this so that the skb gets sent with the correct mark. Do the same for resets. Give the "fwmark_reflect" sysctl precedence over sk->sk_mark so that netfilter rules are still honored. Sign

[PATCH net-next v1] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jon Maxwell
tw->tw_mark location. Then progate this so that the skb gets sent with the correct mark. Do the same for resets. Give the "fwmark_reflect" sysctl precedence over sk->sk_mark so that netfilter rules are still honored. Signed-off-by: Jon Maxwell --- include/net/inet_timewait_sock

[PATCH net-next] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jon Maxwell
k_mark so that netfilter rules are still honored. Signed-off-by: Jon Maxwell --- include/net/inet_timewait_sock.h | 1 + net/ipv4/ip_output.c | 3 ++- net/ipv4/tcp_ipv4.c | 18 -- net/ipv4/tcp_minisocks.c | 1 + net/ipv6/tcp_ipv6.c

RE: [PATCH net] tipc: fix one byte leak in tipc_sk_set_orig_addr()

2018-05-09 Thread Jon Maloy
Acked-by: Jon Maloy Thank you Eric. > -Original Message- > From: Eric Dumazet [mailto:eduma...@google.com] > Sent: Wednesday, May 09, 2018 09:50 > To: David S . Miller > Cc: netdev ; Eric Dumazet > ; Eric Dumazet ; Jon > Maloy ; Ying Xue > Subject: [PATCH net]

[net-next 1/1] tipc: clean up removal of binding table items

2018-05-08 Thread Jon Maloy
kup the tipc_service -> service_range -> publication items in the correct hierarchical order. In this commit we try to make this right, and as a side effect obtain some code simplification. Acked-by: Ying Xue Signed-off-by: Jon Maloy --- net/tipc/name_table.c | 103 ++-

[iproute2-next 1/1] tipc: fixed node and name table listings

2018-05-07 Thread Jon Maloy
ormer potentially is much longer than the latter, we make room for it by eliminating the (to the user) irrelevant publication key. We also reorder some of the columns so that the node id comes last, since this looks nicer and more logical. Signed-off-by: Jon Maloy --- tipc/misc.c | 18

RE: [PATCH net-next] flow_dissector: do not rely on implicit casts

2018-05-07 Thread Jon Maloy
Acked-by: Jon Maloy > -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Paolo Abeni > Sent: Monday, May 07, 2018 06:06 > To: netdev@vger.kernel.org > Cc: David S. Miller > Subject: [PATCH net-next] flow_d

RE: KMSAN: uninit-value in strcmp

2018-05-03 Thread Jon Maloy
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, May 03, 2018 15:22 > To: syzbot+df0257c92ffd4fcc5...@syzkaller.appspotmail.com > Cc: Jon Maloy ; linux-ker...@vger.kernel.org; > netdev@vger.kernel.org; syzkaller-b...@goog

RE: [PATCH] tipc: fix a potential missing-check bug

2018-05-01 Thread Jon Maloy
> -Original Message- > From: Wenwen Wang [mailto:wang6...@umn.edu] > Sent: Tuesday, May 01, 2018 00:26 > To: Wenwen Wang > Cc: Kangjie Lu ; Jon Maloy ; Ying > Xue ; David S. Miller ; > open list:TIPC NETWORK LAYER ; open list:TIPC > NETWORK LAYER ; open list

[net-next 1/1] tipc: introduce ioctl for fetching node identity

2018-04-25 Thread Jon Maloy
particularly useful when we extend some of the commands in the 'tipc' tool, but we also expect regular user applications to need this feature. Acked-by: Ying Xue Signed-off-by: Jon Maloy --- include/uapi/linux/tipc.h | 12 net/tipc/node.c | 21 +

[net 1/1] tipc: fix bug in function tipc_nl_node_dump_monitor

2018-04-25 Thread Jon Maloy
he missing part. Fixes: 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary") Signed-off-by: Jon Maloy --- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/node.c b/net/tipc/node.c index 6f98b56..baaf93f 100644 --- a/n

[net 1/1] tipc: fix infinite loop when dumping link monitor summary

2018-04-17 Thread Jon Maloy
. This solution also caters for the case where there may be gaps in the bearer array. Signed-off-by: Tung Nguyen Signed-off-by: Jon Maloy --- net/tipc/monitor.c | 2 +- net/tipc/node.c| 11 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/net/tipc/monitor.c b/net/

[net 1/1] tipc: fix use-after-free in tipc_nametbl_stop

2018-04-17 Thread Jon Maloy
e delete of the service range item outside the said function. Instead, we now let the two functions calling it test if the list is empty and perform the removal when that is the case. Reported-by: syzbot+d64b64afc55660106...@syzkaller.appspotmail.com Signed-off-by: Jon Maloy --- net/tipc/na

RE: [PATCH net 0/2] tipc: Better check user provided attributes

2018-04-16 Thread Jon Maloy
Acked-by: Jon Maloy Thank you, Eric. > -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Eric Dumazet > Sent: Monday, April 16, 2018 11:30 > To: David S . Miller > Cc: netdev ; Eric Dumazet > ; Eric Dumaz

[net 1/1] tipc: fix missing initializer in tipc_sendmsg()

2018-04-11 Thread Jon Maloy
the named function if the given address type is illegal. Reported-by: syzbot+b0975ce9355b347c1...@syzkaller.appspotmail.com Signed-off-by: Jon Maloy --- net/tipc/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 1fd1c8b..252a5

[net 1/1] tipc: fix unbalanced reference counter

2018-04-11 Thread Jon Maloy
plies back to the commit shown below. Given the low risk of this happening we believe this to be sufficient. Fixes: commit 218527fe27ad ("tipc: replace name table service range array with rb tree") Reported-by: syzbot+aa245f26d42b8305d...@syzkaller.appspotmail.com Signed-off-by: Jon

RE: [PATCH v3] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-11 Thread Jon Maloy
> -Original Message- > From: Ying Xue [mailto:ying@windriver.com] > Sent: Wednesday, April 11, 2018 06:27 > To: Jia-Ju Bai ; Jon Maloy > ; da...@davemloft.net > Cc: netdev@vger.kernel.org; tipc-discuss...@lists.sourceforge.net; linux- > ker...@vger.kernel.org >

RE: [RFC PATCH] packet: mark ring entry as in-use inside spin_lock to prevent RX ring overrun

2018-04-04 Thread Jon Rosen (jrosen)
> >> >One issue with the above proposed change to use TP_STATUS_IN_PROGRESS > >> >is that the documentation of the tp_status field is somewhat > >> >inconsistent. In some places it's described as TP_STATUS_KERNEL(0) > >> >meaning the entry is owned by the kernel and !TP_STATUS_KERN

RE: [RFC PATCH] packet: mark ring entry as in-use inside spin_lock to prevent RX ring overrun

2018-04-04 Thread Jon Rosen (jrosen)
On Wednesday, April 04, 2018 9:49 AM, Willem de Bruijn wrote: > > On Tue, Apr 3, 2018 at 11:55 PM, Jon Rosen wrote: > > Fix PACKET_RX_RING bug for versions TPACKET_V1 and TPACKET_V2 which > > casues the ring to get corrupted by allowing multiple kernel threads > > t

RE: [RFC PATCH] packet: mark ring entry as in-use inside spin_lock to prevent RX ring overrun

2018-04-04 Thread Jon Rosen (jrosen)
> introduced in some previous kernel? Sorry about the tabs, I'll fix that and try to figure out what I did wrong with the signed-off-by. I've looked back as far as I could find online (2.6.11) and it would appear that this bug has always been there. Thanks, jon.

[RFC PATCH] packet: mark ring entry as in-use inside spin_lock to prevent RX ring overrun

2018-04-03 Thread Jon Rosen
work properly. More discussion on this change can be found in the additional comments section titled "3. Discussion on packet_mmap ownership semantics:". Signed-off-by: Jon Rosen --- Additional Comments Section --- 1. Descripti

RE: general protection fault in tipc_nametbl_unsubscribe

2018-04-03 Thread Jon Maloy
#syz dup: general protection fault in __list_del_entry_valid (3) > -Original Message- > From: syzbot > [mailto:syzbot+4859fe19555ea87c4...@syzkaller.appspotmail.com] > Sent: Monday, April 02, 2018 02:01 > To: da...@davemloft.net; Jon Maloy ; linux- > ker...@vger.

[net-next 1/1] tipc: Fix missing list initializations in struct tipc_subscription

2018-04-03 Thread Jon Maloy
ation functions"), which is still in net-next. We fix this for that commit by initializing the two lists properly. Fixes: 242e82cc95f6 ("tipc: collapse subscription creation functions") Reported-by: syzbot+0bb443b74ce09197e...@syzkaller.appspotmail.com Signed-off-by: Jon Maloy --- net/tip

RE: [iproute2-next 0/2] tipc: changes to addressing structure

2018-03-29 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of David Ahern > Sent: Thursday, March 29, 2018 13:59 > To: Jon Maloy ; da...@davemloft.net; > netdev@vger.kernel.org > Cc: Mohan Krishna Ghanta Krishn

[net-next v2 2/5] tipc: refactor name table translate function

2018-03-29 Thread Jon Maloy
The function tipc_nametbl_translate() function is ugly and hard to follow. This can be improved somewhat by introducing a stack variable for holding the publication list to be used and re-ordering the if- clauses for selection of algorithm. Signed-off-by: Jon Maloy --- net/tipc/name_table.c

[net-next v2 5/5] tipc: avoid possible string overflow

2018-03-29 Thread Jon Maloy
safe side we also replace the sprintf() call with snprintf(). Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Reported-by: Arnd Bergmann Signed-off-by: Jon Maloy --- include/uapi/linux/tipc.h | 2 +- net/tipc/link.c | 3 ++- 2 files changed, 3

[net-next v2 1/5] tipc: replace name table service range array with rb tree

2018-03-29 Thread Jon Maloy
improving cache hit rate. Signed-off-by: Jon Maloy --- net/tipc/core.h |1 + net/tipc/link.c |2 +- net/tipc/name_table.c | 1032 ++--- net/tipc/name_table.h |2 +- net/tipc/node.c |4 +- net/tipc/subscr.h |4

[net-next v2 3/5] tipc: permit overlapping service ranges in name table

2018-03-29 Thread Jon Maloy
ication/withdrawal item from a peer node never will be rejected, and make it possible to eliminate the problematic backlog functionality we currently have for handling such cases. Signed-off-by: Jon Maloy --- net/tipc/name_distr.c | 90 +--

[net-next v2 4/5] tipc: tipc: rename address types in user api

2018-03-29 Thread Jon Maloy
ed-off-by: Jon Maloy --- include/uapi/linux/tipc.h | 57 +++ 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/include/uapi/linux/tipc.h b/include/uapi/linux/tipc.h index 4ac9f1f..156224a 100644 --- a/include/uapi/linux/tipc.h +++ b/inc

[net-next v2 0/5] tipc: slim down name table

2018-03-29 Thread Jon Maloy
replaced a few more macros to get a consistent terminology in the API. #5: Added new commit to fix a potential string overflow bug (it is still only in net-next) reported by Arnd Bergmann Jon Maloy (5): tipc: replace name table service range array with rb tree tipc: ref

[iproute2-next 1/2] tipc: introduce command for handling a new 128-bit node identity

2018-03-28 Thread Jon Maloy
same operations. For compatibility the old 'netid' commands are retained, -we just remove them from the help texts. Acked-by: GhantaKrishnamurthy MohanKrishna Signed-off-by: Jon Maloy --- include/uapi/linux/tipc_netlink.h | 2 + tipc/misc.c | 78 ++

[iproute2-next 0/2] tipc: changes to addressing structure

2018-03-28 Thread Jon Maloy
1: We introduce ability to set/get 128-bit node identities 2: We rename 'net id' to 'cluster id' in the command API, of course in a compatible way. 3: We print out all 32-bit node addresses as an integer in hex format, i.e., we remove the assumption about an internal s

  1   2   3   4   5   6   7   8   >