* Re: [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
2023-06-26 20:58 [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()." Kuniyuki Iwashima
@ 2023-06-27 5:51 ` Ido Schimmel
2023-06-27 8:47 ` Jiri Olsa
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Ido Schimmel @ 2023-06-27 5:51 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Kuniyuki Iwashima, netdev, Konrad Dybcio
On Mon, Jun 26, 2023 at 01:58:37PM -0700, Kuniyuki Iwashima wrote:
> This reverts commit 3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.
>
> Konrad reported that desktop environment below cannot be reached after
> commit 3f5f118bb657 ("af_unix: Call scm_recv() only after scm_set_cred().")
>
> - postmarketOS (Alpine Linux w/ musl 1.2.4)
> - busybox 1.36.1
> - GNOME 44.1
> - networkmanager 1.42.6
> - openrc 0.47
>
> Regarding to the warning of SO_PASSPIDFD, I'll post another patch to
> suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv().
>
> Reported-by: Konrad Dybcio <konradybcio@kernel.org>
> Link: https://lore.kernel.org/netdev/8c7f9abd-4f84-7296-2788-1e130d6304a0@kernel.org/
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
2023-06-26 20:58 [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()." Kuniyuki Iwashima
2023-06-27 5:51 ` Ido Schimmel
@ 2023-06-27 8:47 ` Jiri Olsa
2023-06-27 12:24 ` Gal Pressman
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jiri Olsa @ 2023-06-27 8:47 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Kuniyuki Iwashima, netdev, Konrad Dybcio
On Mon, Jun 26, 2023 at 01:58:37PM -0700, Kuniyuki Iwashima wrote:
> This reverts commit 3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.
>
> Konrad reported that desktop environment below cannot be reached after
> commit 3f5f118bb657 ("af_unix: Call scm_recv() only after scm_set_cred().")
>
> - postmarketOS (Alpine Linux w/ musl 1.2.4)
> - busybox 1.36.1
> - GNOME 44.1
> - networkmanager 1.42.6
> - openrc 0.47
>
> Regarding to the warning of SO_PASSPIDFD, I'll post another patch to
> suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv().
>
> Reported-by: Konrad Dybcio <konradybcio@kernel.org>
> Link: https://lore.kernel.org/netdev/8c7f9abd-4f84-7296-2788-1e130d6304a0@kernel.org/
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
hit the same issue, this revert fixes it for me, fwiw:
Teste-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
> ---
> To maintainers
>
> Sorry for bothering, but can this make it to the v6.5 train to
> avoid regression reports ?
> ---
> net/unix/af_unix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index f2f234f0b92c..3953daa2e1d0 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -2807,7 +2807,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state,
> } while (size);
>
> mutex_unlock(&u->iolock);
> - if (state->msg && check_creds)
> + if (state->msg)
> scm_recv(sock, state->msg, &scm, flags);
> else
> scm_destroy(&scm);
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
2023-06-26 20:58 [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()." Kuniyuki Iwashima
2023-06-27 5:51 ` Ido Schimmel
2023-06-27 8:47 ` Jiri Olsa
@ 2023-06-27 12:24 ` Gal Pressman
2023-06-27 16:40 ` patchwork-bot+netdevbpf
2023-06-27 16:42 ` Jakub Kicinski
4 siblings, 0 replies; 7+ messages in thread
From: Gal Pressman @ 2023-06-27 12:24 UTC (permalink / raw)
To: Kuniyuki Iwashima, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: Kuniyuki Iwashima, netdev, Konrad Dybcio
On 26/06/2023 23:58, Kuniyuki Iwashima wrote:
> This reverts commit 3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.
>
> Konrad reported that desktop environment below cannot be reached after
> commit 3f5f118bb657 ("af_unix: Call scm_recv() only after scm_set_cred().")
>
> - postmarketOS (Alpine Linux w/ musl 1.2.4)
> - busybox 1.36.1
> - GNOME 44.1
> - networkmanager 1.42.6
> - openrc 0.47
>
> Regarding to the warning of SO_PASSPIDFD, I'll post another patch to
> suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv().
>
> Reported-by: Konrad Dybcio <konradybcio@kernel.org>
> Link: https://lore.kernel.org/netdev/8c7f9abd-4f84-7296-2788-1e130d6304a0@kernel.org/
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Encountered the same issue.
Tested-by: Gal Pressman <gal@nvidia.com>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
2023-06-26 20:58 [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()." Kuniyuki Iwashima
` (2 preceding siblings ...)
2023-06-27 12:24 ` Gal Pressman
@ 2023-06-27 16:40 ` patchwork-bot+netdevbpf
2023-06-27 16:42 ` Jakub Kicinski
4 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-27 16:40 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: davem, edumazet, kuba, pabeni, kuni1840, netdev, konradybcio
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 26 Jun 2023 13:58:37 -0700 you wrote:
> This reverts commit 3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.
>
> Konrad reported that desktop environment below cannot be reached after
> commit 3f5f118bb657 ("af_unix: Call scm_recv() only after scm_set_cred().")
>
> - postmarketOS (Alpine Linux w/ musl 1.2.4)
> - busybox 1.36.1
> - GNOME 44.1
> - networkmanager 1.42.6
> - openrc 0.47
>
> [...]
Here is the summary with links:
- [v1,net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
https://git.kernel.org/netdev/net-next/c/9d797ee2dce1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
2023-06-26 20:58 [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()." Kuniyuki Iwashima
` (3 preceding siblings ...)
2023-06-27 16:40 ` patchwork-bot+netdevbpf
@ 2023-06-27 16:42 ` Jakub Kicinski
2023-06-27 17:03 ` Kuniyuki Iwashima
4 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2023-06-27 16:42 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Kuniyuki Iwashima,
netdev, Konrad Dybcio
On Mon, 26 Jun 2023 13:58:37 -0700 Kuniyuki Iwashima wrote:
> Regarding to the warning of SO_PASSPIDFD, I'll post another patch to
> suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv().
> Sorry for bothering, but can this make it to the v6.5 train to
> avoid regression reports ?
I'm merging the trees now, could you send the follow up soon?
Could you respin Alexander's fix for me as well (make it a two patch
series?):
https://lore.kernel.org/all/20230626215951.563715-1-aleksandr.mikhalitsyn@canonical.com/
It trivially conflicts after applying this patch.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v1 net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
2023-06-27 16:42 ` Jakub Kicinski
@ 2023-06-27 17:03 ` Kuniyuki Iwashima
0 siblings, 0 replies; 7+ messages in thread
From: Kuniyuki Iwashima @ 2023-06-27 17:03 UTC (permalink / raw)
To: kuba; +Cc: davem, edumazet, konradybcio, kuni1840, kuniyu, netdev, pabeni
From: Jakub Kicinski <kuba@kernel.org>
Date: Tue, 27 Jun 2023 09:42:45 -0700
> On Mon, 26 Jun 2023 13:58:37 -0700 Kuniyuki Iwashima wrote:
> > Regarding to the warning of SO_PASSPIDFD, I'll post another patch to
> > suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv().
>
> > Sorry for bothering, but can this make it to the v6.5 train to
> > avoid regression reports ?
>
> I'm merging the trees now, could you send the follow up soon?
> Could you respin Alexander's fix for me as well (make it a two patch
> series?):
> https://lore.kernel.org/all/20230626215951.563715-1-aleksandr.mikhalitsyn@canonical.com/
> It trivially conflicts after applying this patch.
I see. I'll post 2 patches soon.
Thank you, Jakub!
^ permalink raw reply [flat|nested] 7+ messages in thread