lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171214223217.GA10525@amd>
Date:   Thu, 14 Dec 2017 23:32:17 +0100
From:   Pavel Machek <pavel@....cz>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     X86 ML <x86@...nel.org>, Borislav Petkov <bpetkov@...e.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Zhang Rui <rui.zhang@...el.com>,
        Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH urgent 3/3] x86/power: Make restore_processor_context()
 sane

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.nikula@...ux.intel.com>
> Fixes: 5b06bbcfc2c6 ("x86/power: Fix some ordering bugs in __restore_processor_context()")
> Signed-off-by: Andy Lutomirski <luto@...nel.org>

Thanks!

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

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

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ