Hi!

> My previous attempt to fix a couple of bugs in
> __restore_processor_context() introduced yet another bug.  Rather
> than trying to come up with a minimal fix, let's try to clean it up
> for real.  This patch fixes quite a few things:
> 
>  - The old code saved a nonsensical subset of segment registers.
>    The only registers that need to be saved are those that contain
>    userspace state or those that can't be trivially restored without
>    percpu access working.  (On x86_32, we can restore percpu access
>    by writing __KERNEL_PERCPU to %fs.  On x86_64, it's easier to
>    save and restore the kernel's GSBASE.)  With this patch, we
>    restore hardcoded values to the kernel state where applicable and
>    explicitly restore the user state after fixing all the descriptor
>    tables.
> 
>  - We used to use an unholy mix of inline asm and C helpers for
>    segment register access.  Let's get rid of the inline asm.
> 
> Tested-by: Jarkko Nikula <jarkko.nik...@linux.intel.com>
> Fixes: 5b06bbcfc2c6 ("x86/power: Fix some ordering bugs in 
> __restore_processor_context()")
> Signed-off-by: Andy Lutomirski <l...@kernel.org>

Thanks!

Tested-by: Pavel Machek <pa...@ucw.cz>
Reported-by: Pavel Machek <pa...@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature

Reply via email to