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] [day] [month] [year] [list]
Date:   Sun, 29 Oct 2017 13:15:34 +0100
From:   Juergen Gross <jgross@...e.com>
To:     Borislav Petkov <bp@...e.de>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        Dou Liyang <douly.fnst@...fujitsu.com>,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        xen-devel@...ts.xenproject.org, tglx@...utronix.de,
        mingo@...hat.com, hpa@...or.com, boris.ostrovsky@...cle.com,
        luto@...nel.org
Subject: Re: [PATCH][tip] x86/paravirt: Make the virt_spin_lock_key setup
 after jump_label_init()

On 28/10/17 12:55, Borislav Petkov wrote:
> On Fri, Oct 27, 2017 at 07:25:04PM +0200, Juergen Gross wrote:
>>>> This is assuming CPU 0 is the boot cpu. I think you want boot_cpu_data.cpu_index here or whatever is used on xen to identify the BSP reliably. 
>>>
>>> It seems both PV and PVHVM call xen_init_lock_cpu(0) so 0 here is
>>> Linux's idea of CPU id, not Xen's.
>>>
>>> In case Xen's idea is needed xen_vcpu_id mapping should be used. But I
>>> don't think it's the case here.
>>>
>>
>> Correct.
> 
> If it is Linux's idea of the BSP, then you need to check against
> boot_cpu_data.cpu_index.

The idea is to set the static key on the first call of
xen_init_lock_cpu(). As this first call is done with 0 as parameter
the correct check is against 0.


Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ