2020-05-08 11:36:57 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2016-07-01 21:49:54 +02:00
|
|
|
syntax = "proto2";
|
|
|
|
|
2013-01-23 18:22:47 +04:00
|
|
|
import "core-x86.proto";
|
|
|
|
import "core-arm.proto";
|
2014-04-10 09:30:46 +04:00
|
|
|
import "core-aarch64.proto";
|
2015-04-30 09:57:49 +03:00
|
|
|
import "core-ppc64.proto";
|
2017-06-30 20:31:38 +02:00
|
|
|
import "core-s390.proto";
|
2020-04-08 10:23:16 +08:00
|
|
|
import "core-mips.proto";
|
2023-06-12 15:09:22 +08:00
|
|
|
import "core-loongarch64.proto";
|
2023-08-01 11:59:13 -07:00
|
|
|
import "core-riscv64.proto";
|
2013-01-22 22:52:39 +04:00
|
|
|
|
2014-03-13 14:30:45 +04:00
|
|
|
import "rlimit.proto";
|
2014-04-15 21:58:31 +04:00
|
|
|
import "timer.proto";
|
2015-12-17 12:14:13 +03:00
|
|
|
import "creds.proto";
|
2017-04-19 16:51:01 +03:00
|
|
|
import "sa.proto";
|
2014-08-15 16:02:13 +03:00
|
|
|
import "siginfo.proto";
|
2022-04-08 23:03:37 +03:00
|
|
|
import "rseq.proto";
|
2014-08-15 16:02:13 +03:00
|
|
|
|
2015-01-19 16:10:55 +02:00
|
|
|
import "opts.proto";
|
|
|
|
|
2015-06-18 11:59:16 -06:00
|
|
|
/*
|
|
|
|
* These match the SECCOMP_MODE_* flags from <linux/seccomp.h>.
|
|
|
|
*/
|
|
|
|
enum seccomp_mode {
|
|
|
|
disabled = 0;
|
|
|
|
strict = 1;
|
|
|
|
filter = 2;
|
|
|
|
};
|
|
|
|
|
2012-07-19 13:23:01 +04:00
|
|
|
message task_core_entry {
|
2017-04-10 14:02:00 +03:00
|
|
|
required uint32 task_state = 1 [(criu).dict = "gen"];
|
2012-07-19 13:23:01 +04:00
|
|
|
required uint32 exit_code = 2;
|
|
|
|
|
|
|
|
required uint32 personality = 3;
|
|
|
|
required uint32 flags = 4;
|
2015-01-19 16:10:55 +02:00
|
|
|
required uint64 blk_sigset = 5[(criu).hex = true];
|
2012-07-19 13:23:01 +04:00
|
|
|
|
|
|
|
required string comm = 6;
|
2014-04-15 21:58:31 +04:00
|
|
|
|
|
|
|
optional task_timers_entry timers = 7;
|
2014-04-15 22:00:11 +04:00
|
|
|
optional task_rlimits_entry rlimits = 8;
|
2014-05-08 16:33:59 +04:00
|
|
|
|
2022-11-03 22:04:53 +07:00
|
|
|
/* This is deprecated, should be per-thread */
|
2014-05-08 16:33:59 +04:00
|
|
|
optional uint32 cg_set = 9;
|
2014-08-15 16:02:13 +03:00
|
|
|
|
|
|
|
optional signal_queue_entry signals_s = 10;
|
2015-06-18 11:59:16 -06:00
|
|
|
|
2018-05-07 11:42:45 +03:00
|
|
|
/* These two are deprecated, should be per-thread */
|
|
|
|
optional seccomp_mode old_seccomp_mode = 11;
|
|
|
|
optional uint32 old_seccomp_filter = 12;
|
2015-12-14 12:19:14 +03:00
|
|
|
|
|
|
|
optional uint32 loginuid = 13;
|
|
|
|
|
|
|
|
optional int32 oom_score_adj = 14;
|
2017-04-19 16:51:01 +03:00
|
|
|
repeated sa_entry sigactions = 15;
|
2018-08-31 13:17:12 +03:00
|
|
|
// Reserved for tty inheritance
|
|
|
|
//optional int32 tty_nr = 16;
|
|
|
|
//optional int32 tty_pgrp = 17;
|
2019-07-12 18:12:42 +02:00
|
|
|
|
2019-07-17 13:08:56 -07:00
|
|
|
optional bool child_subreaper = 18;
|
2020-01-10 15:57:50 +03:00
|
|
|
// Reserved for container relative start time
|
|
|
|
//optional uint64 start_time = 19;
|
2020-04-08 10:23:16 +08:00
|
|
|
optional uint64 blk_sigset_extended = 20[(criu).hex = true];
|
2022-01-20 17:13:59 +01:00
|
|
|
|
|
|
|
optional uint32 stop_signo = 21;
|
2022-10-06 17:52:46 +02:00
|
|
|
|
|
|
|
optional uint32 membarrier_registration_mask = 22 [(criu).hex = true];
|
2012-07-19 13:23:01 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
message task_kobj_ids_entry {
|
|
|
|
required uint32 vm_id = 1;
|
|
|
|
required uint32 files_id = 2;
|
|
|
|
required uint32 fs_id = 3;
|
|
|
|
required uint32 sighand_id = 4;
|
2013-01-18 13:18:33 +04:00
|
|
|
|
|
|
|
optional uint32 pid_ns_id = 5;
|
|
|
|
optional uint32 net_ns_id = 6;
|
|
|
|
optional uint32 ipc_ns_id = 7;
|
|
|
|
optional uint32 uts_ns_id = 8;
|
|
|
|
optional uint32 mnt_ns_id = 9;
|
2014-10-14 15:38:00 +04:00
|
|
|
optional uint32 user_ns_id = 10;
|
cgroup: add support for cgroup namespaces
cgroup namespaces are imminent to be merged into the kernel (indeed, they
went into and out of 4.5 for minor issues), and will be carried as a
patchset in the ubuntu 16.04 kernel. Here's an attempt at c/r.
There are essentially three key steps:
* on dump, in parse_task_cgroup, we should ask the task what cgroups it
thinks it is in (unless it has the same cgroup ns id as its parent, then we
should just take the prefixes from the parent's set), and set the prefix on
the cg set
* add a new restore step, prepare_cgroup_namespace(), which happens in
prepare_task_cgroup() that does an unshare() if necessary
* when restoring, in move_in_cgroup, if we're going to restore via usernsd,
leave the full path. if not, use (cgset->path + len(cgset->cgns_prefix) as
the path, since we will have already moved into the cgns_prefix and unshared.
Another observation here is that we can support nesting, since these are
restored heirarchically by nature.
v2: * store cgns prefix length instead of full prefix in images
* set has_cgroup_ns_id conditionally
* drop unused argument to move_in_cgroup
* add extra comments about what is happening when unsharing() on
restore
* add extra comments about what is happening when computing the actual
cgns prefix
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-21 12:28:50 -07:00
|
|
|
optional uint32 cgroup_ns_id = 11;
|
2019-08-14 07:40:40 +03:00
|
|
|
optional uint32 time_ns_id = 12;
|
2012-07-19 13:23:01 +04:00
|
|
|
}
|
|
|
|
|
2013-07-10 15:36:37 +04:00
|
|
|
message thread_sas_entry {
|
|
|
|
required uint64 ss_sp = 1;
|
|
|
|
required uint64 ss_size = 2;
|
|
|
|
required uint32 ss_flags = 3;
|
|
|
|
}
|
|
|
|
|
2012-08-10 20:28:59 +04:00
|
|
|
message thread_core_entry {
|
|
|
|
required uint64 futex_rla = 1;
|
|
|
|
required uint32 futex_rla_len = 2;
|
2012-10-17 00:23:25 +04:00
|
|
|
optional sint32 sched_nice = 3;
|
|
|
|
optional uint32 sched_policy = 4;
|
|
|
|
optional uint32 sched_prio = 5;
|
2012-11-12 17:42:47 +04:00
|
|
|
optional uint64 blk_sigset = 6;
|
2013-07-10 15:36:37 +04:00
|
|
|
optional thread_sas_entry sas = 7;
|
2014-06-27 19:26:52 +04:00
|
|
|
optional uint32 pdeath_sig = 8;
|
2014-08-15 16:02:13 +03:00
|
|
|
|
|
|
|
optional signal_queue_entry signals_p = 9;
|
2015-12-17 12:14:13 +03:00
|
|
|
optional creds_entry creds = 10;
|
2018-05-07 11:42:45 +03:00
|
|
|
|
|
|
|
optional seccomp_mode seccomp_mode = 11;
|
|
|
|
optional uint32 seccomp_filter = 12;
|
2018-02-01 22:29:06 +03:00
|
|
|
|
|
|
|
optional string comm = 13;
|
2020-04-08 10:23:16 +08:00
|
|
|
optional uint64 blk_sigset_extended = 14;
|
2022-04-08 23:03:37 +03:00
|
|
|
optional rseq_entry rseq_entry = 15;
|
2023-03-16 23:09:18 +07:00
|
|
|
optional uint32 cg_set = 16;
|
2012-08-10 20:28:59 +04:00
|
|
|
}
|
|
|
|
|
2014-03-13 14:30:45 +04:00
|
|
|
message task_rlimits_entry {
|
|
|
|
repeated rlimit_entry rlimits = 1;
|
|
|
|
};
|
|
|
|
|
2012-07-19 13:23:01 +04:00
|
|
|
message core_entry {
|
|
|
|
enum march {
|
|
|
|
UNKNOWN = 0;
|
|
|
|
X86_64 = 1;
|
2013-01-22 22:52:39 +04:00
|
|
|
ARM = 2;
|
2014-04-10 09:30:46 +04:00
|
|
|
AARCH64 = 3;
|
2015-04-30 09:57:49 +03:00
|
|
|
PPC64 = 4;
|
2017-06-30 20:31:38 +02:00
|
|
|
S390 = 5;
|
2020-04-08 10:23:16 +08:00
|
|
|
MIPS = 6;
|
2023-06-12 15:09:22 +08:00
|
|
|
LOONGARCH64 = 7;
|
2023-08-01 11:59:13 -07:00
|
|
|
RISCV64 = 8;
|
2012-07-19 13:23:01 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
required march mtype = 1;
|
|
|
|
optional thread_info_x86 thread_info = 2;
|
2013-01-22 22:52:39 +04:00
|
|
|
optional thread_info_arm ti_arm = 6;
|
2014-04-10 09:30:46 +04:00
|
|
|
optional thread_info_aarch64 ti_aarch64 = 8;
|
2015-04-30 09:57:49 +03:00
|
|
|
optional thread_info_ppc64 ti_ppc64 = 9;
|
2017-06-30 20:31:38 +02:00
|
|
|
optional thread_info_s390 ti_s390 = 10;
|
2020-04-08 10:23:16 +08:00
|
|
|
optional thread_info_mips ti_mips = 11;
|
2023-06-12 15:09:22 +08:00
|
|
|
optional thread_info_loongarch64 ti_loongarch64 = 12;
|
2023-08-01 11:59:13 -07:00
|
|
|
optional thread_info_riscv64 ti_riscv64 = 13;
|
2012-07-19 13:23:01 +04:00
|
|
|
|
|
|
|
optional task_core_entry tc = 3;
|
|
|
|
optional task_kobj_ids_entry ids = 4;
|
2012-08-10 20:28:59 +04:00
|
|
|
optional thread_core_entry thread_core = 5;
|
2012-07-19 13:23:01 +04:00
|
|
|
}
|