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: <48CBF41D.5080202@goop.org>
Date:	Sat, 13 Sep 2008 10:10:53 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Suresh Siddha <suresh.b.siddha@...el.com>
CC:	mingo@...e.hu, hpa@...or.com, tglx@...utronix.de,
	arjan@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [patch 7/7] x86, cpa: global flush tlb after splitting large
 page and before doing cpa

Suresh Siddha wrote:
> Do a global flush tlb after splitting the large page and before we do the
> actual change page attribute in the PTE.
>
> With out this, we violate the TLB application note, which says
>     "The TLBs may contain both ordinary and large-page translations for
>      a 4-KByte range of linear addresses. This may occur if software
>      modifies the paging structures so that the page size used for the
>      address range changes. If the two translations differ with respect
>      to page frame or attributes (e.g., permissions), processor behavior
>      is undefined and may be implementation-specific."
>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
> ---
>
> Index: tip/arch/x86/mm/pageattr.c
> ===================================================================
> --- tip.orig/arch/x86/mm/pageattr.c	2008-09-11 13:25:55.000000000 -0700
> +++ tip/arch/x86/mm/pageattr.c	2008-09-11 13:25:57.000000000 -0700
> @@ -131,6 +131,18 @@
>  	mb();
>  }
>  
> +static void __global_flush_tlb(void *arg)
> +{
> +	__flush_tlb_all();
> +}
> +
> +static void global_flush_tlb(void)
> +{
> +	BUG_ON(irqs_disabled());
> +
> +	on_each_cpu(__global_flush_tlb, NULL, 1);
> +}
>   

Use flush_tlb_others(), which will get paravirtualized properly.

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