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]
Date:   Sun, 25 Mar 2018 17:27:32 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Wanpeng Li <kernellwp@...il.com>, peterz@...radead.org
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Kr??m??? <rkrcmar@...hat.com>,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before
 static key get initialized

On Sat, 24 Mar 2018, Wanpeng Li wrote:

>Note: Peterz pointed out in the IRC we have to audit all the architectures that
>implement smp_prepare_boot_cpu() to see what they depend on if we want to move
>jump_label_init() before smp_prepare_boot_cpu(). So what this patch does is
>similar to the issue which handled in xen ca5d376e.

After some auditing, the jump_label_init() being moved before smp_prepare_boot_cpu()
seems fine, however, bulky mechanisms to update text segments conflict with early smp
bootup stages, such as this patch. So, while the disabling virt_spin_lock_key would
be done correctly _after_ jump_label_init(), it is still fragile in that we want to
be using lightweight patching such as jump_label_transform_static() -- which doesn't
take the text_mutex (blocking is out of the question), for example.

For pretty much all archs this means using the transform_static() version. For example
x86, this means using text_poke_early(). -- also ouchy on the !PageReserved(pages[0])
warning for text_poke().

I'm not sure yet of the best way to teach jump_label_transform() to behave like
jump_label_transform_static() under pre-smp bootup, such as when disabling hypervisor
pvspinlocks.

The s390 implementation seems safe as is given that stop_machine is now safe for early
pre-smp boot.

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ