This is a note to let you know that I've just added the patch titled selftests: vDSO: skip getrandom test if architecture is unsupported to the 6.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-vdso-skip-getrandom-test-if-architecture-i.patch and it can be found in the queue-6.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 5b9342ad3069af81c4d7d7998a90e2066961a737 Author: Jason A. Donenfeld <Jason@xxxxxxxxx> Date: Thu Aug 29 20:23:23 2024 +0200 selftests: vDSO: skip getrandom test if architecture is unsupported [ Upstream commit f78280b1a3cedd9f68d5f596179675514a15bd1d ] If the getrandom test compiles for an arch, don't exit fatally if the actual cpu it's running on is unsupported. Suggested-by: Adhemerval Zanella Netto <adhemerval.zanella@xxxxxxxxxx> Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx> Stable-dep-of: 6eda706a535c ("selftests: vDSO: fix the way vDSO functions are called for powerpc") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c index 20bbef992c486..5db8ac8999cd0 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c @@ -104,6 +104,7 @@ static void vgetrandom_init(void) const char *version = versions[VDSO_VERSION]; const char *name = names[VDSO_NAMES][6]; unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR); + size_t ret; if (!sysinfo_ehdr) { printf("AT_SYSINFO_EHDR is not present!\n"); @@ -115,7 +116,11 @@ static void vgetrandom_init(void) printf("%s is missing!\n", name); exit(KSFT_FAIL); } - if (vgrnd.fn(NULL, 0, 0, &vgrnd.params, ~0UL) != 0) { + ret = vgrnd.fn(NULL, 0, 0, &vgrnd.params, ~0UL); + if (ret == -ENOSYS) { + printf("unsupported architecture\n"); + exit(KSFT_SKIP); + } else if (ret) { printf("failed to fetch vgetrandom params!\n"); exit(KSFT_FAIL); }