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:	Thu, 25 Sep 2014 06:57:55 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Bryan O'Donoghue <pure.logic@...us-software.ie>
Cc:	hpa@...or.com, mingo@...hat.com, tglx@...utronix.de,
	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Quark: Flush TLB via CR3 not CR4.PGE in setup_arch()


* Bryan O'Donoghue <pure.logic@...us-software.ie> wrote:

> Quark X1000 requires CR3 to be rewritten to flush TLB entries
> irrespective of the PGE bits in CR4 or PTE.PGE
> 
> This patch flushes the TLB in the required way for Quark in setup_arch()
> See Quark Core_DevMan_001.pdf section 6.4.11
> 
> Signed-off-by: Bryan O'Donoghue <pure.logic@...us-software.ie>
> ---
>  arch/x86/kernel/setup.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 41ead8d..1d2396a 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -879,7 +879,10 @@ void __init setup_arch(char **cmdline_p)
>  			KERNEL_PGD_PTRS);
>  
>  	load_cr3(swapper_pg_dir);
> -	__flush_tlb_all();
> +	if (boot_cpu_data.x86 == 5 && boot_cpu_data.x86_model == 9)
> +		__flush_tlb();
> +	else
> +		__flush_tlb_all();

So why not make __flush_tlb_all() Quark-quirk-aware and be done 
with it, instead of having to validate every single 
__flush_tlb_all() user?

Quark breaks the x86 'flush all TLBs' semantics - the way to fix 
it is to restore those semantics, not to sprinkle the breakage 
all around the code ...

Thanks,

	Ingo
--
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