summaryrefslogtreecommitdiff
path: root/lib/test_bitops.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-06-23 14:02:31 +0200
committerBorislav Petkov <bp@suse.de>2021-06-23 20:05:33 +0200
commitfcb3635f5018e53024c6be3c3213737f469f74ff (patch)
tree3b21b1cbaeca68ab42232f22d78e4dc690d547d8 /lib/test_bitops.c
parentaee8c67a4faa40a8df4e79316dbfc92d123989c1 (diff)
x86/fpu/signal: Handle #PF in the direct restore path
If *RSTOR raises an exception, then the slow path is taken. That's wrong because if the reason was not #PF then going through the slow path is waste of time because that will end up with the same conclusion that the data is invalid. Now that the wrapper around *RSTOR return an negative error code, which is the negated trap number, it's possible to differentiate. If the *RSTOR raised #PF then handle it directly in the fast path and if it was some other exception, e.g. #GP, then give up and do not try the fast path. This removes the legacy frame FRSTOR code from the slow path because FRSTOR is not a ia32_fxstate frame and is therefore handled in the fast path. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210623121457.696022863@linutronix.de
Diffstat (limited to 'lib/test_bitops.c')
0 files changed, 0 insertions, 0 deletions