From 57b86fd082ca78b396d611dc1812921c69107b5e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 20 May 2020 19:52:09 +0200 Subject: [PATCH] Kernel: Fix invalid jump in case RDRAND fails If RDRAND doesn't give us data, we want to try again, not jump to some low address like 0x80 :^) --- Kernel/Random.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Random.cpp b/Kernel/Random.cpp index b5c61b2b20..288af64b8f 100644 --- a/Kernel/Random.cpp +++ b/Kernel/Random.cpp @@ -35,9 +35,9 @@ static u32 random32() if (g_cpu_supports_rdrand) { u32 value = 0; asm volatile( - "1%=:\n" + "1:\n" "rdrand %0\n" - "jnc 1%=\n" + "jnc 1b\n" : "=r"(value)); return value; }