public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Aleksa Sarai <cyphar@cyphar.com>,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev,
	linux-crypto@vger.kernel.org, linux-api@vger.kernel.org,
	x86@kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
	Carlos O'Donell <carlos@redhat.com>,
	Florian Weimer <fweimer@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>, Jann Horn <jannh@google.com>,
	Christian Brauner <brauner@kernel.org>,
	David Hildenbrand <dhildenb@redhat.com>
Subject: Re: [PATCH v18 2/5] random: add vgetrandom_alloc() syscall
Date: Mon, 1 Jul 2024 13:53:04 +0200	[thread overview]
Message-ID: <ZoKYoBp_bSRP_fqn@zx2c4.com> (raw)
In-Reply-To: <Zn7D_YBC2SXTa_jX@zx2c4.com>

On Fri, Jun 28, 2024 at 04:09:01PM +0200, Jason A. Donenfeld wrote:
> 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.

Jason

  parent reply	other threads:[~2024-07-01 11:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20  0:53 [PATCH v18 0/5] implement getrandom() in vDSO Jason A. Donenfeld
2024-06-20  0:53 ` [PATCH v18 1/5] mm: add VM_DROPPABLE for designating always lazily freeable mappings Jason A. Donenfeld
2024-06-20  0:53 ` [PATCH v18 2/5] random: add vgetrandom_alloc() syscall Jason A. Donenfeld
2024-06-20  2:13   ` Aleksa Sarai
2024-06-20 12:18     ` Jason A. Donenfeld
2024-06-28 13:56       ` Thomas Gleixner
2024-06-28 14:09         ` Jason A. Donenfeld
2024-06-28 14:11           ` Jason A. Donenfeld
2024-07-01 11:53           ` Jason A. Donenfeld [this message]
2024-07-01 13:59             ` Jason A. Donenfeld
2024-06-20  0:53 ` [PATCH v18 3/5] arch: allocate vgetrandom_alloc() syscall number Jason A. Donenfeld
2024-06-20  0:53 ` [PATCH v18 4/5] random: introduce generic vDSO getrandom() implementation Jason A. Donenfeld
2024-06-28 13:57   ` Thomas Gleixner
2024-06-20  0:53 ` [PATCH v18 5/5] x86: vdso: Wire up getrandom() vDSO implementation Jason A. Donenfeld
2024-06-28 13:57   ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZoKYoBp_bSRP_fqn@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=arnd@arndb.de \
    --cc=brauner@kernel.org \
    --cc=carlos@redhat.com \
    --cc=cyphar@cyphar.com \
    --cc=dhildenb@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox