On Thu, Oct 31, 2024 at 11:04:06AM -0500, Konstantin Shkolnyy wrote:
On 10/31/2024 09:16, Stefano Garzarella wrote:
On Tue, Oct 29, 2024 at 09:49:54AM -0500, Konstantin Shkolnyy wrote:
Change parameters of SO_VM_SOCKETS_* to uint64_t so that they are always
In include/uapi/linux/vm_sockets.h we talk about "unsigned long long",
but in the kernel code we use u64. IIUC "unsigned long long" should
be u64 on every architecture, at least till we will have some
128-bit cpu, right?
I'm not sure what "unsigned long long" would be on a 128-bit machine.
What about using `unsigned long long` as documented in the vm_sockets.h?
I use uint64_t because the kernel uses u64. I think, this way the code
isn't vulnerable to potential variability of "unsigned long long".
IMHO the test should look more at UAPI than implementation.
Since we document to use "unsigned long long" I think we should use that
in the test to check that our implementation behaves well with what we
suggest the user to do.
If we change to "unsigned long long" should we also change the kernel
to "unsigned long long"?
For now, it should not change much to use u64 or unsigned long long, but
I agree that it would be better to change it. I would do it in a
separate series, though.
Thanks,
Stefano