summaryrefslogtreecommitdiffstats
path: root/include/linux/randomize_kstack.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/randomize_kstack.h')
-rw-r--r--include/linux/randomize_kstack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/randomize_kstack.h b/include/linux/randomize_kstack.h
index 5d868505a9..6d92b68efb 100644
--- a/include/linux/randomize_kstack.h
+++ b/include/linux/randomize_kstack.h
@@ -80,7 +80,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 ^= (rand); \
+ offset = ror32(offset, 5) ^ (rand); \
raw_cpu_write(kstack_offset, offset); \
} \
} while (0)