[PATCH mptcp] mptcp: re-check dsn before reading from subflow
by Florian Westphal
mptcp_subflow_data_available() is commonly called via
ssk->sk_data_ready(), in this case the mptcp socket lock
cannot be acquired.
Therefore, while we can safely discard subflow data that
was already received up to msk->ack_seq, we cannot be sure
that 'subflow->data_avail' will still be valid at the time
userspace wants to read the data -- a previous read on a
different subflow might have carried this data already.
In that (unlikely) event, msk->ack_seq will have been updated
and will be ahead of the subflow dsn.
We can check for this condition and skip/resync to the expected
sequence number.
Signed-off-by: Florian Westphal <fw(a)strlen.de>
---
I could also submit this directly for net-next, but this
patch is only needed w. MP_JOIN support.
net/mptcp/protocol.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 53a2b0ba2241..8f2fc72fc5ed 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -121,6 +121,27 @@ static void __mptcp_move_skb(struct mptcp_sock *msk, struct sock *ssk,
MPTCP_SKB_CB(skb)->offset = offset;
}
+/* both sockets must be locked */
+static bool mptcp_subflow_dsn_valid(const struct mptcp_sock *msk,
+ struct sock *ssk)
+{
+ struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
+ u64 dsn = mptcp_subflow_get_mapped_dsn(subflow);
+
+ /* revalidate data sequence number.
+ *
+ * mptcp_subflow_data_available() is usually called
+ * without msk lock. Its unlikely (but possible)
+ * that msk->ack_seq has been advanced since the last
+ * call found in-sequence data.
+ */
+ if (likely(dsn == msk->ack_seq))
+ return true;
+
+ subflow->data_avail = 0;
+ return mptcp_subflow_data_available(ssk);
+}
+
static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
struct sock *ssk,
unsigned int *bytes)
@@ -133,6 +154,11 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
bool done = false;
int rcvbuf;
+ if (!mptcp_subflow_dsn_valid(msk, ssk)) {
+ *bytes = 0;
+ return false;
+ }
+
rcvbuf = max(ssk->sk_rcvbuf, sk->sk_rcvbuf);
if (rcvbuf > sk->sk_rcvbuf)
sk->sk_rcvbuf = rcvbuf;
--
2.24.1
2 years, 2 months
[mptcp:t/mptcp-Implement-path-manager-interface-commands 20/25] net/mptcp/pm.c:31:7: error: no member named 'addr_signal' in 'struct mptcp_sock'
by kbuild test robot
tree: https://github.com/multipath-tcp/mptcp_net-next.git t/mptcp-Implement-path-manager-interface-commands
head: a28e79bf6de027fea5d0522a32a686aacf5658a7
commit: 781d512532236fdeb2038457060aa4a470e01f7e [20/25] tgupdate: merge t/mptcp-Implement-path-manager-interface-commands base into t/mptcp-Implement-path-manager-interface-commands
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (git://gitmirror/llvm_project 949134e2fefd34a38ed71de90dffe2300e2e1139)
reproduce:
# FIXME the reproduce steps for clang is not ready yet
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the mptcp/t/mptcp-Implement-path-manager-interface-commands HEAD a28e79bf6de027fea5d0522a32a686aacf5658a7 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
>> net/mptcp/pm.c:31:7: error: no member named 'addr_signal' in 'struct mptcp_sock'
msk->addr_signal = 1;
~~~ ^
net/mptcp/pm.c:57:7: error: no member named 'addr_signal' in 'struct mptcp_sock'
msk->addr_signal = 1;
~~~ ^
2 errors generated.
vim +31 net/mptcp/pm.c
532e0037f0c3af Peter Krystad 2020-02-26 12
532e0037f0c3af Peter Krystad 2020-02-26 13 int mptcp_pm_announce_addr(u32 token, u8 local_id, struct in_addr *addr)
532e0037f0c3af Peter Krystad 2020-02-26 14 {
4b738110d9bfa5 Peter Krystad 2020-02-26 15 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 16 int err = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 17
4b738110d9bfa5 Peter Krystad 2020-02-26 18 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 19 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 20
4b738110d9bfa5 Peter Krystad 2020-02-26 21 if (msk->pm.local_valid) {
4b738110d9bfa5 Peter Krystad 2020-02-26 22 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 23 goto announce_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 24 }
4b738110d9bfa5 Peter Krystad 2020-02-26 25
4b738110d9bfa5 Peter Krystad 2020-02-26 26 pr_debug("msk=%p, local_id=%d", msk, local_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 27 msk->pm.local_valid = 1;
4b738110d9bfa5 Peter Krystad 2020-02-26 28 msk->pm.local_id = local_id;
4b738110d9bfa5 Peter Krystad 2020-02-26 29 msk->pm.local_family = AF_INET;
4b738110d9bfa5 Peter Krystad 2020-02-26 30 msk->pm.local_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 @31 msk->addr_signal = 1;
4b738110d9bfa5 Peter Krystad 2020-02-26 32
4b738110d9bfa5 Peter Krystad 2020-02-26 33 announce_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 34 sock_put((struct sock *)msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 35 return err;
532e0037f0c3af Peter Krystad 2020-02-26 36 }
532e0037f0c3af Peter Krystad 2020-02-26 37
:::::: The code at line 31 was first introduced by commit
:::::: 4b738110d9bfa5e1a763123e0ef6d0d2f5852782 mptcp: Implement path manager interface commands
:::::: TO: Peter Krystad <peter.krystad(a)linux.intel.com>
:::::: CC: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[mptcp:t/mptcp-Implement-path-manager-interface-commands 23/25] net//mptcp/pm.c:46:8: error: implicit declaration of function 'mptcp_subflow_connect'
by kbuild test robot
tree: https://github.com/multipath-tcp/mptcp_net-next.git t/mptcp-Implement-path-manager-interface-commands
head: a28e79bf6de027fea5d0522a32a686aacf5658a7
commit: eba1df51e6151d1cc04a559911cf905992581b22 [23/25] tgupdate: merge t/mptcp-Implement-path-manager-interface-commands base into t/mptcp-Implement-path-manager-interface-commands
config: mips-randconfig-a001-20200228 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 5.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout eba1df51e6151d1cc04a559911cf905992581b22
# save the attached .config to linux build tree
GCC_VERSION=5.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the mptcp/t/mptcp-Implement-path-manager-interface-commands HEAD a28e79bf6de027fea5d0522a32a686aacf5658a7 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
net//mptcp/pm.c: In function 'mptcp_pm_announce_addr':
net//mptcp/pm.c:18:21: error: 'msk' redeclared as different kind of symbol
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^
net//mptcp/pm.c:15:47: note: previous definition of 'msk' was here
int mptcp_pm_announce_addr(struct mptcp_sock *msk,
^
net//mptcp/pm.c:18:48: error: 'token' undeclared (first use in this function)
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^
net//mptcp/pm.c:18:48: note: each undeclared identifier is reported only once for each function it appears in
net//mptcp/pm.c:30:14: error: 'struct mptcp_pm_data' has no member named 'remote_valid'
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^
net//mptcp/pm.c:30:31: error: 'remote_id' undeclared (first use in this function)
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^
net//mptcp/pm.c:30:51: error: 'struct mptcp_pm_data' has no member named 'remote_id'
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^
net//mptcp/pm.c:38:18: error: incompatible types when assigning to type 'struct in_addr' from type 'const struct mptcp_addr_info'
local.sin_addr = *addr;
^
net//mptcp/pm.c:42:29: error: 'struct mptcp_pm_data' has no member named 'remote_family'
remote.sin_family = msk->pm.remote_family;
^
net//mptcp/pm.c:44:27: error: 'struct mptcp_pm_data' has no member named 'remote_addr'
remote.sin_addr = msk->pm.remote_addr;
^
>> net//mptcp/pm.c:46:8: error: implicit declaration of function 'mptcp_subflow_connect' [-Werror=implicit-function-declaration]
err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
^
net//mptcp/pm.c: In function 'mptcp_pm_remove_addr':
net//mptcp/pm.c:56:21: error: 'msk' redeclared as different kind of symbol
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^
net//mptcp/pm.c:54:45: note: previous definition of 'msk' was here
int mptcp_pm_remove_addr(struct mptcp_sock *msk, u8 local_id)
^
net//mptcp/pm.c:56:48: error: 'token' undeclared (first use in this function)
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^
net//mptcp/pm.c:68:14: error: 'struct mptcp_pm_data' has no member named 'remote_valid'
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^
net//mptcp/pm.c:68:31: error: 'remote_id' undeclared (first use in this function)
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^
net//mptcp/pm.c:68:51: error: 'struct mptcp_pm_data' has no member named 'remote_id'
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^
net//mptcp/pm.c:75:6: error: 'addr' undeclared (first use in this function)
if (addr)
^
net//mptcp/pm.c:80:30: error: 'struct mptcp_pm_data' has no member named 'remote_family'
remote.sin6_family = msk->pm.remote_family;
^
net//mptcp/pm.c:82:28: error: 'struct mptcp_pm_data' has no member named 'remote_addr6'
remote.sin6_addr = msk->pm.remote_addr6;
^
cc1: some warnings being treated as errors
vim +/mptcp_subflow_connect +46 net//mptcp/pm.c
532e0037f0c3af Peter Krystad 2020-02-26 14
cb6c1764eb317d Paolo Abeni 2020-02-24 15 int mptcp_pm_announce_addr(struct mptcp_sock *msk,
cb6c1764eb317d Paolo Abeni 2020-02-24 16 const struct mptcp_addr_info *addr)
532e0037f0c3af Peter Krystad 2020-02-26 17 {
4b738110d9bfa5 Peter Krystad 2020-02-26 18 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 19 struct sockaddr_in remote;
4b738110d9bfa5 Peter Krystad 2020-02-26 20 struct sockaddr_in local;
4b738110d9bfa5 Peter Krystad 2020-02-26 21 struct sock *sk;
4b738110d9bfa5 Peter Krystad 2020-02-26 22 int err;
4b738110d9bfa5 Peter Krystad 2020-02-26 23
4b738110d9bfa5 Peter Krystad 2020-02-26 24 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 25 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 26
4b738110d9bfa5 Peter Krystad 2020-02-26 27 pr_debug("msk=%p", msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 28
4b738110d9bfa5 Peter Krystad 2020-02-26 29 sk = (struct sock *)msk;
4b738110d9bfa5 Peter Krystad 2020-02-26 30 if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
4b738110d9bfa5 Peter Krystad 2020-02-26 31 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 32 goto create_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 33 }
4b738110d9bfa5 Peter Krystad 2020-02-26 34
4b738110d9bfa5 Peter Krystad 2020-02-26 35 local.sin_family = AF_INET;
4b738110d9bfa5 Peter Krystad 2020-02-26 36 local.sin_port = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 37 if (addr)
4b738110d9bfa5 Peter Krystad 2020-02-26 @38 local.sin_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 39 else
4b738110d9bfa5 Peter Krystad 2020-02-26 40 local.sin_addr.s_addr = htonl(INADDR_ANY);
4b738110d9bfa5 Peter Krystad 2020-02-26 41
4b738110d9bfa5 Peter Krystad 2020-02-26 42 remote.sin_family = msk->pm.remote_family;
4b738110d9bfa5 Peter Krystad 2020-02-26 43 remote.sin_port = inet_sk(sk)->inet_dport;
4b738110d9bfa5 Peter Krystad 2020-02-26 44 remote.sin_addr = msk->pm.remote_addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 45
4b738110d9bfa5 Peter Krystad 2020-02-26 @46 err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
4b738110d9bfa5 Peter Krystad 2020-02-26 47 (struct sockaddr *)&remote, remote_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 48
4b738110d9bfa5 Peter Krystad 2020-02-26 49 create_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 50 sock_put(sk);
4b738110d9bfa5 Peter Krystad 2020-02-26 51 return err;
532e0037f0c3af Peter Krystad 2020-02-26 52 }
532e0037f0c3af Peter Krystad 2020-02-26 53
:::::: The code at line 46 was first introduced by commit
:::::: 4b738110d9bfa5e1a763123e0ef6d0d2f5852782 mptcp: Implement path manager interface commands
:::::: TO: Peter Krystad <peter.krystad(a)linux.intel.com>
:::::: CC: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[mptcp:t/mptcp-Implement-path-manager-interface-commands 23/25] net/mptcp/pm.c:46:8: error: implicit declaration of function 'mptcp_subflow_connect'; did you mean 'mptcp_subflow_init'?
by kbuild test robot
tree: https://github.com/multipath-tcp/mptcp_net-next.git t/mptcp-Implement-path-manager-interface-commands
head: a28e79bf6de027fea5d0522a32a686aacf5658a7
commit: eba1df51e6151d1cc04a559911cf905992581b22 [23/25] tgupdate: merge t/mptcp-Implement-path-manager-interface-commands base into t/mptcp-Implement-path-manager-interface-commands
config: openrisc-randconfig-a001-20200228 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout eba1df51e6151d1cc04a559911cf905992581b22
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the mptcp/t/mptcp-Implement-path-manager-interface-commands HEAD a28e79bf6de027fea5d0522a32a686aacf5658a7 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
net/mptcp/pm.c: In function 'mptcp_pm_announce_addr':
net/mptcp/pm.c:18:21: error: 'msk' redeclared as different kind of symbol
18 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~
net/mptcp/pm.c:15:47: note: previous definition of 'msk' was here
15 | int mptcp_pm_announce_addr(struct mptcp_sock *msk,
| ~~~~~~~~~~~~~~~~~~~^~~
net/mptcp/pm.c:18:48: error: 'token' undeclared (first use in this function); did you mean 'to_kset'?
18 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~~~
| to_kset
net/mptcp/pm.c:18:48: note: each undeclared identifier is reported only once for each function it appears in
net/mptcp/pm.c:30:14: error: 'struct mptcp_pm_data' has no member named 'remote_valid'
30 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^
net/mptcp/pm.c:30:31: error: 'remote_id' undeclared (first use in this function); did you mean 'remote'?
30 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
net/mptcp/pm.c:30:52: error: 'struct mptcp_pm_data' has no member named 'remote_id'; did you mean 'remote'?
30 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
net/mptcp/pm.c:38:20: error: incompatible types when assigning to type 'struct in_addr' from type 'const struct mptcp_addr_info'
38 | local.sin_addr = *addr;
| ^
net/mptcp/pm.c:42:29: error: 'struct mptcp_pm_data' has no member named 'remote_family'
42 | remote.sin_family = msk->pm.remote_family;
| ^
net/mptcp/pm.c:44:27: error: 'struct mptcp_pm_data' has no member named 'remote_addr'
44 | remote.sin_addr = msk->pm.remote_addr;
| ^
>> net/mptcp/pm.c:46:8: error: implicit declaration of function 'mptcp_subflow_connect'; did you mean 'mptcp_subflow_init'? [-Werror=implicit-function-declaration]
46 | err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
| ^~~~~~~~~~~~~~~~~~~~~
| mptcp_subflow_init
net/mptcp/pm.c: In function 'mptcp_pm_remove_addr':
net/mptcp/pm.c:56:21: error: 'msk' redeclared as different kind of symbol
56 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~
net/mptcp/pm.c:54:45: note: previous definition of 'msk' was here
54 | int mptcp_pm_remove_addr(struct mptcp_sock *msk, u8 local_id)
| ~~~~~~~~~~~~~~~~~~~^~~
net/mptcp/pm.c:56:48: error: 'token' undeclared (first use in this function); did you mean 'to_kset'?
56 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~~~
| to_kset
net/mptcp/pm.c:68:14: error: 'struct mptcp_pm_data' has no member named 'remote_valid'
68 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^
net/mptcp/pm.c:68:31: error: 'remote_id' undeclared (first use in this function); did you mean 'remote'?
68 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
net/mptcp/pm.c:68:52: error: 'struct mptcp_pm_data' has no member named 'remote_id'; did you mean 'remote'?
68 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
net/mptcp/pm.c:75:6: error: 'addr' undeclared (first use in this function)
75 | if (addr)
| ^~~~
net/mptcp/pm.c:80:30: error: 'struct mptcp_pm_data' has no member named 'remote_family'
80 | remote.sin6_family = msk->pm.remote_family;
| ^
net/mptcp/pm.c:82:28: error: 'struct mptcp_pm_data' has no member named 'remote_addr6'
82 | remote.sin6_addr = msk->pm.remote_addr6;
| ^
cc1: some warnings being treated as errors
vim +46 net/mptcp/pm.c
532e0037f0c3af Peter Krystad 2020-02-26 14
cb6c1764eb317d Paolo Abeni 2020-02-24 15 int mptcp_pm_announce_addr(struct mptcp_sock *msk,
cb6c1764eb317d Paolo Abeni 2020-02-24 16 const struct mptcp_addr_info *addr)
532e0037f0c3af Peter Krystad 2020-02-26 17 {
4b738110d9bfa5 Peter Krystad 2020-02-26 18 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 19 struct sockaddr_in remote;
4b738110d9bfa5 Peter Krystad 2020-02-26 20 struct sockaddr_in local;
4b738110d9bfa5 Peter Krystad 2020-02-26 21 struct sock *sk;
4b738110d9bfa5 Peter Krystad 2020-02-26 22 int err;
4b738110d9bfa5 Peter Krystad 2020-02-26 23
4b738110d9bfa5 Peter Krystad 2020-02-26 24 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 25 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 26
4b738110d9bfa5 Peter Krystad 2020-02-26 27 pr_debug("msk=%p", msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 28
4b738110d9bfa5 Peter Krystad 2020-02-26 29 sk = (struct sock *)msk;
4b738110d9bfa5 Peter Krystad 2020-02-26 30 if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
4b738110d9bfa5 Peter Krystad 2020-02-26 31 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 32 goto create_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 33 }
4b738110d9bfa5 Peter Krystad 2020-02-26 34
4b738110d9bfa5 Peter Krystad 2020-02-26 35 local.sin_family = AF_INET;
4b738110d9bfa5 Peter Krystad 2020-02-26 36 local.sin_port = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 37 if (addr)
4b738110d9bfa5 Peter Krystad 2020-02-26 38 local.sin_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 39 else
4b738110d9bfa5 Peter Krystad 2020-02-26 40 local.sin_addr.s_addr = htonl(INADDR_ANY);
4b738110d9bfa5 Peter Krystad 2020-02-26 41
4b738110d9bfa5 Peter Krystad 2020-02-26 42 remote.sin_family = msk->pm.remote_family;
4b738110d9bfa5 Peter Krystad 2020-02-26 43 remote.sin_port = inet_sk(sk)->inet_dport;
4b738110d9bfa5 Peter Krystad 2020-02-26 44 remote.sin_addr = msk->pm.remote_addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 45
4b738110d9bfa5 Peter Krystad 2020-02-26 @46 err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
4b738110d9bfa5 Peter Krystad 2020-02-26 47 (struct sockaddr *)&remote, remote_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 48
4b738110d9bfa5 Peter Krystad 2020-02-26 49 create_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 50 sock_put(sk);
4b738110d9bfa5 Peter Krystad 2020-02-26 51 return err;
532e0037f0c3af Peter Krystad 2020-02-26 52 }
532e0037f0c3af Peter Krystad 2020-02-26 53
:::::: The code at line 46 was first introduced by commit
:::::: 4b738110d9bfa5e1a763123e0ef6d0d2f5852782 mptcp: Implement path manager interface commands
:::::: TO: Peter Krystad <peter.krystad(a)linux.intel.com>
:::::: CC: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[mptcp:t/mptcp-Implement-path-manager-interface-commands 21/25] net/mptcp/pm.c:30:15: error: 'struct mptcp_pm_data' has no member named 'remote_valid'; did you mean 'remote'?
by kbuild test robot
tree: https://github.com/multipath-tcp/mptcp_net-next.git t/mptcp-Implement-path-manager-interface-commands
head: a28e79bf6de027fea5d0522a32a686aacf5658a7
commit: f8513e13c445c1804d044dae4b612ea986b491cb [21/25] tgupdate: merge t/mptcp-Implement-path-manager-interface-commands base into t/mptcp-Implement-path-manager-interface-commands
config: s390-randconfig-a001-20200228 (attached as .config)
compiler: s390-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f8513e13c445c1804d044dae4b612ea986b491cb
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the mptcp/t/mptcp-Implement-path-manager-interface-commands HEAD a28e79bf6de027fea5d0522a32a686aacf5658a7 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
net/mptcp/pm.c: In function 'mptcp_pm_announce_addr':
net/mptcp/pm.c:18:21: error: 'msk' redeclared as different kind of symbol
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^~~
net/mptcp/pm.c:15:47: note: previous definition of 'msk' was here
int mptcp_pm_announce_addr(struct mptcp_sock *msk,
^~~
net/mptcp/pm.c:18:48: error: 'token' undeclared (first use in this function); did you mean 'to_kset'?
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^~~~~
to_kset
net/mptcp/pm.c:18:48: note: each undeclared identifier is reported only once for each function it appears in
>> net/mptcp/pm.c:30:15: error: 'struct mptcp_pm_data' has no member named 'remote_valid'; did you mean 'remote'?
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^~~~~~~~~~~~
remote
net/mptcp/pm.c:30:31: error: 'remote_id' undeclared (first use in this function); did you mean 'remote'?
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^~~~~~~~~
remote
net/mptcp/pm.c:30:52: error: 'struct mptcp_pm_data' has no member named 'remote_id'; did you mean 'remote'?
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^~~~~~~~~
remote
net/mptcp/pm.c:38:18: error: incompatible types when assigning to type 'struct in_addr' from type 'const struct mptcp_addr_info'
local.sin_addr = *addr;
^
net/mptcp/pm.c:42:29: error: 'struct mptcp_pm_data' has no member named 'remote_family'
remote.sin_family = msk->pm.remote_family;
^
>> net/mptcp/pm.c:44:28: error: 'struct mptcp_pm_data' has no member named 'remote_addr'; did you mean 'remote'?
remote.sin_addr = msk->pm.remote_addr;
^~~~~~~~~~~
remote
net/mptcp/pm.c: In function 'mptcp_pm_remove_addr':
net/mptcp/pm.c:56:21: error: 'msk' redeclared as different kind of symbol
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^~~
net/mptcp/pm.c:54:45: note: previous definition of 'msk' was here
int mptcp_pm_remove_addr(struct mptcp_sock *msk, u8 local_id)
^~~
net/mptcp/pm.c:56:48: error: 'token' undeclared (first use in this function); did you mean 'to_kset'?
struct mptcp_sock *msk = mptcp_token_get_sock(token);
^~~~~
to_kset
net/mptcp/pm.c:68:15: error: 'struct mptcp_pm_data' has no member named 'remote_valid'; did you mean 'remote'?
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^~~~~~~~~~~~
remote
net/mptcp/pm.c:68:31: error: 'remote_id' undeclared (first use in this function); did you mean 'remote'?
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^~~~~~~~~
remote
net/mptcp/pm.c:68:52: error: 'struct mptcp_pm_data' has no member named 'remote_id'; did you mean 'remote'?
if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
^~~~~~~~~
remote
>> net/mptcp/pm.c:75:6: error: 'addr' undeclared (first use in this function); did you mean 'idr'?
if (addr)
^~~~
idr
net/mptcp/pm.c:80:30: error: 'struct mptcp_pm_data' has no member named 'remote_family'
remote.sin6_family = msk->pm.remote_family;
^
>> net/mptcp/pm.c:82:29: error: 'struct mptcp_pm_data' has no member named 'remote_addr6'; did you mean 'remote'?
remote.sin6_addr = msk->pm.remote_addr6;
^~~~~~~~~~~~
remote
vim +30 net/mptcp/pm.c
532e0037f0c3af Peter Krystad 2020-02-26 14
cb6c1764eb317d Paolo Abeni 2020-02-24 15 int mptcp_pm_announce_addr(struct mptcp_sock *msk,
cb6c1764eb317d Paolo Abeni 2020-02-24 16 const struct mptcp_addr_info *addr)
532e0037f0c3af Peter Krystad 2020-02-26 17 {
4b738110d9bfa5 Peter Krystad 2020-02-26 18 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 19 struct sockaddr_in remote;
4b738110d9bfa5 Peter Krystad 2020-02-26 20 struct sockaddr_in local;
4b738110d9bfa5 Peter Krystad 2020-02-26 21 struct sock *sk;
4b738110d9bfa5 Peter Krystad 2020-02-26 22 int err;
4b738110d9bfa5 Peter Krystad 2020-02-26 23
4b738110d9bfa5 Peter Krystad 2020-02-26 24 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 25 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 26
4b738110d9bfa5 Peter Krystad 2020-02-26 27 pr_debug("msk=%p", msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 28
4b738110d9bfa5 Peter Krystad 2020-02-26 29 sk = (struct sock *)msk;
4b738110d9bfa5 Peter Krystad 2020-02-26 @30 if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
4b738110d9bfa5 Peter Krystad 2020-02-26 31 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 32 goto create_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 33 }
4b738110d9bfa5 Peter Krystad 2020-02-26 34
4b738110d9bfa5 Peter Krystad 2020-02-26 35 local.sin_family = AF_INET;
4b738110d9bfa5 Peter Krystad 2020-02-26 36 local.sin_port = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 37 if (addr)
4b738110d9bfa5 Peter Krystad 2020-02-26 38 local.sin_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 39 else
4b738110d9bfa5 Peter Krystad 2020-02-26 40 local.sin_addr.s_addr = htonl(INADDR_ANY);
4b738110d9bfa5 Peter Krystad 2020-02-26 41
4b738110d9bfa5 Peter Krystad 2020-02-26 42 remote.sin_family = msk->pm.remote_family;
4b738110d9bfa5 Peter Krystad 2020-02-26 43 remote.sin_port = inet_sk(sk)->inet_dport;
4b738110d9bfa5 Peter Krystad 2020-02-26 @44 remote.sin_addr = msk->pm.remote_addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 45
4b738110d9bfa5 Peter Krystad 2020-02-26 46 err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
4b738110d9bfa5 Peter Krystad 2020-02-26 47 (struct sockaddr *)&remote, remote_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 48
4b738110d9bfa5 Peter Krystad 2020-02-26 49 create_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 50 sock_put(sk);
4b738110d9bfa5 Peter Krystad 2020-02-26 51 return err;
532e0037f0c3af Peter Krystad 2020-02-26 52 }
532e0037f0c3af Peter Krystad 2020-02-26 53
cb6c1764eb317d Paolo Abeni 2020-02-24 54 int mptcp_pm_remove_addr(struct mptcp_sock *msk, u8 local_id)
532e0037f0c3af Peter Krystad 2020-02-26 55 {
4b738110d9bfa5 Peter Krystad 2020-02-26 56 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 57 struct sockaddr_in6 remote;
4b738110d9bfa5 Peter Krystad 2020-02-26 58 struct sockaddr_in6 local;
4b738110d9bfa5 Peter Krystad 2020-02-26 59 struct sock *sk;
4b738110d9bfa5 Peter Krystad 2020-02-26 60 int err;
4b738110d9bfa5 Peter Krystad 2020-02-26 61
4b738110d9bfa5 Peter Krystad 2020-02-26 62 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 63 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 64
4b738110d9bfa5 Peter Krystad 2020-02-26 65 pr_debug("msk=%p", msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 66 sk = (struct sock *)msk;
4b738110d9bfa5 Peter Krystad 2020-02-26 67
4b738110d9bfa5 Peter Krystad 2020-02-26 68 if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
4b738110d9bfa5 Peter Krystad 2020-02-26 69 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 70 goto create_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 71 }
4b738110d9bfa5 Peter Krystad 2020-02-26 72
4b738110d9bfa5 Peter Krystad 2020-02-26 73 local.sin6_family = AF_INET6;
4b738110d9bfa5 Peter Krystad 2020-02-26 74 local.sin6_port = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 @75 if (addr)
4b738110d9bfa5 Peter Krystad 2020-02-26 76 local.sin6_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 77 else
4b738110d9bfa5 Peter Krystad 2020-02-26 78 local.sin6_addr = in6addr_any;
4b738110d9bfa5 Peter Krystad 2020-02-26 79
4b738110d9bfa5 Peter Krystad 2020-02-26 80 remote.sin6_family = msk->pm.remote_family;
4b738110d9bfa5 Peter Krystad 2020-02-26 81 remote.sin6_port = inet_sk(sk)->inet_dport;
4b738110d9bfa5 Peter Krystad 2020-02-26 @82 remote.sin6_addr = msk->pm.remote_addr6;
4b738110d9bfa5 Peter Krystad 2020-02-26 83
4b738110d9bfa5 Peter Krystad 2020-02-26 84 err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
4b738110d9bfa5 Peter Krystad 2020-02-26 85 (struct sockaddr *)&remote, remote_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 86
4b738110d9bfa5 Peter Krystad 2020-02-26 87 create_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 88 sock_put(sk);
4b738110d9bfa5 Peter Krystad 2020-02-26 89 return err;
532e0037f0c3af Peter Krystad 2020-02-26 90 }
532e0037f0c3af Peter Krystad 2020-02-26 91
:::::: The code at line 30 was first introduced by commit
:::::: 4b738110d9bfa5e1a763123e0ef6d0d2f5852782 mptcp: Implement path manager interface commands
:::::: TO: Peter Krystad <peter.krystad(a)linux.intel.com>
:::::: CC: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[mptcp:t/mptcp-Implement-path-manager-interface-commands 21/25] net/mptcp/pm.c:18:21: error: 'msk' redeclared as different kind of symbol
by kbuild test robot
tree: https://github.com/multipath-tcp/mptcp_net-next.git t/mptcp-Implement-path-manager-interface-commands
head: a28e79bf6de027fea5d0522a32a686aacf5658a7
commit: f8513e13c445c1804d044dae4b612ea986b491cb [21/25] tgupdate: merge t/mptcp-Implement-path-manager-interface-commands base into t/mptcp-Implement-path-manager-interface-commands
config: openrisc-randconfig-a001-20200228 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f8513e13c445c1804d044dae4b612ea986b491cb
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the mptcp/t/mptcp-Implement-path-manager-interface-commands HEAD a28e79bf6de027fea5d0522a32a686aacf5658a7 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
net/mptcp/pm.c: In function 'mptcp_pm_announce_addr':
>> net/mptcp/pm.c:18:21: error: 'msk' redeclared as different kind of symbol
18 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~
net/mptcp/pm.c:15:47: note: previous definition of 'msk' was here
15 | int mptcp_pm_announce_addr(struct mptcp_sock *msk,
| ~~~~~~~~~~~~~~~~~~~^~~
>> net/mptcp/pm.c:18:48: error: 'token' undeclared (first use in this function); did you mean 'to_kset'?
18 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~~~
| to_kset
net/mptcp/pm.c:18:48: note: each undeclared identifier is reported only once for each function it appears in
>> net/mptcp/pm.c:30:14: error: 'struct mptcp_pm_data' has no member named 'remote_valid'
30 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^
>> net/mptcp/pm.c:30:31: error: 'remote_id' undeclared (first use in this function); did you mean 'remote'?
30 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
>> net/mptcp/pm.c:30:52: error: 'struct mptcp_pm_data' has no member named 'remote_id'; did you mean 'remote'?
30 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
>> net/mptcp/pm.c:38:20: error: incompatible types when assigning to type 'struct in_addr' from type 'const struct mptcp_addr_info'
38 | local.sin_addr = *addr;
| ^
>> net/mptcp/pm.c:42:29: error: 'struct mptcp_pm_data' has no member named 'remote_family'
42 | remote.sin_family = msk->pm.remote_family;
| ^
>> net/mptcp/pm.c:44:27: error: 'struct mptcp_pm_data' has no member named 'remote_addr'
44 | remote.sin_addr = msk->pm.remote_addr;
| ^
net/mptcp/pm.c: In function 'mptcp_pm_remove_addr':
net/mptcp/pm.c:56:21: error: 'msk' redeclared as different kind of symbol
56 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~
net/mptcp/pm.c:54:45: note: previous definition of 'msk' was here
54 | int mptcp_pm_remove_addr(struct mptcp_sock *msk, u8 local_id)
| ~~~~~~~~~~~~~~~~~~~^~~
net/mptcp/pm.c:56:48: error: 'token' undeclared (first use in this function); did you mean 'to_kset'?
56 | struct mptcp_sock *msk = mptcp_token_get_sock(token);
| ^~~~~
| to_kset
net/mptcp/pm.c:68:14: error: 'struct mptcp_pm_data' has no member named 'remote_valid'
68 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^
net/mptcp/pm.c:68:31: error: 'remote_id' undeclared (first use in this function); did you mean 'remote'?
68 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
net/mptcp/pm.c:68:52: error: 'struct mptcp_pm_data' has no member named 'remote_id'; did you mean 'remote'?
68 | if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
| ^~~~~~~~~
| remote
>> net/mptcp/pm.c:75:6: error: 'addr' undeclared (first use in this function)
75 | if (addr)
| ^~~~
net/mptcp/pm.c:80:30: error: 'struct mptcp_pm_data' has no member named 'remote_family'
80 | remote.sin6_family = msk->pm.remote_family;
| ^
>> net/mptcp/pm.c:82:28: error: 'struct mptcp_pm_data' has no member named 'remote_addr6'
82 | remote.sin6_addr = msk->pm.remote_addr6;
| ^
vim +/msk +18 net/mptcp/pm.c
532e0037f0c3af Peter Krystad 2020-02-26 14
cb6c1764eb317d Paolo Abeni 2020-02-24 15 int mptcp_pm_announce_addr(struct mptcp_sock *msk,
cb6c1764eb317d Paolo Abeni 2020-02-24 16 const struct mptcp_addr_info *addr)
532e0037f0c3af Peter Krystad 2020-02-26 17 {
4b738110d9bfa5 Peter Krystad 2020-02-26 @18 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 19 struct sockaddr_in remote;
4b738110d9bfa5 Peter Krystad 2020-02-26 20 struct sockaddr_in local;
4b738110d9bfa5 Peter Krystad 2020-02-26 21 struct sock *sk;
4b738110d9bfa5 Peter Krystad 2020-02-26 22 int err;
4b738110d9bfa5 Peter Krystad 2020-02-26 23
4b738110d9bfa5 Peter Krystad 2020-02-26 24 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 25 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 26
4b738110d9bfa5 Peter Krystad 2020-02-26 27 pr_debug("msk=%p", msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 28
4b738110d9bfa5 Peter Krystad 2020-02-26 29 sk = (struct sock *)msk;
4b738110d9bfa5 Peter Krystad 2020-02-26 @30 if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
4b738110d9bfa5 Peter Krystad 2020-02-26 31 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 32 goto create_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 33 }
4b738110d9bfa5 Peter Krystad 2020-02-26 34
4b738110d9bfa5 Peter Krystad 2020-02-26 35 local.sin_family = AF_INET;
4b738110d9bfa5 Peter Krystad 2020-02-26 36 local.sin_port = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 37 if (addr)
4b738110d9bfa5 Peter Krystad 2020-02-26 @38 local.sin_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 39 else
4b738110d9bfa5 Peter Krystad 2020-02-26 40 local.sin_addr.s_addr = htonl(INADDR_ANY);
4b738110d9bfa5 Peter Krystad 2020-02-26 41
4b738110d9bfa5 Peter Krystad 2020-02-26 @42 remote.sin_family = msk->pm.remote_family;
4b738110d9bfa5 Peter Krystad 2020-02-26 43 remote.sin_port = inet_sk(sk)->inet_dport;
4b738110d9bfa5 Peter Krystad 2020-02-26 @44 remote.sin_addr = msk->pm.remote_addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 45
4b738110d9bfa5 Peter Krystad 2020-02-26 46 err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
4b738110d9bfa5 Peter Krystad 2020-02-26 47 (struct sockaddr *)&remote, remote_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 48
4b738110d9bfa5 Peter Krystad 2020-02-26 49 create_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 50 sock_put(sk);
4b738110d9bfa5 Peter Krystad 2020-02-26 51 return err;
532e0037f0c3af Peter Krystad 2020-02-26 52 }
532e0037f0c3af Peter Krystad 2020-02-26 53
cb6c1764eb317d Paolo Abeni 2020-02-24 54 int mptcp_pm_remove_addr(struct mptcp_sock *msk, u8 local_id)
532e0037f0c3af Peter Krystad 2020-02-26 55 {
4b738110d9bfa5 Peter Krystad 2020-02-26 56 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 57 struct sockaddr_in6 remote;
4b738110d9bfa5 Peter Krystad 2020-02-26 58 struct sockaddr_in6 local;
4b738110d9bfa5 Peter Krystad 2020-02-26 59 struct sock *sk;
4b738110d9bfa5 Peter Krystad 2020-02-26 60 int err;
4b738110d9bfa5 Peter Krystad 2020-02-26 61
4b738110d9bfa5 Peter Krystad 2020-02-26 62 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 63 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 64
4b738110d9bfa5 Peter Krystad 2020-02-26 65 pr_debug("msk=%p", msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 66 sk = (struct sock *)msk;
4b738110d9bfa5 Peter Krystad 2020-02-26 67
4b738110d9bfa5 Peter Krystad 2020-02-26 68 if (!msk->pm.remote_valid || remote_id != msk->pm.remote_id) {
4b738110d9bfa5 Peter Krystad 2020-02-26 69 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 70 goto create_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 71 }
4b738110d9bfa5 Peter Krystad 2020-02-26 72
4b738110d9bfa5 Peter Krystad 2020-02-26 73 local.sin6_family = AF_INET6;
4b738110d9bfa5 Peter Krystad 2020-02-26 74 local.sin6_port = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 @75 if (addr)
4b738110d9bfa5 Peter Krystad 2020-02-26 76 local.sin6_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 77 else
4b738110d9bfa5 Peter Krystad 2020-02-26 78 local.sin6_addr = in6addr_any;
4b738110d9bfa5 Peter Krystad 2020-02-26 79
4b738110d9bfa5 Peter Krystad 2020-02-26 80 remote.sin6_family = msk->pm.remote_family;
4b738110d9bfa5 Peter Krystad 2020-02-26 81 remote.sin6_port = inet_sk(sk)->inet_dport;
4b738110d9bfa5 Peter Krystad 2020-02-26 @82 remote.sin6_addr = msk->pm.remote_addr6;
4b738110d9bfa5 Peter Krystad 2020-02-26 83
4b738110d9bfa5 Peter Krystad 2020-02-26 84 err = mptcp_subflow_connect(sk, (struct sockaddr *)&local,
4b738110d9bfa5 Peter Krystad 2020-02-26 85 (struct sockaddr *)&remote, remote_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 86
4b738110d9bfa5 Peter Krystad 2020-02-26 87 create_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 88 sock_put(sk);
4b738110d9bfa5 Peter Krystad 2020-02-26 89 return err;
532e0037f0c3af Peter Krystad 2020-02-26 90 }
532e0037f0c3af Peter Krystad 2020-02-26 91
:::::: The code at line 18 was first introduced by commit
:::::: 4b738110d9bfa5e1a763123e0ef6d0d2f5852782 mptcp: Implement path manager interface commands
:::::: TO: Peter Krystad <peter.krystad(a)linux.intel.com>
:::::: CC: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[PATCH v4 0/9] add locking to PM APis, implement PM netlink
by Paolo Abeni
This implement the locking required by the PM to allow concurent subflow
accessing the msk PM data in a safe way. Such data is protected via a msk-level
spinlock. It relies on the Double checked locking to avoid contention in the
most common scenarion (no or very little PM "actions").
Additionally changes more than a bit the PM hooks/APIs, to be hopefully simpler
and avoiding duplicate code (no v4/v6 variant, work queue management done by the
core PM infra).
It also introduce the PM netlink - it replace the current basic ones, the
related patch has been dropped locally.
git tree available at:
https://github.com/pabeni/mptcp/tree/mptcp_net-next_part3_7
changes from v3:
- many cleanup and netlink fixes (Matt) - see individual patches changelog
for the details
changes from v2:
- hook the new tests into the self-tests infra
changes from v1:
- 2 new patches: mp_join self-tests (9/9) and a specific mp_join fix (6/9)
- fixed several bugs as pointed out by the above tests
- added support for bind to interface
changes from RFC:
- cleanup uAPIs
- added self-tests for the uAPIs
- fixed ton of bugs
- included feedback from Mat
include/uapi/linux/mptcp.h | 53 +
net/mptcp/Makefile | 3
net/mptcp/options.c | 60 -
net/mptcp/pm.c | 361 +++------
net/mptcp/pm_netlink.c | 829 ++++++++++++++++++++++
net/mptcp/protocol.c | 14
net/mptcp/protocol.h | 113 +-
net/mptcp/subflow.c | 65 +
tools/testing/selftests/net/mptcp/Makefile | 9
tools/testing/selftests/net/mptcp/mptcp_connect.c | 19
tools/testing/selftests/net/mptcp/mptcp_join.sh | 296 +++++++
tools/testing/selftests/net/mptcp/pm_netlink.sh | 123 +++
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 604 ++++++++++++++++
13 files changed, 2230 insertions(+), 319 deletions(-)
2 years, 2 months
[mptcp:t/mptcp-Implement-path-manager-interface-commands 20/20] net/mptcp/pm.c:31:5: error: 'struct mptcp_sock' has no member named 'addr_signal'
by kbuild test robot
tree: https://github.com/multipath-tcp/mptcp_net-next.git t/mptcp-Implement-path-manager-interface-commands
head: 781d512532236fdeb2038457060aa4a470e01f7e
commit: 781d512532236fdeb2038457060aa4a470e01f7e [20/20] tgupdate: merge t/mptcp-Implement-path-manager-interface-commands base into t/mptcp-Implement-path-manager-interface-commands
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 781d512532236fdeb2038457060aa4a470e01f7e
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/mptcp/pm.c: In function 'mptcp_pm_announce_addr':
>> net/mptcp/pm.c:31:5: error: 'struct mptcp_sock' has no member named 'addr_signal'
msk->addr_signal = 1;
^~
net/mptcp/pm.c: In function 'mptcp_pm_announce_addr6':
net/mptcp/pm.c:57:5: error: 'struct mptcp_sock' has no member named 'addr_signal'
msk->addr_signal = 1;
^~
vim +31 net/mptcp/pm.c
532e0037f0c3af Peter Krystad 2020-02-26 12
532e0037f0c3af Peter Krystad 2020-02-26 13 int mptcp_pm_announce_addr(u32 token, u8 local_id, struct in_addr *addr)
532e0037f0c3af Peter Krystad 2020-02-26 14 {
4b738110d9bfa5 Peter Krystad 2020-02-26 15 struct mptcp_sock *msk = mptcp_token_get_sock(token);
4b738110d9bfa5 Peter Krystad 2020-02-26 16 int err = 0;
4b738110d9bfa5 Peter Krystad 2020-02-26 17
4b738110d9bfa5 Peter Krystad 2020-02-26 18 if (!msk)
4b738110d9bfa5 Peter Krystad 2020-02-26 19 return -EINVAL;
4b738110d9bfa5 Peter Krystad 2020-02-26 20
4b738110d9bfa5 Peter Krystad 2020-02-26 21 if (msk->pm.local_valid) {
4b738110d9bfa5 Peter Krystad 2020-02-26 22 err = -EBADR;
4b738110d9bfa5 Peter Krystad 2020-02-26 23 goto announce_put;
4b738110d9bfa5 Peter Krystad 2020-02-26 24 }
4b738110d9bfa5 Peter Krystad 2020-02-26 25
4b738110d9bfa5 Peter Krystad 2020-02-26 26 pr_debug("msk=%p, local_id=%d", msk, local_id);
4b738110d9bfa5 Peter Krystad 2020-02-26 27 msk->pm.local_valid = 1;
4b738110d9bfa5 Peter Krystad 2020-02-26 28 msk->pm.local_id = local_id;
4b738110d9bfa5 Peter Krystad 2020-02-26 29 msk->pm.local_family = AF_INET;
4b738110d9bfa5 Peter Krystad 2020-02-26 30 msk->pm.local_addr = *addr;
4b738110d9bfa5 Peter Krystad 2020-02-26 @31 msk->addr_signal = 1;
4b738110d9bfa5 Peter Krystad 2020-02-26 32
4b738110d9bfa5 Peter Krystad 2020-02-26 33 announce_put:
4b738110d9bfa5 Peter Krystad 2020-02-26 34 sock_put((struct sock *)msk);
4b738110d9bfa5 Peter Krystad 2020-02-26 35 return err;
532e0037f0c3af Peter Krystad 2020-02-26 36 }
532e0037f0c3af Peter Krystad 2020-02-26 37
:::::: The code at line 31 was first introduced by commit
:::::: 4b738110d9bfa5e1a763123e0ef6d0d2f5852782 mptcp: Implement path manager interface commands
:::::: TO: Peter Krystad <peter.krystad(a)linux.intel.com>
:::::: CC: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[PATCH net 0/3] DATA_FIN fixes proposed for net tree
by Mat Martineau
More changes are needed for multi-subflow DATA_FIN support, but these
fixes may be worth applying to the 5.6 tree for single subflow. Self
tests pass, and I checked the headers with DATA_FIN for both the
DATA_FIN-only DSS option and packet with a full mapping and DATA_FIN.
I'll send to netdev following review on this list.
RFC -> v1: Rebased on current net tree
Mat Martineau (3):
mptcp: Check connection state before attempting send
mptcp: Use per-subflow storage for DATA_FIN sequence number
mptcp: Only send DATA_FIN with final mapping
net/mptcp/options.c | 16 ++++++++--------
net/mptcp/protocol.c | 32 +++++++++++++++++++++++++++-----
net/mptcp/protocol.h | 2 ++
3 files changed, 37 insertions(+), 13 deletions(-)
base-commit: 3ee339eb28959629db33aaa2b8cde4c63c6289eb
--
2.25.1
2 years, 2 months
[Weekly meetings] MoM - 27th of February 2020
by Matthieu Baerts
Hello,
Yesterday, we had our 88th meeting with Mat, Peter and Ossama (Intel
OTC), Christoph (Apple), Paolo and Davide (RedHat) 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
- Internal: (By Davide, Matthieu, Florian)
1243181 net: mptcp: rename MPTCP_SUBFLOW_* into MPTCP_SUBFLOW_ATTR_* in
diag ...
1242406 [GIT] Sync with net-next on 20200222: 2 conflicts
1233392 subflow: place outgoing connections on the join list
- net-next: (By Florian, Paolo)
1244410: New: [net-next,v2,1/7] mptcp: add and use mptcp_data_ready helper
1244411: New: [net-next,v2,2/7] mptcp: add work queue skeleton
1244412: New: [net-next,v2,3/7] mptcp: update mptcp ack sequence from
work queue
1244413: New: [net-next,v2,4/7] mptcp: add rmem queue accounting
1244414: New: [net-next,v2,5/7] mptcp: remove mptcp_read_actor
1244415: New: [net-next,v2,6/7] mptcp: avoid work queue scheduling if
possible
1244416: New: [net-next,v2,7/7] mptcp: defer work schedule until mptcp
lock is released:
- They have been applied on net-next
- Florian prepared a branch with resolved conflicts
- the TopGit tree will be reconstructed based on this branch
- net: (By Paolo)
1244925: mptcp: add dummy icsk_sync_mss()
Pending patches:
- The list of pending patches can be seen on PatchWork:
https://patchwork.ozlabs.org/project/mptcp/list/?state=*
- By Florian Westphal, Mat Martineau, Matthieu Baerts, Paolo Abeni,
Peter Krystad
1196109: RFC: [10/10,RFC] selftests:mptcp: decrease timeout to 100 sec:
- do we still have the bug?
- Matth will check if we still have it
- *After meeting note* : yes we still have it with export
rebased on latest net-next.
1233648: Needs Review / ACK: [RFC,1/3] mptcp: Check connection state
before attempting send
1233650: Needs Review / ACK: [RFC,2/3] mptcp: Use per-subflow storage
for DATA_FIN sequence number
1233649: Needs Review / ACK: [RFC,3/3] mptcp: Only send DATA_FIN with
final mapping:
- need review
- and rebase
- *After meeting note* : done
- 1 & 2 would go to net tree if OK
- Paolo will try to look at it as soon as possible
- *After meeting note* : done
1243276: New: [v4,1/9] Squash-to: "mptcp: Add ADD_ADDR handling"
1243281: New: [v4,2/9] Squash-to: "mptcp: Add path manager interface"
1243278: New: [v4,3/9] Squash-to: "mptcp: Add handling of incoming
MP_JOIN requests"
1243277: New: [v4,4/9] Squash-to: "mptcp: Add handling of outgoing
MP_JOIN requests"
1243279: New: [v4,5/9] Squash-to: "mptcp: Implement path manager
interface commands"
1243280: New: [v4,6/9] Squash-to: subflow: place further subflows on new
'join_list'
1243284: New: [v4,7/9] mptcp: add netlink based PM
1243282: New: [v4,8/9] selftests: add PM netlink functional tests
1243283: New: [v4,9/9] selftests: add test-cases for MPTCP MP_JOIN:
- can be applied, fix (if needed) can come later
1243769: New: [v2,1/2] mptcp: Re-factor mptcp_crypto_hmac_sha()
1243771: New: [v2,2/2] mptcp: Make v1 changes for ADD_ADDR and RM_ADDR
options:
- *need review*
- need to be rebased on top of PM patches
1245636: New: mptcp: re-check dsn before reading from subflow:
- *need review*
FYI: Current Roadmap:
- Part 3 (next merge window):
- PM:
- locking
- basic → netlink support
- MP_JOIN
- ADD_ADDR for MPTCP v1
- clean the current patches
- need to make sure we continue to support the protocol →
workaround for shared received windows
- other items:
- Full DATA_FIN support [WIP]:
- could be nice to have it: if ready
- Shared recv window (drop data received on other subflows) [TODO]:
- could be nice to have
- could be nice to share a prototype/RFC with TCP
maintainers (Eric)
- Active backup support [WIP]
- Opti in TCP option structures (unions) [to be rebased)
- ADD_ADDR for MPTCPv1 [TODO]
- PM basic [WIP]
- fix sender ID in MP_JOIN
- Part 4 (to fully support MPTCP):
- Shared recv window (full support)
- IPv6 - IPv4 mapped support
- not dropping MPTCP options (ADD_ADDR, etc.)
- FAST_CLOSE
- full MPTCP v1 support (reliable add_addr, etc.)
- after a few attempts of failed MPTCP, we fallback to TCP
(like TFO is doing)
- PM server (more advanced)
- reduce locks when mptcp_stream_accept (currently 3 locks) but
we might need to add an helper in inet API
- Part 5 (extra needed for prod):
- opti/perfs
- TFO
- PM netlink
- PM bpf
- Scheduler bpf
- syncookies
- [gs]etsockopt per subflow
- notify the userspace when a subflow is added/removed → cmsg
Part 3 remaining stuff:
- Could be good to send more patches in the current merge window but:
- some fixes are needed:
- PM
- MP_JOIN
- ADD_ADDRv1
- we are at week 3
- in two weeks, we should try to see what to send:
- if some stuff are not ready on time, we can also extract
some commits, e.g. diag and mibs
- Review commit messages:
- needed for the next merge window: not urgent
- there are also a couple of patches at the end of the series we
will have to rebase/squash:
- TODO
- packetdrill:
- Davide is working on that
- adding more patches (infinite mapping, finding bugs)
- some DSS tests need to be adapted after last modifications
from Florian
- TODO: have a branch with stable tests:
- need to add "tolerance" parameter
- + fixes in DSS (once it is merged in "export"
- *after meeting note*: mptcp_net-next branch is used in
multipath-tcp/packetdrill repo. It has the tolerance parameters but not
the fixes for DSS yet. This is tested by the CI.
- ADD_ADDR for MPTCPv1:
- Peter is looking at that
- the echo part needs to be added
- we don't want to other host to keep retransmitting the ADD_ADDRv1
- *after meeting note* : that's the current situation, it
would not be worst.
- v6 case (not enough space): strategy from Paolo would be not
to support PORT for the moment (otherwise we need to strip the
timestamps option) and add condition to send that in a pure ACK without DSS.
- we will check next time if we can fully support ADD_ADDRv1
- DATA_FIN:
- Mat is looking at that
- First we need to review + apply the 3 pending patches
- If we use only one subflow at a time (needed for the shared
received window), we should be safe there.
- and the PM is not closing SF
- Shared received windows:
- Florian is looking at that indirectly
- but Florian was busy on the workqueue work
- and they are possibly other priorities (mss_sync)
- mptcp_incoming_option:
- should we use a dynamic pointer?
- with alloc + unalloc
- main advantage: the structure is included in TCP, we would
not impact TCP structure even if MPTCP is not used
- alloc would be done when creating the MPTCP socket → in fact,
store it in subflows
- not really difficult to manage then
- but nobody asked us to change
Extra tests:
- news about Syzkaller? (see prev meeting):
- we got a first bug reported by the official syzbot with MPTCP!
- new about Intel's kbuild? (Mat):
- they are looking at monitoring our branch
- Mat will send a pull request (on undocumented code :) )
- Goal would be to have results directly send to the ML
- CI can also create a additional commit to always select MPTCP
Netdev 0x14:
- it seems at the end, none of us will be able to go there :-/
- Mat might join remotely or be on site, still unsure, depends on
Intel policy
- People from Italy might not be allowed everywhere, not only the
ones from Milan
- Matth's company prefers not to take the risk if this can be cancelled
- don't eat bats
CI:
- also run "mptcp_connect.sh -m mmap"?:
- Florian found a warning when using this.
- it would be nice to always do that
- Matth can add the support when the bug will be fixed
- now run with more debug kconfig:
-e PREEMPT -e DEBUG_PREEMPT
-e DEBUG_SLAVE -e DEBUG_PAGEALLOC -e DEBUG_MUTEXES
-e DEBUG_SPINLOCK -e DEBUG_ATOMIC_SLEEP -e PROVE_RCU
-e DEBUG_OBJECTS_RCU_HEAD
- add packetdrill:
- *after meeting note* : done
- others?
- not for the moment (Intel kbuilds is doing other generic stuffs)
Next meeting:
- We propose to have the next meeting on Thursday, the 5th of March.
- Usual time: 17:00 UTC (9am PST, 6pm CET)
- Still open to everyone!
- https://annuel2.framapad.org/p/mptcp_upstreaming_20200305
Feel free to comment on these points and propose new ones for the next
meeting!
Talk to you next week,
Matt
--
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
2 years, 2 months