linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Are those hacks still valid on powerpc kernel ?
@ 2018-01-24 10:17 Christophe LEROY
  2018-01-24 23:49 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe LEROY @ 2018-01-24 10:17 UTC (permalink / raw)
  To: Aneesh Kumar K.V, Michael Ellerman, Benjamin Herrenschmidt,
	Anton Blanchard
  Cc: linuxppc-dev@lists.ozlabs.org

Below comments are very old.

Aren't new glibc and binutils now able to go without this ?

Note that the code inside the #if 0 is wrong as we have no vma defined 
in the function.

Or does it just have no performance impact anyway ?


 From /arch/powerpc/mm/mem.c:

void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
{
	clear_page(page);

	/*
	 * We shouldn't have to do this, but some versions of glibc
	 * require it (ld.so assumes zero filled pages are icache clean)
	 * - Anton
	 */
	flush_dcache_page(pg);
}
EXPORT_SYMBOL(clear_user_page);

void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
		    struct page *pg)
{
	copy_page(vto, vfrom);

	/*
	 * We should be able to use the following optimisation, however
	 * there are two problems.
	 * Firstly a bug in some versions of binutils meant PLT sections
	 * were not marked executable.
	 * Secondly the first word in the GOT section is blrl, used
	 * to establish the GOT address. Until recently the GOT was
	 * not marked executable.
	 * - Anton
	 */
#if 0
	if (!vma->vm_file && ((vma->vm_flags & VM_EXEC) == 0))
		return;
#endif

	flush_dcache_page(pg);
}

Christophe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-24 23:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-24 10:17 Are those hacks still valid on powerpc kernel ? Christophe LEROY
2018-01-24 23:49 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).