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]
Date:	Tue, 8 Oct 2013 18:40:30 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Cc:	akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Pavel Emelyanov <xemul@...allels.com>,
	Andy Lutomirski <luto@...capital.net>,
	Matt Mackall <mpm@...enic.com>,
	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...il.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Peter Zijlstra <peterz@...radead.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Subject: Re: [patch 1/3] [PATCH] mm: migration -- Do not loose soft dirty bit
 if page is in migration state

On Tue, Oct 08, 2013 at 10:11:40AM -0400, Naoya Horiguchi wrote:
> > Index: linux-2.6.git/mm/memory.c
> > ===================================================================
> > --- linux-2.6.git.orig/mm/memory.c
> > +++ linux-2.6.git/mm/memory.c
> > @@ -837,6 +837,8 @@ copy_one_pte(struct mm_struct *dst_mm, s
> >  					 */
> >  					make_migration_entry_read(&entry);
> >  					pte = swp_entry_to_pte(entry);
> > +					if (pte_swp_soft_dirty(*src_pte))
> > +						pte = pte_swp_mksoft_dirty(pte);
> >  					set_pte_at(src_mm, addr, src_pte, pte);
> >  				}
> >  			}
> 
> When we convert pte to swap_entry, we convert soft-dirty bit in
> pte_to_swp_entry(). So I think that it's better to convert it back
> in swp_entry_to_pte() when we do swap_entry-to-pte conversion.

No, soft dirty bit lays _only_ inside pte entry in memory, iow
swp_entry_t never has this bit, thus to be able to find soft dirty
status in swp_entry_to_pte you need to extend this function and
pass pte entry itself as an argument, which eventually will bring
more massive patch and will be a way more confusing I think.

Or I misunderstood you?
--
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