hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/x86/include/asm/stackprotector.h
....@@ -65,7 +65,7 @@
6565 */
6666 static __always_inline void boot_init_stack_canary(void)
6767 {
68
- u64 canary = 0;
68
+ u64 canary;
6969 u64 tsc;
7070
7171 #ifdef CONFIG_X86_64
....@@ -76,14 +76,8 @@
7676 * of randomness. The TSC only matters for very early init,
7777 * there it already has some randomness on most systems. Later
7878 * on during the bootup the random pool has true entropy too.
79
- * For preempt-rt we need to weaken the randomness a bit, as
80
- * we can't call into the random generator from atomic context
81
- * due to locking constraints. We just leave canary
82
- * uninitialized and use the TSC based randomness on top of it.
8379 */
84
-#ifndef CONFIG_PREEMPT_RT
8580 get_random_bytes(&canary, sizeof(canary));
86
-#endif
8781 tsc = rdtsc();
8882 canary += tsc + (tsc << 32UL);
8983 canary &= CANARY_MASK;