Difference between revisions of "Linux kernel"

From CRIU
Jump to navigation Jump to search
Line 19: Line 19:
 
** <code>CONFIG_PACKET_DIAG=y</code> (Packet socket -> Packet: sockets monitoring interface)
 
** <code>CONFIG_PACKET_DIAG=y</code> (Packet socket -> Packet: sockets monitoring interface)
 
** <code>CONFIG_NETLINK_DIAG=y</code> (Netlink socket -> Netlink: sockets monitoring interface)
 
** <code>CONFIG_NETLINK_DIAG=y</code> (Netlink socket -> Netlink: sockets monitoring interface)
 +
* <code>CONFIG_NETFILTER_XT_MARK=y</code> (Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -> Netfilter Xtables support (required for ip_tables) -> nfmark target and match support)
 +
  
 
Other options not required by CRIU, but C/R supported ([[ZDTM test suite]] may fail without them):
 
Other options not required by CRIU, but C/R supported ([[ZDTM test suite]] may fail without them):
 
* <code>CONFIG_INOTIFY_USER=y</code> (File systems -> Inotify support for userspace)
 
* <code>CONFIG_INOTIFY_USER=y</code> (File systems -> Inotify support for userspace)
 
* <code>CONFIG_FANOTIFY=y</code> (File systems -> Filesystem wide access notification)
 
* <code>CONFIG_FANOTIFY=y</code> (File systems -> Filesystem wide access notification)
* <code>CONFIG_NETFILTER_XT_MARK=y</code> (Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -> Netfilter Xtables support (required for ip_tables) -> nfmark target and match support)
 
 
* <code>CONFIG_MEMCG=y</code> (General setup -> Control Group support -> Memory controller)
 
* <code>CONFIG_MEMCG=y</code> (General setup -> Control Group support -> Memory controller)
 
* <code>CONFIG_CGROUP_DEVICE=y</code> (General setup -> Control Group support -> Device controller)
 
* <code>CONFIG_CGROUP_DEVICE=y</code> (General setup -> Control Group support -> Device controller)

Revision as of 02:43, 3 August 2017

Most likely the first thing to enable is the CONFIG_EXPERT=y (General setup -> Configure standard kernel features (expert users)) option, which on x86_64 depends on the CONFIG_EMBEDDED=y (General setup -> Embedded system) one (welcome to Kconfig reverse chains hell).

The following options must be enabled for CRIU to work:

  • General setup options
    • CONFIG_CHECKPOINT_RESTORE=y (Checkpoint/restore support)
    • CONFIG_NAMESPACES=y (Namespaces support)
    • CONFIG_UTS_NS=y (Namespaces support -> UTS namespace)
    • CONFIG_IPC_NS=y (Namespaces support -> IPC namespace)
    • CONFIG_PID_NS=y (Namespaces support -> PID namespaces)
    • CONFIG_NET_NS=y (Namespaces support -> Network namespace)
    • CONFIG_FHANDLE=y (Open by fhandle syscalls)
    • CONFIG_EVENTFD=y (Enable eventfd() system call)
    • CONFIG_EPOLL=y (Enable eventpoll support)
  • Networking support -> Networking options options for sock-diag subsystem
    • CONFIG_UNIX_DIAG=y (Unix domain sockets -> UNIX: socket monitoring interface)
    • CONFIG_INET_DIAG=y (TCP/IP networking -> INET: socket monitoring interface)
    • CONFIG_INET_UDP_DIAG=y (TCP/IP networking -> INET: socket monitoring interface -> UDP: socket monitoring interface)
    • CONFIG_PACKET_DIAG=y (Packet socket -> Packet: sockets monitoring interface)
    • CONFIG_NETLINK_DIAG=y (Netlink socket -> Netlink: sockets monitoring interface)
  • CONFIG_NETFILTER_XT_MARK=y (Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -> Netfilter Xtables support (required for ip_tables) -> nfmark target and match support)


Other options not required by CRIU, but C/R supported (ZDTM test suite may fail without them):

  • CONFIG_INOTIFY_USER=y (File systems -> Inotify support for userspace)
  • CONFIG_FANOTIFY=y (File systems -> Filesystem wide access notification)
  • CONFIG_MEMCG=y (General setup -> Control Group support -> Memory controller)
  • CONFIG_CGROUP_DEVICE=y (General setup -> Control Group support -> Device controller)
  • CONFIG_MACVLAN=y (Device Drivers -> Network device support -> Network core driver support -> MAC-VLAN support)
  • CONFIG_BRIDGE=y (Networking support -> Networking options -> 802.1d Ethernet Bridging)
  • CONFIG_BINFMT_MISC=y (Userspace binary formats -> Kernel support for MISC binaries)
  • CONFIG_IA32_EMULATION=y (x86 only) (Executable file formats -> Emulations -> IA32 Emulation)

For some usage scenarios there is an ability to track memory changes and produce incremental dumps. Need to enable the CONFIG_MEM_SOFT_DIRTY=y (optional) (Processor type and features -> Track memory changes).

In the beginning of the project we had our custom kernel, which contained some experimental CRIU related patches. Nowadays this is almost not used.