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: <87lesqx64u.ffs@tglx>
Date:   Mon, 18 Jul 2022 08:54:41 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Juergen Gross <jgross@...e.com>,
        Andrew Cooper <Andrew.Cooper3@...rix.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     "x86@...nel.org" <x86@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Josh Poimboeuf <jpoimboe@...nel.org>,
        Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
        Johannes Wikner <kwikner@...z.ch>,
        Alyssa Milburn <alyssa.milburn@...ux.intel.com>,
        Jann Horn <jannh@...gle.com>, "H.J. Lu" <hjl.tools@...il.com>,
        Joao Moreira <joao.moreira@...el.com>,
        Joseph Nuzman <joseph.nuzman@...el.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [patch 02/38] x86/cpu: Use native_wrmsrl() in
 load_percpu_segment()

On Mon, Jul 18 2022 at 07:11, Juergen Gross wrote:
> On 17.07.22 23:54, Thomas Gleixner wrote:
>>   void __init native_smp_prepare_boot_cpu(void)
>>   {
>>   	int me = smp_processor_id();
>> -	switch_to_new_gdt(me);
>> +
>> +	/* SMP invokes this from setup_per_cpu_areas() */
>> +	if (!IS_ENABLED(CONFIG_SMP))
>> +		switch_to_real_gdt(me);
>> +
>>   	/* already set me in cpu_online_mask in boot_cpu_init() */
>>   	cpumask_set_cpu(me, cpu_callout_mask);
>>   	cpu_set_state_online(me);
>> --- a/arch/x86/xen/enlighten_pv.c
>> +++ b/arch/x86/xen/enlighten_pv.c
>> @@ -1164,7 +1164,7 @@ static void __init xen_setup_gdt(int cpu
>>   	pv_ops.cpu.write_gdt_entry = xen_write_gdt_entry_boot;
>>   	pv_ops.cpu.load_gdt = xen_load_gdt_boot;
>>   
>> -	switch_to_new_gdt(cpu);
>> +	switch_to_real_gdt(cpu);
>
> ... can't you use the paravirt variant of load_gdt in switch_to_real_gdt() ?

That does not solve the problem of having a disagreement between GDT and
GS_BASE. Let me dig into this some more.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ