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] [day] [month] [year] [list]
Message-ID: <5045C06F.4000507@gmail.com>
Date:	Tue, 04 Sep 2012 16:48:47 +0800
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Jiri Kosina <jkosina@...e.cz>
CC:	Xin Tong <xerox.time.tech@...il.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: linux page table

On 09/03/2012 02:26 AM, Jiri Kosina wrote:
> On Sun, 2 Sep 2012, Xin Tong wrote:
>
>>>> 3. can two different processes have their CR3 being the same value
>>>> even though they have different first level page tables ?
>>>
>>> Yes, if they are created by clone(CLONE_VM). In such case they share the
>>> same mm_struct, and therefore mm_struct->pgd (which is exactly what is
>>> loaded into cr3 in switch_mm()) is the same.
>>>
>>
>> Is this the COW mechanism in linux. what if the cloned process need to
>> have set of its own pages later. do the CR3s for the 2 processes
>> become different at that point ?
>
> That is a different story. COW is applied on fork() (i.e. spawning new
> process), not on clone(CLONE_VM) (i.e. spawning new thread).
>

Yeah, and unshare(2) does not implement the flag that reverses the 
effects of CLONE_VM.

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