get rid of the address_space override in setsockopt v2
by Christoph Hellwig
Hi Dave,
setsockopt is the last place in architecture-independ code that still
uses set_fs to force the uaccess routines to operate on kernel pointers.
This series adds a new sockptr_t type that can contained either a kernel
or user pointer, and which has accessors that do the right thing, and
then uses it for setsockopt, starting by refactoring some low-level
helpers and moving them over to it before finally doing the main
setsockopt method.
Note that apparently the eBPF selftests do not even cover this path, so
the series has been tested with a testing patch that always copies the
data first and passes a kernel pointer. This is something that works for
most common sockopts (and is something that the ePBF support relies on),
but unfortunately in various corner cases we either don't use the passed
in length, or in one case actually copy data back from setsockopt, or in
case of bpfilter straight out do not work with kernel pointers at all.
Against net-next/master.
Changes since v1:
- check that users don't pass in kernel addresses
- more bpfilter cleanups
- cosmetic mptcp tweak
Diffstat:
crypto/af_alg.c | 7
drivers/crypto/chelsio/chtls/chtls_main.c | 18 -
drivers/isdn/mISDN/socket.c | 4
include/linux/bpfilter.h | 6
include/linux/filter.h | 3
include/linux/mroute.h | 5
include/linux/mroute6.h | 8
include/linux/net.h | 4
include/linux/netfilter.h | 6
include/linux/netfilter/x_tables.h | 4
include/linux/sockptr.h | 132 ++++++++++++
include/net/inet_connection_sock.h | 3
include/net/ip.h | 7
include/net/ipv6.h | 6
include/net/sctp/structs.h | 2
include/net/sock.h | 7
include/net/tcp.h | 6
include/net/udp.h | 2
include/net/xfrm.h | 8
net/atm/common.c | 6
net/atm/common.h | 2
net/atm/pvc.c | 2
net/atm/svc.c | 6
net/ax25/af_ax25.c | 6
net/bluetooth/hci_sock.c | 8
net/bluetooth/l2cap_sock.c | 22 +-
net/bluetooth/rfcomm/sock.c | 12 -
net/bluetooth/sco.c | 6
net/bpfilter/bpfilter_kern.c | 55 ++---
net/bridge/netfilter/ebtables.c | 46 +---
net/caif/caif_socket.c | 8
net/can/j1939/socket.c | 12 -
net/can/raw.c | 16 -
net/core/filter.c | 6
net/core/sock.c | 36 +--
net/dccp/dccp.h | 2
net/dccp/proto.c | 20 -
net/decnet/af_decnet.c | 13 -
net/ieee802154/socket.c | 6
net/ipv4/bpfilter/sockopt.c | 16 -
net/ipv4/ip_options.c | 43 +---
net/ipv4/ip_sockglue.c | 66 +++---
net/ipv4/ipmr.c | 14 -
net/ipv4/netfilter/arp_tables.c | 33 +--
net/ipv4/netfilter/ip_tables.c | 29 +-
net/ipv4/raw.c | 8
net/ipv4/tcp.c | 30 +-
net/ipv4/tcp_ipv4.c | 4
net/ipv4/udp.c | 11 -
net/ipv4/udp_impl.h | 4
net/ipv6/ip6_flowlabel.c | 317 ++++++++++++++++--------------
net/ipv6/ip6mr.c | 17 -
net/ipv6/ipv6_sockglue.c | 203 +++++++++----------
net/ipv6/netfilter/ip6_tables.c | 28 +-
net/ipv6/raw.c | 10
net/ipv6/tcp_ipv6.c | 4
net/ipv6/udp.c | 7
net/ipv6/udp_impl.h | 4
net/iucv/af_iucv.c | 4
net/kcm/kcmsock.c | 6
net/l2tp/l2tp_ppp.c | 4
net/llc/af_llc.c | 4
net/mptcp/protocol.c | 6
net/netfilter/ipvs/ip_vs_ctl.c | 4
net/netfilter/nf_sockopt.c | 2
net/netfilter/x_tables.c | 20 -
net/netlink/af_netlink.c | 4
net/netrom/af_netrom.c | 4
net/nfc/llcp_sock.c | 6
net/packet/af_packet.c | 39 +--
net/phonet/pep.c | 4
net/rds/af_rds.c | 30 +-
net/rds/rdma.c | 14 -
net/rds/rds.h | 6
net/rose/af_rose.c | 4
net/rxrpc/af_rxrpc.c | 8
net/rxrpc/ar-internal.h | 4
net/rxrpc/key.c | 9
net/sctp/socket.c | 4
net/smc/af_smc.c | 4
net/socket.c | 24 --
net/tipc/socket.c | 8
net/tls/tls_main.c | 17 -
net/vmw_vsock/af_vsock.c | 4
net/x25/af_x25.c | 4
net/xdp/xsk.c | 8
net/xfrm/xfrm_state.c | 6
87 files changed, 894 insertions(+), 743 deletions(-)
1 year, 10 months
[PATCH net] mptcp: fix warn at shutdown time for unaccepted msk sockets
by Paolo Abeni
With commit b93df08ccda3 ("mptcp: explicitly track the fully
established status"), the status of unaccepted mptcp closed in
mptcp_sock_destruct() changes from TCP_SYN_RECV to TCP_ESTABLISHED.
As a result mptcp_sock_destruct() does not perform the proper
cleanup and inet_sock_destruct() will later emit a warn.
Address the issue updating the condition tested in mptcp_sock_destruct().
Also update the related comment.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/66
Reported-and-tested-by: Christoph Paasch <cpaasch(a)apple.com>
Fixes: b93df08ccda3 ("mptcp: explicitly track the fully established status")
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
---
net/mptcp/subflow.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 96f4f2fe50ad..e8cac2655c82 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -423,12 +423,12 @@ static void mptcp_sock_destruct(struct sock *sk)
* also remove the mptcp socket, via
* sock_put(ctx->conn).
*
- * Problem is that the mptcp socket will not be in
- * SYN_RECV state and doesn't have SOCK_DEAD flag.
+ * Problem is that the mptcp socket will be in
+ * ESTABLISHED state and will not have the SOCK_DEAD flag.
* Both result in warnings from inet_sock_destruct.
*/
- if (sk->sk_state == TCP_SYN_RECV) {
+ if (sk->sk_state == TCP_ESTABLISHED) {
sk->sk_state = TCP_CLOSE;
WARN_ON_ONCE(sk->sk_socket);
sock_orphan(sk);
--
2.26.2
1 year, 10 months
[PATCH net] mptcp: more stable diag self-tests
by Paolo Abeni
During diag self-tests we introduce long wait in the mptcp test
program to give the script enough time to access the sockets
dump.
Such wait is introduced after shutting down one sockets end. Since
commit 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state
machine") if both sides shutdown the socket is correctly transitioned
into CLOSED status.
As a side effect some sockets are not dumped via the diag interface,
because the socket state (CLOSED) does not match the default filter, and
this cause self-tests instability.
Address the issue moving the above mentioned wait before shutting
down the socket.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/68
Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
Tested-and-acked-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index cad6f73a5fd0..090620c3e10c 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -406,10 +406,11 @@ static int copyfd_io_poll(int infd, int peerfd, int outfd)
/* ... but we still receive.
* Close our write side, ev. give some time
- * for address notification
+ * for address notification and/or checking
+ * the current status
*/
- if (cfg_join)
- usleep(400000);
+ if (cfg_wait)
+ usleep(cfg_wait);
shutdown(peerfd, SHUT_WR);
} else {
if (errno == EINTR)
@@ -427,7 +428,7 @@ static int copyfd_io_poll(int infd, int peerfd, int outfd)
}
/* leave some time for late join/announce */
- if (cfg_wait)
+ if (cfg_join)
usleep(cfg_wait);
close(peerfd);
--
2.26.2
1 year, 10 months
[PATCH net] selftests: mptcp: fix dependecies
by Paolo Abeni
Since commit df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
the MPTCP selftests relies on the MPTCP diag interface which is
enabled by a specific kconfig knob: be sure to include it.
Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
---
tools/testing/selftests/net/mptcp/config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/config b/tools/testing/selftests/net/mptcp/config
index 2499824d9e1c..8df5cb8f71ff 100644
--- a/tools/testing/selftests/net/mptcp/config
+++ b/tools/testing/selftests/net/mptcp/config
@@ -1,4 +1,6 @@
CONFIG_MPTCP=y
CONFIG_MPTCP_IPV6=y
+CONFIG_INET_DIAG=m
+CONFIG_INET_MPTCP_DIAG=m
CONFIG_VETH=y
CONFIG_NET_SCH_NETEM=m
--
2.26.2
1 year, 10 months
[Weekly meetings] MoM - 6th of August 2020
by Matthieu Baerts
Hello,
Yesterday, we had our 111st meeting with Ossama (Intel OTC), Christoph
(Apple), Paolo, Davide and Florian (RedHat), Geliang (Xiaomi), Nicolas
and myself (Tessares).
Thanks again for this new good meeting!
Here are the minutes of the meeting:
Accepted patches:
- The list of accepted patches can be seen on PatchWork:
https://patchwork.ozlabs.org/project/mptcp/list/?state=3
netdev (if mptcp ML is in cc) (Geliang Tang, Paolo Abeni):
1340921 [net] mptcp: be careful on subflow creation
1340373 [net] mptcp: fix bogus sendmsg() return code under pressure
1340308 [net-next] mptcp: use mptcp_for_each_subflow in mptcp_stream_ac
+ SYN cookies (from Florian)
our repo (by: Paolo Abeni):
1339501 [net] mptcp: fix bogus sendmsg() return code under pressure
Pending patches:
- The list of pending patches can be seen on PatchWork:
https://patchwork.ozlabs.org/project/mptcp/list/?state=*
netdev (if mptcp ML is in cc) (by: /):
/
our repo (by: Christoph Paasch, Geliang Tang, Matthieu Baerts,
Nicolas Rybowski, Paolo Abeni):
1325171: Changes Requested: [mptcp-next] selftests: mptcp: interpret \n
as a new line:
- Matth: TODO...
1337426: Changes Requested: [mptcp-next] selftests/mptcp: Better delay &
reordering configuration:
- Changes requested
1340389: Rejected: mptcp: Allow ip mptcp endpoint show:
- Already sent → iproute2 switched to "main" branch instead of "master"
1340771: New: [v5,mptcp-next,1/4] mptcp: rename addr_signal and the
related functions
1340772: New: [v5,mptcp-next,2/4] mptcp: add the outgoing RM_ADDR support
1340774: New: [v5,mptcp-next,3/4] mptcp: add the incoming RM_ADDR support
1340775: New: [v5,mptcp-next,4/4] mptcp: remove addr and subflow in PM
netlink:
- in some cases, there is a lock
- Geliang is looking at that
- a new version will be sent later
- Paolo suggests to look without the 4th patch
- It seems it is OK without the 4th one
- Suggestion: we merge the 3th ones.
- TODO: Matth: apply the 3 first ones → done
1340915: New: [mptcp-next,1/4] bpf: expose is_mptcp flag to bpf_tcp_sock
1340916: New: [mptcp-next,2/4] mptcp: attach subflow socket to parent
cgroup
1340917: New: [mptcp-next,3/4] mptcp: moving struct definitions
1340918: New: [mptcp-next,4/4] bpf: adding 'bpf_mptcp_sock' structure
and helper:
- Waiting for reviews
- Maybe possible to avoid exposing more specific MPTCP structure to
all the kernel
- Nicolas is looking at that
- Create a Github issue?
- TODO: Matth ↑ → done
1341330: New: [01/13] mptcp: rethink 'is writable' conditional
1341334: New: [02/13] mptcp: set data_ready status bit in
subflow_check_data_avail()
1341332: New: [03/13] mptcp: trigger msk processing even for OoO data
1341336: New: [04/13] mptcp: basic sndbuf autotuning
1341335: New: [05/13] mptcp: introduce and use mptcp_try_coalesce()
1341337: New: [06/13] mptcp: move ooo skbs into msk out of order queue.
1341338: New: [07/13] mptcp: cleanup mptcp_subflow_discard_data()
1341339: New: [08/13] mptcp: add OoO related mibs
1341341: New: [09/13] mptcp: move address attribute into mptcp_addr_info
1341340: New: [10/13] mptcp: allow creating non-backup subflows
1341342: New: [11/13] mptcp: allow picking different xmit subflows
1341344: New: [12/13] mptcp: simult flow self-tests
1341343: New: [13/13] mptcp: cache subflow write status in subflow ctx:
- Waiting for review
- Paolo addressed most comments from Florian
- Idea would be to merge this to have more tests and simplify the
process
- TODO: Matth ↑ → done
- Comments reported by Christoph were not applied
Issues on Github:
https://github.com/multipath-tcp/mptcp_net-next/issues/
Recently opened (latest from last week: 69)
72 [iproute2] endpoint add with "id" is not persisted [enhancement]
[iproute2]:
- Normal, new feature needed
71 [interop] Bad mapping: ssn=16194949 map_seq=16120693
map_data_len=31416 [bug] [interop]:
- With Paolo's patches, on going
- Should be still there with v1
- more debug will be needed to capture more states
- with a large transfer: iperf with 4 interfaces from mptcp.org
to net-next: different VMs on the same host
70 [syzkaller] WARNING in mptcp_reset_timer [bug] [syzkaller]:
- Christoph will see if he can reproduce it
Bugs (open and flagged as "bug")
71 [interop] Bad mapping: ssn=16194949 map_seq=16120693
map_data_len=31416 [bug] [interop]
70 [syzkaller] WARNING in mptcp_reset_timer [bug] [syzkaller]
69 Packetdrill: dss: failing with new DATA_FIN patches [bug] @dcaratti:
- Tests needs to be adapted due to changes in the kernel
- We would need to cover the cases where DATA_FIN are received
(1) only in FIN and (2) in ACK+FIN
68 selftests: diag: failing with new DATA_FIN patches [bug]
67 `./mptcp_connect.sh -m mmap` timeout [bug]:
- Can be fixed with Paolo's patch? → mptcp: fix bogus sendmsg()
return code under pressure
- Not related to that → fix an error, not a timeout
66 [interop] IPv4: Attempt to release TCP socket in state 1
00000000cbc88a4a [bug] [interop]
65 clearing properly the status in listen() [bug]
62 [syzkaller] WARNING in __mptcp_move_skbs_from_subflow [bug]
[syzkaller]
56 msk connection state set without msk lock [bug] @pabeni:
- the race is still there for the client msk socket
- now much more difficult to raise
- maybe we should not address it now, seems minor
- we can keep this one
- Paolo has been unassigned
- TODO: Matth: update the status → done
6 loss and delay without reordering causes very slow transfer [bug]
@cpaasch
Paolo reported an issue with ss:
- mptcp diag interface weirdness
- easier to send the small fix for iproute2
Paolo found an issue when sending on multiple subflows:
- If the writer is blocked because send buff is full → we should
check for space on subflow, not msk
- still it is an issue for -net but more visible with multiple subflows
- we can send a patch just for -net (and different one for net-next
as this has been modified by Paolo's patches)
-
https://elixir.bootlin.com/linux/latest/source/net/mptcp/protocol.c#L495
- should be sk_stream_memory_free(ssk) or sk_stream_memory_free(sk)
In Progress (open and assigned to someone)
50 REMOVE_ADDR support [enhancement] @geliangtang
49 ADD_ADDR: echo bit support [enhancement] @geliangtang:
- Was assigned to Peter but there was no activity on this for a
few months
- Now assigned to Geliang
43 [syzkaller] Change syzkaller to exercise MPTCP inet_diag
interface [enhancement] [syzkaller] @cpaasch
17 allow non 'backup' subflows creation [enhancement] @pabeni
Recently closed (since last week)
64 Kernel crash when using `pm_nl_ctl` and `use_mptcp.sh` [bug]
58 Full DATA_FIN support [enhancement] v5.9 @mjmartineau ‡
FYI: Current Roadmap:
- Bugs: https://github.com/multipath-tcp/mptcp_net-next/projects/2
- Current merge window (5.9):
https://github.com/multipath-tcp/mptcp_net-next/projects/1 :
- TODO: Matth: close ↑
- For later: https://github.com/multipath-tcp/mptcp_net-next/projects/4
- 5.10: https://github.com/multipath-tcp/mptcp_net-next/projects/5
Scheduler with BPF:
- a lot of BPF helpers are already available
- possible to do:
- collect all subflows and put then in a map
- then using "skb_sk" type, we can ask to assign a skb to a sk
- current issue: ulp initialisation is done "too soon"
- more tests to do
- in the current MPTCP code:
- we select the path before creating the skb
- but we might need to change that
- but changing that might come with some heavy work:
- a send queue for MPTCP to queue SKB
- would be good for different perspectives and help for
this case with BPF
- a helper could receive some MPTCP info (a DSS mapping + sk) to
select the subflow:
- this would expose a new API for this (with specific data
structures)
Extra tests:
- news about Syzkaller? (Christoph):
- / (see the new Github issue)
- news about interop with mptcp.org? (Christoph):
- / (see the new Github issue)
- once Paolo's patches are in the "export" branch, Christoph is
going to do more tests
- maybe linked to a reinjection?
- needs more analyses
- news about Intel's kbuild? (Mat):
- /
- packetdrill (Davide):
- needed: MP_JOIN tests where we continue reading while a
subflow didn't finish with a DATA_FIN
- some MP_JOIN tests are failing, Davide will investigate more
- CI (Matth):
- /
Next meeting:
- Paolo and Matt will not be able to join the meeting next week and
the week after
- Christoph will not be able to join the meeting next week
- We propose to *skip* the meeting next week and have the next one
on Thursday, the 20th of August if there are enough people.
- Mat has been unanimously elected to take notes at the next
meeting :-D
- Usual time: 15:00 UTC (8am PDT, 5pm CEST, 11pm UTC+8)
- Still open to everyone!
- https://annuel2.framapad.org/p/mptcp_upstreaming_20200820
Feel free to comment on these points and propose new ones for the next
meeting!
Talk to you next week,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
1 year, 10 months
[Weekly meetings] MoM - 30th of July 2020
by Matthieu Baerts
Hello,
Last week, we had our 110th meeting with Mat and Ossama (Intel OTC),
Christoph (Apple), Paolo, Davide and Florian (RedHat), Geliang (Xiaomi),
Nicolas and myself (Tessares).
Thanks again for this new good meeting!
Here are the minutes of the meeting:
Accepted patches:
- The list of accepted patches can be seen on PatchWork:
https://patchwork.ozlabs.org/project/mptcp/list/?state=3
netdev (if mptcp ML is in cc) (Christoph Hellwig, Matthieu Baerts):
1336841 [net] mptcp: fix joined subflows with unblocking sk
1336444 Re: get rid of the address_space override in setsockopt v2
1335658 [iproute2] mptcp: show all endpoints when no ID is specified
our repo (by: Mat Martineau, Matthieu Baerts):
1336746 [mptcp-net] mptcp: fix joined subflows with unblocking sk
1335275 [mptcp-next,v4,12/12] mptcp: Safely store sequence number when
1335272 [mptcp-next,v4,11/12] mptcp: Safely read sequence number when l
1335274 [mptcp-next,v4,10/12] mptcp: Skip unnecessary skb extension all
1335273 [mptcp-next,v4,09/12] mptcp: Only use subflow EOF signaling on
1335271 [mptcp-next,v4,08/12] mptcp: Use full MPTCP-level disconnect st
1335270 [mptcp-next,v4,07/12] mptcp: Add helper to process acks of DATA
1335269 [mptcp-next,v4,06/12] mptcp: Use MPTCP-level flag for sending D
1335268 [mptcp-next,v4,05/12] mptcp: Track received DATA_FIN sequence n
1335265 [mptcp-next,v4,04/12] mptcp: Add mptcp_close_state() helper
1335263 [mptcp-next,v4,03/12] mptcp: Remove outdated and incorrect comm
1335264 [mptcp-next,v4,02/12] mptcp: Return EPIPE if sending is shut do
1335266 [mptcp-next,v4,01/12] mptcp: Allow DATA_FIN in headers without
Pending patches:
- The list of pending patches can be seen on PatchWork:
https://patchwork.ozlabs.org/project/mptcp/list/?state=*
netdev (if mptcp ML is in cc) (by: /):
/
our repo (by: Christoph Paasch, Florian Westphal, Geliang Tang,
Matthieu Baerts):
1325171: Changes Requested: [mptcp-next] selftests: mptcp: interpret \n
as a new line:
- TODO Matth
1327905: Awaiting Upstream: [mptcp-iproute2] mptcp: show all endpoints
when no ID is specified:
- TODO Matth → change state
1337426: New: [mptcp-next] selftests/mptcp: Better delay & reordering
configuration:
- To be reviewed
1338597: New: [RFC,v3,01/10] tcp: remove cookie_ts bit from request_sock
1338598: New: [RFC,v3,02/10] mptcp: token: move retry to caller
1338599: New: [RFC,v3,03/10] mptcp: subflow: split subflow_init_req
1338600: New: [RFC,v3,04/10] mptcp: rename and export
mptcp_subflow_request_sock_ops
1338601: New: [RFC,v3,05/10] tcp: pass want_cookie down to req_init
function
1338602: New: [RFC,v3,06/10] mptcp: subflow: add
mptcp_subflow_init_cookie_req helper
1338603: New: [RFC,v3,07/10] tcp: syncookies: create mptcp request
socket for ACK cookies with MPTCP option
1338604: New: [RFC,v3,08/10] mptcp: enable JOIN requests even if cookies
are in use
1338605: New: [RFC,v3,09/10] selftests: mptcp: make 2nd net namespace
use tcp syn cookies unconditionally
1338606: New: [RFC,v3,10/10] selftests: mptcp: add test cases for mptcp
join tests with syn cookies:
- Florian will send them soon to netdev
1338758: New: [v4,mptcp-next,1/5] mptcp: rename addr_signal and the
related functions
1338760: New: [v4,mptcp-next,2/5] mptcp: add the outgoing RM_ADDR support
1338761: New: [v4,mptcp-next,3/5] mptcp: add the incoming RM_ADDR support
1338762: New: [v4,mptcp-next,4/5] mptcp: trigger the RM_ADDR signal
1338763: New: [v4,mptcp-next,5/5] mptcp: add remove subflow support:
- Paolo will review the new version
Issues on Github:
https://github.com/multipath-tcp/mptcp_net-next/issues/
Recently opened (latest from last week: 64)
69 Packetdrill: dss: failing with new DATA_FIN patches [bug]:
- maybe normal
68 selftests: diag: failing with new DATA_FIN patches [bug]:
- to be investigated
67 `./mptcp_connect.sh -m mmap` timeout [bug]:
- could happen if there is not enough memory, unlikely possible
according to Paolo → we don't receive the wake up signal if limited by
the sendbuffer
66 [interop] IPv4: Attempt to release TCP socket in state 1
00000000cbc88a4a [bug]:
- maybe introduced by the last series from Paolo
65 clearing properly the status in listen() [bug]:
- not blocking but still to be done
Bugs (open and flagged as "bug")
69 Packetdrill: dss: failing with new DATA_FIN patches [bug]
68 selftests: diag: failing with new DATA_FIN patches [bug]
67 `./mptcp_connect.sh -m mmap` timesout [bug]
66 [interop] IPv4: Attempt to release TCP socket in state 1
00000000cbc88a4a [bug]
65 clearing properly the status in listen() [bug]
64 Kernel crash when using `pm_nl_ctl` and `use_mptcp.sh` [bug]
62 [syzkaller] WARNING in __mptcp_move_skbs_from_subflow [bug]
56 msk connection state set without msk lock [bug] @pabeni:
- can be closed: patch has been sent.
- Matth: TODO
6 loss and delay without reordering causes very slow transfer [bug]
@cpaasch:
- Patch has been shared
In Progress (open and assigned to someone)
49 ADD_ADDR: echo bit support [enhancement] @pkrystad:
- could be re-assigned maybe? Follow-up: Contacted @pkrystad,
this can be reassigned
43 [syzkaller] Change syzkaller to exercise MPTCP inet_diag
interface [enhancement] @cpaasch:
- Christoph will look if it is necesseraly (some paths are
already tested)
17 allow non 'backup' subflows creation [enhancement] @pabeni:
- more complex than expected, already 15 patches and some issues
to fix
- for the moment the packet scheduler is "suboptimal": sending on
subflows having the bigger available snd space
- limited by the send buffer at the MPTCP level? Smaller than the
sum of the ones of the two subflows?
- built to be modular later :)
Recently closed (since last week)
63 New subflows send MP_JOIN to port 0 [bug]
58 Full DATA_FIN support [enhancement] v5.9 @mjmartineau ‡
FYI: Current Roadmap:
- Bugs: https://github.com/multipath-tcp/mptcp_net-next/projects/2
- Current merge window (5.9):
https://github.com/multipath-tcp/mptcp_net-next/projects/1
- For later: https://github.com/multipath-tcp/mptcp_net-next/projects/4
Extra tests:
- news about Syzkaller? (Christoph):
- New issue was sent on Github
- news about interop with mptcp.org? (Christoph):
- New issue sent on Github
- tested the export branch and with Florian patches, everything
looks fine!
- news about Intel's kbuild? (Mat):
- No email (success/failure)
- Jenkins status: seems still broken
- packetdrill (Davide):
- Sync with Google upstream repo
- Some fixes for the MP_JOIN
- One fix also for ADD_ADDR (in review)
- Some tests might need to be adapted due to the recent
modification with the DATA_FIN → Mat will look at that
- CI (Matth):
- goal: run all packetdrill tests
- next step: reproducers from syzkaller
mptcpd:
[davide] initial specfile
(https://gitlab.com/dcaratti/mptcpd/-/blob/main/mptcpd.spec) that builds
in a copr (https://copr.fedorainfracloud.org/coprs/dcaratti/mptcpd/ )
[davide] I will file a package request for fedora, after "todo"
items are done (and check if %license is correct):
- One question about the license to be clarified by Ossama and Mat
- "make check" cannot be ran if the host kernel needs to be MPTCP
out-of-tree
- mptcpd will support Net-next in the next version
"bounced" messages: what to do?:
- recently received a lot of spams
- maybe an issue on RedHat side wrongly scoring stuff
- Davide can open an issue on RedHat IT side
- Difficult for Mat to get more details
Next meeting:
- We propose to have the next meeting on Thursday, the 6th of August.
- Usual time: 15:00 UTC (8am PDT, 5pm CEST, 11pm UTC+8)
- Still open to everyone!
- https://annuel2.framapad.org/p/mptcp_upstreaming_20200806
Feel free to comment on these points and propose new ones for the next
meeting!
Talk to you next week,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
1 year, 10 months
[PATCH v2 mptcp-next] selftests/mptcp: Better delay & reordering configuration
by Christoph Paasch
The delay was intended to be configured to "simulate" a high(er) BDP
link. As such, it needs to be set as part of the loss-configuration and
not as part of the netem reordering configuration.
The reordering-config also requires a delay but that delay is the
reordering-extend. So, a good approach is to set the reordering-extend
as a function of the configured latency. E.g., 25% of the overall
latency.
To speed up the selftests, we limit the delay to 50ms maximum to avoid
having the selftests run for too long.
Finally, the intention of tc_reorder was that when it is unset, the test
picks a random configuration. However, currently it is always initialized
and thus the random config won't be picked up.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/6
Reported-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
Signed-off-by: Christoph Paasch <cpaasch(a)apple.com>
---
Notes:
v2: Use "Closes" tag, properly use $(( ... )), limit delay to 50ms (feedback from Matthieu B.)
.../selftests/net/mptcp/mptcp_connect.sh | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 57d75b7f6220..e4df9ba64824 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -14,9 +14,8 @@ capture=false
timeout=30
ipv6=true
ethtool_random_on=true
-tc_delay="$((RANDOM%400))"
+tc_delay="$((RANDOM%50))"
tc_loss=$((RANDOM%101))
-tc_reorder=""
testmode=""
sndbuf=0
rcvbuf=0
@@ -628,30 +627,32 @@ for sender in "$ns1" "$ns2" "$ns3" "$ns4";do
do_ping "$ns4" $sender dead:beef:3::1
done
-[ -n "$tc_loss" ] && tc -net "$ns2" qdisc add dev ns2eth3 root netem loss random $tc_loss
+[ -n "$tc_loss" ] && tc -net "$ns2" qdisc add dev ns2eth3 root netem loss random $tc_loss delay ${tc_delay}ms
echo -n "INFO: Using loss of $tc_loss "
test "$tc_delay" -gt 0 && echo -n "delay $tc_delay ms "
+reorder_delay=$(($tc_delay / 4))
+
if [ -z "${tc_reorder}" ]; then
reorder1=$((RANDOM%10))
reorder1=$((100 - reorder1))
reorder2=$((RANDOM%100))
- if [ $tc_delay -gt 0 ] && [ $reorder1 -lt 100 ] && [ $reorder2 -gt 0 ]; then
+ if [ $reorder_delay -gt 0 ] && [ $reorder1 -lt 100 ] && [ $reorder2 -gt 0 ]; then
tc_reorder="reorder ${reorder1}% ${reorder2}%"
- echo -n "$tc_reorder "
+ echo -n "$tc_reorder with delay ${reorder_delay}ms "
fi
elif [ "$tc_reorder" = "0" ];then
tc_reorder=""
-elif [ "$tc_delay" -gt 0 ];then
+elif [ "$reorder_delay" -gt 0 ];then
# reordering requires some delay
tc_reorder="reorder $tc_reorder"
- echo -n "$tc_reorder "
+ echo -n "$tc_reorder with delay ${reorder_delay}ms "
fi
echo "on ns3eth4"
-tc -net "$ns3" qdisc add dev ns3eth4 root netem delay ${tc_delay}ms $tc_reorder
+tc -net "$ns3" qdisc add dev ns3eth4 root netem delay ${reorder_delay}ms $tc_reorder
for sender in $ns1 $ns2 $ns3 $ns4;do
run_tests_lo "$ns1" "$sender" 10.0.1.1 1
--
2.23.0
1 year, 10 months
[PATCH net] mptcp: fix warn at shutdown time for unaccepted msk sockets
by Paolo Abeni
With commit b93df08ccda3 ("mptcp: explicitly track the fully
established status"), the status of unaccepted mptcp closed in
mptcp_sock_destruct() changes from TCP_SYN_RECV to TCP_ESTABLISHED.
As a result mptcp_sock_destruct() does not perform the proper
cleanup and inet_sock_destruct() will later emit a warn
in ESTABLISHED status.
Address the issue updating the condition tested in mptcp_sock_destruct().
Also update the related comment.
Fixes: b93df08ccda3 ("mptcp: explicitly track the fully established status")
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
---
net/mptcp/subflow.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 45c2284f6ada..3c2ca2108ac2 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -424,12 +424,12 @@ static void mptcp_sock_destruct(struct sock *sk)
* also remove the mptcp socket, via
* sock_put(ctx->conn).
*
- * Problem is that the mptcp socket will not be in
- * SYN_RECV state and doesn't have SOCK_DEAD flag.
+ * Problem is that the mptcp socket will be in
+ * ESTABLISHED state and will not have the SOCK_DEAD flag.
* Both result in warnings from inet_sock_destruct.
*/
- if (sk->sk_state == TCP_SYN_RECV) {
+ if (sk->sk_state == TCP_ESTABLISHED) {
sk->sk_state = TCP_CLOSE;
WARN_ON_ONCE(sk->sk_socket);
sock_orphan(sk);
--
2.26.2
1 year, 10 months
[PATCH net] mptcp: more stable diag self-tests
by Paolo Abeni
During diag self-tests we introduce long wait in the mptcp test
program to give the script enough time to access the sockets
dump.
Such wait is introduced after shutting down one sockets end. Since
commit 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine")
if boths sides shutdown the socket is correctly tranistioned
into CLOSED status.
As a side effect some sockets are not dumped via the diag interface,
because the socket state (CLOSED) does not match the default filter, and
this cause self-tests instability.
Address the issue moving the above mentioned wait before shutting
down the socket.
Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index cad6f73a5fd0..090620c3e10c 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -406,10 +406,11 @@ static int copyfd_io_poll(int infd, int peerfd, int outfd)
/* ... but we still receive.
* Close our write side, ev. give some time
- * for address notification
+ * for address notification and/or checking
+ * the current status
*/
- if (cfg_join)
- usleep(400000);
+ if (cfg_wait)
+ usleep(cfg_wait);
shutdown(peerfd, SHUT_WR);
} else {
if (errno == EINTR)
@@ -427,7 +428,7 @@ static int copyfd_io_poll(int infd, int peerfd, int outfd)
}
/* leave some time for late join/announce */
- if (cfg_wait)
+ if (cfg_join)
usleep(cfg_wait);
close(peerfd);
--
2.26.2
1 year, 10 months
[PATCH 00/13] mptcp: multiple xmit substreams support
by Paolo Abeni
This covers the feedback from Florian on the RFC series, please see
the individual patches changelog for the details.
The only exception is: I'm retaining the MPTCP_SEND_SPACE bit, which looks
required as per ML discussion.
The MPTCP window code is now more conservative and I do not see out of window
errors.
Some self-tests cases are still failing - do not reach the expected aggregated
bwidth - but I've not investigated yet. multiple stream self-tests are not
enabled yet.
It would be great if we could starting merging this in the export branch,
and improve incrementally.
Paolo Abeni (13):
mptcp: rethink 'is writable' conditional
mptcp: set data_ready status bit in subflow_check_data_avail()
mptcp: trigger msk processing even for OoO data
mptcp: basic sndbuf autotuning
mptcp: introduce and use mptcp_try_coalesce()
mptcp: move ooo skbs into msk out of order queue.
mptcp: cleanup mptcp_subflow_discard_data()
mptcp: add OoO related mibs
mptcp: move address attribute into mptcp_addr_info
mptcp: allow creating non-backup subflows
mptcp: allow picking different xmit subflows
mptcp: simult flow self-tests
mptcp: cache subflow write status in subflow ctx
net/mptcp/mib.c | 5 +
net/mptcp/mib.h | 5 +
net/mptcp/pm_netlink.c | 38 +-
net/mptcp/protocol.c | 518 ++++++++++++++----
net/mptcp/protocol.h | 22 +-
net/mptcp/subflow.c | 93 ++--
.../selftests/net/mptcp/simult_flows.sh | 290 ++++++++++
7 files changed, 791 insertions(+), 180 deletions(-)
create mode 100755 tools/testing/selftests/net/mptcp/simult_flows.sh
--
2.26.2
1 year, 11 months