Re: [PATCH] net/9p: add vsock transport
From: Dominique Martinet
Date: Thu Jun 25 2026 - 16:53:51 EST
skvarlamatus@xxxxxxxxx wrote on Thu, Jun 25, 2026 at 05:16:36PM +0200:
> I wanted to ask you about your opinions on the issue with
> port number truncation. The port number is parsed from mount
> options as u16, which is sufficient for TCP, but vsock uses u32.
>
> I see two ways to resolve this. One is adding a new command line
> option for vsock only that would be stored in a u32. The other is
> changing the type of the port variable to u32, and adding a range
> check for TCP.
>
> Personally, I would lean towards the second option.
Actually the port is already parsed as u32 and silently truncated, so
you don't need to worry too much about it (I just tried mounting with
port=0x120235 and it mounted on port 0x234=564 successfully)
We can add a check for tcp/rdma truncation later if someone complains
about it, just make the vsock port type u32
--
Dominique Martinet | Asmadeus