🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
5 messages
5 total messages Started by Davidlohr Bueso Sun, 01 Nov 2026 20:03
[PATCH] mctp: accept MSG_CMSG_COMPAT in recvmsg
#9348
Author: Davidlohr Bueso
Date: Sun, 01 Nov 2026 20:03
27 lines
10447 bytes
32-bit userspace running on a 64-bit kernel is unable to receive MCTP
messages on an AF_MCTP socket, even though sending succeeds. There is
nothing for MCTP to do with it beyond not rejecting it, as af_packet,
af_key and can/isotp already do, for example.

Fixes: 833ef3b91de6 ("mctp: Populate socket implementation")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 net/mctp/af_mctp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
index 8af5e2b3c8d1..aa22c0860712 100644
--- a/net/mctp/af_mctp.c
+++ b/net/mctp/af_mctp.c
@@ -292,8 +292,7 @@ static int mctp_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
 	u8 type;
 	int rc;
 
-	if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK))
+	if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK | MSG_CMSG_COMPAT))
 		return -EOPNOTSUPP;
 
 	skb = skb_recv_datagram(sk, flags, &rc);
--
2.39.5
Re: [PATCH] mctp: accept MSG_CMSG_COMPAT in recvmsg
#9349
Author: netdev-bot+sinfo
Date: Sun, 01 Nov 2026 20:09
18 lines
8335 bytes
Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
Re: [PATCH] mctp: accept MSG_CMSG_COMPAT in recvmsg
#9352
Author: Davidlohr Bueso
Date: Sun, 01 Nov 2026 20:41
24 lines
10787 bytes
On Sun, 01 Nov 2026, netdev-bot+sinfo@kernel.org wrote:

>Hi!
>
>This is an automated message. This series looks like a fix, but its
>commit messages seem to be missing some information:
>
> - How the issue was discovered, e.g. hit in production, hit during
>   development, syzbot report, manual code inspection, LLM or static
>   analysis tool scan.
>
>Please do not repost the series just to address the above. Instead,
>reply to this email with the missing information, so that reviewers
>can take it into account. If the series needs another revision for
>other reasons, please include the information in the commit messages
>then.

This is not a random fix, I actually ran into this while testing 32-bit
support for libcxlmi: https://github.com/computexpresslink/libcxlmi/pull/62

>
>The evaluation is done by an LLM so it may be wrong, if you think
>that is the case please reply and explain.
Re: [PATCH] mctp: accept MSG_CMSG_COMPAT in recvmsg
#11737
Author: Simon Horman
Date: Thu, 05 Nov 2026 13:58
57 lines
9480 bytes
On Sun, Nov 01, 2026 at 12:03:31PM -0800, Davidlohr Bueso wrote:
> 32-bit userspace running on a 64-bit kernel is unable to receive MCTP
> messages on an AF_MCTP socket, even though sending succeeds. There is
> nothing for MCTP to do with it beyond not rejecting it, as af_packet,
> af_key and can/isotp already do, for example.

Hi Davidlohr,

Thanks for your patch.

As prompted elsewhere by a bot, it would be good if the patch description
included some information about how this was found. And also to what
extent the fix has been tested. I know you answered that already but
I'm going to ask for a v2 for other reasons. And it would be good
to include that detail there.

> 
> Fixes: 833ef3b91de6 ("mctp: Populate socket implementation")
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>

This seems to be a fix that effects users. Which I believe you have
reproduced. As such I'd lean towards this being for net, CCed to stable.

Subject: [PATCH net v2] ...

Otherwise, it should be for net-next.

Subject: [PATCH net-next v2] ...

> ---
>  net/mctp/af_mctp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
> index 8af5e2b3c8d1..aa22c0860712 100644
> --- a/net/mctp/af_mctp.c
> +++ b/net/mctp/af_mctp.c
> @@ -292,8 +292,7 @@ static int mctp_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,

Strangely this patch has been mangled - the original code is 7 rather than
8 lines long. (s/,8/,7). Because of this it could not be applied by our
CI which then did not run the usual tests.

I'd like to ask you to fix that and send a v2.

>  	u8 type;
>  	int rc;
>  
> -	if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK))
> +	if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK | MSG_CMSG_COMPAT))
>  		return -EOPNOTSUPP;
>  
>  	skb = skb_recv_datagram(sk, flags, &rc);

-- 
pw-bot: changes-requested
Re: [PATCH] mctp: accept MSG_CMSG_COMPAT in recvmsg
#11787
Author: Davidlohr Bueso
Date: Thu, 05 Nov 2026 15:32
61 lines
11876 bytes
On Thu, 05 Nov 2026, Simon Horman wrote:

>On Sun, Nov 01, 2026 at 12:03:31PM -0800, Davidlohr Bueso wrote:
>> 32-bit userspace running on a 64-bit kernel is unable to receive MCTP
>> messages on an AF_MCTP socket, even though sending succeeds. There is
>> nothing for MCTP to do with it beyond not rejecting it, as af_packet,
>> af_key and can/isotp already do, for example.
>
>Hi Davidlohr,
>
>Thanks for your patch.
>
>As prompted elsewhere by a bot, it would be good if the patch description
>included some information about how this was found. And also to what
>extent the fix has been tested. I know you answered that already but
>I'm going to ask for a v2 for other reasons. And it would be good
>to include that detail there.

Thanks for taking a look.

So I don't think the changelog should be mentioning random userspace
programs for testing/verifying this - as the bot email suggested, just
replying there should be enough.

>
>>
>> Fixes: 833ef3b91de6 ("mctp: Populate socket implementation")
>> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
>
>This seems to be a fix that effects users. Which I believe you have
>reproduced. As such I'd lean towards this being for net, CCed to stable.
>
>Subject: [PATCH net v2] ...
>
>Otherwise, it should be for net-next.
>
>Subject: [PATCH net-next v2] ...

Will do.

>
>> ---
>>  net/mctp/af_mctp.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
>> index 8af5e2b3c8d1..aa22c0860712 100644
>> --- a/net/mctp/af_mctp.c
>> +++ b/net/mctp/af_mctp.c
>> @@ -292,8 +292,7 @@ static int mctp_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
>
>Strangely this patch has been mangled - the original code is 7 rather than
>8 lines long. (s/,8/,7). Because of this it could not be applied by our
>CI which then did not run the usual tests.

Yeah I messed that up (noticed sashiko couldn't apply it either), not
sure what happened.

Thanks,
Davidlohr
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads