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:	Wed, 24 Sep 2014 17:07:12 +0100
From:	Bryan O'Donoghue <pure.logic@...us-software.ie>
To:	"H. Peter Anvin" <hpa@...or.com>, mingo@...nel.org,
	linux-kernel@...r.kernel.org, tglx@...utronix.de,
	stable@...r.kernel.org, bp@...en8.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/platform] x86/intel/quark: Switch off CR4.PGE so TLB
 flush uses CR3 instead

On 24/09/14 16:58, Bryan O'Donoghue wrote:
>
>>
>> I believe there is one more change needed: there is a __flush_tlb_all()
>> in the early code which gets executed before the above code runs; the
>> easiest fix is to just add a __flush_tlb() immediately after it.
>>
>> This should have been pushed upstream, and not stayed in the BSP kernel.
>
> Peter.
>
> You're talking about void __init setup_arch() right ?
>
> The code looks like this
>
> load_cr3(swapper_pg_dir);
> __flush_tlb_all();
>
> Note that on Quark the method to invalidate the TLB is by reloading CR3
> - which is immediately prior to __flush_tlb_all();
>
> So __flush_tlb_all(); will do nothing but that's OK since load_cr3()
> already flushed the TLB - including any PTE with PGE set

I take your point though.

It's probably better to be explicit and do the whole

if (quark)
	__flush_tlb();
else
	__flush_tlb_all();

So that we aren't relying on the side effects of the previous statement.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ