<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://criu.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ktkhai</id>
	<title>CRIU - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://criu.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ktkhai"/>
	<link rel="alternate" type="text/html" href="https://criu.org/Special:Contributions/Ktkhai"/>
	<updated>2026-05-13T15:01:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.6</generator>
	<entry>
		<id>https://criu.org/index.php?title=Upstream_kernel_commits&amp;diff=4535</id>
		<title>Upstream kernel commits</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Upstream_kernel_commits&amp;diff=4535"/>
		<updated>2018-03-01T08:11:10Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: /* Merged patches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
  NOTE: to figure out which kernel version a commit was included into, please use&lt;br /&gt;
  git describe --contains COMMITID&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pending patches ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Reference&lt;br /&gt;
! Description&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/avagin/linux-task-diag/commits/task-diag-v3-devel v3-devel], [https://lkml.org/lkml/2015/7/6/142 v2], [http://lwn.net/Articles/633622/ v1] || kernel: add a netlink interface to get information about processes || ?&lt;br /&gt;
|-&lt;br /&gt;
|[https://lkml.org/lkml/2016/6/28/801 lkml] || fs: allow to use dirfd as root for openat and other *at syscalls || ?&lt;br /&gt;
|-&lt;br /&gt;
|[https://lkml.org/lkml/2017/1/23/712 lkml] || [PATCH] mnt: allow to add a mount into an existing group || &lt;br /&gt;
|-&lt;br /&gt;
|[https://lkml.org/lkml/2017/4/14/138 lkml] || ARM/shmem: Drop page coloring align for non-VIPT CPUs || ?&lt;br /&gt;
|-&lt;br /&gt;
|[https://lkml.org/lkml/2017/5/9/634 lkml] || fs: add an ioctl to get an owning userns for a superblock || ?&lt;br /&gt;
|-&lt;br /&gt;
|[https://lkml.org/lkml/2018/2/27/78 lkml] || userfaultfd: non-cooperative: syncronous events || ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Merged patches ==&lt;br /&gt;
&lt;br /&gt;
This table lists CRIU-related kernel commits already merged to vanilla.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; class=&amp;quot;unsortable&amp;quot; | Commit&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; class=&amp;quot;unsortable&amp;quot; | Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Kernel version&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|7773fbc541}} || procfs: make proc_get_link to use dentry instead of inode || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|640708a2cf}} || procfs: introduce the /proc/&amp;lt;pid&amp;gt;/map_files/ directory || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|067bce1a06}} || c/r: introduce CHECKPOINT_RESTORE symbol || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|028ee4be34}} || c/r: prctl: add PR_SET_MM codes to set up mm_struct entries || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b3f7f573a2}} || c/r: procfs: add start_data, end_data, start_brk members to /proc/$pid/stat v4 || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b8f566b04d}} || sysctl: add the kernel.ns_last_pid control || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|c9da99e647}} || unix_diag: Fixup RQLEN extension report || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|885ee74d5d}} || af_unix: Move CINQ/COUTQ code to helpers || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|257b529876}} || unix_diag: Add the MEMINFO extension || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|c0636faa53}} || inet_diag: Add the SKMEMINFO extension || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|5d2e5f274f}} || sock_diag: Introduce the meminfo nla core (v2) || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|288461e154}} || unix_diag: Include unix_diag.h into header-y target || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|e6fe2371bd}} || sock_diag: Arrange sock_diag.h such that it is exportable to userspace || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|e09e9d189b}} || unix: If we happen to find peer NULL when diag dumping, write zero. || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|3b0723c12e}} || unix_diag: Fix incoming connections nla length  || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|2ea744a583}} || net: unix -- Add missing module.h inclusion || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|5d531aaa64}} || unix_diag: Write it into kbuild || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|cbf391958a}} || unix_diag: Receive queue lenght NLA || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|2aac7a2cb0}} || unix_diag: Pending connections IDs NLA || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|ac02be8d96}} || unix_diag: Unix peer inode NLA || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|5f7b056946}} || unix_diag: Unix inode info NLA || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|f5248b48a6}} || unix_diag: Unix socket name NLA || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|5d3cae8bc3}} || unix_diag: Dumping exact socket core || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|45a96b9be6}} || unix_diag: Dumping all sockets core || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|22931d3b90}} || unix_diag: Basic module skeleton || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|fa7ff56f75}} || af_unix: Export stuff required for diag module || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|f65c1b534b}} || sock_diag: Generalize requests cookies managements || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|aec8dc62f6}} || sock_diag: Fix module netlink aliases || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|e7c466e58e}} || sock_diag: Move the SOCK_DIAG_BY_FAMILY cmd declaration || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|86e62ad6b2}} || udp_diag: Fix the !ipv6 case || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|b872a2371f}} || udp_diag: Make it module when ipv6 is a module || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|507dd7961e}} || udp_diag: Wire the udp_diag module into kbuild || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|b6d640c228}} || udp_diag: Implement the dump-all functionality || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|a925aa00a5}} || udp_diag: Implement the get_exact dumping functionality || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|52b7c59bc3}} || udp_diag: Basic skeleton || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|fce823381e}} || udp: Export code sk lookup routines || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|1942c518ca}} || inet_diag: Generalize inet_diag dump and get_exact calls || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|3c4d05c805}} || inet_diag: Introduce the inet socket dumping routine || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|8d07d1518a}} || inet_diag: Introduce the byte-code run on an inet socket || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|efb3cb428d}} || inet_diag: Split inet_diag_get_exact into parts || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|476f7dbff3}} || inet_diag: Split inet_diag_get_exact into parts || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|b005ab4ef8}} || inet_diag: Export inet diag cookie checking routine || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|87c22ea52e}} || inet_diag: Reduce the number of args for bytecode run routine || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|7b35eadd7e}} || inet_diag: Remove indirect sizeof from inet diag handlers || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|8ef874bfc7}} || sock_diag: Move the sock_ code to net/core/ || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|a029fe26b6}} || inet_diag: Cleanup type2proto last user || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|d23deaa07b}} || inet_diag: Introduce socket family checks || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|25c4cd2b6d}} || inet_diag: Switch the _dump to work with new header || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|fe50ce2846}} || inet_diag: Switch the _get_exact to work with new header || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|126fdc3249}} || inet_diag: Introduce new inet_diag_req header || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|d366477a52}} || sock_diag: Initial skeleton || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|f13c95f0e2}} || inet_diag: Switch from _GETSOCK to IPPROTO_ numbers || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|37f352b5e3}} || inet_diag: Move byte-code finding up the call-stack || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|8d34172dfd}} || sock_diag: Introduce new message type || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|818411616b}} || fs, proc: Introduce /proc/&amp;lt;pid&amp;gt;/task/&amp;lt;tid&amp;gt;/children entry v9 || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|5b172087f9}} || c/r: procfs: add arg_start/end, env_start/end and exit_code members || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|fe8c7f5cbf}} || c/r: prctl: Extend PR_SET_MM to set up more mm_struct entries || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|d97b46a646}} || syscalls, x86: Add __NR_kcmp syscall || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b32dfe3771}} || c/r: prctl: Add ability to set new mm_struct::exe_file || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|79f0713d40}} || prctl: Use CAP_SYS_RESOURCE for PR_SET_MM option || 3.3&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|300f786b26}} || prctl: add ability to get clear_tid_address || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|4934b0329f}} || datagram: Factor out sk queue referencing || 3.4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|3f518bf745}} || datagram: Add offset argument to __skb_recv_datagram || 3.4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|da5ef6e51b}} || skb: Add skb_peek_next helper || 3.4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ef64a54f6e}} || sock: Introduce the SO_PEEK_OFF sock option || 3.4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|f55bb7f9cb}} || unix: Support peeking offset for datagram and seqpacket sockets || 3.4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|fc0d753641}} || unix: Support peeking offset for stream sockets || 3.4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|1d151c337d}} || fcntl: Add F_GETOWNER_UIDS option v3 || 3.6&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|370816aef0}} || tcp: Move code around || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ee9952831c}} || tcp: Initial repair mode || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c0e88ff0f2}} || tcp: Repair socket queues || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|5e6a3ce657}} || tcp: Report mss_clamp with TCP_MAXSEG option in repair mode || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b139ba4e90}} || tcp: Repair connection-time negotiated parameters || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|de248a75c3}} || tcp repair: Fix unaligned access when repairing options (v2) || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|736f24d5e5}} || c/r: prctl: Drop VMA flags test on PR_SET_MM_ stack data assignment || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|5702c5eeab}} || c/r: prctl: Move PR_GET_TID_ADDRESS to a proper place || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|16fbdce62d}} || proc: report file/anon bit in /proc/pid/pagemap || 3.4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|bca1554373}} || proc/smaps: show amount of nonlinear ptes in vma || 3.5&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b14f243a42}} || net: Dont use ifindices in hash fns || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|9c7dafbfab}} || net: Allow to create links with given ifindex || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e6f8f1a739}} || veth: Allow to create peer link with given ifindex || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|aa79e66eee}} || net: Make ifindex generation per-net namespace || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|1fb9489bf1}} || net: Loopback ifindex is constant now || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|faf60af17f}} || procfs: Move /proc/pid/fd[info] handling code to fd.[ch] || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ddd3e0771b}} || procfs: Convert /proc/pid/fdinfo/ handling routines to seq-file || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|55985dd72a}} || procfs: Add ability to plug in auxiliary fdinfo providers || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|cbac5542d4}} || fs, eventfd: Add procfs fdinfo helper || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|138d22b586}} || fs, epoll: Add procfs fdinfo helper v2 || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|711c7bf991}} || fs, exportfs: Add export_encode_inode_fh helper || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|be77196b80}} || fs, notify: Add procfs fdinfo helper || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e6dbcafb74}} || fs, fanotify: Add @mflags field to fanotify output || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|2787b04b6c}} || packet: Introduce net/packet/internal.h header || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|96ec632714}} || packet: Diag core and basic socket info dumping || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|8a360be0c5}} || packet: Report more packet sk info via diag module || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|eea68e2f1a}} || packet: Report socket mclist info via diag module || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|16f01365fa}} || packet: Report rings cfg via diag engine || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|fff3321d75}} || packet: Report fanout status via diag engine || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|0fa7fa98db}} || packet: Protect packet sk list with mutex (v2) || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|579035dc5d}} || kernel: limit a value of ns_last_pid to (0, max_pid) || 3.6&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|bc26ccd8fc}} || tcp: restore rcv_wscale in a repair mode (v2) || 3.6&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|f7b86bfe8d}} || sockopt: Make SO_BINDTODEVICE readable || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e4e541a848}} || sock-diag: Report shutdown for inet and unix sockets (v2) || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|834f82e2aa}} || procfs: add VmFlags field in smaps output || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|06026d911c}} || tty: pty - Move TIOCPKT handling into pty.c || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c6298038bc}} || tty, ioctls -- Add new ioctl definitions for tty flags fetching || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|84fd7bdf12}} || tty: Add get- ioctls to fetch tty status v3 || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|a8fc927780}} || sk-filter: Add ability to get socket filter program (v2) || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|cacb6ba0f3}} || net: inet_diag -- Return error code if protocol handler is missed || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c454e6111d}} || tcp-repair: Handle zero-length data put in rcv queue || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ec34232575}} || tcp: fix retransmission in repair mode || 3.7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|2b9164771e}} || ipv6: adapt connect for repair move || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c91f6df2db}} || sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|3fcfe78658}} || ipc: add more comments to message copying related code || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|51eeacaa07}} || ipc: simplify message copying || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b30efe2775}} || ipc: convert prepare_copy() from macro to function || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|85398aa8de}} || ipc: simplify free_copy() call || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|3a665531a3}} || selftests: IPC message queue copy feature test || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|4a674f34ba}} || ipc: introduce message queue copy feature || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|f9dd87f473}} || ipc: message queue receive cleanup || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|03f5956680}} || ipc: add sysctl to specify desired next object id || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|9afdacda02}} || ipc: remove forced assignment of selected message || 3.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|3f7d1fe108}} || arm: Wire up kcmp syscall || 3.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|1e142b29e2}} || kcmp: make it depend on CHECKPOINT_RESTORE || 3.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ceaa1fef65}} || tcp: adding a per-socket timestamp offset || 3.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|93be6ce0e9}} || tcp: set and get per-socket timestamp || 3.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ee684b6f28}} || tcp: send packets with a socket timestamp || 3.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|66dd34ad}} || signal: allow to send any siginfo to itself || 3.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ae5fc987}} || net: fix *_DIAG_MAX constants || 3.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|0f29c768}} || net: prepare netlink code for netlink diag || 3.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|eaaa3139}} || netlink: Diag core and basic socket info dumping (v2) || 3.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|84c751bd}} || ptrace: add ability to retrieve signals without removing from a queue (v4) || 3.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|040fa020}} || clear_refs: Sanitize accepted commands declaration || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|af9de7eb}} || clear_refs: Introduce private struct for mm_walk || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|2b0a9f01}} || pagemap-introduce-pagemap_entry_t-without-pmshift-bits || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|0f8975ec}} || mm: soft-dirty bits for user memory changes tracking || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|541c237c}} || pagemap: prepare to reuse constant bits with page-shift || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|57b8015e}} || posix-timers: Show sigevent info in proc file || 3.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|48f6a7a5}} || posix-timers: Introduce /proc/PID/timers file || 3.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|5ed67f05}} || posix timers: Allocate timer id per process (v2) || 3.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|15ef0298}} || posix-timers: Show clock ID in proc file || 3.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|29000cae}} || ptrace: add ability to get/set signal-blocked mask (v2) || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|274038f8}} || tun: Report &amp;quot;persist&amp;quot; flag to userspace || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|179ef71c}} || mm: Save soft-dirty bits on swapped pages || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|41bb3476}} || mm: Save soft-dirty bits on file pages || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|76975e9c}} || tun: Get skfilter layout || 3.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|849c9b6f}} || tun: Allow to skip filter on attach || 3.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|3d407a80}} || tun: Report whether the queue is attached or not || 3.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|fb7589a1}} || tun: Add ability to create tun device with given index || 3.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e3e12028}} || tcp: don't apply tsoffset if rcv_tsecr is zero || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c7781a6e}} || tcp: initialize rcv_tstamp for restored sockets || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|7ed5c5ae}} || tcp: set timestamps for restored skb-s || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|6dec97dc}} || mm: move_ptes -- Set soft dirty bit depending on pte type || 3.11&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c3d16e16}} || mm: migration -- Do not loose soft dirty bit if page is in migration state || 3.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e9cdd6e7}} || mm: pagemap -- Inspect _PAGE_SOFT_DIRTY only on present pages || 3.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|dbde4979}} || tcp: don't update snd_nxt, when a socket is switched from repair mode || 3.13&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|d9104d1c}} || mm: track vma changes with VM_SOFTDIRTY bit || 3.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|34228d47}} || mm: Ignore VM_SOFTDIRTY on VMA merging || 3.14, 3.13-stable&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|24f91eba1}} || mm: don't lose the SOFT_DIRTY flag on mprotect || 3.14, 3.13-stable&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|49d063cb3}} || proc: show mnt_id in /proc/pid/fdinfo || 3.15&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|0bf073315}} || mm: Make freshly remapped file pages being softdirty unconditionally || 3.16&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|9aed8614a}} || mm: Don't forget to set softdirty on file mapped fault || 3.17&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b43790eed}} || mm: Don't forget to save file map softdiry bit on unmap || 3.16&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c86c97ff4}} || mm: Clear VM_SOFTDIRTY flag inside clear_refs_write instead of clear_soft_dirty || 3.16&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|af9c4957c}} || timerfd: Implement show_fdinfo method || 3.17&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|854d06d9f}} || docs: Procfs -- Document timerfd output || 3.17&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|5442e9fbd}} || timerfd: Implement timerfd_ioctl method to restore timerfd_ctx::ticks, v3 || 3.17&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|64e455079}} || mm: softdirty: enable write notifications on VMAs after VM_SOFTDIRTY cleared || 3.18&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|9c5990240}} || mm: introduce check_data_rlimit helper || 3.18&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|8764b338b}} || mm: use may_adjust_brk helper || 3.18&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|71fe97e18}} || prctl: PR_SET_MM -- factor out mmap_sem when updating mm::exe_file || 3.18&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|f606b77f1}} || prctl: PR_SET_MM -- introduce PR_SET_MM_MAP operation || 3.18&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|a3816ab0e}} || fs: Convert show_fdinfo functions to void || 3.19&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|9183df25f}} || shm: add memfd_create() syscall || 3.17&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e4a0d3e72}} || aio: Make it possible to remap aio ring || 3.19&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|6c8c90319}} || proc: show locks in /proc/pid/fdinfo/X || 4.1&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|155e35d4d}} || VFS: Introduce inode-getting helpers for layered/unioned fs environments || 4.0&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|df1a085af}} || VFS: Add a fallthrough flag for marking virtual dentries || 4.0&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|f25801ee4}} || overlay: Call ovl_drop_write() earlier in ovl_dentry_open() || 4.2-rc2&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|4bacc9c92}} || overlayfs: Make f_path always point to the overlay and f_inode to the underlay || 4.2-rc2&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|9391dd00d}} || fix a braino in ovl_d_select_inode() || 4.2-rc2&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|13c4a9011}} || seccomp: add ptrace options for suspend/resume || 4.3-rc1&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|bab189918}} || bpf, seccomp: prepare for upcoming criu support || 4.4-rc1&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|f8e529ed9}} || seccomp, ptrace: add support for dumping seccomp filters || 4.4-rc1&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c83aa55d0}} || autofs: show pipe inode in mount options || 4.6-rc4&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b1ed4c4fa}} || tcp: add an ability to dump and restore window parameters || 4.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|b059a453b}} || x86/vdso: Add mremap hook to vm_special_mapping || 4.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|f80fd3a5f}} || selftests/x86: Add vDSO mremap() test || 4.8&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e38447ee1}} || x86/vdso: Unmap vdso blob on vvar mapping failure || 4.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|576ebfefd}} || x86/vdso: Replace calculate_addr in map_vdso() with addr || 4.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|2eefd8789}} || x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_* || 4.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|90954e7b9}} || x86/coredump: Use pr_reg size, rather that TIF_IA32 flag || 4.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|cc87324b3}} || x86/ptrace: Down with test_thread_flag(TIF_IA32) || 4.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|684635105}} || x86/signal: Add SA_{X32,IA32}_ABI sa_flags || 4.9&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ed1e7db33}} || x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi() || v4.9-rc2&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|7b2dd3682}} || x86/coredump: Always use user_regs_struct for compat_elf_gregset_t || v4.9-rc7&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|432490f9d}} || net: ip, diag -- Add diag interface for raw sockets || v4.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|cd05a0eca}} || net: ip, raw_diag -- Fix socket leaking for destroy request || v4.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|3de864f8c}} || net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect || v4.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|9999370fa}} || net: ip, raw_diag -- Use jump for exiting from nested loop || v4.10&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|c62cce2ca}} || net: add an ioctl to get a socket network namespace || v4.10-rc1&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|319b0534b9}} || tcp: allow to enable the repair mode for non-listening sockets || v4.10-rc1&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|ba94f3088b}} || unix: add ioctl to open a unix socket file with O_PATH ||&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|6a0b41d1e2}} || x86/mm: Introduce arch_rnd() to compute 32/64 mmap random base || 4.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|8f3e474f3c}} || x86/mm: Add task_size parameter to mmap_base() || 4.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|1b028f784e}} || x86/mm: Introduce mmap_compat_base() for 32-bit mmap() || 4.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|3e6ef9c809}} || x86/mm: Make mmap(MAP_32BIT) work correctly || 4.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|e13b73dd9c}} || x86/hugetlb: Adjust to the new native/compat mmap bases || 4.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|ada26481df}} || x86/mm: Make in_compat_syscall() work during exec || 4.12&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|280e87e98c}} || ARM32: Support mremap() for sigpage/vDSO || 4.13&lt;br /&gt;
|-&lt;br /&gt;
|{{torvalds.git|739586951b}} || arm64/vdso: Support mremap() for vDSO || 4.14-rc1&lt;br /&gt;
|-&lt;br /&gt;
|{{net-next.git|f2780d6d74}} || tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device || 4.17-rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Service_descriptors&amp;diff=4518</id>
		<title>Service descriptors</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Service_descriptors&amp;diff=4518"/>
		<updated>2018-01-17T08:38:25Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are the fds that help us to do checkpoint and restore. There must be only files, which are used by criu frequently, and it's difficult to obtain them by another way. The number of service fds on restore is significant, as they make file table grow, so service fds may increase memory usage after restore in comparison to dump. Other common used on restore files should be placed in fdstore instead. Note, that not all members of enum sfd_type from criu/include/servicefd.h have to be there. Some of them must go to fdstore sometimes.&lt;br /&gt;
&lt;br /&gt;
==Restore==&lt;br /&gt;
*We try to place service fds as low as possible to minimize memory overhead. Per-fdtable variable service_fd_base points to the biggest service fd number. It's being chosen in choose_service_fd_base() in dependence of max file descriptor used by task.&lt;br /&gt;
&lt;br /&gt;
*Since ordinary files, which are open on restore, may be bigger than service_fd_base, there is code parts where service fds mustn't be modified at all. We mask such areas via sfds_protected variable, and they aborts restore if modifications of sfds are found in such code parts.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=TCP_connection&amp;diff=4490</id>
		<title>TCP connection</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=TCP_connection&amp;diff=4490"/>
		<updated>2017-11-21T09:19:50Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: /* TCP_SYN_SENT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how we handle established TCP connections.&lt;br /&gt;
&lt;br /&gt;
== TCP repair mode in kernel ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;TCP_REPAIR&amp;lt;/code&amp;gt; socket option was added to the kernel 3.5 to help with C/R for TCP sockets.&lt;br /&gt;
&lt;br /&gt;
When this option is used, a socket is switched into a special mode, in which any action performed on it&lt;br /&gt;
does not result in anything defined by an appropriate protocol actions, but rather directly puts the socket&lt;br /&gt;
into a state, in which the socket is expected to be at the end of the successfully finished operation.&lt;br /&gt;
&lt;br /&gt;
For example, calling &amp;lt;code&amp;gt;connect()&amp;lt;/code&amp;gt; on a repaired socket just changes its state to &amp;lt;code&amp;gt;ESTABLISHED&amp;lt;/code&amp;gt;,&lt;br /&gt;
with the peer address set as requested.&lt;br /&gt;
The &amp;lt;code&amp;gt;bind()&amp;lt;/code&amp;gt; call forcibly binds the socket to a given address (ignoring any potential conflicts).&lt;br /&gt;
The &amp;lt;code&amp;gt;close()&amp;lt;/code&amp;gt; call closes the socket without any transient &amp;lt;code&amp;gt;FIN_WAIT&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;TIME_WAIT&amp;lt;/code&amp;gt;/etc states,&lt;br /&gt;
socket is silently killed.&lt;br /&gt;
&lt;br /&gt;
=== Sequences ===&lt;br /&gt;
&lt;br /&gt;
To restore the connection properly, bind() and connect() is not enough. One also needs to restore the&lt;br /&gt;
TCP sequence numbers. To do so, the &amp;lt;code&amp;gt;TCP_REPAIR_QUEUE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;TCP_QUEUE_SEQ&amp;lt;/code&amp;gt; options were introduced.&lt;br /&gt;
&lt;br /&gt;
The former one selects which queue (input or output) will be repaired and the latter gets/sets the sequence. Note&lt;br /&gt;
setting the sequence is only possible on CLOSE-d socket.&lt;br /&gt;
&lt;br /&gt;
=== Packets in queue ===&lt;br /&gt;
&lt;br /&gt;
When set the queue to repair as described above, one can call recv or send syscalls on a repaired socket. Both calls&lt;br /&gt;
result on peeking or poking data from/to the respective queue. This sounds funny, but yes, for repaired socket one&lt;br /&gt;
can receve the outgoing and send the incoming queues. Using the &amp;lt;code&amp;gt;MSG_PEEK&amp;lt;/code&amp;gt; flag for &amp;lt;code&amp;gt;recv()&amp;lt;/code&amp;gt; is required.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
There are 4 options that are negotiated by the socket at the connecting stage. These are&lt;br /&gt;
&lt;br /&gt;
* mss_clamp -- the maximum size of the segment peer is ready to accept&lt;br /&gt;
* snd _scale -- the scale factor for a window&lt;br /&gt;
* sack -- whether selective acks are permitted or not&lt;br /&gt;
* tstamp -- whether timestamps on packets are supported&lt;br /&gt;
&lt;br /&gt;
All four can be read with &amp;lt;code&amp;gt;getsockopt()&amp;lt;/code&amp;gt; calls to a socket and in order to restore them the &amp;lt;code&amp;gt;TCP_REPAIR_OPTIONS&amp;lt;/code&amp;gt; sockoption is introduced.&lt;br /&gt;
&lt;br /&gt;
== Timestamp ==&lt;br /&gt;
&amp;quot;The sender's timestamp clock is used as a source of monotonic non-decreasing values to stamp the segments&amp;quot;(rfc7323). The Linux kernel uses the jiffies counter as the tcp timestamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#define tcp_time_stamp          ((__u32)(jiffies))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We add the &amp;lt;code&amp;gt;TCP_TIMESTAMP&amp;lt;/code&amp;gt; options to be able to compensate a difference between jiffies counters, when a connection is migrated on another host. When a connection is dumped, criu calls &amp;lt;code&amp;gt;getsockopt(TCP_TIMESTAMP)&amp;lt;/code&amp;gt; to get a current timestamp, then on restore it calls &amp;lt;code&amp;gt;setsockopt(TCP_TIMESTAMP)&amp;lt;/code&amp;gt; to set this timestamp as a starting point.&lt;br /&gt;
&lt;br /&gt;
== Checkpoint and restore TCP connection ==&lt;br /&gt;
&lt;br /&gt;
With the above sockoptions dumping and restoring TCP connection becomes possible. The criu just reads the socket&lt;br /&gt;
state and restores it back letting the protocol resurrect the data sequence.&lt;br /&gt;
&lt;br /&gt;
One thing to note here — while the socket is closed between dump and restore the connection should be &amp;quot;locked&amp;quot;, i.e.&lt;br /&gt;
no packets from peer should enter the stack, otherwise the RST will be sent by a kernel. In order to do so a simple&lt;br /&gt;
netfilter rule is configured that drops all the packets from peer to a socket we're dealing with. This rule sits&lt;br /&gt;
in the host netfilter tables after the criu dump command finishes and it should be there when you issue the&lt;br /&gt;
criu restore one.&lt;br /&gt;
&lt;br /&gt;
Another thing to note is -- on restore there should be available the IP address, that was used by the connection.&lt;br /&gt;
This is automatically so if restore happens on the same box as dump. In case of hand-made live migration the&lt;br /&gt;
IP address should be copied too.&lt;br /&gt;
&lt;br /&gt;
That said, the command line option &amp;lt;code&amp;gt;--tcp-established&amp;lt;/code&amp;gt; should be used when calling criu to explicitly state, that the&lt;br /&gt;
caller is aware of this &amp;quot;transitional&amp;quot; state of the netfilter.&lt;br /&gt;
&lt;br /&gt;
In case the target process lives in NET namespace the connection locking happens the other way. Instead of&lt;br /&gt;
per-connection iptables rules the &amp;quot;network-lock&amp;quot;/&amp;quot;network-unlock&amp;quot; [[action scripts]] are called so that the user&lt;br /&gt;
could isolate the whole netns from network. Typically this is done by downing the respective veth pair end.&lt;br /&gt;
&lt;br /&gt;
== States ==&lt;br /&gt;
=== TCP_SYN_SENT ===&lt;br /&gt;
There is only one difference with TCP_ESTABLISHED, we have to restore a socket and disable the repair mode before calling &amp;lt;code&amp;gt;connect()&amp;lt;/code&amp;gt;. The kernel will send a one syn-sent packet with the same initial sequence number and sets the TCP_SYN_SENT state for the socket.&lt;br /&gt;
&lt;br /&gt;
=== Half-closed sockets ===&lt;br /&gt;
A socket is half-closed when it sent or received a fin packet. These sockets are in one for these states: TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_CLOSING, TCP_LAST_ACL, TCP_CLOSE_WAIT. To restore these states, we restore a socket into the TCP_ESTABLISHED state and then we call shutfown(SHUT_WR), if a socket has sent a fin packet and we send a fake fin packet, if a socket has received it before. For example, if we want to restore the TCP_FIN_WAIT1 state, we have to call shutfown(SHUT_WR) and we can send a fake ack to the fin packet to restore the TCP_FIN_WAIT2 state.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Simple TCP pair]]&lt;br /&gt;
* [[TCP repair TODO]]&lt;br /&gt;
* [[CLI/opt/--tcp-close|Dropping the connection]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* http://lwn.net/Articles/495304/&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Sockets]]&lt;br /&gt;
[[Category: Editor help needed]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4190</id>
		<title>Fdinfo engine</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4190"/>
		<updated>2017-04-25T16:02:18Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Masters and slaves =&lt;br /&gt;
# A file may be referred by several file descriptors. The descriptors may belong to a single process or to several processes.&lt;br /&gt;
# Group of descriptors referring to the same file is called shared. One of the descriptors is named master, others are slaves.&lt;br /&gt;
# Every descriptor is discribed via struct fdinfo_list_entry (fle).&lt;br /&gt;
# One process opens a master fle of a file, while other processes, sharing the file, obtain it using scm_rights. See send_fds() and receive_fds() for the details.&lt;br /&gt;
&lt;br /&gt;
= Per-process files restore =&lt;br /&gt;
Every file types is described via structure file_desc. We sequentially call file_desc::ops::open(struct file_desc *d, int *new_fd) method for every master file of a process until all masters are restored. The open methods may return three values:&lt;br /&gt;
*  0  -- restore of the master file is successefuly finished;&lt;br /&gt;
*  1  -- restore is in progress or it can't be started yet, because of it depends on another files, so the method should be called once again;&lt;br /&gt;
* -1 -- restore failed.&lt;br /&gt;
&lt;br /&gt;
Right after a file is open at first time, the open method must return fd value in new_fd argument. This allows the common code to send this master to other processes to reopen the master as a slave as soon as possible. The same time, returning of not-negative new_fd does not mean, that the master is restored. The open() callback may return not-negative new_fd and &amp;quot;1&amp;quot; as return value at the same time.&lt;br /&gt;
&lt;br /&gt;
Example. Restore of connected unix socket by open() method.&lt;br /&gt;
*1)Open a socket, write its file descriptor to new_fd and return 1.&lt;br /&gt;
*2)Check if peer socket is open and bound. If it's not so, then return 1 and repeat step &amp;quot;2&amp;quot; in next time.&lt;br /&gt;
*3)Connect to the peer and return 0.&lt;br /&gt;
&lt;br /&gt;
Note: it's also possible to go to step &amp;quot;2&amp;quot; right after new_fd is written.&lt;br /&gt;
&lt;br /&gt;
The peer, which bind() the socket waits in &amp;quot;2&amp;quot;, must notify the socket, when it is bound:&lt;br /&gt;
*1)bind(&amp;lt;peer name&amp;gt;);&lt;br /&gt;
*2)set_fds_event(&amp;lt;socket pid&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
# Slave TTY can only be created after respective master peer is restored. But now we wait even more -- till all masters are restored.&lt;br /&gt;
# CTTY must be created after all other TTYs are restored. For all tty dependencies see tty_deps_restored() for the details.&lt;br /&gt;
# Epoll can be created in any time, but it can add a fd in its polling list after the corresponding fle is completely restored. The only exception is a epoll listening other epoll. In this case we wait till listened fle is just created (not restored). See epoll_not_ready_tfd().&lt;br /&gt;
# Unix socket must wait a peer before connect to it. See peer_is_not_prepared() for the details.&lt;br /&gt;
# TCP sockets have a counter on address use.&lt;br /&gt;
# Implementing a new relationships between fle stages, check, that you are not introducing a circular dependence (with existing).&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
# Pipes (and fifos), unix sockets and TTYs generate two fds in their -&amp;gt;open callbacls, the 2nd one can conflict with some other fd the task restores and (!) this &amp;quot;2nd one&amp;quot; may require sending to some other task.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4189</id>
		<title>Fdinfo engine</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4189"/>
		<updated>2017-04-25T15:34:41Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Masters and slaves =&lt;br /&gt;
# A file may be referred by several file descriptors. The descriptors may belong to a single process or to several processes.&lt;br /&gt;
# Group of descriptors referring to the same file is called shared. One of the descriptors is named master, others are slaves.&lt;br /&gt;
# Every descriptor is discribed via struct fdinfo_list_entry (fle).&lt;br /&gt;
# One process opens a master fle of a file, while other processes, sharing the file, obtain it using scm_rights. See send_fds() and receive_fds() for the details.&lt;br /&gt;
&lt;br /&gt;
= Per-process files restore =&lt;br /&gt;
Every file types is described via structure file_desc. We sequentially call file_desc::ops::open(struct file_desc *d, int *new_fd) method for every master file of a process until all masters are restored. The open methods may return three values:&lt;br /&gt;
*  0  -- restore of the master file is successefuly finished;&lt;br /&gt;
*  1  -- restore is in progress or it can't be started yet, because of it depends on another files, so the method should be called once again;&lt;br /&gt;
* -1 -- restore failed.&lt;br /&gt;
&lt;br /&gt;
Right after a file is open at first time, the open method must return fd value in new_fd argument. This allows the common code to send this master to other processes to reopen the master as a slave as soon as possible. The same time, returning of not-negative new_fd does not mean, that the master is restored. The open() callback may return not-negative new_fd and &amp;quot;1&amp;quot; as return value at the same time.&lt;br /&gt;
&lt;br /&gt;
Example. Restore of connected unix socket by open() method.&lt;br /&gt;
*1)Open a socket, write its file descriptor to new_fd and return 1.&lt;br /&gt;
*2)Check if peer socket is open and bound. If it's not so, then return 1 and repeat step &amp;quot;2&amp;quot; in next time.&lt;br /&gt;
*3)Connect to the peer and return 0.&lt;br /&gt;
&lt;br /&gt;
Note: it's also possible to go to step &amp;quot;2&amp;quot; right after new_fd is written.&lt;br /&gt;
&lt;br /&gt;
The peer, which bind() the socket waits in &amp;quot;2&amp;quot;, must notify the socket, when it is bound:&lt;br /&gt;
*1)bind(&amp;lt;peer name&amp;gt;);&lt;br /&gt;
*2)set_fds_event(&amp;lt;socket pid&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
# Slave TTY can only be created after respective master peer are restored. But now we wait even more -- till all masters are restored.&lt;br /&gt;
# CTTY must be created after all other TTYs are restored. For all tty dependencies see tty_deps_restored() for the details.&lt;br /&gt;
# Epoll can be created in any time, but it can add a fd in its polling list, after the corresponding fle is completely restored. The only exception is a epoll listening other epoll. In this case we wait till listened fle is just created (not restored). See epoll_not_ready_tfd().&lt;br /&gt;
# Unix socket must wait a peer before connect to it. See peer_is_not_prepared() for the details.&lt;br /&gt;
# TCP sockets have a counter on address use.&lt;br /&gt;
# Implementing a new relationships between fle stages, check, that you are not introducing a circular dependence (with existing).&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
# Pipes (and fifos), unix sockets and TTYs generate two fds in their -&amp;gt;open callbacls, the 2nd one can conflict with some other fd the task restores and (!) this &amp;quot;2nd one&amp;quot; may require sending to some other task.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4188</id>
		<title>Fdinfo engine</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4188"/>
		<updated>2017-04-25T15:10:46Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: /* Per-process files restore */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Masters and slaves =&lt;br /&gt;
# A file may be referred by several file descriptors. The descriptors may belong to a single process or to several processes.&lt;br /&gt;
# Group of descriptors referring to the same file is called shared. One of the descriptors is named master, others are slaves.&lt;br /&gt;
# Every descriptor is discribed via struct fdinfo_list_entry (fle).&lt;br /&gt;
# One process opens a master fle of a file, while other processes, sharing the file, obtain it using scm_rights. See send_fds() and receive_fds() for the details.&lt;br /&gt;
&lt;br /&gt;
= Per-process files restore =&lt;br /&gt;
Every file types is described via structure file_desc. We sequentially call file_desc::ops::open(struct file_desc *d, int *new_fd) method for every master file of a process until all masters are restored. The open methods may return three values:&lt;br /&gt;
*  0  -- restore of the master file is successefuly finished;&lt;br /&gt;
*  1  -- restore is in progress or it can't be started yet, because of it depends on another files, so the method should be called once again;&lt;br /&gt;
* -1 -- restore failed.&lt;br /&gt;
&lt;br /&gt;
Right after a file is open at first time, the open method must return fd value in new_fd argument. This allows the common code to send this master to other processes to reopen the master as a slave as soon as possible. The same time, returning of not-negative new_fd does not mean, that the master is restored. The open() callback may return not-negative new_fd and &amp;quot;1&amp;quot; as return value at the same time.&lt;br /&gt;
&lt;br /&gt;
Example. Restore of connected unix socket by open() method.&lt;br /&gt;
*1)Open a socket, write its file descriptor to new_fd and return 1.&lt;br /&gt;
*2)Check if peer socket is open and bound. If it's not so, then return 1 and repeat step &amp;quot;2&amp;quot; in next time.&lt;br /&gt;
*3)Connect to the peer and return 0.&lt;br /&gt;
&lt;br /&gt;
Note: it's also possible to go to step &amp;quot;2&amp;quot; right after new_fd is written.&lt;br /&gt;
&lt;br /&gt;
The peer, which bind() the socket waits in &amp;quot;2&amp;quot;, must notify the socket, when it is bound:&lt;br /&gt;
*1)bind(&amp;lt;peer name&amp;gt;);&lt;br /&gt;
*2)set_fds_event(&amp;lt;socket pid&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
# Pipes (and fifos), unix sockets and TTYs generate two fds in their -&amp;gt;open callbacls, the 2nd one can conflict with some other fd the task restores and (!) this &amp;quot;2nd one&amp;quot; may require sending to some other task.&lt;br /&gt;
# Some actions can only be done only after file is created, served out and moved to proper position. E.g. epoll configuration and scheduling TCP repair off.                                            &lt;br /&gt;
# Slave TTYs can only be restored after respective master peers.&lt;br /&gt;
# CTTYs should be __created__ after all other TTYs are created, configured and served out.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4187</id>
		<title>Fdinfo engine</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4187"/>
		<updated>2017-04-25T09:15:09Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Masters and slaves =&lt;br /&gt;
# A file may be referred by several file descriptors. The descriptors may belong to a single process or to several processes.&lt;br /&gt;
# Group of descriptors referring to the same file is called shared. One of the descriptors is named master, others are slaves.&lt;br /&gt;
# Every descriptor is discribed via struct fdinfo_list_entry (fle).&lt;br /&gt;
# One process opens a master fle of a file, while other processes, sharing the file, obtain it using scm_rights. See send_fds() and receive_fds() for the details.&lt;br /&gt;
&lt;br /&gt;
= Per-process files restore =&lt;br /&gt;
Every file types is described via structure file_desc. We sequentially call file_desc::ops::open(struct file_desc *d, int *new_fd) method for every master file of a process until all masters are restored. The open methods may return three values:&lt;br /&gt;
*  0  -- restore of the master file is successefuly finished;&lt;br /&gt;
*  1  -- restore is in progress or it can't be started yet, because of it depends on another files, so the method should be called once again;&lt;br /&gt;
* -1 -- restore failed.&lt;br /&gt;
&lt;br /&gt;
Right after a file is open at first time, the open method must return fd value in new_fd argument. This allows the common code to send this master to other processes to reopen the master as a slave as soon as possible. The same time, returning of not-negative new_fd does not mean, that the master is restored. The open() callback may return not-negative new_fd and &amp;quot;1&amp;quot; as return value at the same time.&lt;br /&gt;
&lt;br /&gt;
Example. Restore of connected unix socket by open() method.&lt;br /&gt;
*1)Open a socket, write its file descriptor to new_fd and return 1.&lt;br /&gt;
*2)Check if peer socket is open and bound. If it's not so, then return 1 and repeat step &amp;quot;2&amp;quot; in next time.&lt;br /&gt;
*3)Connect to the peer and return 0.&lt;br /&gt;
&lt;br /&gt;
Note: it's also possible to go to step &amp;quot;2&amp;quot; right after new_fd is written.&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
# Pipes (and fifos), unix sockets and TTYs generate two fds in their -&amp;gt;open callbacls, the 2nd one can conflict with some other fd the task restores and (!) this &amp;quot;2nd one&amp;quot; may require sending to some other task.&lt;br /&gt;
# Some actions can only be done only after file is created, served out and moved to proper position. E.g. epoll configuration and scheduling TCP repair off.                                            &lt;br /&gt;
# Slave TTYs can only be restored after respective master peers.&lt;br /&gt;
# CTTYs should be __created__ after all other TTYs are created, configured and served out.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4186</id>
		<title>Fdinfo engine</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4186"/>
		<updated>2017-04-25T09:06:21Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Masters and slaves =&lt;br /&gt;
# A file may be referred by several file descriptors. The descriptors may belong to a single process or to several processes.&lt;br /&gt;
# Group of descriptors referring to the same file is called shared. One of the descriptors is named master, others are slaves.&lt;br /&gt;
# Every descriptor is discribed via struct fdinfo_list_entry (fle).&lt;br /&gt;
# One process opens a master fle of a file, while other processes, sharing the file, obtain it using scm_rights. See send_fds() and receive_fds() for the details.&lt;br /&gt;
&lt;br /&gt;
= Per-process files restore =&lt;br /&gt;
Every file types is described via structure file_desc. We sequentially call file_desc::ops::open(struct file_desc *d, int *new_fd) method for every master file of a process until all masters are restored. The open methods may return three values:&lt;br /&gt;
*  0  -- restore of the master file is successefuly finished;&lt;br /&gt;
*  1  -- restore is in progress or it can't be started yet, because of it depends on another files, so the method should be called once again;&lt;br /&gt;
* -1 -- restore failed.&lt;br /&gt;
&lt;br /&gt;
Right after a file is open at first time, the open method must return fd value in new_fd argument. This allows the common code to send this master to other processes to reopen the master as a slave as soon as possible. The same time, returning of not-negative new_fd does not mean, that the master is restored. The open() callback may return not-negative new_fd and &amp;quot;1&amp;quot; as return value at the same time.&lt;br /&gt;
&lt;br /&gt;
Example. Restore of connected unix socket by open() method.&lt;br /&gt;
*1)Open a socket, write its file descriptor to new_fd and return 1.&lt;br /&gt;
*2)Check if peer socket is open and bound. If it's not so, then return 1 and repeat step &amp;quot;2&amp;quot; in next time.&lt;br /&gt;
*3)Connect to the peer and return 0.&lt;br /&gt;
&lt;br /&gt;
Note: it's also possible to go to step &amp;quot;2&amp;quot; right after new_fd is written.&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
# Pipes (and fifos), unix sockets and TTYs generate two fds in their -&amp;gt;open callbacls, the 2nd one can conflict with some other fd the task restores and (!) this &amp;quot;2nd one&amp;quot; may require sending to some other task. This imposes another requirement on the 3-stages engine described above.                                                                                   &lt;br /&gt;
# Some actions can only be done only after file is created, served out    and moved to proper position. E.g. epoll configuration and scheduling    TCP repair off. Thus the -&amp;gt;post_open call :( and separate queue for   epoll fds.                                                                                                                                                 &lt;br /&gt;
# Slave TTYs can only be restored after respective master peers. Take into account the issue #2, this results in 3rd queue for slave TTYs.&lt;br /&gt;
# CTTYs should be __created__ after all other TTYs are created, configured and served out. Thus separate stages (not only queue) for CTTYs.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4185</id>
		<title>Fdinfo engine</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4185"/>
		<updated>2017-04-25T08:59:20Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: /* Masters and slaves */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Masters and slaves =&lt;br /&gt;
# A file may be referred by several file descriptors. The descriptors may belong to a single process or to several processes.&lt;br /&gt;
# Group of descriptors referring to the same file is called shared. One of them called master, others are slaves.&lt;br /&gt;
# Every descriptor is discribed via struct fdinfo_list_entry.&lt;br /&gt;
# Shared file descriptors are distributed between tasks using scm_rights. See send_fds() and receive_fds() for the details.&lt;br /&gt;
&lt;br /&gt;
= Per-process files restore =&lt;br /&gt;
Every file types is described via structure file_desc. We sequentially call file_desc::ops::open(struct file_desc *d, int *new_fd) method for every master file of a process until all masters are restored. The open methods may return three values:&lt;br /&gt;
*  0  -- restore of the master file is successefuly finished;&lt;br /&gt;
*  1  -- restore is in progress or it can't be started yet, because of it depends on another files, so the method should be called once again;&lt;br /&gt;
* -1 -- restore failed.&lt;br /&gt;
&lt;br /&gt;
Right after a file is open at first time, the open method must return fd value in new_fd argument. This allows the common code to send this master to other processes to reopen the master as a slave as soon as possible. The same time, returning of not-negative new_fd does not mean, that the master is restored. The open() callback may return not-negative new_fd and &amp;quot;1&amp;quot; as return value at the same time.&lt;br /&gt;
&lt;br /&gt;
Example. Restore of connected unix socket by open() method.&lt;br /&gt;
*1)Open a socket, write its file descriptor to new_fd and return 1.&lt;br /&gt;
*2)Check if peer socket is open and bound. If it's not so, then return 1 and repeat step &amp;quot;2&amp;quot; in next time.&lt;br /&gt;
*3)Connect to the peer and return 0.&lt;br /&gt;
&lt;br /&gt;
Note: it's also possible to go to step &amp;quot;2&amp;quot; right after new_fd is written.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4183</id>
		<title>Fdinfo engine</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Fdinfo_engine&amp;diff=4183"/>
		<updated>2017-04-25T08:49:28Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Masters and slaves =&lt;br /&gt;
# Shared file descriptors are distributed between tasks using scm_rights. One fle from a group of shared fles called master, others are slaves.&lt;br /&gt;
# Pipes (and fifos), unix sockets and TTYs generate two fds in their -&amp;gt;open callbacls, the 2nd one can conflict with some other fd the task restores and (!) this &amp;quot;2nd one&amp;quot; may require sending to some other task. This imposes another requirement on the 3-stages engine described above.                                                                                   &lt;br /&gt;
# Some actions can only be done only after file is created, served out    and moved to proper position. E.g. epoll configuration and scheduling    TCP repair off. Thus the -&amp;gt;post_open call :( and separate queue for   epoll fds.                                                                                                                                                 &lt;br /&gt;
# Slave TTYs can only be restored after respective master peers. Take into account the issue #2, this results in 3rd queue for slave TTYs.&lt;br /&gt;
# CTTYs should be __created__ after all other TTYs are created, configured and served out. Thus separate stages (not only queue) for CTTYs.&lt;br /&gt;
&lt;br /&gt;
= Per-process files restore =&lt;br /&gt;
Every file types is described via structure file_desc. We sequentially call file_desc::ops::open(struct file_desc *d, int *new_fd) method for every master file of a process until all masters are restored. The open methods may return three values:&lt;br /&gt;
*  0  -- restore of the master file is successefuly finished;&lt;br /&gt;
*  1  -- restore is in progress or it can't be started yet, because of it depends on another files, so the method should be called once again;&lt;br /&gt;
* -1 -- restore failed.&lt;br /&gt;
&lt;br /&gt;
Right after a file is open at first time, the open method must return fd value in new_fd argument. This allows the common code to send this master to other processes to reopen the master as a slave as soon as possible. The same time, returning of not-negative new_fd does not mean, that the master is restored. The open() callback may return not-negative new_fd and &amp;quot;1&amp;quot; as return value at the same time.&lt;br /&gt;
&lt;br /&gt;
Example. Restore of connected unix socket by open() method.&lt;br /&gt;
*1)Open a socket, write its file descriptor to new_fd and return 1.&lt;br /&gt;
*2)Check if peer socket is open and bound. If it's not so, then return 1 and repeat step &amp;quot;2&amp;quot; in next time.&lt;br /&gt;
*3)Connect to the peer and return 0.&lt;br /&gt;
&lt;br /&gt;
Note: it's also possible to go to step &amp;quot;2&amp;quot; right after new_fd is written.&lt;br /&gt;
&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
[[Category:Empty articles]]&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Nested_namespaces&amp;diff=4156</id>
		<title>Nested namespaces</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Nested_namespaces&amp;diff=4156"/>
		<updated>2017-04-17T11:56:40Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Currently supported ==&lt;br /&gt;
We have experimental support of nesting of user and net namespaces (in criu-dev branch), and support of pid namespaces currently is under development.&lt;br /&gt;
&lt;br /&gt;
== Pid namespace ==&lt;br /&gt;
&lt;br /&gt;
=== Status ===&lt;br /&gt;
The latest version of the patchset is &amp;quot;[PATCH v3 00/55] Nested pid namespaces support&amp;quot;: https://lists.openvz.org/pipermail/criu/2017-April/036952.html&lt;br /&gt;
It makes criu checkpoint/restore code working with multi-level pids and introduces new processes-helpers. They are used to restore processes with right pids in the whole pid namespace hierarchy, because a process may set ns_last_pid only in its current active pid namespace, and can't write to parent's (see kernel's pid_ns_ctl_handler() for the details).&lt;br /&gt;
&lt;br /&gt;
The patchset has limitations. It does not support restore of sid and pgid if there is a nested pid namespace, because in common case unmodified process tree is not restorable. It's need to introduce new helpers like we do for one-level pid namespace now, and this functionality will be implemented in separate patchset later. Currently, Pavel Tikhomirov is working on this problem. Also, there is no a children sorting, so it may happen a situation, when pid ns child reaper goes after a process of this pid ns in the parent's pstree_item::children list. This also will be accounted on Pavel's patchset.&lt;br /&gt;
&lt;br /&gt;
Also, there is no support for zombies in child pid namespace, and this functionality will be implemented in v4 of the series.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
Patchset teaches criu primitives to work with dynamically allocated pids, sids, pgids and threads ids, and allows them to have up to 32 nesting level (current maximal level from Linux kernel). It makes pids (etc) be linked on every ns_id::pid::rb_root instead of global one-level pid_root_rb's rb_node, and this allows to find a free pid on the whole pid ns hierarchy. Before the patchset we used pids (etc) given by parasite, now we get them from NSpid (etc) strings in /proc/[pid]/status, if there are several pid namespaces.&lt;br /&gt;
&lt;br /&gt;
One more thing, the patchset does, is unification of pstree_item::ids. We have many always checks like &amp;quot;if (item-&amp;gt;ids-&amp;gt;has_xxx_ns_id)&amp;quot;, and they are noisy and over the whole code. The patchset determines and populates not existing ids for the tasks in single place on the stage of image reading. So, after the patchset we'll be able to delete all of these noisy checks and make the code simply and more beautiful. The patchset itself needs this to know, which pid_ns a task belongs to.&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=Nested_namespaces&amp;diff=4155</id>
		<title>Nested namespaces</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Nested_namespaces&amp;diff=4155"/>
		<updated>2017-04-17T11:45:37Z</updated>

		<summary type="html">&lt;p&gt;Ktkhai: Created page with &amp;quot;== Currently supported == We have experimental support of nesting of user and net namespaces (in criu-dev branch), and support of pid namespaces currently is under development...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Currently supported ==&lt;br /&gt;
We have experimental support of nesting of user and net namespaces (in criu-dev branch), and support of pid namespaces currently is under development.&lt;br /&gt;
&lt;br /&gt;
== Pid namespace ==&lt;br /&gt;
&lt;br /&gt;
=== Status ===&lt;br /&gt;
The latest version of the patchset is &amp;quot;[PATCH v3 00/55] Nested pid namespaces support&amp;quot;: https://lists.openvz.org/pipermail/criu/2017-April/036952.html&lt;br /&gt;
It makes criu checkpoint/restore code working with multi-level pids and introduces new processes-helpers. They are used to restore processes with right pids in the whole pid namespace hierarchy, because a process may set ns_last_pid only in its current active pid namespace, and can't write to parent's (see kernel's pid_ns_ctl_handler() for the details).&lt;br /&gt;
&lt;br /&gt;
The patchset has limitations. It does not support restore of sid and pgid if there is a nested pid namespace, because in common case unmodified process tree is not restorable. It's need to introduce new helpers like we do for one-level pid namespace now, and this functionality will be implemented in separate patchset later. Currently, Pavel Tikhomirov is working on this problem. Also, there is no a children sorting, so it may happen a situation, when pid ns child reaper goes after a process of this pid ns in the parent's pstree_item::children list. This also will be accounted on Pavel's patchset.&lt;br /&gt;
&lt;br /&gt;
Also, there is no support for zombies in child pid namespace, and this functionality will be implemented in v4 of the series.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
Patchset teaches criu primitives to work with dynamically allocated pids, sids, pgids and threads ids, and allows them to have up to 32 nesting level (current maximal level from Linux kernel). It makes pids (etc) be linked on every ns_id::pid::rb_root instead of global one-level pid_root_rb's rb_node, and this allows to find a free pid on the whole pid ns hierarchy. Before the patchset we used pids (etc) given by parasite, now we get them from NSpid (etc) strings in /proc/[pid]/status, if there are several pid namespaces.&lt;br /&gt;
&lt;br /&gt;
One more thing the patchset does, is unification of pstree_item::ids. We have many always checks like &amp;quot;if (item-&amp;gt;ids-&amp;gt;has_xxx_ns_id)&amp;quot;, and they are noisy and over the whole code. The patchset determines and populates not existing ids for the tasks in single place on the stage of image reading. So, after the patchset we'll be able to delete all of these noisy checks and make the code simply and more beautiful.&lt;/div&gt;</summary>
		<author><name>Ktkhai</name></author>
	</entry>
</feed>