[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4xfrphsdl7p2aqu6w7diow5shsnjq263lhfudi4yiqxvkvcmkq@ti2hcdbkthok>
Date: Thu, 24 Oct 2024 17:21:24 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: Konstantin Shkolnyy <kshk@...ux.ibm.com>
Cc: virtualization@...ts.linux.dev, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, mjrosato@...ux.ibm.com
Subject: Re: [PATCH] vsock/test: fix failures due to wrong SO_RCVLOWAT
parameter
On Thu, Oct 24, 2024 at 10:00:47AM -0500, Konstantin Shkolnyy wrote:
>On 10/24/2024 03:43, Stefano Garzarella wrote:
>>Other setsockopt() in the tests where we use unsigned long are
>>SO_VM_SOCKETS_* but they are expected to be unsigned, so we should be
>>fine.
>
>It's actually not "signed vs unsigned", but a "size + endianess" problem.
I see, thanks!
>
>Also, looking at SO_VM_SOCKETS_* code in the test, it uses unsigned
>long and size_t which (I believe) will both shrink to 4 bytes on 32-bit
>machines, while the corresponding kernel code in af_vsock.c uses u64.
>It looks to me that this kernel code will be unhappy to receive just 4
>bytes when it expects 8.
>
In include/uapi/linux/vm_sockets.h we talk about unsigned long long for
SO_VM_SOCKETS_*, that IIUC also on 32-bit machines should be on 64bit,
so the kernel code looks okay, but the tests should be improved, right?
Thanks,
Stefano
Powered by blists - more mailing lists