[SRU][J:linux/J:hwe-6.8][PATCH 1/1] UBUNTU SAUCE: Revert "randomize_kstack: Improve entropy diffusion"
Roxana Nicolescu
roxana.nicolescu at canonical.com
Thu Aug 1 13:45:49 UTC 2024
BugLink: https://bugs.launchpad.net/bugs/2073267
This reverts "randomize_kstack: Improve entropy diffusion" that changed
the kernel stack for entropy to 1KiB, limitting the thread kernel stack to
15KiB. This impacts virtualbox 6.1.50 on jammy, that is no longer
maintained upstream. The issue does not persist on version 7.0.20 due to a
code refactoring that probably resulted in less stack usage. Fixing it on
the jammy virtualbox package side is not straightfoward because the fix is
not easy to backport to 6.x and upgrading the jammy package to 7.x breaks
current users machines.
This is a temporary solution needed due to the impact, more investigation
is required.
Signed-off-by: Roxana Nicolescu <roxana.nicolescu at canonical.com>
---
include/linux/randomize_kstack.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/randomize_kstack.h b/include/linux/randomize_kstack.h
index 5d52d15faee0c..d373f1bcbf7ca 100644
--- a/include/linux/randomize_kstack.h
+++ b/include/linux/randomize_kstack.h
@@ -58,7 +58,7 @@ DECLARE_PER_CPU(u32, kstack_offset);
if (static_branch_maybe(CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT, \
&randomize_kstack_offset)) { \
u32 offset = raw_cpu_read(kstack_offset); \
- offset = ror32(offset, 5) ^ (rand); \
+ offset ^= (rand); \
raw_cpu_write(kstack_offset, offset); \
} \
} while (0)
--
2.34.1
More information about the kernel-team
mailing list