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: <E2528628-52A6-444F-BE02-0C69D5E52726@vmware.com>
Date:   Thu, 15 Feb 2018 17:47:34 +0000
From:   Nadav Amit <namit@...are.com>
To:     Dave Hansen <dave.hansen@...ux.intel.com>
CC:     Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Willy Tarreau <w@....eu>, "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

Dave Hansen <dave.hansen@...ux.intel.com> wrote:

>> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
>> index c67ef3fb4f35..979c7ec6baab 100644
>> --- a/arch/x86/mm/tlb.c
>> +++ b/arch/x86/mm/tlb.c
>> @@ -74,7 +74,8 @@ static void choose_new_asid(struct mm_struct *next, u64 next_tlb_gen,
>> 		return;
>> 	}
>> 
>> -	if (this_cpu_read(cpu_tlbstate.invalidate_other))
>> +	if (this_cpu_read(cpu_tlbstate.invalidate_other) &&
>> +	    !mm_pti_disable(next))
>> 		clear_asid_other();
> 
> This isn't obviously correct.  Don't we still need to invalidate other
> user asids?

I forgot to regard this question: When you reenable PTI (after switching back
to 64-bit process), you flush the global pages, so no kernel mappings for the
32-bit process are left.

As for kernel mappings of 64-bit processes, you will flush them later, when
you switch back to 64-bit process (the indication is left set).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ