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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200710011238.10318.ak@suse.de>
Date:	Mon, 1 Oct 2007 12:38:10 +0200
From:	Andi Kleen <ak@...e.de>
To:	"Jan Beulich" <jbeulich@...ell.com>
Cc:	linux-kernel@...r.kernel.org, patches@...-64.org
Subject: Re: [patches] [PATCH] [13/50] x86: Fix and reenable CLFLUSH support inchange_page_attr()

On Monday 24 September 2007 10:23:29 Jan Beulich wrote:
> >@@ -162,7 +198,7 @@ __change_page_attr(unsigned long address
> > 	/* on x86-64 the direct mapping set at boot is not using 4k pages */
> >  	BUG_ON(PageReserved(kpte_page));
> > 
> >-	save_page(kpte_page);
> >+	save_page(kpte_page, 0);
> > 	if (page_private(kpte_page) == 0)
> > 		revert_page(address, ref_prot);
> > 	return 0;
> 
> What is the point of continuing to launder kpte_page here? Page table pages
> never get their caching attributes changed, nor would their direct mapping
> ever change. (Same for i386, obviously.)

We can only free the page table after all the TLBs have been flushed;
otherwise other CPUs can walk already overwritten data as page tables (which can 
then cause various problems). This is similar to the lazy TLB flush logic in the 
standard VM.

We don't need to cache flush it though, that is why 0 is passed here.

Admittedly the function argument is a little bogus because the caller
could just do it; didn't change that yet.

-Andi

-
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