syscall.sh / riscv64 / getrandom

getrandom

obtain a series of random bytes

sys_getrandom(char *buf, size_t count, unsigned int flags)
number278 (0x116)
abicommon
entry pointsys_getrandom
sinceLinux 4.15
man pagegetrandom(2)
sourceelixir.bootlin.com

Registers

registervalue
a7278, the syscall number
a0char *buf
a1size_t count
a2unsigned int flags
a0the return value

Then run ecall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/getrandom