linux/tools/include/linux
Adhemerval Zanella 712676ea2b arm64: vDSO: Wire up getrandom() vDSO implementation
Hook up the generic vDSO implementation to the aarch64 vDSO data page.
The _vdso_rng_data required data is placed within the _vdso_data vvar
page, by using a offset larger than the vdso_data.

The vDSO function requires a ChaCha20 implementation that does not write
to the stack, and that can do an entire ChaCha20 permutation.  The one
provided uses NEON on the permute operation, with a fallback to the
syscall for chips that do not support AdvSIMD.

This also passes the vdso_test_chacha test along with
vdso_test_getrandom. The vdso_test_getrandom bench-single result on
Neoverse-N1 shows:

   vdso: 25000000 times in 0.783884250 seconds
   libc: 25000000 times in 8.780275399 seconds
syscall: 25000000 times in 8.786581518 seconds

A small fixup to arch/arm64/include/asm/mman.h was required to avoid
pulling kernel code into the vDSO, similar to what's already done in
arch/arm64/include/asm/rwonce.h.

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2024-09-13 17:28:36 +02:00
..
sched XArray: Add calls to might_alloc() 2022-07-10 21:17:30 -04:00
unaligned License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
align.h tools: move alignment-related macros to new <linux/align.h> 2024-04-01 10:49:28 +01:00
arm-smccc.h tools: Import ARM SMCCC definitions 2022-05-03 21:30:19 +01:00
atomic.h tools/include: Update atomic definitions 2022-02-20 08:44:37 +02:00
bitfield.h tools: Copy bitfield.h from the kernel sources 2022-11-10 19:10:27 +00:00
bitmap.h radix tree test suite: put definition of bitmap_clear() into lib/bitmap.c 2024-07-10 14:24:27 -07:00
bitops.h asm-generic cleanups for 6.10 2024-05-20 15:18:34 -07:00
bits.h tools headers: Synchronize linux/bits.h with the kernel sources 2024-04-26 22:13:10 -03:00
btf_ids.h tools/resolve_btfids: fix build with musl libc 2024-03-28 18:58:29 -07:00
bug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
build_bug.h tools headers: Syncronize linux/build_bug.h with the kernel sources 2023-01-18 10:31:11 -03:00
cache.h tools/include: Add cache.h stub 2022-02-20 08:44:37 +02:00
compiler_types.h work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
compiler-gcc.h tools: Rename __fallthrough to fallthrough 2023-04-06 21:41:00 -03:00
compiler.h arm64: vDSO: Wire up getrandom() vDSO implementation 2024-09-13 17:28:36 +02:00
const.h compiler.h: move __is_constexpr() to compiler.h 2023-10-18 14:43:22 -07:00
coresight-pmu.h perf cs-etm: Copy kernel coresight-pmu.h header 2023-05-26 16:03:27 -03:00
ctype.h tools headers: Update linux/ctype.h with the kernel sources 2020-12-18 17:32:28 -03:00
debugfs.h tools/include: Add debugfs.h stub 2022-02-20 08:44:37 +02:00
delay.h
err.h docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
export.h module: remove EXPORT_UNUSED_SYMBOL* 2021-02-08 12:28:07 +01:00
filter.h selftests/bpf: add fp-leaking precise subprog result tests 2024-04-04 18:31:08 -07:00
find.h tools: sync find_bit() implementation 2022-09-21 12:21:44 -07:00
ftrace.h
gfp_types.h tools: fix compilation after gfp_types.h split 2022-09-11 16:22:31 -07:00
gfp.h tools: fix compilation after gfp_types.h split 2022-09-11 16:22:31 -07:00
hash.h hash.h: remove unused define directive 2022-01-20 08:52:54 +02:00
hashtable.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
interrupt.h
interval_tree_generic.h objtool: Fix find_{symbol,func}_containing() 2022-10-17 16:41:08 +02:00
io.h tools/include: Add io.h stub 2022-02-20 08:44:37 +02:00
jhash.h tools/: replace HTTP links with HTTPS ones 2020-08-07 11:33:21 -07:00
kallsyms.h kallsyms: increase maximum kernel symbol length to 512 2022-09-28 08:56:25 +02:00
kconfig.h tools headers: Remove broken definition of __LITTLE_ENDIAN 2021-07-14 14:39:36 -03:00
kern_levels.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kernel.h memblock tests: fix undefined reference to `panic' 2024-04-04 11:08:33 +03:00
linkage.h selftests: vDSO: fix include order in build of test_vdso_chacha 2024-08-30 15:44:38 +02:00
list_sort.h tools lib: Adopt list_sort() from the kernel sources 2021-10-20 10:30:59 -03:00
list.h tools lib: Add list_last_entry_or_null() 2022-07-26 16:02:13 -03:00
log2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
math64.h tools include: Add an initial math64.h 2021-04-15 16:38:02 -03:00
math.h tools: Fix math.h breakage 2021-11-30 09:14:42 -08:00
mm.h mm/memblock: use PAGE_ALIGN_DOWN to get pgend in free_memmap 2024-06-05 10:22:22 +03:00
module.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mutex.h
nmi.h tools/lib/lockdep: Add empty nmi.h 2018-09-10 13:48:23 +02:00
numa.h memblock tests: fix implicit declaration of function 'numa_valid_node' 2024-07-05 11:24:47 +03:00
objtool_types.h x86,objtool: Split UNWIND_HINT_EMPTY in two 2023-03-23 23:18:58 +01:00
overflow.h compiler.h: drop fallback overflow checkers 2021-09-13 10:18:28 -07:00
panic.h memblock tests: fix undefined reference to `panic' 2024-04-04 11:08:33 +03:00
pfn.h tools/include: Add pfn.h stub 2022-02-20 08:44:37 +02:00
poison.h slab: delete useless RED_INACTIVE and RED_ACTIVE 2024-06-24 21:41:41 +02:00
rbtree_augmented.h tools lib rbtree: pick some improvements from the kernel rbtree code 2024-05-08 08:41:27 -07:00
rbtree.h rbtree: Add generic add and find helpers 2021-02-17 14:07:31 +01:00
rcu.h rcu: Don't return a value from rcu_assign_pointer() 2019-06-13 15:38:34 -07:00
refcount.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ring_buffer.h tools headers: Add missing perf_event.h include 2019-08-22 11:12:36 -03:00
rwsem.h maple_tree: update check_forking() and bench_forking() 2023-12-10 16:51:33 -08:00
seq_file.h memblock tests: fix warning ‘struct seq_file’ declared inside parameter list 2023-09-14 10:51:28 +03:00
sizes.h tools: bpftool: add "prog run" subcommand to test-run programs 2019-07-05 23:48:07 +02:00
slab.h slab: remove PARTIAL_NODE slab_state 2024-03-05 11:12:47 +01:00
spinlock.h maple_tree: introduce {mtree,mas}_lock_nested() 2023-12-10 16:51:31 -08:00
static_call_types.h static_call: Move struct static_call_key definition to static_call_types.h 2021-03-11 16:04:39 +01:00
string.h tools lib: Adopt memchr_inv() from kernel 2020-11-27 08:34:52 -03:00
stringify.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
time64.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
types.h tools/virtio: fix build caused by virtio_ring changes 2023-04-21 03:02:35 -04:00
zalloc.h tools lib: Adopt zalloc()/zfree() from tools/perf 2019-07-09 10:13:26 -03:00