# Re: \[PATCH v2 14/17\] selftests: vdso: Make test\_vdso\_getrandom look for the right vDSO function

- From: Jason A. Donenfeld \<Jason@zx2c4.com\>
- Date: 2024-08-26 07:28:55 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2024/08/290070
- Thread: https://ratatoskr.run/linuxppc-dev/2024/08/289625/t.md

```text
On Thu, Aug 22, 2024 at 09:13:22AM +0200, Christophe Leroy wrote:
> Don't hard-code x86 specific names, use vdso_config definitions
> to find the correct function matching the architecture.
> 
> Add random VDSO function names in names[][]. Remove the #ifdef
> CONFIG_VDSO32, having the name there all the time is harmless
> and guaranties a steady index for following strings.

This is indeed the right way of doing it. Thanks. I'll take this now,
though with one small fixup:

> +	const char *version = versions[VDSO_VERSION];
> +	const char **name = (const char **)&names[VDSO_NAMES];

I'll just do:

        const char *name = names[VDSO_NAMES][6];

Instead of referring to name[6] everywhere after. Seems more straight
forward.

Jason
```
