[tipc-discussion] [net-next 4/9] tipc: create group member event messages when they are needed

2018-01-08 Thread Jon Maloy
explicitly create a new message and send it upwards. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 95 +++ net/tipc/group.h | 2 +- net/tipc/socket.c | 3 +- 3 f

[tipc-discussion] [net-next 6/9] tipc: send out join messages as soon as new member is discovered

2018-01-08 Thread Jon Maloy
Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 100 +++--- net/tipc/group.h | 4 +- net/tipc/name_table.c | 2 +- net/tipc/socket.c | 4 +- 4 files changed, 68 insert

[tipc-discussion] [net-next 3/9] tipc: adjustment to group member FSM

2018-01-08 Thread Jon Maloy
Analysis reveals that the member state MBR_QURANTINED in reality is unnecessary, and can be replaced by the state MBR_JOINING at all occurrencs. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 5 ++--- 1 fil

[tipc-discussion] [net-next 2/9] tipc: let group member stay in JOINED mode if unable to reclaim

2018-01-08 Thread Jon Maloy
state. In this commit we refactor the code for handling message arrival from a JOINED member, both to make it more comprehensible and to cover the case described above. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/

[tipc-discussion] [net-next 1/9] tipc: a couple of cleanups

2018-01-08 Thread Jon Maloy
- We remove the 'reclaiming' member list in struct tipc_group, since it doesn't serve any purpose. - We simplify the GRP_REMIT_MSG branch of tipc_group_protocol_rcv(). Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/

[tipc-discussion] [net-next 0/9] tipc: improvements to group messaging

2018-01-08 Thread Jon Maloy
'net' but not yet to 'net-next'. Jon Maloy (9): tipc: a couple of cleanups tipc: let group member stay in JOINED mode if unable to reclaim tipc: adjustment to group member FSM tipc: create group member event messages when they are needed tipc: simplify group LEAVE sequence tipc: send out

[tipc-discussion] [net-next 1/9] tipc: a couple of cleanups

2018-01-08 Thread Jon Maloy
- We remove the 'reclaiming' member list in struct tipc_group, since it doesn't serve any purpose. - We simplify the GRP_REMIT_MSG branch of tipc_group_protocol_rcv(). Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/

[tipc-discussion] [net-next 0/9] tipc: improvements to group messaging

2018-01-08 Thread Jon Maloy
'net' but not yet to 'net-next'. Jon Maloy (9): tipc: a couple of cleanups tipc: let group member stay in JOINED mode if unable to reclaim tipc: adjustment to group member FSM tipc: create group member event messages when they are needed tipc: simplify group LEAVE sequence tipc: send out

[tipc-discussion] [net-next 7/9] tipc: add option to suppress PUBLISH events for pre-existing publications

2018-01-08 Thread Jon Maloy
for the tipc driver, at least for now. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 4 +++- net/tipc/name_table.c | 13 +++-- net/tipc/name_table.h | 2 +- net/tipc/server.c | 4 ++-- net/tipc/serve

[tipc-discussion] [net-next 6/9] tipc: send out join messages as soon as new member is discovered

2018-01-08 Thread Jon Maloy
Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 100 +++--- net/tipc/group.h | 4 +- net/tipc/name_table.c | 2 +- net/tipc/socket.c | 4 +- 4 files changed, 68 insert

[tipc-discussion] [net-next 5/9] tipc: simplify group LEAVE sequence

2018-01-08 Thread Jon Maloy
issue a group DOWN event when the link to the peer node is gone, so that no LEAVE message is to be expected. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 40 +--- 1 file changed,

[tipc-discussion] [net-next 9/9] tipc: improve poll() for group member socket

2018-01-08 Thread Jon Maloy
for a specific destination, and the other three send modes, which are. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 64 +++ net/tipc/group.h | 2 +- net/tipc/socket.c |

[tipc-discussion] [net-next 8/9] tipc: improve groupcast scope handling

2018-01-08 Thread Jon Maloy
global group with the same identity across the same nodes, without interfering with the local groups. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- include/uapi/linux/tipc.h | 7 ++-- net/tipc/group.c | 13 --- net/tipc/

[tipc-discussion] [net-next 4/9] tipc: create group member event messages when they are needed

2018-01-08 Thread Jon Maloy
explicitly create a new message and send it upwards. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 95 +++ net/tipc/group.h | 2 +- net/tipc/socket.c | 3 +- 3 f

[tipc-discussion] [net-next 3/9] tipc: adjustment to group member FSM

2018-01-08 Thread Jon Maloy
Analysis reveals that the member state MBR_QURANTINED in reality is unnecessary, and can be replaced by the state MBR_JOINING at all occurrencs. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 5 ++--- 1 fil

[tipc-discussion] [net-next 2/9] tipc: let group member stay in JOINED mode if unable to reclaim

2018-01-08 Thread Jon Maloy
state. In this commit we refactor the code for handling message arrival from a JOINED member, both to make it more comprehensible and to cover the case described above. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/

[tipc-discussion] [net-next 8/9] tipc: improve groupcast scope handling

2018-01-08 Thread Jon Maloy
global group with the same identity across the same nodes, without interfering with the local groups. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- include/uapi/linux/tipc.h | 7 ++-- net/tipc/group.c | 13 --- net/tipc/

[tipc-discussion] [net-next 9/9] tipc: improve poll() for group member socket

2018-01-08 Thread Jon Maloy
for a specific destination, and the other three send modes, which are. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 64 +++ net/tipc/group.h | 2 +- net/tipc/s

Re: [tipc-discussion] KASAN: use-after-free Read in tipc_group_size

2018-01-08 Thread Jon Maloy
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Monday, January 08, 2018 13:44 > To: syzbot <syzbot+aae58876fb5a1fad0...@syzkaller.appspotmail.com> > Cc: David Miller <da...@davemloft.net>; Jon Maloy > <jon.ma.

Re: [tipc-discussion] [net-next 05/11] tipc: adjustment to group member FSM

2018-01-03 Thread Jon Maloy
> -Original Message- > From: Ying Xue > Sent: Tuesday, January 02, 2018 06:53 > To: Jon Maloy <jon.ma...@ericsson.com>; Jon Maloy > <ma...@donjonn.com> > Cc: Mohan Krishna Ghanta Krishnamurthy > <mohan.krishna.ghanta.krishnamur...@ericsson.c

[tipc-discussion] [net-next 1/1] tipc: fix a potental access after delete in tipc_sk_join()

2018-01-10 Thread Jon Maloy
rning from tipc_sk_join() directly after the failed tipc_sk_publish. Reported-by: syzbot+e3eeae78ea88b8d6d...@syzkaller.appspotmail.com Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tipc/socket.c b/net/tipc/socket

[tipc-discussion] [net-next 1/1] tipc: fix race condition at topology server receive

2018-01-15 Thread Jon Maloy
sk_callback_lock for mutual exclusion in the two functions. In addition, we have to move a call to tipc_conn_terminate() outside the mentioned lock to avoid deadlock. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/s

[tipc-discussion] [net-next 1/1] tipc: fix race between poll() and setsockopt()

2018-01-17 Thread Jon Maloy
to the moved field. This will eliminate the race risk. Reported-by: syzbot+799dafde028679585...@syzkaller.appspotmail.com Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 19 --- net/tipc/group.h | 4 ++-- net/tipc/socket.c | 7 +++ 3 files chang

Re: [tipc-discussion] KASAN: use-after-free Read in tipc_group_is_open

2018-01-16 Thread Jon Maloy
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Monday, January 15, 2018 23:44 > To: syzbot <syzbot+799dafde028679585...@syzkaller.appspotmail.com> > Cc: David Miller <da...@davemloft.net>; Jon Maloy > <jon.ma.

[tipc-discussion] [net-next 1/1] tipc: fix bug during lookup of multicast destination nodes

2018-01-12 Thread Jon Maloy
NODE_SCOPE on other nodes. Since such publications never will be visible on the sending node anyway, it makes no sense to discriminate by scope at all. We now remove this parameter altogether. Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/name_table.c | 6 ++ net/tipc/

Re: [tipc-discussion] [bug report] tipc: send out join messages as soon as new member is discovered

2018-01-12 Thread Jon Maloy
Hi Dan, There is already a patch queued up for net-next fixing this. ///jon > -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Friday, January 12, 2018 15:49 > To: Jon Maloy <jon.ma...@ericsson.com> > Cc: tipc-discussion@lists.sour

[tipc-discussion] [net 1/1] tipc: fix skb truesize/datasize ratio control

2018-02-08 Thread Jon Maloy
at all. In this commit, we change the ratio condition and replace skb_copy() with a call to skb_copy_expand() to finally get this right. Acked-by: Jon Maloy <jon.ma...@ericsson.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/msg.c | 4 ++-- 1 file changed, 2 insert

[tipc-discussion] [net-next 01/10] tipc: remove redundant code in topology server

2018-02-15 Thread Jon Maloy
-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/server.c | 36 +++- net/tipc/server.h | 4 +--- net/tipc/subscr.c | 4 +--- 3 files changed, 9 insertions(+), 35 deletions(-) diff --git a/net/tipc/server.

[tipc-discussion] [net-next 05/10] tipc: simplify endianness handling in topology subscriber

2018-02-15 Thread Jon Maloy
the need for conversion internally before performing their respective operations. Hence, all handling of such conversions become transparent to the rest of the code. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/name_

Re: [tipc-discussion] [net v2 1/1] tipc: avoid unnecessary copying of bundled messages

2018-02-15 Thread Jon Maloy
Of course, the target for this is net-next, not net. ///jon > -Original Message- > From: Jon Maloy > Sent: Wednesday, February 14, 2018 12:01 > To: Jon Maloy <jon.ma...@ericsson.com>; Jon Maloy > <ma...@donjonn.com> > Cc: Moha

[tipc-discussion] [net-next 1/1] tipc: apply bearer link tolerance on running links

2018-02-15 Thread Jon Maloy
change this so that also already existing links are updated dynamically, without any need for a reset, when the bearer value is changed. We leverage the already existing per-link functionality for this to achieve the wanted effect. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon

[tipc-discussion] [net-next 02/10] tipc: remove unnecessary function pointers

2018-02-15 Thread Jon Maloy
ing@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/server.c | 21 ++--- net/tipc/server.h | 5 - net/tipc/subscr.c | 27 ++- net/tipc/subscr.h | 4 4 files changed, 20 insertions(+), 37 deletions(-) diff --gi

[tipc-discussion] [net-next 08/10] tipc: make struct tipc_server private for server.c

2018-02-15 Thread Jon Maloy
have to move the start/stop functions for the topology server to server.c, where they logically belong anyway. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/name_table.c | 10 ++-- net/tipc/server

[tipc-discussion] [net-next 09/10] tipc: separate topology server listener socket from subcsriber sockets

2018-02-15 Thread Jon Maloy
We move the listener socket to struct tipc_server and give it its own work item. This makes it easier to follow the code, and entails some simplifications in the reception code in subscriber sockets. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@eri

[tipc-discussion] [net-next 03/10] tipc: eliminate struct tipc_subscriber

2018-02-15 Thread Jon Maloy
a spinlock and a new 'inactive' state to the subscription structure. Using those, both problems described above can be easily solved. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/se

Re: [tipc-discussion] [net v2 1/1] tipc: avoid unnecessary copying of bundled messages

2018-02-15 Thread Jon Maloy
to my own version. ///jon > -Original Message- > From: Jon Maloy > Sent: Wednesday, February 14, 2018 12:01 > To: Jon Maloy <jon.ma...@ericsson.com>; Jon Maloy > <ma...@donjonn.com> > Cc: Mohan Krishna Ghanta Krishnamurthy > <mohan.krishna.ghanta.kri

[tipc-discussion] [net-next 07/10] tipc: some prefix changes

2018-02-15 Thread Jon Maloy
change. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/name_table.c | 33 net/tipc/server.c | 5 ++--- net/tipc/subscr.c | 52 +-- net/t

[tipc-discussion] [net-next 1/1] tipc: avoid unnecessary copying of bundled messages

2018-02-15 Thread Jon Maloy
fer clones to be the truesize of the clone itself. This change eliminates both the overaccounting and the unnecessary buffer copying. Reported-by: Hoang Le <hoang.h...@dektek.com.au> Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/

[tipc-discussion] [net-next v2 1/1] tipc: avoid unnecessary copying of bundled messages

2018-02-15 Thread Jon Maloy
Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/msg.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/tipc/msg.c b/net/tipc/msg.c index 4e1c6f6..ce0bfc4 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c @@ -416,8 +416,8 @@ bool t

[tipc-discussion] [net-next 10/10] tipc: rename tipc_server to tipc_topsrv

2018-02-15 Thread Jon Maloy
ing@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/Makefile | 2 +- net/tipc/core.h | 6 +- net/tipc/group.c | 2 +- net/tipc/server.c | 700 - net/tipc/server.h | 57 - net/tipc/subscr.c | 2

[tipc-discussion] [net-next 06/10] tipc: collapse subscription creation functions

2018-02-15 Thread Jon Maloy
After the previous changes it becomes logical to collapse the two-level creation of subscription instances into one. We do that here. We also rename the creation and deletion functions for more consistency. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy &

Re: [tipc-discussion] [net-next 01/24] tipc: avoid unnecessary copying of bundled messages

2018-02-15 Thread Jon Maloy
> -Original Message- > From: Ying Xue [mailto:ying@windriver.com] > Sent: Wednesday, February 14, 2018 08:17 > To: Jon Maloy <jon.ma...@ericsson.com>; Jon Maloy > <ma...@donjonn.com> > Cc: Mohan Krishna Ghanta Krishnamurthy > <mohan.krishna.ghan

Re: [tipc-discussion] [net-next v2 1/1] tipc: avoid unnecessary copying of bundled messages

2018-02-18 Thread Jon Maloy
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Friday, February 16, 2018 21:33 > To: Jon Maloy <jon.ma...@ericsson.com> > Cc: net...@vger.kernel.org; Mohan Krishna Ghanta Krishnamurthy > <mohan.krishna.ghanta.krishnamur...@erics

[tipc-discussion] [net 1/1] tipc: fix memory leak of group member when peer node is lost

2017-12-21 Thread Jon Maloy
. Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/net/tipc/group.c b/net/tipc/group.c index e5b03f0..8e12ab5 100644 --- a/net/tipc/group.c +++ b/net/tipc/group.c @@ -850,17 +

Re: [tipc-discussion] PATCH v1: 0001-tipc-fix-hanging-poll-for-stream-clients.patch

2017-12-22 Thread Jon Maloy
Acked-by: Jon Thank you, Partha, and Merry Christmas ///j From: Parthasarathy Bhuvaragan [mailto:parthasarathy.bhuvara...@gmail.com] Sent: Friday, December 22, 2017 10:35 To: tipc-discussion@lists.sourceforge.net; Jon Maloy <jon.ma...@ericsson.com>; ma...@donjonn.com; Ying Xue

[tipc-discussion] [net-next 0/2] tipc: two small cleanups

2018-01-04 Thread Jon Maloy
These two commits are based on commit f9c935db8086 ("tipc: fix problems with multipoint-to-point flow control") which has been applied to 'net' but not yet to 'net-next'. Jon Maloy (2): tipc: some clarifying name changes tipc: simplify small window members' sorting algorithm

[tipc-discussion] [net-next 2/2] tipc: simplify small window members' sorting algorithm

2018-01-04 Thread Jon Maloy
We simplify the sorting algorithm in tipc_update_member(). We also make the remaining conditional call to this function unconditional, since the same condition now is tested for inside the said function. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@eri

[tipc-discussion] [net-next 1/2] tipc: some clarifying name changes

2018-01-04 Thread Jon Maloy
nabled() -> tipc_group_is_receiver(). Members fulfilling this condition will accept messages sent from the current socket, i.e., they are receivers from its viewpoint. There are no functional changes in this commit. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.

[tipc-discussion] [net 1/1] tipc: correct initial value for group congestion flag

2018-02-26 Thread Jon Maloy
t corrects this bug. Reported-by: Hoang Le <hoang.h...@dektek.com.au> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/group.c | 1 + net/tipc/socket.c | 1 + 2 files changed, 2 insertions(+) diff --git a/net/tipc/group.c b/net/tipc/group.c index 03086cc..d7a7bef 100644 --- a/

Re: [tipc-discussion] Serious performance degradation in Linux 4.15

2018-02-26 Thread Jon Maloy
Of Peter Zijlstra > Sent: Monday, February 12, 2018 10:17 > To: Jon Maloy <jon.ma...@ericsson.com> > Cc: net...@vger.kernel.org; mi...@kernel.org; David Miller > (da...@davemloft.net) <da...@davemloft.net>; Mike Galbraith > <umgwanakikb...@gmail.com>; Matt Fleming <m..

Re: [tipc-discussion] [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media

2018-07-25 Thread Jon Maloy
Acked ///Jon Maloy > -Original Message- > From: netdev-ow...@vger.kernel.org On Behalf > Of YueHaibing > Sent: Wednesday, 25 July, 2018 05:01 > To: da...@davemloft.net; Jon Maloy ; > ying@windriver.com > Cc: linux-ker...@vger.kernel.org; net...@vger.kernel.or

Re: [tipc-discussion] [PATCH] tipc: fix an interrupt unsafe locking scenario

2018-08-07 Thread Jon Maloy
Nice fix. I was a little in doubt about using that lock, but deemed it was overkill to introduce an extra lock just for this case. Acked-by: Jon Maloy > -Original Message- > From: Ying Xue > Sent: Tuesday, 07 August, 2018 02:53 > To: net...@vger.kernel.org; Jon Mal

Re: [tipc-discussion] [PATCH] tipc: fix issue that tipc_dest neglects of big-endian

2018-08-21 Thread Jon Maloy
Hi Ying, Do you have time to review this? I am non vacation right now, and don't have time. Honestly, this patch doesn't make sense to me at all. ///jon > -Original Message- > From: David Miller > Sent: Monday, 20 August, 2018 22:21 > To: haiqing@windriver.com >

Re: [tipc-discussion] [PATCH] tipc: fix the big/little endian issue in tipc_dest

2018-08-22 Thread Jon Maloy
on > -Original Message- > From: Haiqing Bai > Sent: Wednesday, 22 August, 2018 02:40 > To: tipc-discussion@lists.sourceforge.net > Cc: Jon Maloy ; ying@windriver.com; > da...@davemloft.net; zhenbo@windriver.com; > haiqing@windriver.com > Subject: [tipc

Re: [tipc-discussion] [PATCH net-next] tipc: remove unused tipc_group_size

2018-07-17 Thread Jon Maloy
Acked-by: Jon Maloy ///jon > -Original Message- > From: YueHaibing > Sent: Tuesday, 17 July, 2018 10:11 > To: da...@davemloft.net; Jon Maloy ; > ying@windriver.com > Cc: linux-ker...@vger.kernel.org; net...@vger.kernel.org; > tipc-discussion@lists.source

[tipc-discussion] [net-next 1/1] tipc: make link capability update thread safe

2018-07-18 Thread Jon Maloy
this we have to perform the update inside the node item's write lock protection. Fixes: 9012de508956 ("tipc: add sequence number check for link STATE messages") Signed-off-by: Jon Maloy --- net/tipc/node.c | 4 1 file changed, 4 insertions(+) diff --git a/net/tipc/node.c b/net/t

[tipc-discussion] [net-next 1/2] tipc: add sequence number check for link STATE messages

2018-07-09 Thread Jon Maloy
that duplicates can be identified and ignored. This will also be useful when tracing such cases, and to avert replay attacks when TIPC is encrypted. For compatibility reasons we have to introduce a new capability flag TIPC_LINK_PROTO_SEQNO to handle this new feature. Signed-off-by: Jon Maloy --- net/tipc

[tipc-discussion] [net-next 2/2] tipc: check session number before accepting link protocol messages

2018-07-09 Thread Jon Maloy
are currently using to achieve this. Acked-by: Ying Xue Signed-off-by: Jon Maloy --- net/tipc/link.c | 68 +++-- net/tipc/link.h | 1 + net/tipc/node.c | 5 - 3 files changed, 52 insertions(+), 22 deletions(-) diff --git a/net/tipc/link.c

[tipc-discussion] More debug support in TIPC

2018-07-11 Thread Jon Maloy
This is what I have in mind regarding debugging. A fine granular, non-intrusive debug support where we can enable each debug line individually. Maybe no more blackbuilds... https://www.kernel.org/doc/html/v4.11/admin-guide/dynamic-debug-howto.html ///jon

[tipc-discussion] [net 1/4] tipc: fix wrong return value from function tipc_node_try_addr()

2018-07-06 Thread Jon Maloy
ess itself. This results in a DSC_TRIAL_FAIL_MSG being sent unecessarily to the peer, and sometimes makes the trial period starting over again. Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Signed-off-by: Jon Maloy --- net/tipc/node.c | 7 +-- 1 file changed

[tipc-discussion] [net 3/4] tipc: fix correct setting of message type in second discoverer

2018-07-06 Thread Jon Maloy
, and never change message type, with the result that its links may never be established. In this commmit we ensure that the message type always is set correctly after the trial period is over. Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Signed-o

[tipc-discussion] [net 2/4] tipc: correct discovery message handling during address trial period

2018-07-06 Thread Jon Maloy
period. Such messages are not ignored as they should be, leading to links setup attempts while the node still has no address. Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Signed-off-by: Jon Maloy --- net/tipc/discover.c | 5 - 1 file changed, 4

[tipc-discussion] [net 4/4] tipc: make function tipc_net_finalize() thread safe

2018-07-06 Thread Jon Maloy
Signed-off-by: Jon Maloy --- net/tipc/net.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/net/tipc/net.c b/net/tipc/net.c index 4fbaa04..a7f6964 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c @@ -121,12 +121,17 @@ int tipc_net_init(struct net *net, u8 *no

[tipc-discussion] [net 0/4] tipc: fixes in duplicate address discovery function

2018-07-06 Thread Jon Maloy
commit 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") introduced new functionality that has turned out to contain several bugs and weaknesses. We address those in this series. Jon Maloy (4): tipc: fix wrong return value from function tipc_node_try_add

[tipc-discussion] [net-next 1/1] tipc: extend link reset criteria for stale packet retransmission

2018-07-06 Thread Jon Maloy
the link until the link tolerance time is passed AND we have made 100 retransmissions attempts. Acked-by: Ying Xue Signed-off-by: Jon Maloy --- net/tipc/link.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/net/tipc/link.c b/net/tipc

Re: [tipc-discussion] [net-next 1/1] tipc: extend link reset criteria for stale packet retransmission

2018-07-06 Thread Jon Maloy
would like to see some real-site statistics before trying to change this. BR ///jon > -Original Message- > From: Ying Xue > Sent: Friday, 06 July, 2018 07:35 > To: Jon Maloy ; Jon Maloy > Cc: Mohan Krishna Ghanta Krishnamurthy > ; Tung Quang Nguyen > ; Hoang Huu

Re: [tipc-discussion] More debug support in TIPC

2018-07-13 Thread Jon Maloy
; From: Ying Xue > Sent: Friday, 13 July, 2018 08:34 > To: Jon Maloy ; tipc-...@dektech.com.au; > tipc-discussion@lists.sourceforge.net > Subject: Re: More debug support in TIPC > > Thanks Jon for the share. It looks very good. I don't know whether you > have used it. If not,

Re: [tipc-discussion] KASAN: use-after-free Read in tipc_group_is_open

2018-01-16 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Cong Wang > Sent: Tuesday, January 16, 2018 13:56 > To: Jon Maloy <jon.ma...@ericsson.com> > Cc: syzbot <syzbot+799dafde028679585...@syzkaller.appsp

Re: [tipc-discussion] [net-next 1/1] tipc: sockopt(TIPC_SO_RCVBUF) for setting receive buffer

2018-02-28 Thread Jon Maloy
or bigger. This has the advantage that we don't need to change the default value, and we avoid side effect on other protocols. ///jon > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, February 28, 2018 11:36 > To: Jon Maloy <jon.ma.

[tipc-discussion] [net-next 1/1] tipc: sockopt(TIPC_SO_RCVBUF) for setting receive buffer

2018-02-27 Thread Jon Maloy
ch.com.au> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- include/uapi/linux/tipc.h | 1 + net/tipc/socket.c | 8 2 files changed, 9 insertions(+) diff --git a/include/uapi/linux/tipc.h b/include/uapi/linux/tipc.h index 14bacc7..8ce4a69 100644 --- a/include/uapi/

Re: [tipc-discussion] [net-next 1/5] tipc: obsolete TIPC_ZONE_SCOPE

2018-03-15 Thread Jon Maloy
No, it won't. I just moved those functions and #defines to the bottom of the same file, and marked them as 'deprecated'. BR ///jon > -Original Message- > From: Jiri Pirko [mailto:j...@resnulli.us] > Sent: Thursday, March 15, 2018 12:11 > To: Jon Maloy <jon.ma...@ericsso

[tipc-discussion] [net-next 1/5] tipc: obsolete TIPC_ZONE_SCOPE

2018-03-15 Thread Jon Maloy
for use during lookup, with the same meaning as ZONE_SCOPE/CLUSTER_SCOPE. We now permit it even as binding scope, but for compatibility reasons we choose to not change the value of TIPC_CLUSTER_SCOPE. Acked-by: Ying Xue <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@eri

[tipc-discussion] [net-next 0/5] tipc: obsolete zone concept

2018-03-15 Thread Jon Maloy
Functionality related to the 'zone' concept was never implemented in TIPC. In this series we eliminate the remaining traces of it in the code, and can hence take a first step in reducing the footprint and complexity of the binding table. Jon Maloy (5): tipc: obsolete TIPC_ZONE_SCOPE tipc

[tipc-discussion] [net-next 0/5] tipc: obsolete zone concept

2018-03-15 Thread Jon Maloy
Functionality related to the zone concept was never implemented in TIPC. In this series we eliminate the remaining traces of it in the code, and can hence take a first step in reducing the footprint and complexity of the binding table. Jon Maloy (5): tipc: obsolete TIPC_ZONE_SCOPE tipc

Re: [tipc-discussion] [net-next 1/3] tipc: modify socket iterator for sock_diag

2018-03-14 Thread Jon Maloy
c-discussion@lists.sourceforge.net; Jon Maloy > <jon.ma...@ericsson.com>; ma...@donjonn.com; Ying Xue > <ying@windriver.com> > Cc: Parthasarathy Bhuvaragan <parthasarathy.bhuvara...@ericsson.com> > Subject: [net-next 1/3] tipc: modify socket iterator for sock_diag > > The

Re: [tipc-discussion] [iproute2 1/1] ss: Add support for TIPC socket diag in ss tool

2018-03-14 Thread Jon Maloy
Acked-by: jon > -Original Message- > From: Mohan Krishna Ghanta Krishnamurthy > Sent: Tuesday, March 13, 2018 11:33 > To: tipc-discussion@lists.sourceforge.net; Jon Maloy > <jon.ma...@ericsson.com>; ma...@donjonn.com; Ying Xue > <ying@windriver.com>

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

2018-04-03 Thread Jon Maloy
) for a program which only needs to quickly check the id of a node, given the hash address. Can you see nay obvious advantages with using netlink here? ///jon > -Original Message- > From: Partha [mailto:parthasarathy.bhuvara...@gmail.com] > Sent: Tuesday, April 03, 2018 02:39 > T

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

2018-04-04 Thread Jon Maloy
> -Original Message- > From: Partha [mailto:parthasarathy.bhuvara...@gmail.com] > Sent: Wednesday, April 04, 2018 03:01 > To: Jon Maloy <jon.ma...@ericsson.com>; Jon Maloy > <ma...@donjonn.com> > Cc: tipc-discussion@lists.sourceforge.net; Mohan

Re: [tipc-discussion] [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 <baijiaju1...@gmail.com>; Jon Maloy > <jon.ma...@ericsson.com>; da...@davemloft.net > Cc: net...@vger.kernel.org; tipc-discussio

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

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

[tipc-discussion] [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-b

Re: [tipc-discussion] [net-next 2/3] tipc: implement configuration of UDP media MTU

2018-04-18 Thread Jon Maloy
> -Original Message- > From: Mohan Krishna Ghanta Krishnamurthy > Sent: Monday, April 09, 2018 12:24 > To: tipc-discussion@lists.sourceforge.net; Jon Maloy > <jon.ma...@ericsson.com>; ma...@donjonn.com; > ying@windriver.com; Mohan Kris

Re: [tipc-discussion] [net-next 1/3] tipc: set default MTU for UDP media

2018-04-18 Thread Jon Maloy
> -Original Message- > From: Mohan Krishna Ghanta Krishnamurthy > Sent: Monday, April 09, 2018 12:24 > To: tipc-discussion@lists.sourceforge.net; Jon Maloy > <jon.ma...@ericsson.com>; ma...@donjonn.com; > ying@windriver.com; Mohan Kris

Re: [tipc-discussion] [net-next 3/3] tipc: confgiure and apply UDP bearer MTU on running links

2018-04-18 Thread Jon Maloy
Acked-by: me ///jon > -Original Message- > From: Mohan Krishna Ghanta Krishnamurthy > Sent: Monday, April 09, 2018 12:24 > To: tipc-discussion@lists.sourceforge.net; Jon Maloy > <jon.ma...@ericsson.com>; ma...@donjonn.com; > ying@windriver.com; Mohan Kris

Re: [tipc-discussion] TIPC did not recover after a short time network problem

2018-04-18 Thread Jon Maloy
Hi Jianfeng, This is a really hard one. The kernel is very old, and the problem does not sound familiar to me, as a pure TIPC maintainer. However, we do have people working with OpenSAF even in our company, so I will cc your message to one of our guys, just in case it is something he recognizes.

Re: [tipc-discussion] tipc: remove skb_clone() in function tipc_msg_extract()

2018-04-24 Thread Jon Maloy
Hi Ying, I'll respond to this one, since I initiated it. See below. > -Original Message- > From: Ying Xue [mailto:ying@windriver.com] > Sent: Tuesday, April 24, 2018 08:22 > To: Tung Quang Nguyen ; tipc- > discuss...@lists.sourceforge.net > Subject: Re:

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

2018-04-17 Thread Jon Maloy
the 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 <jon.ma...@ericsson.com&g

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

2018-04-17 Thread Jon Maloy
il we can return MAX_BEARERS. This solution also caters for the case where there may be gaps in the bearer array. Signed-off-by: Tung Nguyen <tung.q.ngu...@dektech.com.au> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- net/tipc/monitor.c | 2 +- net/tipc/node.c| 11 --- 2

[tipc-discussion] [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 <jon.ma...@ericsson.com> --- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/node.c b/net/tipc/node.c ind

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

2018-04-25 Thread Jon Maloy
. This will be 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 <ying@windriver.com> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- include/uapi/linux/tipc.h | 12 net

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

2018-03-29 Thread Jon Maloy
sprintf() call with snprintf(). Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Reported-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- include/uapi/linux/tipc.h | 2 +- net/tipc/link.c | 3

[tipc-discussion] [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 <jon.ma...@ericsson.

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

2018-03-29 Thread Jon Maloy
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: refactor name

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

2018-03-29 Thread Jon Maloy
igned-off-by: Jon Maloy <jon.ma...@ericsson.com> --- 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/inc

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

2018-03-29 Thread Jon Maloy
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 <jon.ma...@ericsson.com> --- net/tipc/name_distr.c | 90 +-- net/tipc/name_d

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

2018-03-29 Thread Jon Maloy
is much longer than the latter, we make room for it by eliminating 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 <jon.ma...@ericsson.com> --- tipc/misc.c

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

2018-03-24 Thread Jon Maloy
. For compatibility the old 'netid' commands are retained, -we just remove them from the help texts. Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- include/uapi/linux/tipc_netlink.h | 2 + tipc/misc.c | 79 ++- tipc/misc.h

[tipc-discussion] [iproute2 2/2] tipc: change node address printout formats

2018-03-24 Thread Jon Maloy
Since a node address now per definition is only an unstructured 32-bit integer it makes no sense print it out as a structured string. In this commit, we replace all occurrences of "" printouts with just an "%x". Signed-off-by: Jon Maloy <jon.ma...@ericsson.com>

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

2018-03-24 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, i.e., we remove the assumption about an internal structure. Jon Maloy (2): tipc

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

2018-03-24 Thread Jon Maloy
. For compatibility the old 'netid' commands are retained, -we just remove them from the help texts. Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> --- include/uapi/linux/tipc_netlink.h | 2 + tipc/misc.c | 79 - tipc/misc.h

<    1   2   3   4   5   6   7   8   9   10   >