mbox series

[0/3] mptcp: fix for ipv6-related oops

Message ID cover.1574350681.git.pabeni@redhat.com
Headers show
Series mptcp: fix for ipv6-related oops | expand

Message

Paolo Abeni Nov. 21, 2019, 3:41 p.m. UTC
We need to allocate a larger struct sock for mptcp v6 master sockets,
otherwise inet6_sk() will access mptcp related data instead of
struct ipv6_pinfo.

This should fix the crash reported by Matt.

The protocol.c code changes are split in 2 patches to simplify the
squashing.
(yep, I know we somewhat agreed to big giant rebase, but this specific
should be trivial).

Additionally adds some fixlet for the ipv6 tests

v1 -> v2:
 - address Matt feedback on patches 1 && 2
 - add missing mptcp_v6 proto registration (I don't know why the previous
   iteration of these patches did not explode without that!!! :(((

Paolo Abeni (3):
  selftests: fixup for IPv6 tests
  mptcp: use ipv6-specific proto struct
  mptcp/ipv6: mptcp_v6_prot needs costom destroy.

 net/mptcp/protocol.c                          | 24 +++++++++++--
 .../selftests/net/mptcp/mptcp_connect.sh      | 34 ++++++-------------
 2 files changed, 33 insertions(+), 25 deletions(-)

Comments

Matthieu Baerts Nov. 21, 2019, 3:58 p.m. UTC | #1
Hi Paolo,

On 21/11/2019 16:41, Paolo Abeni wrote:
> We need to allocate a larger struct sock for mptcp v6 master sockets,
> otherwise inet6_sk() will access mptcp related data instead of
> struct ipv6_pinfo.
> 
> This should fix the crash reported by Matt.
> 
> The protocol.c code changes are split in 2 patches to simplify the
> squashing.
> (yep, I know we somewhat agreed to big giant rebase, but this specific
> should be trivial).
> 
> Additionally adds some fixlet for the ipv6 tests
> 
> v1 -> v2:
>   - address Matt feedback on patches 1 && 2
>   - add missing mptcp_v6 proto registration (I don't know why the previous
>     iteration of these patches did not explode without that!!! :(((

Thank you for the new version and good catch for the proto registration!

The new version looks good to me. I am going to apply it if there is no 
objections (post fixes are still possible of course).

Cheers,
Matt
Matthieu Baerts Nov. 21, 2019, 4:44 p.m. UTC | #2
Hi Paolo,

On 21/11/2019 16:58, Matthieu Baerts wrote:
> Hi Paolo,
> 
> On 21/11/2019 16:41, Paolo Abeni wrote:
>> We need to allocate a larger struct sock for mptcp v6 master sockets,
>> otherwise inet6_sk() will access mptcp related data instead of
>> struct ipv6_pinfo.
>>
>> This should fix the crash reported by Matt.
>>
>> The protocol.c code changes are split in 2 patches to simplify the
>> squashing.
>> (yep, I know we somewhat agreed to big giant rebase, but this specific
>> should be trivial).
>>
>> Additionally adds some fixlet for the ipv6 tests
>>
>> v1 -> v2:
>>   - address Matt feedback on patches 1 && 2
>>   - add missing mptcp_v6 proto registration (I don't know why the 
>> previous
>>     iteration of these patches did not explode without that!!! :(((
> 
> Thank you for the new version and good catch for the proto registration!
> 
> The new version looks good to me. I am going to apply it if there is no 
> objections (post fixes are still possible of course).

Again thank you for the patches!

- 2a2dd30dbd33: "squashed" patch 1/3 in "mptcp: add basic kselftest for 
mptcp"
- 39d0ec7ab1eb..432a009dc917: result
- 4bf7842874f1: "squashed" patch 2/3 in "mptcp: Add MPTCP socket stubs"
- 3d4407546cc9: conflict in t/mptcp-Associate-MPTCP-context-with-TCP-socket
- 432a009dc917..458c883a09f8: result
- 972a3aab48ac: "squashed" patch 3/3 in "mptcp: Add key generation and 
token tree"
- 458c883a09f8..9dde928ded79: result

Tests are now OK again! Thanks for the fix!

Cheers,
Matt