public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Theodore Ts'o <tytso@mit.edu>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Eric Biggers <ebiggers@kernel.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>
Subject: Re: [PATCH] aarch64: vdso: Wire up getrandom() vDSO implementation
Date: Mon, 26 Aug 2024 22:55:41 +0200	[thread overview]
Message-ID: <ZszrzRbL-eks6A3I@zx2c4.com> (raw)
In-Reply-To: <20240826181059.111536-1-adhemerval.zanella@linaro.org>

On Mon, Aug 26, 2024 at 06:10:40PM +0000, Adhemerval Zanella wrote:
> +static __always_inline ssize_t getrandom_syscall(void *buffer, size_t len, unsigned int flags)
> +{
> +	register long int x8 asm ("x8") = __NR_getrandom;
> +	register long int x0 asm ("x0") = (long int) buffer;
> +	register long int x1 asm ("x1") = (long int) len;
> +	register long int x2 asm ("x2") = (long int) flags;
> +
> +	asm ("svc 0" : "=r"(x0) : "r"(x8), "0"(x0), "r"(x1), "r"(x2));
> +
> +	return x0;
> +}

More generally, it might be best to follow the format used by
arch/arm64/include/asm/vdso/gettimeofday.h.

  parent reply	other threads:[~2024-08-26 20:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 18:10 [PATCH] aarch64: vdso: Wire up getrandom() vDSO implementation Adhemerval Zanella
2024-08-26 20:27 ` Jason A. Donenfeld
2024-08-27 13:17   ` Adhemerval Zanella Netto
2024-08-27 13:34     ` Jason A. Donenfeld
2024-08-27 13:39       ` Adhemerval Zanella Netto
2024-08-27 14:00         ` Christophe Leroy
2024-08-27 14:01           ` Adhemerval Zanella Netto
2024-08-27 14:10             ` Christophe Leroy
2024-08-27 14:14               ` Adhemerval Zanella Netto
2024-08-27 14:28                 ` Jason A. Donenfeld
2024-08-27 14:30                   ` Adhemerval Zanella Netto
2024-08-27 14:32                     ` Jason A. Donenfeld
2024-08-27 14:35                       ` Adhemerval Zanella Netto
2024-08-27 14:41                         ` [PATCH] selftests/vDSO: separate LDLIBS from CFLAGS for libsodium Jason A. Donenfeld
2024-08-27 14:45                           ` Adhemerval Zanella Netto
2024-08-27 14:52                             ` Jason A. Donenfeld
2024-08-27 13:52     ` [PATCH] aarch64: vdso: Wire up getrandom() vDSO implementation Christophe Leroy
2024-08-26 20:55 ` Jason A. Donenfeld [this message]
2024-08-27  8:46 ` Christophe Leroy
2024-08-27  8:53   ` Jason A. Donenfeld
2024-08-27 15:16     ` Jason A. Donenfeld
2024-08-27 15:18       ` [PATCH] random: vDSO: move prototype of arch chacha function to vdso/getrandom.h Jason A. Donenfeld
2024-08-27 15:47         ` [PATCH v2] " Jason A. Donenfeld
2024-08-27 16:53           ` Christophe Leroy
2024-08-27 16:55             ` Jason A. Donenfeld
2024-08-27 14:07   ` [PATCH] aarch64: vdso: Wire up getrandom() vDSO implementation Adhemerval Zanella Netto
2024-08-27 13:51 ` Ard Biesheuvel
2024-08-27 14:00 ` Mark Rutland
2024-08-27 14:05   ` Adhemerval Zanella Netto

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=ZszrzRbL-eks6A3I@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=ebiggers@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    --cc=will@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