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: <20140925151123.GA4864@gmail.com>
Date:	Thu, 25 Sep 2014 17:11:23 +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:

> >It talks about:
> >
> >+       /*
> >+        * Locate the page directory and flush the TLB.
> >+        * On Quark X1000 rewriting CR3 flushes the TLB no if/else is required
> >+        * to choose between __flush_tlb() and __flush_tlb_all()
> >+        */
> >         load_cr3(swapper_pg_dir);
> >         __flush_tlb_all();
> >
> >But it is completely silent on the real reason for why we don't
> >need a Quark quirk here, which would be something like:
> >
> >	/*
> >	 * On Quark CPUs we still have the PGE bit set so
> >	 * __flush_tlb_all() is not yet doing what it says - but
> >	 * accidentally we have a cr3 flush here which is what is
> >	 * needed - so there's no need to add a Quark quirk here.
> >	 */
> >
> >Right?
> 
> OK.
> 
> IMO.
> 
> If we're adding a comment though the first thing the comment ought to say is
> what the code does for everybody else - stuff CR3 and flush the TLB, then it
> should comment on the exception for Quark.
> 
> /*
>  * Locate the page directory and flush the TLB.
>  *
>  * On Quark CPUs we still have the PGE bit set so
>  * __flush_tlb_all() is not yet doing what it says - but
>  * accidentally we have a cr3 flush here which is what is
>  * needed - so there's no need to add a Quark quirk here.
>  */
> 
> ?

Yeah, fair enough. You can even put the latter in parentheses, to 
signal that it's all a rare case.

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