All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI"
@ 2024-02-16 12:04 Matthieu Baerts (NGI0)
  2024-02-16 13:01 ` Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI": Tests Results MPTCP CI
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Matthieu Baerts (NGI0) @ 2024-02-16 12:04 UTC (permalink / raw)
  To: mptcp; +Cc: Paolo Abeni, Matthieu Baerts (NGI0)

As discussed on [1], an additional check is done to catch local software
bug.

This patch is supposed to land only in our tree, for both 'export' and
'export-net' branches, because the warning could be triggered by bugged/
malicious peer. We want it in our tree for our CI to detect internal
bugs.

Link: https://lore.kernel.org/all/20240215-mptcp-fix-bogus-pr-warn-v1-1-d14c10312820@kernel.org/ [1]
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/options.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 27ca42c77b02..5926955625cf 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -982,7 +982,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
 
 	if (unlikely(!READ_ONCE(msk->pm.server_side)))
-		pr_warn_once("bogus mpc option on established client sk");
+		/* DO-NOT-MERGE: use WARN i/o pr_warn: only for MPTCP export */
+		WARN_ONCE(1, "bogus mpc option on established client sk");
 
 set_fully_established:
 	mptcp_data_lock((struct sock *)msk);

---
base-commit: 65bda47e218b37c3dc919d3ccbd19dfad87a99e5
change-id: 20240216-mptcp-warn-bogus-pr-warn-6dcc88038246

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI": Tests Results
  2024-02-16 12:04 [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Matthieu Baerts (NGI0)
@ 2024-02-16 13:01 ` MPTCP CI
  2024-02-16 13:20 ` MPTCP CI
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: MPTCP CI @ 2024-02-16 13:01 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp

Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (GitHub Action) did some validations and here is its report:

- KVM Validation: normal:
  - Success! ✅:
  - Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7930497802

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ff4697aba2c5


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI": Tests Results
  2024-02-16 12:04 [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Matthieu Baerts (NGI0)
  2024-02-16 13:01 ` Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI": Tests Results MPTCP CI
@ 2024-02-16 13:20 ` MPTCP CI
  2024-02-16 20:21 ` [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Mat Martineau
  2024-02-19 10:35 ` Matthieu Baerts
  3 siblings, 0 replies; 6+ messages in thread
From: MPTCP CI @ 2024-02-16 13:20 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp

Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (Cirrus) did some validations with a debug kernel and here is its report:

- KVM Validation: debug (except selftest_mptcp_join):
  - Script error! ❓:
  - Task: https://cirrus-ci.com/task/5311899533836288
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5311899533836288/summary/summary.txt

- KVM Validation: debug (only selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/6437799440678912
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/6437799440678912/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ff4697aba2c5


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI"
  2024-02-16 12:04 [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Matthieu Baerts (NGI0)
  2024-02-16 13:01 ` Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI": Tests Results MPTCP CI
  2024-02-16 13:20 ` MPTCP CI
@ 2024-02-16 20:21 ` Mat Martineau
  2024-02-19 10:06   ` Matthieu Baerts
  2024-02-19 10:35 ` Matthieu Baerts
  3 siblings, 1 reply; 6+ messages in thread
From: Mat Martineau @ 2024-02-16 20:21 UTC (permalink / raw)
  To: Matthieu Baerts (NGI0); +Cc: mptcp, Paolo Abeni

On Fri, 16 Feb 2024, Matthieu Baerts (NGI0) wrote:

> As discussed on [1], an additional check is done to catch local software
> bug.
>
> This patch is supposed to land only in our tree, for both 'export' and
> 'export-net' branches, because the warning could be triggered by bugged/
> malicious peer. We want it in our tree for our CI to detect internal
> bugs.
>
> Link: https://lore.kernel.org/all/20240215-mptcp-fix-bogus-pr-warn-v1-1-d14c10312820@kernel.org/ [1]
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Looks good to squash. Would be good to keep some of the above info in the 
post-squash commit message for context (especially the lore link).

One other thing, I noticed that this is mentioned in the "DO-NOT-MERGE: 
mptcp: improve code coverage for CI" commit message:

"""
     mptcp: use kmalloc on kasan build

       Helps detection UaF, which apparently kasan misses with kmem_cache
       allocator.

       We also need to always set the SOCK_RCU_FREE flag, to preserved the
       current code leveraging SLAB_TYPESAFE_BY_RCU. This latter change will
       make unreachable some existing errors path, but I don't see other
       options.

"""

But it looks like the code for that disappeared between 
export/20230405T131056 and export/20230405T132954 (also missing on 
export-net). I didn't find mention of this in the mailing list. A topgit 
glitch?


- Mat

> ---
> net/mptcp/options.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 27ca42c77b02..5926955625cf 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -982,7 +982,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
> 		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
>
> 	if (unlikely(!READ_ONCE(msk->pm.server_side)))
> -		pr_warn_once("bogus mpc option on established client sk");
> +		/* DO-NOT-MERGE: use WARN i/o pr_warn: only for MPTCP export */
> +		WARN_ONCE(1, "bogus mpc option on established client sk");
>
> set_fully_established:
> 	mptcp_data_lock((struct sock *)msk);
>
> ---
> base-commit: 65bda47e218b37c3dc919d3ccbd19dfad87a99e5
> change-id: 20240216-mptcp-warn-bogus-pr-warn-6dcc88038246
>
> Best regards,
> -- 
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI"
  2024-02-16 20:21 ` [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Mat Martineau
@ 2024-02-19 10:06   ` Matthieu Baerts
  0 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts @ 2024-02-19 10:06 UTC (permalink / raw)
  To: Mat Martineau; +Cc: mptcp, Paolo Abeni

Hi Mat,

On 16/02/2024 21:21, Mat Martineau wrote:
> On Fri, 16 Feb 2024, Matthieu Baerts (NGI0) wrote:
> 
>> As discussed on [1], an additional check is done to catch local software
>> bug.
>>
>> This patch is supposed to land only in our tree, for both 'export' and
>> 'export-net' branches, because the warning could be triggered by bugged/
>> malicious peer. We want it in our tree for our CI to detect internal
>> bugs.
>>
>> Link:
>> https://lore.kernel.org/all/20240215-mptcp-fix-bogus-pr-warn-v1-1-d14c10312820@kernel.org/ [1]
>> Suggested-by: Paolo Abeni <pabeni@redhat.com>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> 
> Looks good to squash.

Thank you for the review!

> Would be good to keep some of the above info in
> the post-squash commit message for context (especially the lore link).

Yes, good point, I will update the '.topmsg' file.

> One other thing, I noticed that this is mentioned in the "DO-NOT-MERGE:
> mptcp: improve code coverage for CI" commit message:
> 
> """
>     mptcp: use kmalloc on kasan build
> 
>       Helps detection UaF, which apparently kasan misses with kmem_cache
>       allocator.
> 
>       We also need to always set the SOCK_RCU_FREE flag, to preserved the
>       current code leveraging SLAB_TYPESAFE_BY_RCU. This latter change will
>       make unreachable some existing errors path, but I don't see other
>       options.
> 
> """
> 
> But it looks like the code for that disappeared between
> export/20230405T131056 and export/20230405T132954 (also missing on
> export-net). I didn't find mention of this in the mailing list. A topgit
> glitch?

Oops, I forgot to update the commit message back then. Here is the
modification I did in TopGit:


$ git log --first-parent --no-merges $(./.tg-get-topic.sh "DO-NOT-MERGE:
mptcp: improve code coverage for CI") -2

(...) # (the first commit was an update of my email address)

commit 0fd1a78a8c4d99054a1b47626d45df7f5d36e2ec
Author: Matthieu Baerts <matttbe@kernel.org>
Date:   Wed Apr 5 15:23:56 2023 +0200

    Revert "DO-NOT-MERGE: mptcp: use kmalloc on kasan build"

    This reverts commit 4edee9adfa20120c18e41c26e2ca0a97ead0d93f.

    This piece of code was causing issues, see:


https://github.com/multipath-tcp/mptcp_net-next/issues/371#issuecomment-1496226126

    It sounds safer to revert it then.

    Suggested-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>


I can fix that!

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI"
  2024-02-16 12:04 [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Matthieu Baerts (NGI0)
                   ` (2 preceding siblings ...)
  2024-02-16 20:21 ` [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Mat Martineau
@ 2024-02-19 10:35 ` Matthieu Baerts
  3 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts @ 2024-02-19 10:35 UTC (permalink / raw)
  To: Mat Martineau; +Cc: Paolo Abeni, mptcp

Hi Mat,

On 16/02/2024 13:04, Matthieu Baerts (NGI0) wrote:
> As discussed on [1], an additional check is done to catch local software
> bug.
> 
> This patch is supposed to land only in our tree, for both 'export' and
> 'export-net' branches, because the warning could be triggered by bugged/
> malicious peer. We want it in our tree for our CI to detect internal
> bugs.

Thank you for the review!

Now in our tree, for both -net and -next:

New patches for t/upstream:
- 735e80ba1492: tg:msg: remove 'use kmalloc on kasan build'
- 91351bfa97db: "squashed" in "DO-NOT-MERGE: mptcp: improve code
coverage for CI"
- 359220a914aa: tg:msg: add 'warn in case of bogus mpc option on
established client sk'
- Results: f2fb9bec2195..d5aedc5b25ce (export)

New patches for t/upstream-net:
- a1880660e156: tg:msg: remove 'use kmalloc on kasan build'
- 1c78093d056a: Squash to "DO-NOT-MERGE: mptcp: improve code coverage
for CI"
- 5405ccb66c00: tg:msg: add 'warn in case of bogus mpc option on
established client sk'
- Results: 9dcf86462a59..22c802d10725 (export-net)

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-19 10:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 12:04 [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Matthieu Baerts (NGI0)
2024-02-16 13:01 ` Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI": Tests Results MPTCP CI
2024-02-16 13:20 ` MPTCP CI
2024-02-16 20:21 ` [PATCH mptcp-next] Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI" Mat Martineau
2024-02-19 10:06   ` Matthieu Baerts
2024-02-19 10:35 ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.