diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-09-15 14:10:41 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-10-17 17:40:56 +0300 |
commit | b5636d45aae42aa345b4c7918bdef245ed63da68 (patch) | |
tree | 4e8fd6a035991d8409d32dfeb1a37258ae389a81 /crypto/ecdh_helper.c | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
download | linux-b5636d45aae42aa345b4c7918bdef245ed63da68.tar.xz |
x86/cpu: Remove segment load from switch_to_new_gdt()
On 32bit FS and on 64bit GS segments are already set up correctly, but
load_percpu_segment() still sets [FG]S after switching from the early GDT
to the direct GDT.
For 32bit the segment load has no side effects, but on 64bit it causes
GSBASE to become 0, which means that any per CPU access before GSBASE is
set to the new value is going to fault. That's the reason why the whole
file containing this code has stackprotector removed.
But that's a pointless exercise for both 32 and 64 bit as the relevant
segment selector is already correct. Loading the new GDT does not change
that.
Remove the segment loads and add comments.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220915111143.097052006@infradead.org
Diffstat (limited to 'crypto/ecdh_helper.c')
0 files changed, 0 insertions, 0 deletions