Re: [PATCH v18 2/5] random: add vgetrandom_alloc() syscall
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2024-07-01 14:00:13
Also in:
linux-crypto, linux-patches, lkml
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2024-07-01 14:00:13
Also in:
linux-crypto, linux-patches, lkml
On Mon, Jul 1, 2024 at 1:53 PM Jason A. Donenfeld [off-list ref] wrote:
On Fri, Jun 28, 2024 at 04:09:01PM +0200, Jason A. Donenfeld wrote:quoted
fine. Also I used u32 there for the two smaller arguments, but maybe that's silly and we should go straight to u64?Judging by `struct clone_args`, it looks like I've got to use __aligned_u64 for every argument: struct clone_args { __aligned_u64 flags; __aligned_u64 pidfd; __aligned_u64 child_tid; __aligned_u64 parent_tid; __aligned_u64 exit_signal; __aligned_u64 stack; __aligned_u64 stack_size; __aligned_u64 tls; __aligned_u64 set_tid; __aligned_u64 set_tid_size; __aligned_u64 cgroup; }; #define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */ #define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */ #define CLONE_ARGS_SIZE_VER2 88 /* sizeof third published struct */ So okay, I'll do that, and will have an ARGS_SIZE_VER0 macro too.
This is now covered by v19 of this patchset: https://lore.kernel.org/lkml/20240701135801.3698-1-Jason@zx2c4.com/ (local)