The parent field of a struct device may be NULL. The macro
ibdev_to_node() should check for that.
Signed-off-by: Ka-Cheong Poon
---
net/rds/ib.h | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/rds/ib.h b/net/rds/ib.h
index 5ae069d..8dfff43 100644
--- a/net/rds
/receive packet
processing.
Suggested-by: Håkon Bugge
Signed-off-by: Ka-Cheong Poon
Acked-by: Santosh Shilimkar
---
net/rds/ib.c | 10 +++-
net/rds/ib.h | 15 +++--
net/rds/ib_cm.c | 166 +++---
net/rds/ib_recv.c | 8 +--
net/rds
On 10/2/19 1:16 AM, David Miller wrote:
From: Ka-Cheong Poon
Date: Mon, 30 Sep 2019 02:08:00 -0700
Currently, RDS calls ib_dma_alloc_coherent() to allocate a large piece
of contiguous DMA coherent memory to store struct rds_header for
sending/receiving packets. The memory allocated is then
fragmented. Instead, RDS should use the DMA
memory pool interface to handle this.
Suggested-by: Håkon Bugge
Signed-off-by: Ka-Cheong Poon
---
net/rds/ib.c | 10 +++-
net/rds/ib.h | 15 +++--
net/rds/ib_cm.c | 166 +++---
net/rds
On 9/21/19 9:09 AM, Jakub Kicinski wrote:
On Tue, 17 Sep 2019 08:29:18 -0700, Ka-Cheong Poon wrote:
In rds_bind(), laddr_check is called without checking if it is NULL or
not. And rs_transport should be reset if rds_add_bound() fails.
Reported-by: syzbot+fae39afd2101a17ec
Signed-off-by: Ka-Cheong Poon
Acked-by: Santosh Shilimkar
---
net/rds/bind.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/rds/bind.c b/net/rds/bind.c
index 20c156a..5b5fb4c 100644
--- a/net/rds/bind.c
+++ b/net/rds/bind.c
@@ -244,7 +244,8 @@ int rds_bind(struct so
On 9/24/19 11:27 PM, Ka-Cheong Poon wrote:
In rds_bind(), laddr_check is called without checking if it is NULL or
not. And rs_transport should be reset if rds_add_bound() fails.
Fixes: c5c1a030a7db ("net/rds: Check laddr_check before calling it")
Oops, wrong Subject. Will re-subm
In rds_bind(), laddr_check is called without checking if it is NULL or
not. And rs_transport should be reset if rds_add_bound() fails.
Fixes: c5c1a030a7db ("net/rds: Check laddr_check before calling it")
Reported-by: syzbot+fae39afd2101a17ec...@syzkaller.appspotmail.com
Signed-off-by:
In rds_bind(), laddr_check is called without checking if it is NULL or
not. And rs_transport should be reset if rds_add_bound() fails.
Reported-by: syzbot+fae39afd2101a17ec...@syzkaller.appspotmail.com
Signed-off-by: Ka-Cheong Poon
---
net/rds/bind.c | 5 -
1 file changed, 4 insertions
rds_sock should not be added to the bind hash table
before all the needed fields are set.
Reported-by: syzbot+4b4f8163c2e246df3...@syzkaller.appspotmail.com
Signed-off-by: Ka-Cheong Poon
---
net/rds/bind.c | 40 ++--
1 file changed, 18 insertions(+), 22 deletions
On 8/25/19 5:20 AM, David Miller wrote:
From: Ka-Cheong Poon
Date: Wed, 21 Aug 2019 20:18:24 -0700
The rds6_inc_info_copy() function has a couple struct members which
are leaking stack information. The ->tos field should hold actual
information and the ->flags field needs to be zero
f0 ("rds: Extend RDS API for IPv6 support")
Reported-by: 黄ID蝴蝶
Signed-off-by: Dan Carpenter
Signed-off-by: Ka-Cheong Poon
Acked-by: Santosh Shilimkar
---
net/rds/recv.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 853de48
f0 ("rds: Extend RDS API for IPv6 support")
Reported-by: 黄ID蝴蝶
Signed-off-by: Dan Carpenter
Signed-off-by: Ka-Cheong Poon
---
net/rds/recv.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 853de48..a42ba7f 100644
--- a/ne
Add support of the socket options RDS6_INFO_SOCKETS and
RDS6_INFO_RECV_MESSAGES which update the RDS_INFO_SOCKETS and
RDS_INFO_RECV_MESSAGES options respectively. The old options work
for IPv4 sockets only.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 93
Please ignore this review request. It was sent to the
wrong alias. I'm sorry about this.
On 3/4/19 6:32 PM, Ka-Cheong Poon wrote:
Currently, an RDS socket's send buffer is shared by all the peers this
socket communicates with. When one or more peers are slow to rece
peers are slow, their data will not interfere with
data sent to other peers.
A sysctl parameter, sock_max_peers, is added to limit the number of
peers a socket can communicate with. The default is 8192. Its range
of valid value is 128 to 65536.
Orabug: 28314151
Tested-by: Rose Wang
Signed-of
In rds_send_mprds_hash(), if the calculated hash value is non-zero and
the MPRDS connections are not yet up, it will wait. But it should not
wait if the send is non-blocking. In this case, it should just use the
base c_path for sending the message.
Signed-off-by: Ka-Cheong Poon
---
net/rds
This patch removes the IPv6 dependency from RDS.
Signed-off-by: Ka-Cheong Poon
---
net/rds/Kconfig | 2 +-
net/rds/af_rds.c | 32 +++-
net/rds/bind.c | 4 +++-
net/rds/connection.c | 26 --
net/rds/ib.c
alloc_percpu().
Signed-off-by: Ka-Cheong Poon
---
net/rds/ib.h | 2 +-
net/rds/ib_cm.c | 2 +-
net/rds/ib_recv.c | 10 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/rds/ib.h b/net/rds/ib.h
index beb95b8..73427ff 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
address scope mismatched issue.
Added back rds_connect() IPv6 changes.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 91
net/rds/bind.c | 59 ++-
net/rds/connection.c | 54
not accept IPv6 address from an application.
And RDS layer does not accept nor initiate IPv6 connections.
v2: Fixed sparse warnings.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 138 +++---
net/rds/bind.c | 91 ++-
net/rds/cong.c
to represent IPv4
address in the new data structures.
v4: Revert changes to SO_RDS_TRANSPORT
Signed-off-by: Ka-Cheong Poon
---
include/uapi/linux/rds.h | 69 +++-
net/rds/connection.c | 101 +++
net/rds/ib.c
IPv4 RDS
connections. When it needs to communicate with an IPv6 peer, it uses
the RDS_CM_PORT to send the connection set up request.
Ka-Cheong Poon (3):
rds: Changing IP address internal representation to struct in6_addr
rds: Enable RDS IPv6 support
rds: Extend RDS API for IPv6 support
include
On 07/24/2018 11:20 AM, David Miller wrote:
From: Ka-Cheong Poon
Date: Tue, 24 Jul 2018 11:18:24 +0800
On 07/24/2018 02:15 AM, David Miller wrote:
From: Ka-Cheong Poon
Date: Mon, 23 Jul 2018 07:16:11 -0700
@@ -163,15 +165,29 @@ int rds_tcp_accept_one(struct socket *sock)
inet
On 07/24/2018 02:15 AM, David Miller wrote:
From: Ka-Cheong Poon
Date: Mon, 23 Jul 2018 07:16:11 -0700
@@ -163,15 +165,29 @@ int rds_tcp_accept_one(struct socket *sock)
inet = inet_sk(new_sock->sk);
+ my_addr = &new_sock->sk->sk_v6_rcv_saddr;
+ peer_addr =
IPv4 RDS
connections. When it needs to communicate with an IPv6 peer, it uses
the RDS_CM_PORT to send the connection set up request.
Ka-Cheong Poon (3):
rds: Changing IP address internal representation to struct in6_addr
rds: Enable RDS IPv6 support
rds: Extend RDS API for IPv6 support
include
not accept IPv6 address from an application.
And RDS layer does not accept nor initiate IPv6 connections.
v2: Fixed sparse warnings.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 138 +++---
net/rds/bind.c | 91 ++-
net/rds/cong.c
back rds_connect() IPv6 changes.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 91
net/rds/bind.c | 59 ++-
net/rds/connection.c | 54
net/rds/ib.c
to represent IPv4
address in the new data structures.
v4: Revert changes to SO_RDS_TRANSPORT
Signed-off-by: Ka-Cheong Poon
---
include/uapi/linux/rds.h | 69 +++-
net/rds/connection.c | 101 +++
net/rds/ib.c
On 07/19/2018 01:31 AM, David Miller wrote:
From: Sowmini Varadhan
Date: Wed, 18 Jul 2018 03:33:40 -0700
On (07/18/18 15:19), Ka-Cheong Poon wrote:
bind() and connect() are using the sa_family/ss_family to have
the application signal to the kernel about whether ipv4 or ipv6 is
desired. (and
On 07/17/2018 07:27 PM, Sowmini Varadhan wrote:
On (07/17/18 13:32), Ka-Cheong Poon wrote:
The app can use either structures to make the call. When the
app fills in the structure, it knows what it is filling in,
either sockaddr_in or sockaddr_in6. So it knows the right size
to use. The app
On 07/17/2018 12:20 AM, Sowmini Varadhan wrote:
- Looks like rds_connect() is checking things in the right order (thanks)
However, rds_cancel_sent_to is still looking at the len to figure
out the family.. as we move to ipv6, it would be better if we allow
the caller to specify stru
to represent IPv4
address in the new data structures.
Signed-off-by: Ka-Cheong Poon
---
include/uapi/linux/rds.h | 71 +++--
net/rds/connection.c | 101 +++
net/rds/ib.c | 52
net/rds
not accept IPv6 address from an application.
And RDS layer does not accept nor initiate IPv6 connections.
v2: Fixed sparse warnings.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 138 +++---
net/rds/bind.c | 91 ++-
net/rds/cong.c
Miller).
Added support to set up connection between link local and non-link
addresses.
Various review comments from Santosh Shilimkar and Sowmini Varadhan.
v2: Fixed bound and peer address scope mismatched issue.
Added back rds_connect() IPv6 changes.
Signed-off-by: Ka-Cheong Poon
IPv4 RDS
connections. When it needs to communicate with an IPv6 peer, it uses
the RDS_CM_PORT to send the connection set up request.
Ka-Cheong Poon (3):
rds: Changing IP address internal representation to struct in6_addr
rds: Enable RDS IPv6 support
rds: Extend RDS API for IPv6 support
include
On 07/07/2018 01:26 AM, Santosh Shilimkar wrote:
Hi Ka-Cheong,
On 7/6/2018 8:25 AM, Sowmini Varadhan wrote:
On (07/06/18 23:08), Ka-Cheong Poon wrote:
As mentioned in a previous mail, it is unclear why the
port number is transport specific. Most Internet services
use the same port number
On 07/06/2018 11:14 PM, Sowmini Varadhan wrote:
- In net/rds/rds.h;
/* The following ports, 16385, 18634, 18635, are registered with IANA as
* the ports to be used for RDS over TCP and UDP. 18634 is the historical
What is "RDS over TCP and UDP"? There is no such thing as RDS-over-UD
On 07/06/2018 06:15 PM, Sowmini Varadhan wrote:
On (07/06/18 17:08), Ka-Cheong Poon wrote:
Hmm. Why do you need to include tcp header in ib transport
code ? If there is any common function just move to core
common file and use it.
I think it can be removed as it is left over from earlier
On 07/06/2018 01:44 AM, Sowmini Varadhan wrote:
- rds_getname(): one of the existing properties of PF_RDS is that a
connect() does not involve an implicit bind(). Note that you are basing
the changes in rds_bind() on this behavior, thus I guess we make the
choice of treating this as a f
On 07/06/2018 01:58 AM, Santosh Shilimkar wrote:
--- a/net/rds/bind.c
+++ b/net/rds/bind.c
@@ -42,42 +43,58 @@
static const struct rhashtable_params ht_parms = {
.nelem_hint = 768,
- .key_len = sizeof(u64),
+ .key_len = RDS_BOUND_KEY_LEN,
Do we really need the scope id to be pa
On 06/30/2018 04:50 PM, David Miller wrote:
From: Ka-Cheong Poon
Date: Wed, 27 Jun 2018 03:23:27 -0700
This patch changes the internal representation of an IP address to use
struct in6_addr. IPv4 address is stored as an IPv4 mapped address.
All the functions which take an IP address as
rds_connect() IPv6 changes.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 28 +++-
net/rds/bind.c | 34 +-
net/rds/connection.c | 43 -
net/rds/ib.c | 55
IPv4 RDS
connections. When it needs to communicate with an IPv6 peer, it uses
the RDS_CM_PORT to send the connection set up request.
Ka-Cheong Poon (3):
rds: Changing IP address internal representation to struct in6_addr
rds: Enable RDS IPv6 support
rds: Extend RDS API for IPv6 support
include
to represent IPv4
address in the new data structures.
Signed-off-by: Ka-Cheong Poon
---
include/uapi/linux/rds.h | 71 +++--
net/rds/connection.c | 100 +++
net/rds/ib.c | 52
net/rds
not accept IPv6 address from an application.
And RDS layer does not accept nor initiate IPv6 connections.
v2: Fixed sparse warnings.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 138 --
net/rds/bind.c | 91 +-
net/rds/cong.c
On 06/26/2018 09:08 PM, Sowmini Varadhan wrote:
On (06/26/18 21:02), Ka-Cheong Poon wrote:
In this case, RFC 6724 prefers link local address as source.
the keyword is "prefers".
There is a reason for that. It is the way folks expect
how IPv6 addresses are being used.
While
On 06/26/2018 06:16 PM, Sowmini Varadhan wrote:
On (06/26/18 13:30), Ka-Cheong Poon wrote:
My answer to this is that if a socket is not bound to a link
local address (meaning it is bound to a non-link local address)
and it is used to send to a link local peer, I think it should
fail.
Hmm
On 06/26/2018 01:50 AM, Sowmini Varadhan wrote:
If a socket is bound, I guess the scope_id should be used. So
if a socket is not bound to a link local address and the socket
is used to sent to a link local peer, it should fail.
PF_RDS sockets *MUST* alwasy be bound. See
Documentation/network
On 06/26/2018 01:03 AM, Sowmini Varadhan wrote:
On (06/25/18 03:38), Ka-Cheong Poon wrote:
@@ -1105,8 +1105,27 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg,
size_t payload_len)
break;
case sizeof(*sin6): {
- ret
not accept IPv6 address from an application.
And RDS layer does not accept nor initiate IPv6 connections.
Signed-off-by: Ka-Cheong Poon
---
net/rds/af_rds.c | 138 --
net/rds/bind.c | 91 +-
net/rds/cong.c | 23 ++--
net/rds
(RDS_CM_PORT) to accept IPv6 connection. And it
continues to use the original RDS_PORT for IPv4 RDS connections. When
it needs to communicate with an IPv6 peer, it uses the RDS_CM_PORT to
send the connection set up request.
Signed-off-by: Ka-Cheong Poon
---
net/rds/bind.c | 21
IPv4 RDS
connections. When it needs to communicate with an IPv6 peer, it uses
the RDS_CM_PORT to send the connection set up request.
Ka-Cheong Poon (3):
rds: Changing IP address internal representation to struct in6_addr
rds: Enable RDS IPv6 support
rds: Extend RDS API for IPv6 support
include
to represent IPv4
address in the new data structures.
Signed-off-by: Ka-Cheong Poon
---
include/uapi/linux/rds.h | 71 +--
net/rds/connection.c | 97
net/rds/ib.c | 52 ++
net
On 04/26/2018 05:43 AM, Eric Dumazet wrote:
When adding tcp mmap() implementation, I forgot that socket lock
had to be taken before current->mm->mmap_sem. syzbot eventually caught
the bug.
Since we can not lock the socket in tcp mmap() handler we have to
split the operation in two phases.
1) mm
only the zero c_path can be used.
Signed-off-by: Ka-Cheong Poon
---
net/rds/send.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/net/rds/send.c b/net/rds/send.c
index acad042..94c7f74 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1,5 +1,5 @@
/*
- * Cop
When the connection is shutdown and sock_release() is
called to free the socket, the owner's reference count is decremented
and becomes incorrect. Note that this bug only shows up when the socket
owner is configured as a kernel module.
v2: Update comments
Signed-off-by: Ka-Cheong Poo
On 03/01/2018 07:54 PM, Sowmini Varadhan wrote:
On Wed, Feb 28, 2018 at 11:44 PM, Ka-Cheong Poon
wrote:
Commit 0933a578cd55 ("rds: tcp: use sock_create_lite() to create the
accept socket") has a reference counting issue in TCP socket creation
when accepting a new connection. The
When the connection is shutdown and sock_release() is
called to free the socket, the owner's reference count is decremented
and becomes incorrect. Note that this bug only shows up when the socket
owner is configured as a kernel module.
Signed-off-by: Ka-Cheong Poon
---
net/rds/tc
59 matches
Mail list logo