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: <20070728000223.31492de4.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Sat, 28 Jul 2007 00:02:23 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Zoltan Menyhart <Zoltan.Menyhart@...l.net>
Cc:	linux-kernel@...r.kernel.org, linux-ia64@...r.kernel.org,
	tony.luck@...el.com, nickpiggin@...oo.com.au, clameter@....com
Subject: Re: [PATCH] flush cache fixes for ia64 [2/2] sync icache dcache

On Fri, 27 Jul 2007 16:16:27 +0200
Zoltan Menyhart <Zoltan.Menyhart@...l.net> wrote:

> Do you really need a "sync_icache_dcache()" in "do_wp_page()"?
> I guess it is only needed when the EXEC bit of the PTE gets turned on.
> 
Ah, sorry. do_wp_page() without page copy (reuse case) doesn't need sync.

About page copy case
There was an issue that Java receives SIGILL because lazy_mmu_prot_update()
is called before set_pte(). Then, Only do_wp_page() calls lazy_mmu_prot_update()
before set_pte().

This is because the kernel allocates a new page with filling its contents by
copy (on cache!) from old page.
Then, do_wp_page() uses page copy needs sync.


> > --- linux-2.6.23-rc1.test.orig/mm/migrate.c
> > +++ linux-2.6.23-rc1.test/mm/migrate.c
> > @@ -172,6 +172,7 @@ static void remove_migration_pte(struct 
> >  	pte = pte_mkold(mk_pte(new, vma->vm_page_prot));
> >  	if (is_write_migration_entry(entry))
> >  		pte = pte_mkwrite(pte);
> > +	flush_icache_page(vma, new);
> >  	set_pte_at(mm, addr, ptep, pte);
> >  
> >  	if (PageAnon(new))
> 
> I think "flush_icache_page()", or rather "flush_cache_page()" is
> to be placed where migration tears down the old virtual --> physical
> address translation for good.
migration uses try_to_unmap() when removing old pte. so it seems safe.
This patch above treats creating new page map case.

Thanks,
-Kame
-
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