summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 17:08:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 17:08:40 +0000
commitdb4355c97c4d09cabe0ff0d522acff7b672d18df (patch)
tree078ed2ef0cd31b9992ba7a9e94ad05bb5e4b6077
parentInitial commit. (diff)
downloadgolang-github-checkpoint-restore-go-criu-db4355c97c4d09cabe0ff0d522acff7b672d18df.tar.xz
golang-github-checkpoint-restore-go-criu-db4355c97c4d09cabe0ff0d522acff7b672d18df.zip
Adding upstream version 6.3.0+ds1.upstream/6.3.0+ds1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--.github/dependabot.yml6
-rw-r--r--.github/workflows/main.yml49
-rw-r--r--.github/workflows/verify.yml22
-rw-r--r--.gitignore13
-rw-r--r--.golangci.yml10
-rw-r--r--LICENSE201
-rw-r--r--Makefile41
-rw-r--r--README.md105
-rw-r--r--crit/Makefile41
-rw-r--r--crit/cmd/cli.go214
-rw-r--r--crit/crit.go167
-rw-r--r--crit/decode-extra.go279
-rw-r--r--crit/decode.go202
-rw-r--r--crit/encode-extra.go123
-rw-r--r--crit/encode.go171
-rw-r--r--crit/explore.go363
-rw-r--r--crit/image.go165
-rw-r--r--crit/images/apparmor.pb.go300
-rw-r--r--crit/images/apparmor.proto16
-rw-r--r--crit/images/autofs.pb.go217
-rw-r--r--crit/images/autofs.proto17
-rw-r--r--crit/images/binfmt-misc.pb.go209
-rw-r--r--crit/images/binfmt-misc.proto14
-rw-r--r--crit/images/bpfmap-data.pb.go172
-rw-r--r--crit/images/bpfmap-data.proto10
-rw-r--r--crit/images/bpfmap-file.pb.go301
-rw-r--r--crit/images/bpfmap-file.proto25
-rw-r--r--crit/images/cgroup.pb.go648
-rw-r--r--crit/images/cgroup.proto43
-rw-r--r--crit/images/core-aarch64.pb.go353
-rw-r--r--crit/images/core-aarch64.proto25
-rw-r--r--crit/images/core-arm.pb.go497
-rw-r--r--crit/images/core-arm.proto41
-rw-r--r--crit/images/core-mips.pb.go963
-rwxr-xr-xcrit/images/core-mips.proto92
-rw-r--r--crit/images/core-ppc64.pb.go695
-rw-r--r--crit/images/core-ppc64.proto73
-rw-r--r--crit/images/core-s390.pb.go681
-rw-r--r--crit/images/core-s390.proto53
-rw-r--r--crit/images/core-x86.pb.go1029
-rw-r--r--crit/images/core-x86.proto110
-rw-r--r--crit/images/cpuinfo.pb.go591
-rw-r--r--crit/images/cpuinfo.proto49
-rw-r--r--crit/images/creds.pb.go294
-rw-r--r--crit/images/creds.proto27
-rw-r--r--crit/images/criu-core.pb.go1200
-rw-r--r--crit/images/criu-core.proto134
-rw-r--r--crit/images/criu-sa.pb.go195
-rw-r--r--crit/images/criu-sa.proto14
-rw-r--r--crit/images/eventfd.pb.go175
-rw-r--r--crit/images/eventfd.proto12
-rw-r--r--crit/images/eventpoll.pb.go296
-rw-r--r--crit/images/eventpoll.proto24
-rw-r--r--crit/images/ext-file.pb.go155
-rw-r--r--crit/images/ext-file.proto10
-rw-r--r--crit/images/fdinfo.pb.go661
-rw-r--r--crit/images/fdinfo.proto81
-rw-r--r--crit/images/fh.pb.go321
-rw-r--r--crit/images/fh.proto25
-rw-r--r--crit/images/fifo.pb.go160
-rw-r--r--crit/images/fifo.proto9
-rw-r--r--crit/images/file-lock.pb.go188
-rw-r--r--crit/images/file-lock.proto12
-rw-r--r--crit/images/fown.pb.go179
-rw-r--r--crit/images/fown.proto11
-rw-r--r--crit/images/fs.pb.go160
-rw-r--r--crit/images/fs.proto9
-rw-r--r--crit/images/fsnotify.pb.go763
-rw-r--r--crit/images/fsnotify.proto62
-rw-r--r--crit/images/ghost-file.pb.go317
-rw-r--r--crit/images/ghost-file.proto27
-rw-r--r--crit/images/handler.go142
-rw-r--r--crit/images/img-streamer.pb.go214
-rw-r--r--crit/images/img-streamer.proto18
-rw-r--r--crit/images/inventory.pb.go305
-rw-r--r--crit/images/inventory.proto24
-rw-r--r--crit/images/ipc-desc.pb.go197
-rw-r--r--crit/images/ipc-desc.proto13
-rw-r--r--crit/images/ipc-msg.pb.go237
-rw-r--r--crit/images/ipc-msg.proto16
-rw-r--r--crit/images/ipc-sem.pb.go156
-rw-r--r--crit/images/ipc-sem.proto10
-rw-r--r--crit/images/ipc-shm.pb.go176
-rw-r--r--crit/images/ipc-shm.proto12
-rw-r--r--crit/images/ipc-var.pb.go304
-rw-r--r--crit/images/ipc-var.proto23
-rw-r--r--crit/images/macvlan.pb.go151
-rw-r--r--crit/images/macvlan.proto8
-rw-r--r--crit/images/memfd.pb.go316
-rw-r--r--crit/images/memfd.proto25
-rw-r--r--crit/images/mm.pb.go395
-rw-r--r--crit/images/mm.proto35
-rw-r--r--crit/images/mnt.pb.go444
-rw-r--r--crit/images/mnt.proto62
-rw-r--r--crit/images/netdev.pb.go616
-rw-r--r--crit/images/netdev.proto77
-rw-r--r--crit/images/ns.pb.go170
-rw-r--r--crit/images/ns.proto10
-rw-r--r--crit/images/opts.pb.go227
-rw-r--r--crit/images/opts.proto20
-rw-r--r--crit/images/packet-sock.pb.go550
-rw-r--r--crit/images/packet-sock.proto49
-rw-r--r--crit/images/pagemap.pb.go237
-rw-r--r--crit/images/pagemap.proto16
-rw-r--r--crit/images/pidns.pb.go142
-rw-r--r--crit/images/pidns.proto7
-rw-r--r--crit/images/pipe-data.pb.go161
-rw-r--r--crit/images/pipe-data.proto9
-rw-r--r--crit/images/pipe.pb.go176
-rw-r--r--crit/images/pipe.proto13
-rw-r--r--crit/images/pstree.pb.go179
-rw-r--r--crit/images/pstree.proto11
-rw-r--r--crit/images/regfile.pb.go275
-rw-r--r--crit/images/regfile.proto36
-rw-r--r--crit/images/remap-file-path.pb.go230
-rw-r--r--crit/images/remap-file-path.proto18
-rw-r--r--crit/images/rlimit.pb.go151
-rw-r--r--crit/images/rlimit.proto8
-rw-r--r--crit/images/rseq.pb.go173
-rw-r--r--crit/images/rseq.proto10
-rw-r--r--crit/images/seccomp.pb.go226
-rw-r--r--crit/images/seccomp.proto13
-rw-r--r--crit/images/siginfo.pb.go207
-rw-r--r--crit/images/siginfo.proto11
-rw-r--r--crit/images/signalfd.pb.go177
-rw-r--r--crit/images/signalfd.proto13
-rw-r--r--crit/images/sit.pb.go291
-rw-r--r--crit/images/sit.proto24
-rw-r--r--crit/images/sk-inet.pb.go508
-rw-r--r--crit/images/sk-inet.proto55
-rw-r--r--crit/images/sk-netlink.pb.go258
-rw-r--r--crit/images/sk-netlink.proto24
-rw-r--r--crit/images/sk-opts.pb.go453
-rw-r--r--crit/images/sk-opts.proto43
-rw-r--r--crit/images/sk-packet.pb.go236
-rw-r--r--crit/images/sk-packet.proto18
-rw-r--r--crit/images/sk-unix.pb.go410
-rw-r--r--crit/images/sk-unix.proto57
-rw-r--r--crit/images/stats.pb.go461
-rw-r--r--crit/images/stats.proto40
-rw-r--r--crit/images/sysctl.pb.go223
-rw-r--r--crit/images/sysctl.proto15
-rw-r--r--crit/images/tcp-stream.pb.go300
-rw-r--r--crit/images/tcp-stream.proto29
-rw-r--r--crit/images/time.pb.go151
-rw-r--r--crit/images/time.proto8
-rw-r--r--crit/images/timens.pb.go227
-rw-r--r--crit/images/timens.proto12
-rw-r--r--crit/images/timer.pb.go428
-rw-r--r--crit/images/timer.proto32
-rw-r--r--crit/images/timerfd.pb.go234
-rw-r--r--crit/images/timerfd.proto21
-rw-r--r--crit/images/tty.pb.go831
-rw-r--r--crit/images/tty.proto92
-rw-r--r--crit/images/tun.pb.go272
-rw-r--r--crit/images/tun.proto20
-rw-r--r--crit/images/userns.pb.go238
-rw-r--r--crit/images/userns.proto14
-rw-r--r--crit/images/utsns.pb.go152
-rw-r--r--crit/images/utsns.proto8
-rw-r--r--crit/images/vma.pb.go237
-rw-r--r--crit/images/vma.proto27
-rw-r--r--crit/stats.go51
-rw-r--r--crit/utils.go231
-rw-r--r--features.go45
-rw-r--r--go.mod9
-rw-r--r--go.sum20
-rw-r--r--magic/magic.go158
-rw-r--r--main.go264
-rw-r--r--notify.go62
-rw-r--r--phaul/api.go45
-rw-r--r--phaul/client.go141
-rw-r--r--phaul/images.go42
-rw-r--r--phaul/server.go108
-rw-r--r--rpc/rpc.pb.go2327
-rw-r--r--rpc/rpc.proto248
-rw-r--r--scripts/Makefile19
-rw-r--r--scripts/README.md11
-rwxr-xr-xscripts/magicgen-test.sh42
-rw-r--r--scripts/magicgen.go112
-rw-r--r--scripts/magicgen_test.go110
-rw-r--r--stats/stats.pb.go462
-rw-r--r--stats/stats.proto40
-rw-r--r--stats/types.go14
-rw-r--r--stats/utils.go53
-rw-r--r--test/Makefile84
-rw-r--r--test/crit/Makefile37
-rwxr-xr-xtest/crit/crit-test.sh83
-rw-r--r--test/crit/main.go110
-rw-r--r--test/crit/stats_test.go27
-rw-r--r--test/loop/loop.c63
-rw-r--r--test/main.go194
-rw-r--r--test/main_coverage_test.go40
-rw-r--r--test/main_test.go11
-rw-r--r--test/phaul/main.go194
-rw-r--r--test/phaul/main_coverage_test.go39
-rw-r--r--test/phaul/main_test.go11
-rw-r--r--test/piggie/piggie.c61
198 files changed, 34435 insertions, 0 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..b4c78be
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: gomod
+ directory: /
+ schedule:
+ interval: monthly
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..c494cb6
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,49 @@
+name: ci
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
+ matrix:
+ go-version: [1.17.x, 1.18.x, 1.19.x]
+ # criu is pre-installed in the Ubuntu 20.04 GitHub Action virtual
+ # environment as a dependency for Podman
+ criu_branch: ["", criu-dev]
+
+ steps:
+
+ - name: checkout
+ uses: actions/checkout@v3
+
+ - name: build criu ${{ matrix.criu_branch }}
+ if: matrix.criu_branch != ''
+ run: |
+ sudo apt-get install -y libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python-protobuf libnl-3-dev libnet-dev libcap-dev
+ git clone --depth=1 --single-branch -b ${{ matrix.criu_branch }} https://github.com/checkpoint-restore/criu.git
+ make -j"$(nproc)" -C criu
+ sudo make -C criu install-criu PREFIX=/usr
+
+ - name: install go ${{ matrix.go-version }}
+ uses: actions/setup-go@v3
+ with:
+ go-version: ${{ matrix.go-version }}
+
+ - name: Test go-criu
+ run: sudo env "PATH=$PATH" make test
+
+ - name: Test magicgen script
+ run: make -C scripts test
+
+ - name: Test crit
+ run: sudo make -C test crit-test
+
+ - name: Check code coverage
+ if: matrix.go-version == '1.18.x' && matrix.criu_branch == 'criu-dev'
+ run: |
+ # Run actual test as root as it uses CRIU.
+ sudo env "PATH=$PATH" make coverage
+ # Upload coverage results to codecov
+ sudo -E make codecov
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
new file mode 100644
index 0000000..398c0bb
--- /dev/null
+++ b/.github/workflows/verify.yml
@@ -0,0 +1,22 @@
+name: verify
+on: [ push, pull_request ]
+
+jobs:
+ lint:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v3
+ - uses: golangci/golangci-lint-action@v3
+ with:
+ version: latest
+ # Only show new issues for a pull request.
+ only-new-issues: true
+
+ gomod:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v3
+ - name: verify go.mod/go.sum
+ run: |
+ go mod tidy
+ git diff --exit-code
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5518060
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+test/test
+test/test.coverage
+test/piggie/piggie
+test/phaul/phaul
+test/phaul/phaul.coverage
+test/loop/loop
+test/crit/crit-test
+test/crit/test-imgs
+image
+scripts/*.h
+scripts/expected.go
+scripts/output.go
+crit/bin
diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 0000000..c451510
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,10 @@
+linters:
+ presets:
+ - bugs
+ - performance
+ - unused
+ - format
+
+linters-settings:
+ exhaustive:
+ default-signifies-exhaustive: true
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0c29160
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+SHELL = /bin/bash
+GO ?= go
+CC ?= gcc
+
+all: build
+
+lint:
+ golangci-lint run ./...
+
+build: rpc/rpc.pb.go stats/stats.pb.go
+ $(GO) build -v ./...
+ # Build crit binary
+ $(MAKE) -C crit bin/crit
+
+test: build
+ $(MAKE) -C test
+
+coverage:
+ $(MAKE) -C test coverage
+
+codecov:
+ $(MAKE) -C test codecov
+
+rpc/rpc.proto:
+ curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@
+
+rpc/rpc.pb.go: rpc/rpc.proto
+ protoc --go_out=. --go_opt=M$^=rpc/ $^
+
+stats/stats.proto:
+ curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/stats.proto -o $@
+
+stats/stats.pb.go: stats/stats.proto
+ protoc --go_out=. --go_opt=M$^=stats/ $^
+
+vendor:
+ GO111MODULE=on $(GO) mod tidy
+ GO111MODULE=on $(GO) mod vendor
+ GO111MODULE=on $(GO) mod verify
+
+.PHONY: build test lint vendor coverage codecov
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d186cb8
--- /dev/null
+++ b/README.md
@@ -0,0 +1,105 @@
+[![test](https://github.com/checkpoint-restore/go-criu/workflows/ci/badge.svg?branch=master)](https://github.com/checkpoint-restore/go-criu/actions?query=workflow%3Aci)
+[![verify](https://github.com/checkpoint-restore/go-criu/workflows/verify/badge.svg?branch=master)](https://github.com/checkpoint-restore/go-criu/actions?query=workflow%3Averify)
+[![Go Reference](https://pkg.go.dev/badge/github.com/checkpoint-restore/go-criu.svg)](https://pkg.go.dev/github.com/checkpoint-restore/go-criu)
+
+## go-criu -- Go bindings for CRIU
+
+This repository provides Go bindings for [CRIU](https://criu.org/).
+The code is based on the Go-based PHaul implementation from the CRIU repository.
+For easier inclusion into other Go projects, the CRIU Go bindings have been moved to this repository.
+
+### CRIU
+The Go bindings provide an easy way to use the CRIU RPC calls from Go without
+the need to set up all the infrastructure to make the actual RPC connection to CRIU.
+
+The following example would print the version of CRIU:
+```go
+import (
+ "log"
+
+ "github.com/checkpoint-restore/go-criu/v6"
+)
+
+func main() {
+ c := criu.MakeCriu()
+ version, err := c.GetCriuVersion()
+ if err != nil {
+ log.Fatalln(err)
+ }
+ log.Println(version)
+}
+```
+
+or to just check if at least a certain CRIU version is installed:
+
+```go
+ c := criu.MakeCriu()
+ result, err := c.IsCriuAtLeast(31100)
+```
+
+### CRIT
+
+The `crit` package provides bindings to decode, encode, and manipulate
+CRIU image files natively within Go. It also provides a CLI tool similar
+to the original CRIT Python tool. To get started with this, see the docs
+at https://criu.org/CRIT_(Go_library).
+
+## Releases
+
+The first go-criu release was 3.11 based on CRIU 3.11. The initial plan
+was to follow CRIU so that go-criu would carry the same version number as
+CRIU.
+
+As go-criu is imported in other projects and as Go modules are expected
+to follow Semantic Versioning go-criu will also follow Semantic Versioning
+starting with the 4.0.0 release.
+
+The following table shows the relation between go-criu and criu versions:
+
+| Major version | Latest release | CRIU version |
+| -------------- | -------------- | ------------ |
+| v6             | 6.2.0         | 3.17         |
+| v5             | 5.3.0         | 3.16         |
+| v5             | 5.0.0         | 3.15         |
+| v4             | 4.1.0         | 3.14         |
+
+## How to contribute
+
+While bug fixes can first be identified via an "issue", that is not required.
+It's ok to just open up a PR with the fix, but make sure you include the same
+information you would have included in an issue - like how to reproduce it.
+
+PRs for new features should include some background on what use cases the
+new code is trying to address. When possible and when it makes sense, try to
+break-up larger PRs into smaller ones - it's easier to review smaller
+code changes. But only if those smaller ones make sense as stand-alone PRs.
+
+Regardless of the type of PR, all PRs should include:
+* well documented code changes
+* additional testcases. Ideally, they should fail w/o your code change applied
+* documentation changes
+
+Squash your commits into logical pieces of work that might want to be reviewed
+separate from the rest of the PRs. Ideally, each commit should implement a
+single idea, and the PR branch should pass the tests at every commit. GitHub
+makes it easy to review the cumulative effect of many commits; so, when in
+doubt, use smaller commits.
+
+PRs that fix issues should include a reference like `Closes #XXXX` in the
+commit message so that github will automatically close the referenced issue
+when the PR is merged.
+
+Contributors must assert that they are in compliance with the [Developer
+Certificate of Origin 1.1](http://developercertificate.org/). This is achieved
+by adding a "Signed-off-by" line containing the contributor's name and e-mail
+to every commit message. Your signature certifies that you wrote the patch or
+otherwise have the right to pass it on as an open-source patch.
+
+## License and copyright
+
+Unless mentioned otherwise in a specific file's header, all code in
+this project is released under the Apache 2.0 license.
+
+The author of a change remains the copyright holder of their code
+(no copyright assignment). The list of authors and contributors can be
+retrieved from the git commit history and in some cases, the file headers.
diff --git a/crit/Makefile b/crit/Makefile
new file mode 100644
index 0000000..f0e3d57
--- /dev/null
+++ b/crit/Makefile
@@ -0,0 +1,41 @@
+GO ?= go
+
+# The import path that protoc will use if a proto file imports another one
+import_path := github.com/checkpoint-restore/go-criu/crit/images
+# Path to .proto source files
+proto_path := ./images
+# Generate string of all .proto filenames
+proto_files := $(sort $(subst $(proto_path)/,,$(wildcard $(proto_path)/*.proto)))
+# Generate M flag to specify import path for all .proto files
+# and replace all spaces with commas to use with go_opt flag
+comma := ,
+proto_opts := $(subst $() $(),$(comma),$(patsubst %,M%=$(import_path),$(proto_files)))
+
+all: gen-proto bin/crit
+
+update-proto:
+ rm ./images/*.proto || true
+ git clone --depth 1 --branch master https://github.com/checkpoint-restore/criu criu-temp
+ cp criu-temp/images/*.proto ./images/
+ # rpc.proto is not an image and it is used only to communicate criu-service and swrk.
+ rm -rf criu-temp images/rpc.proto
+ # To prevent namespace conflict with proto files
+ # in github.com/letsencrypt/boulder, we prepend
+ # a prefix to the filenames.
+ mv ./images/sa.proto ./images/criu-sa.proto
+ sed -i 's/sa\.proto/criu-sa\.proto/g' images/*.proto
+ mv ./images/core.proto ./images/criu-core.proto
+ sed -i 's/core\.proto/criu-core\.proto/g' images/*.proto
+
+gen-proto:
+ rm -f ./images/*.pb.go
+ @protoc \
+ --proto_path=$(proto_path) \
+ --go_out=$(proto_path) \
+ --go_opt=paths=source_relative,$(proto_opts) \
+ $(proto_files)
+
+bin/crit: cmd/cli.go
+ $(GO) build -o $@ $^
+
+.PHONY: all gen-proto update-proto
diff --git a/crit/cmd/cli.go b/crit/cmd/cli.go
new file mode 100644
index 0000000..63a4682
--- /dev/null
+++ b/crit/cmd/cli.go
@@ -0,0 +1,214 @@
+package main
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "log"
+ "os"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit"
+ "github.com/spf13/cobra"
+)
+
+// The crit service used to invoke all commands
+var c crit.CritSvc
+
+// All members needed for crit struct
+var inputFilePath, outputFilePath, inputDirPath string
+var pretty, noPayload bool
+
+// The `crit` command
+var rootCmd = &cobra.Command{
+ Use: "crit",
+ Short: "CRIU Image Tool(CRIT) to manipulate CRIU image files",
+ Long: `CRIU Image Tool (CRIT) is a command line tool to investigate
+binary image files generated by CRIU and view them in JSON.
+This is a Go implementation of the original Python app.
+Find the complete documentation is at https://criu.org/CRIT`,
+}
+
+// The `crit decode` command
+var decodeCmd = &cobra.Command{
+ Use: "decode",
+ Short: "Convert binary image to JSON",
+ Long: `Convert the input binary image to JSON and write it to a file.
+If no output file is provided, the JSON is printed to stdout.`,
+ Run: func(cmd *cobra.Command, args []string) {
+ c = crit.NewCli(inputFilePath, outputFilePath,
+ inputDirPath, pretty, noPayload)
+ img, err := c.Decode()
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ var jsonData []byte
+ if pretty {
+ jsonData, err = json.MarshalIndent(img, "", " ")
+ } else {
+ jsonData, err = json.Marshal(img)
+ }
+ if err != nil {
+ log.Fatal(errors.New(fmt.Sprint("Error processing data into JSON: ", err)))
+ }
+ // If no output file, print to stdout
+ if outputFilePath == "" {
+ fmt.Println(string(jsonData))
+ return
+ }
+ // Write to output file
+ jsonFile, err := os.Create(outputFilePath)
+ if err != nil {
+ log.Fatal(errors.New(fmt.Sprint("Error opening destination file: ", err)))
+ }
+ defer jsonFile.Close()
+ _, err = jsonFile.Write(jsonData)
+ if err != nil {
+ log.Fatal(errors.New(fmt.Sprint("Error writing JSON data: ", err)))
+ }
+ },
+}
+
+// The `crit encode` command
+var encodeCmd = &cobra.Command{
+ Use: "encode",
+ Short: "Convert JSON to binary image file",
+ Long: "Convert the input JSON to a CRIU image file.",
+ Run: func(cmd *cobra.Command, args []string) {
+ c = crit.NewCli(inputFilePath, outputFilePath,
+ inputDirPath, pretty, noPayload)
+ // Convert JSON to Go struct
+ img, err := c.Parse()
+ if err != nil {
+ log.Fatal(err)
+ }
+ // Write Go struct to binary image file
+ if err := c.Encode(img); err != nil {
+ log.Fatal(err)
+ }
+ },
+}
+
+// The `crit show` command
+var showCmd = &cobra.Command{
+ Use: "show INPATH",
+ Short: "Convert binary image to human-readable JSON",
+ Long: "Convert the input binary image to human-readable JSON and print to stdout",
+ Args: cobra.ExactArgs(1),
+ Run: func(cmd *cobra.Command, args []string) {
+ inputFilePath = args[0]
+ pretty = true
+ c = crit.NewCli(inputFilePath, outputFilePath,
+ inputDirPath, pretty, noPayload)
+ img, err := c.Decode()
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ jsonData, err := json.MarshalIndent(img, "", " ")
+ if err != nil {
+ log.Fatal(errors.New(fmt.Sprint("Error processing data into JSON: ", err)))
+ }
+ fmt.Println(string(jsonData))
+ },
+}
+
+// The `crit info` command
+var infoCmd = &cobra.Command{
+ Use: "info INPATH",
+ Short: "Show information about the image file",
+ Args: cobra.ExactArgs(1),
+ Run: func(cmd *cobra.Command, args []string) {
+ inputFilePath = args[0]
+ c = crit.NewCli(inputFilePath, outputFilePath,
+ inputDirPath, pretty, noPayload)
+ img, err := c.Info()
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ jsonData, err := json.MarshalIndent(img, "", " ")
+ if err != nil {
+ log.Fatal(errors.New(fmt.Sprint("Error processing data into JSON: ", err)))
+ }
+ fmt.Println(string(jsonData))
+ },
+}
+
+// The `crit x` command
+var xCmd = &cobra.Command{
+ Use: "x DIR {ps|fds|mems|rss}",
+ Short: "Explore the image directory",
+ Long: "Explore the image directory with one of (ps, fds, mems, rss) options",
+ // Exactly two arguments are required:
+ // * Path of the input directory
+ // * Explore type
+ Args: cobra.ExactArgs(2),
+ Run: func(cmd *cobra.Command, args []string) {
+ inputDirPath = args[0]
+ // We can use an empty interface to hold the
+ // returned object since we don't really care
+ // about the data itself, as long as we can
+ // marshal it into JSON and display it.
+ var xData interface{}
+ var err error
+
+ c = crit.NewCli(inputFilePath, outputFilePath,
+ inputDirPath, pretty, noPayload)
+ // Switch the explore type and call the handler.
+ switch args[1] {
+ case "ps":
+ xData, err = c.ExplorePs()
+ case "fds":
+ xData, err = c.ExploreFds()
+ case "mems":
+ xData, err = c.ExploreMems()
+ case "rss":
+ xData, err = c.ExploreRss()
+ default:
+ err = errors.New("Error exploring directory: Invalid explore type")
+ }
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ jsonData, err := json.MarshalIndent(xData, "", " ")
+ if err != nil {
+ log.Fatal(errors.New(fmt.Sprint("Error processing data into JSON: ", err)))
+ }
+ fmt.Println(string(jsonData))
+ },
+}
+
+// Add all commands to the root command and configure flags
+func init() {
+ // Disable completion generation
+ rootCmd.CompletionOptions.DisableDefaultCmd = true
+ // Decode options
+ decodeCmd.Flags().StringVarP(&inputFilePath, "input", "i", "",
+ "Path to the binary image file")
+ decodeCmd.Flags().StringVarP(&outputFilePath, "output", "o", "",
+ "Path to the destination JSON file")
+ decodeCmd.Flags().BoolVar(&pretty, "pretty", false,
+ "Provide indented and multi-line JSON output")
+ rootCmd.AddCommand(decodeCmd)
+ // Encode options
+ encodeCmd.Flags().StringVarP(&inputFilePath, "input", "i", "",
+ "Path to the JSON file")
+ encodeCmd.Flags().StringVarP(&outputFilePath, "output", "o", "",
+ "Path to the destination image file")
+ rootCmd.AddCommand(encodeCmd)
+ // Show options
+ showCmd.Flags().BoolVar(&noPayload, "nopl", false,
+ "Do not show payload contents")
+ rootCmd.AddCommand(showCmd)
+ // Info and X commands
+ rootCmd.AddCommand(infoCmd)
+ rootCmd.AddCommand(xCmd)
+}
+
+func main() {
+ if err := rootCmd.Execute(); err != nil {
+ log.Fatal(err)
+ }
+}
diff --git a/crit/crit.go b/crit/crit.go
new file mode 100644
index 0000000..a7d401e
--- /dev/null
+++ b/crit/crit.go
@@ -0,0 +1,167 @@
+package crit
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+)
+
+// CritSvc is the interface that wraps all CRIT operations.
+// To create a CRIT service instance, use New().
+type CritSvc interface {
+ // Read binary image file into Go struct (decode.go)
+ Decode() (*CriuImage, error)
+ // Read only counts of image file entries into Go struct
+ Info() (*CriuImage, error)
+ // Read JSON into Go struct
+ Parse() (*CriuImage, error)
+ // Write JSON to binary image file (encode.go)
+ Encode(*CriuImage) error
+ // Explore process information (explore.go)
+ ExplorePs() (*PsTree, error)
+ ExploreFds() ([]*Fd, error)
+ ExploreMems() ([]*MemMap, error)
+ ExploreRss() ([]*RssMap, error)
+}
+
+// crit implements the CritSvc interface. It contains:
+// * Path of the input file
+// * Path of the output file
+// * Path of the input directory (for `crit explore`)
+// * Boolean to format and indent JSON output
+// * Boolean to skip payload data
+// * Boolean to indicate CLI usage
+type crit struct {
+ inputFilePath string
+ outputFilePath string
+ // Directory path is required only for exploring
+ inputDirPath string
+ pretty bool
+ noPayload bool
+ cli bool
+}
+
+// New creates a CRIT service to use in a Go program
+func New(
+ inputFilePath, outputFilePath,
+ inputDirPath string,
+ pretty, noPayload bool,
+) CritSvc {
+ return &crit{
+ inputFilePath: inputFilePath,
+ outputFilePath: outputFilePath,
+ inputDirPath: inputDirPath,
+ pretty: pretty,
+ noPayload: noPayload,
+ cli: false,
+ }
+}
+
+// NewCli creates a CRIT service to use in a CLI app.
+// All functions called by this service will wait for
+// input from stdin if an input path is not provided.
+func NewCli(
+ inputFilePath, outputFilePath,
+ inputDirPath string,
+ pretty, noPayload bool,
+) CritSvc {
+ return &crit{
+ inputFilePath: inputFilePath,
+ outputFilePath: outputFilePath,
+ inputDirPath: inputDirPath,
+ pretty: pretty,
+ noPayload: noPayload,
+ cli: true,
+ }
+}
+
+// Decode loads a binary image file into a CriuImage object
+func (c *crit) Decode() (*CriuImage, error) {
+ // If no input path is provided in the CLI, read
+ // from stdin (pipe, redirection, or keyboard)
+ if c.inputFilePath == "" {
+ if c.cli {
+ return decodeImg(os.Stdin, c.noPayload)
+ }
+ }
+
+ imgFile, err := os.Open(c.inputFilePath)
+ if err != nil {
+ return nil,
+ errors.New(fmt.Sprint("Error opening image file: ", err))
+ }
+ defer imgFile.Close()
+ // Convert binary image to Go struct
+ return decodeImg(imgFile, c.noPayload)
+}
+
+// Info loads a binary image file into a CriuImage object
+// with a single entry - the number of entries in the file.
+// No payload data is present in the returned object.
+func (c *crit) Info() (*CriuImage, error) {
+ // If no input path is provided in the CLI, read
+ // from stdin (pipe, redirection, or keyboard)
+ if c.inputFilePath == "" {
+ if c.cli {
+ return countImg(os.Stdin)
+ }
+ }
+
+ imgFile, err := os.Open(c.inputFilePath)
+ if err != nil {
+ return nil,
+ errors.New(fmt.Sprint("Error opening image file: ", err))
+ }
+ defer imgFile.Close()
+ // Convert binary image to Go struct
+ return countImg(imgFile)
+}
+
+// Parse is the JSON equivalent of Decode.
+// It loads a JSON file into a CriuImage object.
+func (c *crit) Parse() (*CriuImage, error) {
+ var (
+ jsonData []byte
+ err error
+ )
+
+ // If no input path is provided in the CLI, read
+ // from stdin (pipe, redirection, or keyboard)
+ if c.inputFilePath == "" {
+ if c.cli {
+ jsonData, err = io.ReadAll(os.Stdin)
+ }
+ } else {
+ jsonData, err = os.ReadFile(c.inputFilePath)
+ }
+
+ if err != nil {
+ return nil, errors.New(fmt.Sprint("Error reading JSON: ", err))
+ }
+
+ img := CriuImage{}
+ if err = json.Unmarshal(jsonData, &img); err != nil {
+ return nil, errors.New(fmt.Sprint("Error processing JSON: ", err))
+ }
+
+ return &img, nil
+}
+
+// Encode dumps a CriuImage object into a binary image file
+func (c *crit) Encode(img *CriuImage) error {
+ // If no output path is provided in the CLI, print to stdout
+ if c.outputFilePath == "" {
+ if c.cli {
+ return encodeImg(img, os.Stdout)
+ }
+ }
+ imgFile, err := os.Create(c.outputFilePath)
+ if err != nil {
+ return errors.New(fmt.Sprint("Error opening destination file: ", err))
+ }
+ defer imgFile.Close()
+ // Convert JSON to Go struct
+ return encodeImg(img, imgFile)
+}
diff --git a/crit/decode-extra.go b/crit/decode-extra.go
new file mode 100644
index 0000000..6cde525
--- /dev/null
+++ b/crit/decode-extra.go
@@ -0,0 +1,279 @@
+package crit
+
+import (
+ "encoding/base64"
+ "encoding/binary"
+ "encoding/json"
+ "errors"
+ "io"
+ "os"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+// Extra data handler for pipe and FIFO data
+func decodePipesData(
+ f *os.File,
+ payload proto.Message,
+ noPayload bool,
+) (string, error) {
+ p, ok := payload.(*images.PipeDataEntry)
+ if !ok {
+ return "", errors.New("Unable to assert payload type")
+ }
+ extraSize := p.GetBytes()
+
+ if noPayload {
+ _, err := f.Seek(int64(extraSize), 1)
+ if err != nil {
+ return "", err
+ }
+ return countBytes(int64(extraSize)), nil
+ }
+ extraBuf := make([]byte, extraSize)
+ if _, err := f.Read(extraBuf); err != nil {
+ return "", err
+ }
+ return base64.StdEncoding.EncodeToString(extraBuf), nil
+}
+
+// Extra data handler for socket queues
+func decodeSkQueues(
+ f *os.File,
+ payload proto.Message,
+ noPayload bool,
+) (string, error) {
+ p, ok := payload.(*images.SkPacketEntry)
+ if !ok {
+ return "", errors.New("Unable to assert payload type")
+ }
+ extraSize := p.GetLength()
+
+ if noPayload {
+ _, err := f.Seek(int64(extraSize), 1)
+ if err != nil {
+ return "", err
+ }
+ return countBytes(int64(extraSize)), nil
+ }
+ extraBuf := make([]byte, extraSize)
+ if _, err := f.Read(extraBuf); err != nil {
+ return "", err
+ }
+ return base64.StdEncoding.EncodeToString(extraBuf), nil
+}
+
+type tcpStreamExtra struct {
+ InQ string `json:"inQ"`
+ OutQ string `json:"outQ"`
+}
+
+// Extra data handler for TCP streams
+func decodeTcpStream(
+ f *os.File,
+ payload proto.Message,
+ noPayload bool,
+) (string, error) {
+ p, ok := payload.(*images.TcpStreamEntry)
+ if !ok {
+ return "", errors.New("Unable to assert payload type")
+ }
+ inQLen := p.GetInqLen()
+ outQLen := p.GetOutqLen()
+
+ if noPayload {
+ _, err := f.Seek(0, 2)
+ if err != nil {
+ return "", err
+ }
+ return countBytes(int64(inQLen + outQLen)), nil
+ }
+
+ extra := tcpStreamExtra{}
+ extraBuf := make([]byte, inQLen)
+ if _, err := f.Read(extraBuf); err != nil {
+ return "", err
+ }
+ extra.InQ = base64.StdEncoding.EncodeToString(extraBuf)
+ extraBuf = make([]byte, outQLen)
+ if _, err := f.Read(extraBuf); err != nil {
+ return "", err
+ }
+ extra.OutQ = base64.StdEncoding.EncodeToString(extraBuf)
+
+ extraJson, err := json.Marshal(extra)
+ return string(extraJson), err
+}
+
+// Extra data handler for BPF map data
+func decodeBpfmapData(
+ f *os.File,
+ payload proto.Message,
+ noPayload bool,
+) (string, error) {
+ p, ok := payload.(*images.BpfmapDataEntry)
+ if !ok {
+ return "", errors.New("Unable to assert payload type")
+ }
+ extraSize := p.GetKeysBytes() + p.GetValuesBytes()
+
+ if noPayload {
+ _, err := f.Seek(int64(extraSize), 1)
+ if err != nil {
+ return "", err
+ }
+ return countBytes(int64(extraSize)), nil
+ }
+ extraBuf := make([]byte, extraSize)
+ if _, err := f.Read(extraBuf); err != nil {
+ return "", err
+ }
+ return base64.StdEncoding.EncodeToString(extraBuf), nil
+}
+
+// Extra data handler for IPC semaphores
+func decodeIpcSem(
+ f *os.File,
+ payload proto.Message,
+ noPayload bool,
+) (string, error) {
+ p, ok := payload.(*images.IpcSemEntry)
+ if !ok {
+ return "", errors.New("Unable to assert payload type")
+ }
+ // Each semaphore is 16-bit
+ extraSize := int64(p.GetNsems()) * 2
+ // Round off to nearest 64-bit multiple
+ roundedSize := (extraSize/8 + 1) * 8
+
+ if noPayload {
+ _, err := f.Seek(roundedSize, 1)
+ if err != nil {
+ return "", err
+ }
+ return countBytes(extraSize), nil
+ }
+ extraPayload := []uint16{}
+ for i := 0; i < int(extraSize/2); i++ {
+ // Create 16-bit buffer
+ extraBuf := make([]byte, 2)
+ if _, err := f.Read(extraBuf); err != nil {
+ return "", err
+ }
+ extraPayload = append(extraPayload, binary.LittleEndian.Uint16(extraBuf))
+ }
+ _, err := f.Seek(roundedSize-extraSize, 1)
+ if err != nil {
+ return "", err
+ }
+ extraJson, err := json.Marshal(extraPayload)
+ return string(extraJson), err
+}
+
+// Extra data handler for IPC shared memory
+func decodeIpcShm(
+ f *os.File,
+ payload proto.Message,
+ noPayload bool,
+) (string, error) {
+ p, ok := payload.(*images.IpcShmEntry)
+ if !ok {
+ return "", errors.New("Unable to assert payload type")
+ }
+ extraSize := int64(p.GetSize())
+ // Round off to nearest 32-bit multiple
+ roundedSize := (extraSize/4 + 1) * 4
+
+ if noPayload {
+ _, err := f.Seek(roundedSize, 1)
+ if err != nil {
+ return "", err
+ }
+ return countBytes(extraSize), nil
+ }
+ extraBuf := make([]byte, extraSize)
+ if _, err := f.Read(extraBuf); err != nil {
+ return "", err
+ }
+ _, err := f.Seek(roundedSize-extraSize, 1)
+ if err != nil {
+ return "", err
+ }
+ return base64.StdEncoding.EncodeToString(extraBuf), nil
+}
+
+// Extra data handler for IPC messages
+func decodeIpcMsg(
+ f *os.File,
+ payload proto.Message,
+ noPayload bool,
+) (string, error) {
+ p, ok := payload.(*images.IpcMsgEntry)
+ if !ok {
+ return "", errors.New("Unable to assert payload type")
+ }
+ msgQNum := int64(p.GetQnum())
+ sizeBuf := make([]byte, 4)
+ // Store payload size if noPayload is true
+ var totalSize int64 = 0
+ // Store messages as string slice
+ extraPayload := []string{}
+
+ for i := 0; i < int(msgQNum); i++ {
+ n, err := f.Read(sizeBuf)
+ if n == 0 {
+ if errors.Is(err, io.EOF) {
+ break
+ }
+ return "", err
+ }
+ extraSize := uint64(binary.LittleEndian.Uint32(sizeBuf))
+ msgBuf := make([]byte, extraSize)
+ if _, err = f.Read(msgBuf); err != nil {
+ return "", err
+ }
+ msg := &images.IpcMsg{}
+ if err = proto.Unmarshal(msgBuf, msg); err != nil {
+ return "", err
+ }
+ msgSize := int64(msg.GetMsize())
+ // Round off to nearest 64-bit multiple
+ roundedMsgSize := (msgSize/8 + 1) * 8
+
+ if noPayload {
+ _, err = f.Seek(roundedMsgSize, 1)
+ if err != nil {
+ return "", err
+ }
+ totalSize += int64(extraSize) + msgSize
+ } else {
+ jsonMsg, err := protojson.Marshal(msg)
+ if err != nil {
+ return "", err
+ }
+ extraPayload = append(extraPayload, string(jsonMsg))
+
+ msgDataBuf := make([]byte, msgSize)
+ if _, err = f.Read(msgDataBuf); err != nil {
+ return "", err
+ }
+ msgData := base64.StdEncoding.EncodeToString(msgDataBuf)
+ extraPayload = append(extraPayload, msgData)
+ _, err = f.Seek(roundedMsgSize-msgSize, 1)
+ if err != nil {
+ return "", err
+ }
+ }
+ }
+
+ if noPayload {
+ return countBytes(totalSize), nil
+ }
+ extraJson, err := json.Marshal(extraPayload)
+ if err != nil {
+ return "", err
+ }
+ return string(extraJson), nil
+}
diff --git a/crit/decode.go b/crit/decode.go
new file mode 100644
index 0000000..7fabc76
--- /dev/null
+++ b/crit/decode.go
@@ -0,0 +1,202 @@
+package crit
+
+import (
+ "encoding/base64"
+ "encoding/binary"
+ "errors"
+ "io"
+ "os"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+ "google.golang.org/protobuf/proto"
+)
+
+// decodeImg identifies the type of image file
+// and calls the appropriate decode handler
+func decodeImg(f *os.File, noPayload bool) (*CriuImage, error) {
+ img := CriuImage{}
+ var err error
+
+ // Identify magic
+ if img.Magic, err = readMagic(f); err != nil {
+ return nil, err
+ }
+
+ switch img.Magic {
+ // Special handlers
+ case "PAGEMAP":
+ err = img.decodePagemap(f)
+ case "GHOST_FILE":
+ err = img.decodeGhostFile(f, noPayload)
+ // Default handler with func for extra data
+ case "PIPES_DATA":
+ err = img.decodeDefault(f, decodePipesData, noPayload)
+ case "FIFO_DATA":
+ err = img.decodeDefault(f, decodePipesData, noPayload)
+ case "SK_QUEUES":
+ err = img.decodeDefault(f, decodeSkQueues, noPayload)
+ case "TCP_STREAM":
+ err = img.decodeDefault(f, decodeTcpStream, noPayload)
+ case "BPFMAP_DATA":
+ err = img.decodeDefault(f, decodeBpfmapData, noPayload)
+ case "IPCNS_SEM":
+ err = img.decodeDefault(f, decodeIpcSem, noPayload)
+ case "IPCNS_SHM":
+ err = img.decodeDefault(f, decodeIpcShm, noPayload)
+ case "IPCNS_MSG":
+ err = img.decodeDefault(f, decodeIpcMsg, noPayload)
+ default:
+ err = img.decodeDefault(f, nil, noPayload)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ return &img, nil
+}
+
+// decodeDefault is used for all image files
+// that are in the standard protobuf format
+func (img *CriuImage) decodeDefault(
+ f *os.File,
+ decodeExtra func(*os.File, proto.Message, bool) (string, error),
+ noPayload bool,
+) error {
+ sizeBuf := make([]byte, 4)
+ // Read payload size and payload until EOF
+ for {
+ if n, err := f.Read(sizeBuf); err != nil {
+ if n == 0 && err == io.EOF {
+ break
+ }
+ return err
+ }
+ // Create proto struct to hold payload
+ payload, err := images.ProtoHandler(img.Magic)
+ if err != nil {
+ return err
+ }
+ payloadSize := uint64(binary.LittleEndian.Uint32(sizeBuf))
+ payloadBuf := make([]byte, payloadSize)
+ if _, err := f.Read(payloadBuf); err != nil {
+ return err
+ }
+ if err := proto.Unmarshal(payloadBuf, payload); err != nil {
+ return err
+ }
+ entry := CriuEntry{Message: payload}
+ if decodeExtra != nil {
+ extraPayload, err := decodeExtra(f, payload, noPayload)
+ if err != nil {
+ return err
+ }
+ entry.Extra = extraPayload
+ }
+ img.Entries = append(img.Entries, &entry)
+ }
+ return nil
+}
+
+// Special handler for pagemap image
+func (img *CriuImage) decodePagemap(f *os.File) error {
+ sizeBuf := make([]byte, 4)
+ // First entry is pagemap head
+ var payload proto.Message = &images.PagemapHead{}
+ // Read payload size and payload until EOF
+ for {
+ if n, err := f.Read(sizeBuf); err != nil {
+ if n == 0 && err == io.EOF {
+ break
+ }
+ return err
+ }
+
+ payloadSize := uint64(binary.LittleEndian.Uint32(sizeBuf))
+ payloadBuf := make([]byte, payloadSize)
+ if _, err := f.Read(payloadBuf); err != nil {
+ return err
+ }
+ if err := proto.Unmarshal(payloadBuf, payload); err != nil {
+ return err
+ }
+ entry := CriuEntry{Message: payload}
+ img.Entries = append(img.Entries, &entry)
+ // Create struct for next entry
+ payload = &images.PagemapEntry{}
+ }
+ return nil
+}
+
+// Special handler for ghost image
+func (img *CriuImage) decodeGhostFile(f *os.File, noPayload bool) error {
+ sizeBuf := make([]byte, 4)
+ if _, err := f.Read(sizeBuf); err != nil {
+ return err
+ }
+ // Create proto struct for primary entry
+ payload := &images.GhostFileEntry{}
+ payloadSize := uint64(binary.LittleEndian.Uint32(sizeBuf))
+ payloadBuf := make([]byte, payloadSize)
+ if _, err := f.Read(payloadBuf); err != nil {
+ return err
+ }
+ if err := proto.Unmarshal(payloadBuf, payload); err != nil {
+ return err
+ }
+ entry := CriuEntry{Message: payload}
+
+ if payload.GetChunks() {
+ img.Entries = append(img.Entries, &entry)
+ for {
+ n, err := f.Read(sizeBuf)
+ if n == 0 {
+ if errors.Is(err, io.EOF) {
+ break
+ }
+ return err
+ }
+ // Create proto struct for chunk
+ payload := &images.GhostChunkEntry{}
+ payloadSize := uint64(binary.LittleEndian.Uint32(sizeBuf))
+ payloadBuf := make([]byte, payloadSize)
+ if _, err := f.Read(payloadBuf); err != nil {
+ return err
+ }
+ if err := proto.Unmarshal(payloadBuf, payload); err != nil {
+ return err
+ }
+ entry = CriuEntry{Message: payload}
+ if noPayload {
+ if _, err = f.Seek(int64(payload.GetLen()), 1); err != nil {
+ return err
+ }
+ } else {
+ extraBuf := make([]byte, payload.GetLen())
+ if _, err := f.Read(extraBuf); err != nil {
+ return err
+ }
+ entry.Extra = base64.StdEncoding.EncodeToString(extraBuf)
+ }
+ img.Entries = append(img.Entries, &entry)
+ }
+ } else {
+ if noPayload {
+ // Seek to the end of the file
+ if _, err := f.Seek(0, 2); err != nil {
+ return err
+ }
+ } else {
+ fInfo, err := f.Stat()
+ if err != nil {
+ return err
+ }
+ extraBuf := make([]byte, uint64(fInfo.Size())-4-payloadSize)
+ if _, err := f.Read(extraBuf); err != nil {
+ return err
+ }
+ entry.Extra = base64.StdEncoding.EncodeToString(extraBuf)
+ }
+ img.Entries = append(img.Entries, &entry)
+ }
+ return nil
+}
diff --git a/crit/encode-extra.go b/crit/encode-extra.go
new file mode 100644
index 0000000..c3408aa
--- /dev/null
+++ b/crit/encode-extra.go
@@ -0,0 +1,123 @@
+package crit
+
+import (
+ "encoding/base64"
+ "encoding/binary"
+ "encoding/json"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+// Extra payload handler for pipe and FIFO data
+func encodePipesData(extra string) ([]byte, error) {
+ return base64.StdEncoding.DecodeString(extra)
+}
+
+// Extra payload handler for socket queues
+func encodeSkQueues(extra string) ([]byte, error) {
+ return base64.StdEncoding.DecodeString(extra)
+}
+
+// Extra payload handler for TCP streams
+func encodeTcpStream(extra string) ([]byte, error) {
+ extraPayload := tcpStreamExtra{}
+ if err := json.Unmarshal([]byte(extra), &extraPayload); err != nil {
+ return nil, err
+ }
+
+ inqBytes, err := base64.StdEncoding.DecodeString(extraPayload.InQ)
+ if err != nil {
+ return nil, err
+ }
+ outQBytes, err := base64.StdEncoding.DecodeString(extraPayload.OutQ)
+ if err != nil {
+ return nil, err
+ }
+
+ return append(inqBytes, outQBytes...), nil
+}
+
+// Extra payload handler for BPF map data
+func encodeBpfmapData(extra string) ([]byte, error) {
+ return base64.StdEncoding.DecodeString(extra)
+}
+
+// Extra payload handler for IPC semaphores
+func encodeIpcSem(extra string) ([]byte, error) {
+ extraEntries := []uint16{}
+ if err := json.Unmarshal([]byte(extra), &extraEntries); err != nil {
+ return nil, err
+ }
+ extraPayload := []byte{}
+ extraBuf := make([]byte, 2)
+
+ for _, entry := range extraEntries {
+ binary.LittleEndian.PutUint16(extraBuf, entry)
+ extraPayload = append(extraPayload, extraBuf...)
+ }
+ // Each semaphore is 16-bit
+ extraSize := len(extraEntries) * 2
+ // Round off to nearest 64-bit multiple
+ roundedSize := (extraSize/8 + 1) * 8
+ // Append zeroes for the remaining bytes
+ extraPayload = append(extraPayload, make([]byte, roundedSize-extraSize)...)
+
+ return extraPayload, nil
+}
+
+// Extra payload handler for IPC shared memory
+func encodeIpcShm(extra string) ([]byte, error) {
+ extraPayload, err := base64.StdEncoding.DecodeString(extra)
+ if err != nil {
+ return nil, err
+ }
+ // Round off to nearest 32-bit multiple
+ roundedSize := len(extraPayload)
+ // Append zeroes for remaining bytes
+ extraPayload = append(extraPayload, make([]byte, roundedSize-len(extraPayload))...)
+
+ return extraPayload, nil
+}
+
+// Extra payload handler for IPC messages
+func encodeIpcMsg(extra string) ([]byte, error) {
+ extraEntries := []string{}
+ if err := json.Unmarshal([]byte(extra), &extraEntries); err != nil {
+ return nil, err
+ }
+ extraPayload := []byte{}
+ sizeBuf := make([]byte, 4)
+
+ for i := 0; i < len(extraEntries)/2; i++ {
+ msg := &images.IpcMsg{}
+ // Unmarshal JSON into proto struct
+ if err := protojson.Unmarshal([]byte(extraEntries[i]), msg); err != nil {
+ return nil, err
+ }
+ // Marshal proto struct into binary
+ msgPayload, err := proto.Marshal(msg)
+ if err != nil {
+ return nil, err
+ }
+ // Append size of message, followed by the message
+ binary.LittleEndian.PutUint32(sizeBuf, uint32(len(msgPayload)))
+ extraPayload = append(extraPayload, sizeBuf...)
+ extraPayload = append(extraPayload, msgPayload...)
+ // Append message data
+ msgData, err := base64.StdEncoding.DecodeString(extraEntries[i+1])
+ if err != nil {
+ return nil, err
+ }
+ extraPayload = append(extraPayload, msgData...)
+
+ msgSize := int64(msg.GetMsize())
+ // Round off to nearest 64-bit multiple
+ roundedMsgSize := (msgSize/8 + 1) * 8
+ // Append zeroes for remaining bytes
+ extraPayload = append(extraPayload, make([]byte, roundedMsgSize-msgSize)...)
+ }
+
+ return extraPayload, nil
+}
diff --git a/crit/encode.go b/crit/encode.go
new file mode 100644
index 0000000..eb24dcd
--- /dev/null
+++ b/crit/encode.go
@@ -0,0 +1,171 @@
+package crit
+
+import (
+ "encoding/base64"
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "os"
+
+ "github.com/checkpoint-restore/go-criu/v6/magic"
+ "google.golang.org/protobuf/proto"
+)
+
+// encodeImg identifies the type of image file
+// and calls the appropriate encode handler
+func encodeImg(img *CriuImage, f *os.File) error {
+ magicMap := magic.LoadMagic()
+ var err error
+
+ // Write magic
+ magic, ok := magicMap.ByName[img.Magic]
+ if !ok {
+ return errors.New(fmt.Sprint("Unknown magic ", img.Magic))
+ }
+ magicBuf := make([]byte, 4)
+ if img.Magic != "INVENTORY" {
+ if img.Magic == "STATS" || img.Magic == "IRMAP_CACHE" {
+ binary.LittleEndian.PutUint32(magicBuf, uint32(magicMap.ByName["IMG_SERVICE"]))
+ } else {
+ binary.LittleEndian.PutUint32(magicBuf, uint32(magicMap.ByName["IMG_COMMON"]))
+ }
+ if _, err = f.Write(magicBuf); err != nil {
+ return err
+ }
+ }
+ binary.LittleEndian.PutUint32(magicBuf, uint32(magic))
+ if _, err = f.Write(magicBuf); err != nil {
+ return err
+ }
+
+ // Call handler for entries
+ switch img.Magic {
+ // Special handler for ghost files
+ case "GHOST_FILE":
+ err = img.encodeGhostFile(f)
+ // Default handler with func for extra data
+ case "BPFMAP_DATA":
+ err = img.encodeDefault(f, encodeBpfmapData)
+ case "FIFO_DATA":
+ err = img.encodeDefault(f, encodePipesData)
+ case "IPCNS_MSG":
+ err = img.encodeDefault(f, encodeIpcMsg)
+ case "IPCNS_SEM":
+ err = img.encodeDefault(f, encodeIpcSem)
+ case "IPCNS_SHM":
+ err = img.encodeDefault(f, encodeIpcShm)
+ case "PIPES_DATA":
+ err = img.encodeDefault(f, encodePipesData)
+ case "SK_QUEUES":
+ err = img.encodeDefault(f, encodeSkQueues)
+ case "TCP_STREAM":
+ err = img.encodeDefault(f, encodeTcpStream)
+ default:
+ err = img.encodeDefault(f, nil)
+ }
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// encodeDefault is used for all image files
+// that are in the standard protobuf format
+func (img *CriuImage) encodeDefault(
+ f *os.File,
+ encodeExtra func(string) ([]byte, error),
+) error {
+ sizeBuf := make([]byte, 4)
+
+ for _, entry := range img.Entries {
+ payload, err := proto.Marshal(entry.Message)
+ if err != nil {
+ return err
+ }
+ // Write size of payload into buffer
+ binary.LittleEndian.PutUint32(sizeBuf, uint32(len(payload)))
+
+ if _, err = f.Write(sizeBuf); err != nil {
+ return err
+ }
+ if _, err = f.Write(payload); err != nil {
+ return err
+ }
+
+ // Write extra data
+ if encodeExtra != nil {
+ if entry.Extra != "" {
+ extraPayload, err := encodeExtra(entry.Extra)
+ if err != nil {
+ return err
+ }
+ if _, err = f.Write(extraPayload); err != nil {
+ return err
+ }
+ }
+ }
+ }
+
+ return nil
+}
+
+// Special handler for ghost image
+func (img *CriuImage) encodeGhostFile(f *os.File) error {
+ sizeBuf := make([]byte, 4)
+ // Write primary entry
+ payload, err := proto.Marshal(img.Entries[0].Message)
+ if err != nil {
+ return err
+ }
+ // Write size of payload into buffer
+ binary.LittleEndian.PutUint32(sizeBuf, uint32(len(payload)))
+
+ if _, err = f.Write(sizeBuf); err != nil {
+ return err
+ }
+ if _, err = f.Write(payload); err != nil {
+ return err
+ }
+
+ // If there is only one entry,
+ // then no chunks are present
+ if len(img.Entries) == 1 {
+ // Write extra data
+ extraPayload, err := base64.StdEncoding.DecodeString(img.Entries[0].Extra)
+ if err != nil {
+ return err
+ }
+ if _, err = f.Write(extraPayload); err != nil {
+ return err
+ }
+
+ return nil
+ }
+
+ // Write chunks
+ for _, entry := range img.Entries[1:] {
+ payload, err = proto.Marshal(entry.Message)
+ if err != nil {
+ return err
+ }
+ extraPayload, err := base64.StdEncoding.DecodeString(entry.Extra)
+ if err != nil {
+ return err
+ }
+
+ binary.LittleEndian.PutUint32(sizeBuf, uint32(len(extraPayload)))
+
+ if _, err = f.Write(sizeBuf); err != nil {
+ return err
+ }
+ if _, err = f.Write(payload); err != nil {
+ return err
+ }
+ if _, err = f.Write(extraPayload); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/crit/explore.go b/crit/explore.go
new file mode 100644
index 0000000..4de053d
--- /dev/null
+++ b/crit/explore.go
@@ -0,0 +1,363 @@
+package crit
+
+import (
+ "fmt"
+ "path/filepath"
+ "strconv"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+)
+
+// PsTree represents the process tree
+type PsTree struct {
+ PId uint32 `json:"pId"`
+ PgId uint32 `json:"pgId"`
+ SId uint32 `json:"sId"`
+ Comm string `json:"comm"`
+ Process *images.PstreeEntry `json:"-"`
+ Core *images.CoreEntry `json:"-"`
+ Children []*PsTree `json:"children,omitempty"`
+}
+
+// ExplorePs constructs the process tree and returns the root process
+func (c *crit) ExplorePs() (*PsTree, error) {
+ psTreeImg, err := getImg(filepath.Join(c.inputDirPath, "pstree.img"))
+ if err != nil {
+ return nil, err
+ }
+
+ processes := make(map[uint32]*PsTree)
+ var psTreeRoot *PsTree
+ for _, entry := range psTreeImg.Entries {
+ process := entry.Message.(*images.PstreeEntry)
+ pId := process.GetPid()
+
+ coreImg, err := getImg(filepath.Join(c.inputDirPath, fmt.Sprintf("core-%d.img", pId)))
+ if err != nil {
+ return nil, err
+ }
+ coreData := coreImg.Entries[0].Message.(*images.CoreEntry)
+
+ ps := &PsTree{
+ PId: pId,
+ PgId: process.GetPgid(),
+ SId: process.GetSid(),
+ Comm: coreData.Tc.GetComm(),
+ Process: process,
+ Core: coreData,
+ }
+ // If there is no parent process, then it is the root
+ if process.GetPpid() == 0 {
+ psTreeRoot = ps
+ }
+ processes[pId] = ps
+ }
+
+ for _, ps := range processes {
+ parent := ps.Process.GetPpid()
+ if parent != 0 {
+ processes[parent].Children = append(processes[parent].Children, ps)
+ }
+ }
+
+ return psTreeRoot, nil
+}
+
+// Fd represents the file descriptors opened in a single process
+type Fd struct {
+ PId uint32 `json:"pId"`
+ Files []*File `json:"files,omitempty"`
+}
+
+// File represents a single opened file
+type File struct {
+ Fd string `json:"fd"`
+ Path string `json:"path"`
+}
+
+// ExploreFds searches the process tree for open files
+// and returns a list of PIDs with the corresponding files
+func (c *crit) ExploreFds() ([]*Fd, error) {
+ psTreeImg, err := getImg(filepath.Join(c.inputDirPath, "pstree.img"))
+ if err != nil {
+ return nil, err
+ }
+
+ fds := make([]*Fd, 0)
+ for _, entry := range psTreeImg.Entries {
+ process := entry.Message.(*images.PstreeEntry)
+ pId := process.GetPid()
+ // Get file with object IDs
+ idsImg, err := getImg(filepath.Join(c.inputDirPath, fmt.Sprintf("ids-%d.img", pId)))
+ if err != nil {
+ return nil, err
+ }
+ filesId := idsImg.Entries[0].Message.(*images.TaskKobjIdsEntry).GetFilesId()
+ // Get open file descriptors
+ fdInfoImg, err := getImg(filepath.Join(c.inputDirPath, fmt.Sprintf("fdinfo-%d.img", filesId)))
+ if err != nil {
+ return nil, err
+ }
+
+ fdEntry := Fd{PId: pId}
+ for _, fdInfoEntry := range fdInfoImg.Entries {
+ fdInfo := fdInfoEntry.Message.(*images.FdinfoEntry)
+ filePath, err := getFilePath(c.inputDirPath,
+ fdInfo.GetId(), fdInfo.GetType())
+ if err != nil {
+ return nil, err
+ }
+ file := File{
+ Fd: strconv.FormatUint(uint64(fdInfo.GetFd()), 10),
+ Path: filePath,
+ }
+ fdEntry.Files = append(fdEntry.Files, &file)
+ }
+ // Get chroot and chdir info
+ fsImg, err := getImg(filepath.Join(c.inputDirPath, fmt.Sprintf("fs-%d.img", pId)))
+ if err != nil {
+ return nil, err
+ }
+ fs := fsImg.Entries[0].Message.(*images.FsEntry)
+ filePath, err := getFilePath(c.inputDirPath,
+ fs.GetCwdId(), images.FdTypes_REG)
+ if err != nil {
+ return nil, err
+ }
+ fdEntry.Files = append(fdEntry.Files, &File{
+ Fd: "cwd",
+ Path: filePath,
+ })
+ filePath, err = getFilePath(c.inputDirPath,
+ fs.GetRootId(), images.FdTypes_REG)
+ if err != nil {
+ return nil, err
+ }
+ fdEntry.Files = append(fdEntry.Files, &File{
+ Fd: "root",
+ Path: filePath,
+ })
+
+ fds = append(fds, &fdEntry)
+ }
+
+ return fds, nil
+}
+
+// MemMap represents the memory mapping of a single process
+type MemMap struct {
+ PId uint32 `json:"pId"`
+ Exe string `json:"exe"`
+ Mems []*Mem `json:"mems,omitempty"`
+}
+
+// Mem represents the memory mapping of a single file
+type Mem struct {
+ Start string `json:"start"`
+ End string `json:"end"`
+ Protection string `json:"protection"`
+ Resource string `json:"resource,omitempty"`
+}
+
+// ExploreMems traverses the process tree and returns a
+// list of processes with the corresponding memory mapping
+func (c *crit) ExploreMems() ([]*MemMap, error) {
+ psTreeImg, err := getImg(filepath.Join(c.inputDirPath, "pstree.img"))
+ if err != nil {
+ return nil, err
+ }
+
+ vmaIdMap, vmaId := make(map[uint64]int), 0
+ // Use a closure to handle the ID counter
+ getVmaId := func(shmId uint64) int {
+ if _, ok := vmaIdMap[shmId]; !ok {
+ vmaIdMap[shmId] = vmaId
+ vmaId++
+ }
+ return vmaIdMap[shmId]
+ }
+
+ memMaps := make([]*MemMap, 0)
+ for _, entry := range psTreeImg.Entries {
+ process := entry.Message.(*images.PstreeEntry)
+ pId := process.GetPid()
+ // Get memory mappings
+ mmImg, err := getImg(filepath.Join(c.inputDirPath, fmt.Sprintf("mm-%d.img", pId)))
+ if err != nil {
+ return nil, err
+ }
+ mmInfo := mmImg.Entries[0].Message.(*images.MmEntry)
+ exePath, err := getFilePath(c.inputDirPath,
+ mmInfo.GetExeFileId(), images.FdTypes_REG)
+ if err != nil {
+ return nil, err
+ }
+
+ memMap := MemMap{
+ PId: pId,
+ Exe: exePath,
+ }
+ for _, vma := range mmInfo.GetVmas() {
+ mem := Mem{
+ Start: strconv.FormatUint(vma.GetStart(), 16),
+ End: strconv.FormatUint(vma.GetEnd(), 16),
+ }
+
+ switch status := vma.GetStatus(); {
+ // Pages used by a file
+ case status&((1<<7)|(1<<6)) != 0:
+ file, err := getFilePath(c.inputDirPath,
+ uint32(vma.GetShmid()), images.FdTypes_REG)
+ if err != nil {
+ return nil, err
+ }
+ if vma.GetPgoff() != 0 {
+ mem.Resource = fmt.Sprintf("%s + 0x%x", file, vma.GetPgoff())
+ }
+ if status&(1<<7) != 0 {
+ mem.Resource = fmt.Sprint(mem.Resource, " (s)")
+ }
+ case status&(1<<3) != 0:
+ mem.Resource = "[vdso]"
+ case status&(1<<2) != 0:
+ mem.Resource = "[vsyscall]"
+ case status&(1<<1) != 0:
+ mem.Resource = "[stack]"
+ // 0x0100 (256) indicates that the page grows downwards
+ case vma.GetFlags()&0x0100 != 0:
+ mem.Resource = "[stack?]"
+ case status&(1<<11) != 0:
+ mem.Resource = fmt.Sprintf("packet[%d]", getVmaId(vma.GetShmid()))
+ case status&(1<<10) != 0:
+ mem.Resource = fmt.Sprintf("ips[%d]", getVmaId(vma.GetShmid()))
+ case status&(1<<8) != 0:
+ mem.Resource = fmt.Sprintf("shmem[%d]", getVmaId(vma.GetShmid()))
+ }
+ if vma.GetStatus()&1 == 0 {
+ mem.Resource = fmt.Sprint(mem.Resource, " *")
+ }
+
+ // Check page protection
+ r, w, x := "-", "-", "-"
+ prot := vma.GetProt()
+ if prot&1 != 0 {
+ r = "r"
+ }
+ if prot&2 != 0 {
+ w = "w"
+ }
+ if prot&4 != 0 {
+ x = "x"
+ }
+ mem.Protection = fmt.Sprint(r, w, x)
+
+ memMap.Mems = append(memMap.Mems, &mem)
+ }
+
+ memMaps = append(memMaps, &memMap)
+ }
+
+ return memMaps, nil
+}
+
+// RssMap represents the resident set size mapping of a single process
+type RssMap struct {
+ PId uint32 `json:"pId"`
+ /*
+ walrus -> walruses
+ radius -> radii
+ If you code without breaks,
+ rss -> rsi :P
+ */
+ Rsses []*Rss `json:"rss,omitempty"`
+}
+
+// Rss represents a single resident set size mapping
+type Rss struct {
+ PhyAddr string `json:"phyAddr,omitempty"`
+ PhyPages int64 `json:"phyPages,omitempty"`
+ Vmas []*Vma `json:"vmas,omitempty"`
+ Resource string `json:"resource,omitempty"`
+}
+
+// Vma represents a single virtual memory area
+type Vma struct {
+ Addr string `json:"addr,omitempty"`
+ Pages int64 `json:"pages,omitempty"`
+}
+
+// ExploreRss traverses the process tree and returns
+// a list of processes with their RSS mappings
+func (c *crit) ExploreRss() ([]*RssMap, error) {
+ psTreeImg, err := getImg(filepath.Join(c.inputDirPath, "pstree.img"))
+ if err != nil {
+ return nil, err
+ }
+
+ rssMaps := make([]*RssMap, 0)
+ for _, entry := range psTreeImg.Entries {
+ process := entry.Message.(*images.PstreeEntry)
+ pId := process.GetPid()
+ // Get virtual memory addresses
+ mmImg, err := getImg(filepath.Join(c.inputDirPath, fmt.Sprintf("mm-%d.img", pId)))
+ if err != nil {
+ return nil, err
+ }
+ vmas := mmImg.Entries[0].Message.(*images.MmEntry).GetVmas()
+ // Get physical memory addresses
+ pagemapImg, err := getImg(filepath.Join(c.inputDirPath, fmt.Sprintf("pagemap-%d.img", pId)))
+ if err != nil {
+ return nil, err
+ }
+
+ vmaIndex, vmaIndexPrev := 0, -1
+ rssMap := RssMap{PId: pId}
+ // Skip pagemap head entry
+ for _, pagemapEntry := range pagemapImg.Entries[1:] {
+ pagemapData := pagemapEntry.Message.(*images.PagemapEntry)
+ rss := Rss{
+ PhyAddr: fmt.Sprintf("%x", pagemapData.GetVaddr()),
+ PhyPages: int64(pagemapData.GetNrPages()),
+ }
+
+ for vmas[vmaIndex].GetEnd() <= pagemapData.GetVaddr() {
+ vmaIndex++
+ }
+ // Compute last virtual address
+ pagemapEnd := pagemapData.GetVaddr() + (uint64(pagemapData.GetNrPages()) << 12)
+
+ for vmas[vmaIndex].GetStart() < pagemapEnd {
+ if vmaIndex == vmaIndexPrev {
+ // Use tilde to indicate that VMA is of the previous pagemap entry
+ rss.Vmas = append(rss.Vmas, &Vma{Addr: "~"})
+ vmaIndex++
+ continue
+ }
+
+ rss.Vmas = append(rss.Vmas, &Vma{
+ Addr: fmt.Sprintf("%x", vmas[vmaIndex].GetStart()),
+ Pages: int64(vmas[vmaIndex].GetEnd()-vmas[vmaIndex].GetStart()) >> 12,
+ })
+ // Pages used by a file
+ if vmas[vmaIndex].GetStatus()&((1<<6)|(1<<7)) != 0 {
+ file, err := getFilePath(c.inputDirPath,
+ uint32(vmas[vmaIndex].GetShmid()), images.FdTypes_REG)
+ if err != nil {
+ return nil, err
+ }
+ rss.Resource = file
+ }
+ // Set reference to current index before increment
+ vmaIndexPrev = vmaIndex
+ vmaIndex++
+ }
+
+ vmaIndex--
+ rssMap.Rsses = append(rssMap.Rsses, &rss)
+ }
+
+ rssMaps = append(rssMaps, &rssMap)
+ }
+
+ return rssMaps, nil
+}
diff --git a/crit/image.go b/crit/image.go
new file mode 100644
index 0000000..74c1e6d
--- /dev/null
+++ b/crit/image.go
@@ -0,0 +1,165 @@
+package crit
+
+import (
+ "encoding/json"
+ "fmt"
+ "strings"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+// CriuImage represents a CRIU binary image file
+type CriuImage struct {
+ Magic string `json:"magic"`
+ Entries []*CriuEntry `json:"entries"`
+}
+
+// CriuEntry represents a single entry in an image
+type CriuEntry struct {
+ proto.Message
+ Extra string
+}
+
+// MarshalJSON is the marshaler for CriuEntry.
+// This is required as protojson.Marshal is
+// used for the proto.Message, and any extra
+// data is manually appended to the entry
+func (c *CriuEntry) MarshalJSON() ([]byte, error) {
+ // Special handling for "count"
+ if c.Message == nil {
+ return []byte(fmt.Sprint(`{"count":"`, c.Extra, `"}`)), nil
+ }
+
+ data, err := protojson.Marshal(c.Message)
+ if err != nil {
+ return nil, err
+ }
+ // Append extra
+ if c.Extra != "" {
+ extraString := fmt.Sprint(`"extra":"`, c.Extra, `"}`)
+ data[len(data)-1] = byte(',')
+ data = append(data, []byte(extraString)...)
+ }
+ return data, nil
+}
+
+// jsonImage is a temporary struct to store all
+// entries as raw JSON, and unmarshal them into
+// proper proto structs depending on the magic
+type jsonImage struct {
+ Magic string `json:"magic"`
+ JsonEntries []json.RawMessage `json:"entries"`
+}
+
+// UnmarshalJSON is the unmarshaler for CriuImage.
+// This is required as the object must be checked
+// for any extra data, which must be removed from
+// the JSON byte stream before unmarshaling the
+// remaining bytes into a proto.Message object
+func (img *CriuImage) UnmarshalJSON(data []byte) error {
+ imgData := jsonImage{}
+ var err error
+
+ if err = json.Unmarshal(data, &imgData); err != nil {
+ return err
+ }
+ img.Magic = imgData.Magic
+
+ switch img.Magic {
+ case "GHOST_FILE":
+ err = unmarshalGhostFile(&imgData, img)
+ case "PAGEMAP":
+ err = unmarshalPagemap(&imgData, img)
+ default:
+ err = unmarshalDefault(&imgData, img)
+ }
+
+ return err
+}
+
+// Helper to separate proto data and extra data
+func splitJsonData(data []byte) ([]byte, string) {
+ extraPayload := ""
+ dataString := string(data)
+ dataItems := strings.Split(dataString, ",")
+ // Handle extra data, if present
+ last := strings.Split(dataItems[len(dataItems)-1], ":")
+ if last[0] == `"extra"` {
+ extra := last[1]
+ extraPayload = extra[1 : len(extra)-2]
+ dataString = strings.Join(dataItems[:len(dataItems)-1], ",") + "}"
+ }
+ return []byte(dataString), extraPayload
+}
+
+// unmarshalDefault is used for all JSON data
+// that is in the standard protobuf format
+func unmarshalDefault(imgData *jsonImage, img *CriuImage) error {
+ for _, data := range imgData.JsonEntries {
+ // Create proto struct to hold payload
+ payload, err := images.ProtoHandler(img.Magic)
+ if err != nil {
+ return err
+ }
+ jsonPayload, extraPayload := splitJsonData(data)
+ // Handle proto data
+ if err = protojson.Unmarshal(jsonPayload, payload); err != nil {
+ return err
+ }
+ img.Entries = append(img.Entries, &CriuEntry{
+ Message: payload,
+ Extra: extraPayload,
+ })
+ }
+
+ return nil
+}
+
+// Special handler for ghost image
+func unmarshalGhostFile(imgData *jsonImage, img *CriuImage) error {
+ // Process primary entry
+ entry := CriuEntry{Message: &images.GhostFileEntry{}}
+ jsonPayload, extraPayload := splitJsonData(imgData.JsonEntries[0])
+ if err := protojson.Unmarshal(jsonPayload, entry.Message); err != nil {
+ return err
+ }
+ entry.Extra = extraPayload
+ img.Entries = append(img.Entries, &entry)
+ // If there is only one JSON entry,
+ // then no ghost chunks are present
+ if len(imgData.JsonEntries) == 1 {
+ return nil
+ }
+
+ // Process chunks
+ for _, data := range imgData.JsonEntries[1:] {
+ entry = CriuEntry{Message: &images.GhostChunkEntry{}}
+ jsonPayload, extraPayload = splitJsonData(data)
+ if err := protojson.Unmarshal(jsonPayload, entry.Message); err != nil {
+ return err
+ }
+ entry.Extra = extraPayload
+ img.Entries = append(img.Entries, &entry)
+ }
+
+ return nil
+}
+
+// Special handler for pagemap image
+func unmarshalPagemap(imgData *jsonImage, img *CriuImage) error {
+ // First entry is pagemap head
+ var payload proto.Message = &images.PagemapHead{}
+ for _, data := range imgData.JsonEntries {
+ entry := CriuEntry{Message: payload}
+ if err := protojson.Unmarshal(data, entry.Message); err != nil {
+ return err
+ }
+ img.Entries = append(img.Entries, &entry)
+ // Create struct for next entry
+ payload = &images.PagemapEntry{}
+ }
+
+ return nil
+}
diff --git a/crit/images/apparmor.pb.go b/crit/images/apparmor.pb.go
new file mode 100644
index 0000000..67bef0a
--- /dev/null
+++ b/crit/images/apparmor.pb.go
@@ -0,0 +1,300 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: apparmor.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type AaPolicy struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
+ Blob []byte `protobuf:"bytes,2,req,name=blob" json:"blob,omitempty"`
+}
+
+func (x *AaPolicy) Reset() {
+ *x = AaPolicy{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_apparmor_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AaPolicy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AaPolicy) ProtoMessage() {}
+
+func (x *AaPolicy) ProtoReflect() protoreflect.Message {
+ mi := &file_apparmor_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AaPolicy.ProtoReflect.Descriptor instead.
+func (*AaPolicy) Descriptor() ([]byte, []int) {
+ return file_apparmor_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *AaPolicy) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *AaPolicy) GetBlob() []byte {
+ if x != nil {
+ return x.Blob
+ }
+ return nil
+}
+
+type AaNamespace struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
+ Policies []*AaPolicy `protobuf:"bytes,2,rep,name=policies" json:"policies,omitempty"`
+ Namespaces []*AaNamespace `protobuf:"bytes,3,rep,name=namespaces" json:"namespaces,omitempty"`
+}
+
+func (x *AaNamespace) Reset() {
+ *x = AaNamespace{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_apparmor_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AaNamespace) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AaNamespace) ProtoMessage() {}
+
+func (x *AaNamespace) ProtoReflect() protoreflect.Message {
+ mi := &file_apparmor_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AaNamespace.ProtoReflect.Descriptor instead.
+func (*AaNamespace) Descriptor() ([]byte, []int) {
+ return file_apparmor_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *AaNamespace) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *AaNamespace) GetPolicies() []*AaPolicy {
+ if x != nil {
+ return x.Policies
+ }
+ return nil
+}
+
+func (x *AaNamespace) GetNamespaces() []*AaNamespace {
+ if x != nil {
+ return x.Namespaces
+ }
+ return nil
+}
+
+type ApparmorEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Namespaces []*AaNamespace `protobuf:"bytes,1,rep,name=namespaces" json:"namespaces,omitempty"`
+}
+
+func (x *ApparmorEntry) Reset() {
+ *x = ApparmorEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_apparmor_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ApparmorEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApparmorEntry) ProtoMessage() {}
+
+func (x *ApparmorEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_apparmor_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApparmorEntry.ProtoReflect.Descriptor instead.
+func (*ApparmorEntry) Descriptor() ([]byte, []int) {
+ return file_apparmor_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ApparmorEntry) GetNamespaces() []*AaNamespace {
+ if x != nil {
+ return x.Namespaces
+ }
+ return nil
+}
+
+var File_apparmor_proto protoreflect.FileDescriptor
+
+var file_apparmor_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x61, 0x72, 0x6d, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x33, 0x0a, 0x09, 0x61, 0x61, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52,
+ 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x22, 0x79, 0x0a, 0x0c, 0x61, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x6f, 0x6c,
+ 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x61, 0x61,
+ 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
+ 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73,
+ 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
+ 0x22, 0x3f, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x61, 0x72, 0x6d, 0x6f, 0x72, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
+ 0x73,
+}
+
+var (
+ file_apparmor_proto_rawDescOnce sync.Once
+ file_apparmor_proto_rawDescData = file_apparmor_proto_rawDesc
+)
+
+func file_apparmor_proto_rawDescGZIP() []byte {
+ file_apparmor_proto_rawDescOnce.Do(func() {
+ file_apparmor_proto_rawDescData = protoimpl.X.CompressGZIP(file_apparmor_proto_rawDescData)
+ })
+ return file_apparmor_proto_rawDescData
+}
+
+var file_apparmor_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_apparmor_proto_goTypes = []interface{}{
+ (*AaPolicy)(nil), // 0: aa_policy
+ (*AaNamespace)(nil), // 1: aa_namespace
+ (*ApparmorEntry)(nil), // 2: apparmor_entry
+}
+var file_apparmor_proto_depIdxs = []int32{
+ 0, // 0: aa_namespace.policies:type_name -> aa_policy
+ 1, // 1: aa_namespace.namespaces:type_name -> aa_namespace
+ 1, // 2: apparmor_entry.namespaces:type_name -> aa_namespace
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_apparmor_proto_init() }
+func file_apparmor_proto_init() {
+ if File_apparmor_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_apparmor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AaPolicy); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_apparmor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AaNamespace); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_apparmor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ApparmorEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_apparmor_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_apparmor_proto_goTypes,
+ DependencyIndexes: file_apparmor_proto_depIdxs,
+ MessageInfos: file_apparmor_proto_msgTypes,
+ }.Build()
+ File_apparmor_proto = out.File
+ file_apparmor_proto_rawDesc = nil
+ file_apparmor_proto_goTypes = nil
+ file_apparmor_proto_depIdxs = nil
+}
diff --git a/crit/images/apparmor.proto b/crit/images/apparmor.proto
new file mode 100644
index 0000000..0c84f80
--- /dev/null
+++ b/crit/images/apparmor.proto
@@ -0,0 +1,16 @@
+syntax = "proto2";
+
+message aa_policy {
+ required string name = 1;
+ required bytes blob = 2;
+}
+
+message aa_namespace {
+ required string name = 1;
+ repeated aa_policy policies = 2;
+ repeated aa_namespace namespaces = 3;
+}
+
+message apparmor_entry {
+ repeated aa_namespace namespaces = 1;
+}
diff --git a/crit/images/autofs.pb.go b/crit/images/autofs.pb.go
new file mode 100644
index 0000000..828bd7f
--- /dev/null
+++ b/crit/images/autofs.pb.go
@@ -0,0 +1,217 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: autofs.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type AutofsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Fd *int32 `protobuf:"varint,1,req,name=fd" json:"fd,omitempty"`
+ Pgrp *int32 `protobuf:"varint,2,req,name=pgrp" json:"pgrp,omitempty"`
+ Timeout *int32 `protobuf:"varint,3,req,name=timeout" json:"timeout,omitempty"`
+ Minproto *int32 `protobuf:"varint,4,req,name=minproto" json:"minproto,omitempty"`
+ Maxproto *int32 `protobuf:"varint,5,req,name=maxproto" json:"maxproto,omitempty"`
+ Mode *int32 `protobuf:"varint,6,req,name=mode" json:"mode,omitempty"`
+ Uid *int32 `protobuf:"varint,7,opt,name=uid" json:"uid,omitempty"`
+ Gid *int32 `protobuf:"varint,8,opt,name=gid" json:"gid,omitempty"`
+ ReadFd *int32 `protobuf:"varint,9,opt,name=read_fd,json=readFd" json:"read_fd,omitempty"`
+}
+
+func (x *AutofsEntry) Reset() {
+ *x = AutofsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_autofs_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AutofsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AutofsEntry) ProtoMessage() {}
+
+func (x *AutofsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_autofs_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AutofsEntry.ProtoReflect.Descriptor instead.
+func (*AutofsEntry) Descriptor() ([]byte, []int) {
+ return file_autofs_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *AutofsEntry) GetFd() int32 {
+ if x != nil && x.Fd != nil {
+ return *x.Fd
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetPgrp() int32 {
+ if x != nil && x.Pgrp != nil {
+ return *x.Pgrp
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetTimeout() int32 {
+ if x != nil && x.Timeout != nil {
+ return *x.Timeout
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetMinproto() int32 {
+ if x != nil && x.Minproto != nil {
+ return *x.Minproto
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetMaxproto() int32 {
+ if x != nil && x.Maxproto != nil {
+ return *x.Maxproto
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetMode() int32 {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetUid() int32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetGid() int32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+func (x *AutofsEntry) GetReadFd() int32 {
+ if x != nil && x.ReadFd != nil {
+ return *x.ReadFd
+ }
+ return 0
+}
+
+var File_autofs_proto protoreflect.FileDescriptor
+
+var file_autofs_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5,
+ 0x01, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x66, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x02, 0x66, 0x64, 0x12,
+ 0x12, 0x0a, 0x04, 0x70, 0x67, 0x72, 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x04, 0x70,
+ 0x67, 0x72, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03,
+ 0x20, 0x02, 0x28, 0x05, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1a, 0x0a,
+ 0x08, 0x6d, 0x69, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x02, 0x28, 0x05, 0x52,
+ 0x08, 0x6d, 0x69, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x02, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20,
+ 0x02, 0x28, 0x05, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67,
+ 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x17, 0x0a,
+ 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x66, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
+ 0x72, 0x65, 0x61, 0x64, 0x46, 0x64,
+}
+
+var (
+ file_autofs_proto_rawDescOnce sync.Once
+ file_autofs_proto_rawDescData = file_autofs_proto_rawDesc
+)
+
+func file_autofs_proto_rawDescGZIP() []byte {
+ file_autofs_proto_rawDescOnce.Do(func() {
+ file_autofs_proto_rawDescData = protoimpl.X.CompressGZIP(file_autofs_proto_rawDescData)
+ })
+ return file_autofs_proto_rawDescData
+}
+
+var file_autofs_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_autofs_proto_goTypes = []interface{}{
+ (*AutofsEntry)(nil), // 0: autofs_entry
+}
+var file_autofs_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_autofs_proto_init() }
+func file_autofs_proto_init() {
+ if File_autofs_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_autofs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AutofsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_autofs_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_autofs_proto_goTypes,
+ DependencyIndexes: file_autofs_proto_depIdxs,
+ MessageInfos: file_autofs_proto_msgTypes,
+ }.Build()
+ File_autofs_proto = out.File
+ file_autofs_proto_rawDesc = nil
+ file_autofs_proto_goTypes = nil
+ file_autofs_proto_depIdxs = nil
+}
diff --git a/crit/images/autofs.proto b/crit/images/autofs.proto
new file mode 100644
index 0000000..5c8c216
--- /dev/null
+++ b/crit/images/autofs.proto
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message autofs_entry {
+ required int32 fd = 1;
+ required int32 pgrp = 2;
+ required int32 timeout = 3;
+ required int32 minproto = 4;
+ required int32 maxproto = 5;
+ required int32 mode = 6;
+
+ optional int32 uid = 7;
+ optional int32 gid = 8;
+
+ optional int32 read_fd = 9;
+}
diff --git a/crit/images/binfmt-misc.pb.go b/crit/images/binfmt-misc.pb.go
new file mode 100644
index 0000000..1f85eb4
--- /dev/null
+++ b/crit/images/binfmt-misc.pb.go
@@ -0,0 +1,209 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: binfmt-misc.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type BinfmtMiscEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
+ Enabled *bool `protobuf:"varint,2,req,name=enabled" json:"enabled,omitempty"`
+ Interpreter *string `protobuf:"bytes,3,req,name=interpreter" json:"interpreter,omitempty"`
+ Flags *string `protobuf:"bytes,4,opt,name=flags" json:"flags,omitempty"`
+ Extension *string `protobuf:"bytes,5,opt,name=extension" json:"extension,omitempty"`
+ Magic *string `protobuf:"bytes,6,opt,name=magic" json:"magic,omitempty"`
+ Mask *string `protobuf:"bytes,7,opt,name=mask" json:"mask,omitempty"`
+ Offset *int32 `protobuf:"varint,8,opt,name=offset" json:"offset,omitempty"`
+}
+
+func (x *BinfmtMiscEntry) Reset() {
+ *x = BinfmtMiscEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binfmt_misc_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BinfmtMiscEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BinfmtMiscEntry) ProtoMessage() {}
+
+func (x *BinfmtMiscEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_binfmt_misc_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BinfmtMiscEntry.ProtoReflect.Descriptor instead.
+func (*BinfmtMiscEntry) Descriptor() ([]byte, []int) {
+ return file_binfmt_misc_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *BinfmtMiscEntry) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *BinfmtMiscEntry) GetEnabled() bool {
+ if x != nil && x.Enabled != nil {
+ return *x.Enabled
+ }
+ return false
+}
+
+func (x *BinfmtMiscEntry) GetInterpreter() string {
+ if x != nil && x.Interpreter != nil {
+ return *x.Interpreter
+ }
+ return ""
+}
+
+func (x *BinfmtMiscEntry) GetFlags() string {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return ""
+}
+
+func (x *BinfmtMiscEntry) GetExtension() string {
+ if x != nil && x.Extension != nil {
+ return *x.Extension
+ }
+ return ""
+}
+
+func (x *BinfmtMiscEntry) GetMagic() string {
+ if x != nil && x.Magic != nil {
+ return *x.Magic
+ }
+ return ""
+}
+
+func (x *BinfmtMiscEntry) GetMask() string {
+ if x != nil && x.Mask != nil {
+ return *x.Mask
+ }
+ return ""
+}
+
+func (x *BinfmtMiscEntry) GetOffset() int32 {
+ if x != nil && x.Offset != nil {
+ return *x.Offset
+ }
+ return 0
+}
+
+var File_binfmt_misc_proto protoreflect.FileDescriptor
+
+var file_binfmt_misc_proto_rawDesc = []byte{
+ 0x0a, 0x11, 0x62, 0x69, 0x6e, 0x66, 0x6d, 0x74, 0x2d, 0x6d, 0x69, 0x73, 0x63, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x11, 0x62, 0x69, 0x6e, 0x66, 0x6d, 0x74, 0x5f, 0x6d,
+ 0x69, 0x73, 0x63, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
+ 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07,
+ 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x65, 0x72,
+ 0x70, 0x72, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e,
+ 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12,
+ 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a,
+ 0x05, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61,
+ 0x67, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65,
+ 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
+}
+
+var (
+ file_binfmt_misc_proto_rawDescOnce sync.Once
+ file_binfmt_misc_proto_rawDescData = file_binfmt_misc_proto_rawDesc
+)
+
+func file_binfmt_misc_proto_rawDescGZIP() []byte {
+ file_binfmt_misc_proto_rawDescOnce.Do(func() {
+ file_binfmt_misc_proto_rawDescData = protoimpl.X.CompressGZIP(file_binfmt_misc_proto_rawDescData)
+ })
+ return file_binfmt_misc_proto_rawDescData
+}
+
+var file_binfmt_misc_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_binfmt_misc_proto_goTypes = []interface{}{
+ (*BinfmtMiscEntry)(nil), // 0: binfmt_misc_entry
+}
+var file_binfmt_misc_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_binfmt_misc_proto_init() }
+func file_binfmt_misc_proto_init() {
+ if File_binfmt_misc_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_binfmt_misc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BinfmtMiscEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_binfmt_misc_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_binfmt_misc_proto_goTypes,
+ DependencyIndexes: file_binfmt_misc_proto_depIdxs,
+ MessageInfos: file_binfmt_misc_proto_msgTypes,
+ }.Build()
+ File_binfmt_misc_proto = out.File
+ file_binfmt_misc_proto_rawDesc = nil
+ file_binfmt_misc_proto_goTypes = nil
+ file_binfmt_misc_proto_depIdxs = nil
+}
diff --git a/crit/images/binfmt-misc.proto b/crit/images/binfmt-misc.proto
new file mode 100644
index 0000000..a48d872
--- /dev/null
+++ b/crit/images/binfmt-misc.proto
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message binfmt_misc_entry {
+ required string name = 1;
+ required bool enabled = 2;
+ required string interpreter = 3;
+ optional string flags = 4;
+ optional string extension = 5;
+ optional string magic = 6;
+ optional string mask = 7;
+ optional int32 offset = 8;
+}
diff --git a/crit/images/bpfmap-data.pb.go b/crit/images/bpfmap-data.pb.go
new file mode 100644
index 0000000..df3343d
--- /dev/null
+++ b/crit/images/bpfmap-data.pb.go
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: bpfmap-data.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type BpfmapDataEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MapId *uint32 `protobuf:"varint,1,req,name=map_id,json=mapId" json:"map_id,omitempty"`
+ KeysBytes *uint32 `protobuf:"varint,2,req,name=keys_bytes,json=keysBytes" json:"keys_bytes,omitempty"` // Bytes required to store keys
+ ValuesBytes *uint32 `protobuf:"varint,3,req,name=values_bytes,json=valuesBytes" json:"values_bytes,omitempty"` // Bytes required to store values
+ Count *uint32 `protobuf:"varint,4,req,name=count" json:"count,omitempty"` // Number of key-value pairs stored
+}
+
+func (x *BpfmapDataEntry) Reset() {
+ *x = BpfmapDataEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_bpfmap_data_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BpfmapDataEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BpfmapDataEntry) ProtoMessage() {}
+
+func (x *BpfmapDataEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_bpfmap_data_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BpfmapDataEntry.ProtoReflect.Descriptor instead.
+func (*BpfmapDataEntry) Descriptor() ([]byte, []int) {
+ return file_bpfmap_data_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *BpfmapDataEntry) GetMapId() uint32 {
+ if x != nil && x.MapId != nil {
+ return *x.MapId
+ }
+ return 0
+}
+
+func (x *BpfmapDataEntry) GetKeysBytes() uint32 {
+ if x != nil && x.KeysBytes != nil {
+ return *x.KeysBytes
+ }
+ return 0
+}
+
+func (x *BpfmapDataEntry) GetValuesBytes() uint32 {
+ if x != nil && x.ValuesBytes != nil {
+ return *x.ValuesBytes
+ }
+ return 0
+}
+
+func (x *BpfmapDataEntry) GetCount() uint32 {
+ if x != nil && x.Count != nil {
+ return *x.Count
+ }
+ return 0
+}
+
+var File_bpfmap_data_proto protoreflect.FileDescriptor
+
+var file_bpfmap_data_proto_rawDesc = []byte{
+ 0x0a, 0x11, 0x62, 0x70, 0x66, 0x6d, 0x61, 0x70, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x62, 0x70, 0x66, 0x6d, 0x61, 0x70, 0x5f, 0x64,
+ 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x61, 0x70,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12,
+ 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18,
+ 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x79, 0x74,
+ 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+}
+
+var (
+ file_bpfmap_data_proto_rawDescOnce sync.Once
+ file_bpfmap_data_proto_rawDescData = file_bpfmap_data_proto_rawDesc
+)
+
+func file_bpfmap_data_proto_rawDescGZIP() []byte {
+ file_bpfmap_data_proto_rawDescOnce.Do(func() {
+ file_bpfmap_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_bpfmap_data_proto_rawDescData)
+ })
+ return file_bpfmap_data_proto_rawDescData
+}
+
+var file_bpfmap_data_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_bpfmap_data_proto_goTypes = []interface{}{
+ (*BpfmapDataEntry)(nil), // 0: bpfmap_data_entry
+}
+var file_bpfmap_data_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_bpfmap_data_proto_init() }
+func file_bpfmap_data_proto_init() {
+ if File_bpfmap_data_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_bpfmap_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BpfmapDataEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_bpfmap_data_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_bpfmap_data_proto_goTypes,
+ DependencyIndexes: file_bpfmap_data_proto_depIdxs,
+ MessageInfos: file_bpfmap_data_proto_msgTypes,
+ }.Build()
+ File_bpfmap_data_proto = out.File
+ file_bpfmap_data_proto_rawDesc = nil
+ file_bpfmap_data_proto_goTypes = nil
+ file_bpfmap_data_proto_depIdxs = nil
+}
diff --git a/crit/images/bpfmap-data.proto b/crit/images/bpfmap-data.proto
new file mode 100644
index 0000000..b9502bb
--- /dev/null
+++ b/crit/images/bpfmap-data.proto
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message bpfmap_data_entry {
+ required uint32 map_id = 1;
+ required uint32 keys_bytes = 2; /* Bytes required to store keys */
+ required uint32 values_bytes = 3; /* Bytes required to store values */
+ required uint32 count = 4; /* Number of key-value pairs stored */
+}
diff --git a/crit/images/bpfmap-file.pb.go b/crit/images/bpfmap-file.pb.go
new file mode 100644
index 0000000..f50a459
--- /dev/null
+++ b/crit/images/bpfmap-file.pb.go
@@ -0,0 +1,301 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: bpfmap-file.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type BpfmapFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Pos *uint64 `protobuf:"varint,3,req,name=pos" json:"pos,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,4,req,name=fown" json:"fown,omitempty"`
+ MapType *uint32 `protobuf:"varint,5,req,name=map_type,json=mapType" json:"map_type,omitempty"`
+ KeySize *uint32 `protobuf:"varint,6,req,name=key_size,json=keySize" json:"key_size,omitempty"`
+ ValueSize *uint32 `protobuf:"varint,7,req,name=value_size,json=valueSize" json:"value_size,omitempty"`
+ MapId *uint32 `protobuf:"varint,8,req,name=map_id,json=mapId" json:"map_id,omitempty"`
+ MaxEntries *uint32 `protobuf:"varint,9,req,name=max_entries,json=maxEntries" json:"max_entries,omitempty"`
+ MapFlags *uint32 `protobuf:"varint,10,req,name=map_flags,json=mapFlags" json:"map_flags,omitempty"`
+ Memlock *uint64 `protobuf:"varint,11,req,name=memlock" json:"memlock,omitempty"`
+ Frozen *bool `protobuf:"varint,12,req,name=frozen,def=0" json:"frozen,omitempty"`
+ MapName *string `protobuf:"bytes,13,req,name=map_name,json=mapName" json:"map_name,omitempty"`
+ Ifindex *uint32 `protobuf:"varint,14,req,name=ifindex,def=0" json:"ifindex,omitempty"`
+ MntId *int32 `protobuf:"zigzag32,15,opt,name=mnt_id,json=mntId,def=-1" json:"mnt_id,omitempty"`
+ MapExtra *uint64 `protobuf:"varint,16,opt,name=map_extra,json=mapExtra" json:"map_extra,omitempty"`
+}
+
+// Default values for BpfmapFileEntry fields.
+const (
+ Default_BpfmapFileEntry_Frozen = bool(false)
+ Default_BpfmapFileEntry_Ifindex = uint32(0)
+ Default_BpfmapFileEntry_MntId = int32(-1)
+)
+
+func (x *BpfmapFileEntry) Reset() {
+ *x = BpfmapFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_bpfmap_file_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BpfmapFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BpfmapFileEntry) ProtoMessage() {}
+
+func (x *BpfmapFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_bpfmap_file_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BpfmapFileEntry.ProtoReflect.Descriptor instead.
+func (*BpfmapFileEntry) Descriptor() ([]byte, []int) {
+ return file_bpfmap_file_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *BpfmapFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetPos() uint64 {
+ if x != nil && x.Pos != nil {
+ return *x.Pos
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *BpfmapFileEntry) GetMapType() uint32 {
+ if x != nil && x.MapType != nil {
+ return *x.MapType
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetKeySize() uint32 {
+ if x != nil && x.KeySize != nil {
+ return *x.KeySize
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetValueSize() uint32 {
+ if x != nil && x.ValueSize != nil {
+ return *x.ValueSize
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetMapId() uint32 {
+ if x != nil && x.MapId != nil {
+ return *x.MapId
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetMaxEntries() uint32 {
+ if x != nil && x.MaxEntries != nil {
+ return *x.MaxEntries
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetMapFlags() uint32 {
+ if x != nil && x.MapFlags != nil {
+ return *x.MapFlags
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetMemlock() uint64 {
+ if x != nil && x.Memlock != nil {
+ return *x.Memlock
+ }
+ return 0
+}
+
+func (x *BpfmapFileEntry) GetFrozen() bool {
+ if x != nil && x.Frozen != nil {
+ return *x.Frozen
+ }
+ return Default_BpfmapFileEntry_Frozen
+}
+
+func (x *BpfmapFileEntry) GetMapName() string {
+ if x != nil && x.MapName != nil {
+ return *x.MapName
+ }
+ return ""
+}
+
+func (x *BpfmapFileEntry) GetIfindex() uint32 {
+ if x != nil && x.Ifindex != nil {
+ return *x.Ifindex
+ }
+ return Default_BpfmapFileEntry_Ifindex
+}
+
+func (x *BpfmapFileEntry) GetMntId() int32 {
+ if x != nil && x.MntId != nil {
+ return *x.MntId
+ }
+ return Default_BpfmapFileEntry_MntId
+}
+
+func (x *BpfmapFileEntry) GetMapExtra() uint64 {
+ if x != nil && x.MapExtra != nil {
+ return *x.MapExtra
+ }
+ return 0
+}
+
+var File_bpfmap_file_proto protoreflect.FileDescriptor
+
+var file_bpfmap_file_proto_rawDesc = []byte{
+ 0x0a, 0x11, 0x62, 0x70, 0x66, 0x6d, 0x61, 0x70, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x03, 0x0a, 0x11,
+ 0x62, 0x70, 0x66, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x26, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d,
+ 0x42, 0x10, 0xd2, 0x3f, 0x0d, 0x1a, 0x0b, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73,
+ 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66,
+ 0x6f, 0x77, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x19, 0x0a, 0x08,
+ 0x6d, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07,
+ 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73,
+ 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69,
+ 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
+ 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x69, 0x7a,
+ 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x6d,
+ 0x61, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70,
+ 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x6d, 0x61,
+ 0x70, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x18, 0x0b, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x12, 0x1d, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x08,
+ 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x06, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x12,
+ 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x02, 0x28,
+ 0x09, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x07, 0x69, 0x66,
+ 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x0d, 0x3a, 0x01, 0x30, 0x52, 0x07,
+ 0x69, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, 0x06, 0x6d, 0x6e, 0x74, 0x5f, 0x69,
+ 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x11, 0x3a, 0x02, 0x2d, 0x31, 0x52, 0x05, 0x6d, 0x6e, 0x74,
+ 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18,
+ 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x78, 0x74, 0x72, 0x61,
+}
+
+var (
+ file_bpfmap_file_proto_rawDescOnce sync.Once
+ file_bpfmap_file_proto_rawDescData = file_bpfmap_file_proto_rawDesc
+)
+
+func file_bpfmap_file_proto_rawDescGZIP() []byte {
+ file_bpfmap_file_proto_rawDescOnce.Do(func() {
+ file_bpfmap_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_bpfmap_file_proto_rawDescData)
+ })
+ return file_bpfmap_file_proto_rawDescData
+}
+
+var file_bpfmap_file_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_bpfmap_file_proto_goTypes = []interface{}{
+ (*BpfmapFileEntry)(nil), // 0: bpfmap_file_entry
+ (*FownEntry)(nil), // 1: fown_entry
+}
+var file_bpfmap_file_proto_depIdxs = []int32{
+ 1, // 0: bpfmap_file_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_bpfmap_file_proto_init() }
+func file_bpfmap_file_proto_init() {
+ if File_bpfmap_file_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_bpfmap_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BpfmapFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_bpfmap_file_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_bpfmap_file_proto_goTypes,
+ DependencyIndexes: file_bpfmap_file_proto_depIdxs,
+ MessageInfos: file_bpfmap_file_proto_msgTypes,
+ }.Build()
+ File_bpfmap_file_proto = out.File
+ file_bpfmap_file_proto_rawDesc = nil
+ file_bpfmap_file_proto_goTypes = nil
+ file_bpfmap_file_proto_depIdxs = nil
+}
diff --git a/crit/images/bpfmap-file.proto b/crit/images/bpfmap-file.proto
new file mode 100644
index 0000000..895321e
--- /dev/null
+++ b/crit/images/bpfmap-file.proto
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+
+message bpfmap_file_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2 [(criu).flags = "rfile.flags"];
+ required uint64 pos = 3;
+ required fown_entry fown = 4;
+ required uint32 map_type = 5;
+ required uint32 key_size = 6;
+ required uint32 value_size = 7;
+ required uint32 map_id = 8;
+ required uint32 max_entries = 9;
+ required uint32 map_flags = 10;
+ required uint64 memlock = 11;
+ required bool frozen = 12 [default = false];
+ required string map_name = 13;
+ required uint32 ifindex = 14 [default = 0];
+ optional sint32 mnt_id = 15 [default = -1];
+ optional uint64 map_extra = 16;
+}
diff --git a/crit/images/cgroup.pb.go b/crit/images/cgroup.pb.go
new file mode 100644
index 0000000..db64234
--- /dev/null
+++ b/crit/images/cgroup.pb.go
@@ -0,0 +1,648 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: cgroup.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CgroupPerms struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Mode *uint32 `protobuf:"varint,1,req,name=mode" json:"mode,omitempty"`
+ Uid *uint32 `protobuf:"varint,2,req,name=uid" json:"uid,omitempty"`
+ Gid *uint32 `protobuf:"varint,3,req,name=gid" json:"gid,omitempty"`
+}
+
+func (x *CgroupPerms) Reset() {
+ *x = CgroupPerms{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cgroup_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgroupPerms) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgroupPerms) ProtoMessage() {}
+
+func (x *CgroupPerms) ProtoReflect() protoreflect.Message {
+ mi := &file_cgroup_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgroupPerms.ProtoReflect.Descriptor instead.
+func (*CgroupPerms) Descriptor() ([]byte, []int) {
+ return file_cgroup_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CgroupPerms) GetMode() uint32 {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return 0
+}
+
+func (x *CgroupPerms) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *CgroupPerms) GetGid() uint32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+type CgroupPropEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
+ Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
+ Perms *CgroupPerms `protobuf:"bytes,3,opt,name=perms" json:"perms,omitempty"`
+}
+
+func (x *CgroupPropEntry) Reset() {
+ *x = CgroupPropEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cgroup_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgroupPropEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgroupPropEntry) ProtoMessage() {}
+
+func (x *CgroupPropEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_cgroup_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgroupPropEntry.ProtoReflect.Descriptor instead.
+func (*CgroupPropEntry) Descriptor() ([]byte, []int) {
+ return file_cgroup_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CgroupPropEntry) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *CgroupPropEntry) GetValue() string {
+ if x != nil && x.Value != nil {
+ return *x.Value
+ }
+ return ""
+}
+
+func (x *CgroupPropEntry) GetPerms() *CgroupPerms {
+ if x != nil {
+ return x.Perms
+ }
+ return nil
+}
+
+type CgroupDirEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DirName *string `protobuf:"bytes,1,req,name=dir_name,json=dirName" json:"dir_name,omitempty"`
+ Children []*CgroupDirEntry `protobuf:"bytes,2,rep,name=children" json:"children,omitempty"`
+ Properties []*CgroupPropEntry `protobuf:"bytes,3,rep,name=properties" json:"properties,omitempty"`
+ DirPerms *CgroupPerms `protobuf:"bytes,4,opt,name=dir_perms,json=dirPerms" json:"dir_perms,omitempty"`
+}
+
+func (x *CgroupDirEntry) Reset() {
+ *x = CgroupDirEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cgroup_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgroupDirEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgroupDirEntry) ProtoMessage() {}
+
+func (x *CgroupDirEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_cgroup_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgroupDirEntry.ProtoReflect.Descriptor instead.
+func (*CgroupDirEntry) Descriptor() ([]byte, []int) {
+ return file_cgroup_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CgroupDirEntry) GetDirName() string {
+ if x != nil && x.DirName != nil {
+ return *x.DirName
+ }
+ return ""
+}
+
+func (x *CgroupDirEntry) GetChildren() []*CgroupDirEntry {
+ if x != nil {
+ return x.Children
+ }
+ return nil
+}
+
+func (x *CgroupDirEntry) GetProperties() []*CgroupPropEntry {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *CgroupDirEntry) GetDirPerms() *CgroupPerms {
+ if x != nil {
+ return x.DirPerms
+ }
+ return nil
+}
+
+type CgControllerEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Cnames []string `protobuf:"bytes,1,rep,name=cnames" json:"cnames,omitempty"`
+ Dirs []*CgroupDirEntry `protobuf:"bytes,2,rep,name=dirs" json:"dirs,omitempty"`
+}
+
+func (x *CgControllerEntry) Reset() {
+ *x = CgControllerEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cgroup_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgControllerEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgControllerEntry) ProtoMessage() {}
+
+func (x *CgControllerEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_cgroup_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgControllerEntry.ProtoReflect.Descriptor instead.
+func (*CgControllerEntry) Descriptor() ([]byte, []int) {
+ return file_cgroup_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CgControllerEntry) GetCnames() []string {
+ if x != nil {
+ return x.Cnames
+ }
+ return nil
+}
+
+func (x *CgControllerEntry) GetDirs() []*CgroupDirEntry {
+ if x != nil {
+ return x.Dirs
+ }
+ return nil
+}
+
+type CgMemberEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
+ Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"`
+ CgnsPrefix *uint32 `protobuf:"varint,3,opt,name=cgns_prefix,json=cgnsPrefix" json:"cgns_prefix,omitempty"`
+}
+
+func (x *CgMemberEntry) Reset() {
+ *x = CgMemberEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cgroup_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgMemberEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgMemberEntry) ProtoMessage() {}
+
+func (x *CgMemberEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_cgroup_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgMemberEntry.ProtoReflect.Descriptor instead.
+func (*CgMemberEntry) Descriptor() ([]byte, []int) {
+ return file_cgroup_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CgMemberEntry) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *CgMemberEntry) GetPath() string {
+ if x != nil && x.Path != nil {
+ return *x.Path
+ }
+ return ""
+}
+
+func (x *CgMemberEntry) GetCgnsPrefix() uint32 {
+ if x != nil && x.CgnsPrefix != nil {
+ return *x.CgnsPrefix
+ }
+ return 0
+}
+
+type CgSetEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Ctls []*CgMemberEntry `protobuf:"bytes,2,rep,name=ctls" json:"ctls,omitempty"`
+}
+
+func (x *CgSetEntry) Reset() {
+ *x = CgSetEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cgroup_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgSetEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgSetEntry) ProtoMessage() {}
+
+func (x *CgSetEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_cgroup_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgSetEntry.ProtoReflect.Descriptor instead.
+func (*CgSetEntry) Descriptor() ([]byte, []int) {
+ return file_cgroup_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CgSetEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *CgSetEntry) GetCtls() []*CgMemberEntry {
+ if x != nil {
+ return x.Ctls
+ }
+ return nil
+}
+
+type CgroupEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Sets []*CgSetEntry `protobuf:"bytes,1,rep,name=sets" json:"sets,omitempty"`
+ Controllers []*CgControllerEntry `protobuf:"bytes,2,rep,name=controllers" json:"controllers,omitempty"`
+}
+
+func (x *CgroupEntry) Reset() {
+ *x = CgroupEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cgroup_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgroupEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgroupEntry) ProtoMessage() {}
+
+func (x *CgroupEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_cgroup_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgroupEntry.ProtoReflect.Descriptor instead.
+func (*CgroupEntry) Descriptor() ([]byte, []int) {
+ return file_cgroup_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *CgroupEntry) GetSets() []*CgSetEntry {
+ if x != nil {
+ return x.Sets
+ }
+ return nil
+}
+
+func (x *CgroupEntry) GetControllers() []*CgControllerEntry {
+ if x != nil {
+ return x.Controllers
+ }
+ return nil
+}
+
+var File_cgroup_proto protoreflect.FileDescriptor
+
+var file_cgroup_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46,
+ 0x0a, 0x0c, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x12,
+ 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x6f,
+ 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x11, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x65,
+ 0x72, 0x6d, 0x73, 0x52, 0x05, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x10, 0x63,
+ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x64, 0x69, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x19, 0x0a, 0x08, 0x64, 0x69, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x09, 0x52, 0x07, 0x64, 0x69, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x63, 0x68,
+ 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63,
+ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x64, 0x69, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x32, 0x0a, 0x0a, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
+ 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2a, 0x0a,
+ 0x09, 0x64, 0x69, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x0d, 0x2e, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x52,
+ 0x08, 0x64, 0x69, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x73, 0x22, 0x54, 0x0a, 0x13, 0x63, 0x67, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x06, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f,
+ 0x64, 0x69, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x69, 0x72, 0x73, 0x22,
+ 0x5a, 0x0a, 0x0f, 0x63, 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02,
+ 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x67,
+ 0x6e, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x0a, 0x63, 0x67, 0x6e, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x44, 0x0a, 0x0c, 0x63,
+ 0x67, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x63,
+ 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x67, 0x5f, 0x6d,
+ 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63, 0x74, 0x6c,
+ 0x73, 0x22, 0x69, 0x0a, 0x0c, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x21, 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0d, 0x2e, 0x63, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04,
+ 0x73, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
+ 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x67, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73,
+}
+
+var (
+ file_cgroup_proto_rawDescOnce sync.Once
+ file_cgroup_proto_rawDescData = file_cgroup_proto_rawDesc
+)
+
+func file_cgroup_proto_rawDescGZIP() []byte {
+ file_cgroup_proto_rawDescOnce.Do(func() {
+ file_cgroup_proto_rawDescData = protoimpl.X.CompressGZIP(file_cgroup_proto_rawDescData)
+ })
+ return file_cgroup_proto_rawDescData
+}
+
+var file_cgroup_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_cgroup_proto_goTypes = []interface{}{
+ (*CgroupPerms)(nil), // 0: cgroup_perms
+ (*CgroupPropEntry)(nil), // 1: cgroup_prop_entry
+ (*CgroupDirEntry)(nil), // 2: cgroup_dir_entry
+ (*CgControllerEntry)(nil), // 3: cg_controller_entry
+ (*CgMemberEntry)(nil), // 4: cg_member_entry
+ (*CgSetEntry)(nil), // 5: cg_set_entry
+ (*CgroupEntry)(nil), // 6: cgroup_entry
+}
+var file_cgroup_proto_depIdxs = []int32{
+ 0, // 0: cgroup_prop_entry.perms:type_name -> cgroup_perms
+ 2, // 1: cgroup_dir_entry.children:type_name -> cgroup_dir_entry
+ 1, // 2: cgroup_dir_entry.properties:type_name -> cgroup_prop_entry
+ 0, // 3: cgroup_dir_entry.dir_perms:type_name -> cgroup_perms
+ 2, // 4: cg_controller_entry.dirs:type_name -> cgroup_dir_entry
+ 4, // 5: cg_set_entry.ctls:type_name -> cg_member_entry
+ 5, // 6: cgroup_entry.sets:type_name -> cg_set_entry
+ 3, // 7: cgroup_entry.controllers:type_name -> cg_controller_entry
+ 8, // [8:8] is the sub-list for method output_type
+ 8, // [8:8] is the sub-list for method input_type
+ 8, // [8:8] is the sub-list for extension type_name
+ 8, // [8:8] is the sub-list for extension extendee
+ 0, // [0:8] is the sub-list for field type_name
+}
+
+func init() { file_cgroup_proto_init() }
+func file_cgroup_proto_init() {
+ if File_cgroup_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_cgroup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgroupPerms); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cgroup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgroupPropEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cgroup_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgroupDirEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cgroup_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgControllerEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cgroup_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgMemberEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cgroup_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgSetEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cgroup_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgroupEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_cgroup_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_cgroup_proto_goTypes,
+ DependencyIndexes: file_cgroup_proto_depIdxs,
+ MessageInfos: file_cgroup_proto_msgTypes,
+ }.Build()
+ File_cgroup_proto = out.File
+ file_cgroup_proto_rawDesc = nil
+ file_cgroup_proto_goTypes = nil
+ file_cgroup_proto_depIdxs = nil
+}
diff --git a/crit/images/cgroup.proto b/crit/images/cgroup.proto
new file mode 100644
index 0000000..ee03541
--- /dev/null
+++ b/crit/images/cgroup.proto
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message cgroup_perms {
+ required uint32 mode = 1;
+ required uint32 uid = 2;
+ required uint32 gid = 3;
+}
+
+message cgroup_prop_entry {
+ required string name = 1;
+ required string value = 2;
+ optional cgroup_perms perms = 3;
+}
+
+message cgroup_dir_entry {
+ required string dir_name = 1;
+ repeated cgroup_dir_entry children = 2;
+ repeated cgroup_prop_entry properties = 3;
+ optional cgroup_perms dir_perms = 4;
+}
+
+message cg_controller_entry {
+ repeated string cnames = 1;
+ repeated cgroup_dir_entry dirs = 2;
+}
+
+message cg_member_entry {
+ required string name = 1;
+ required string path = 2;
+ optional uint32 cgns_prefix = 3;
+}
+
+message cg_set_entry {
+ required uint32 id = 1;
+ repeated cg_member_entry ctls = 2;
+}
+
+message cgroup_entry {
+ repeated cg_set_entry sets = 1;
+ repeated cg_controller_entry controllers = 2;
+}
diff --git a/crit/images/core-aarch64.pb.go b/crit/images/core-aarch64.pb.go
new file mode 100644
index 0000000..3001acd
--- /dev/null
+++ b/crit/images/core-aarch64.pb.go
@@ -0,0 +1,353 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: core-aarch64.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserAarch64RegsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Regs []uint64 `protobuf:"varint,1,rep,name=regs" json:"regs,omitempty"`
+ Sp *uint64 `protobuf:"varint,2,req,name=sp" json:"sp,omitempty"`
+ Pc *uint64 `protobuf:"varint,3,req,name=pc" json:"pc,omitempty"`
+ Pstate *uint64 `protobuf:"varint,4,req,name=pstate" json:"pstate,omitempty"`
+}
+
+func (x *UserAarch64RegsEntry) Reset() {
+ *x = UserAarch64RegsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_aarch64_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserAarch64RegsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserAarch64RegsEntry) ProtoMessage() {}
+
+func (x *UserAarch64RegsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_aarch64_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserAarch64RegsEntry.ProtoReflect.Descriptor instead.
+func (*UserAarch64RegsEntry) Descriptor() ([]byte, []int) {
+ return file_core_aarch64_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserAarch64RegsEntry) GetRegs() []uint64 {
+ if x != nil {
+ return x.Regs
+ }
+ return nil
+}
+
+func (x *UserAarch64RegsEntry) GetSp() uint64 {
+ if x != nil && x.Sp != nil {
+ return *x.Sp
+ }
+ return 0
+}
+
+func (x *UserAarch64RegsEntry) GetPc() uint64 {
+ if x != nil && x.Pc != nil {
+ return *x.Pc
+ }
+ return 0
+}
+
+func (x *UserAarch64RegsEntry) GetPstate() uint64 {
+ if x != nil && x.Pstate != nil {
+ return *x.Pstate
+ }
+ return 0
+}
+
+type UserAarch64FpsimdContextEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Vregs []uint64 `protobuf:"varint,1,rep,name=vregs" json:"vregs,omitempty"`
+ Fpsr *uint32 `protobuf:"varint,2,req,name=fpsr" json:"fpsr,omitempty"`
+ Fpcr *uint32 `protobuf:"varint,3,req,name=fpcr" json:"fpcr,omitempty"`
+}
+
+func (x *UserAarch64FpsimdContextEntry) Reset() {
+ *x = UserAarch64FpsimdContextEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_aarch64_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserAarch64FpsimdContextEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserAarch64FpsimdContextEntry) ProtoMessage() {}
+
+func (x *UserAarch64FpsimdContextEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_aarch64_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserAarch64FpsimdContextEntry.ProtoReflect.Descriptor instead.
+func (*UserAarch64FpsimdContextEntry) Descriptor() ([]byte, []int) {
+ return file_core_aarch64_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserAarch64FpsimdContextEntry) GetVregs() []uint64 {
+ if x != nil {
+ return x.Vregs
+ }
+ return nil
+}
+
+func (x *UserAarch64FpsimdContextEntry) GetFpsr() uint32 {
+ if x != nil && x.Fpsr != nil {
+ return *x.Fpsr
+ }
+ return 0
+}
+
+func (x *UserAarch64FpsimdContextEntry) GetFpcr() uint32 {
+ if x != nil && x.Fpcr != nil {
+ return *x.Fpcr
+ }
+ return 0
+}
+
+type ThreadInfoAarch64 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ClearTidAddr *uint64 `protobuf:"varint,1,req,name=clear_tid_addr,json=clearTidAddr" json:"clear_tid_addr,omitempty"`
+ Tls *uint64 `protobuf:"varint,2,req,name=tls" json:"tls,omitempty"`
+ Gpregs *UserAarch64RegsEntry `protobuf:"bytes,3,req,name=gpregs" json:"gpregs,omitempty"`
+ Fpsimd *UserAarch64FpsimdContextEntry `protobuf:"bytes,4,req,name=fpsimd" json:"fpsimd,omitempty"`
+}
+
+func (x *ThreadInfoAarch64) Reset() {
+ *x = ThreadInfoAarch64{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_aarch64_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadInfoAarch64) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadInfoAarch64) ProtoMessage() {}
+
+func (x *ThreadInfoAarch64) ProtoReflect() protoreflect.Message {
+ mi := &file_core_aarch64_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadInfoAarch64.ProtoReflect.Descriptor instead.
+func (*ThreadInfoAarch64) Descriptor() ([]byte, []int) {
+ return file_core_aarch64_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ThreadInfoAarch64) GetClearTidAddr() uint64 {
+ if x != nil && x.ClearTidAddr != nil {
+ return *x.ClearTidAddr
+ }
+ return 0
+}
+
+func (x *ThreadInfoAarch64) GetTls() uint64 {
+ if x != nil && x.Tls != nil {
+ return *x.Tls
+ }
+ return 0
+}
+
+func (x *ThreadInfoAarch64) GetGpregs() *UserAarch64RegsEntry {
+ if x != nil {
+ return x.Gpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoAarch64) GetFpsimd() *UserAarch64FpsimdContextEntry {
+ if x != nil {
+ return x.Fpsimd
+ }
+ return nil
+}
+
+var File_core_aarch64_proto protoreflect.FileDescriptor
+
+var file_core_aarch64_proto_rawDesc = []byte{
+ 0x0a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x61, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x65, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34,
+ 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72,
+ 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x72, 0x65, 0x67, 0x73, 0x12,
+ 0x0e, 0x0a, 0x02, 0x73, 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x73, 0x70, 0x12,
+ 0x0e, 0x0a, 0x02, 0x70, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x70, 0x63, 0x12,
+ 0x16, 0x0a, 0x06, 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x06, 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x61, 0x0a, 0x21, 0x75, 0x73, 0x65, 0x72, 0x5f,
+ 0x61, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34, 0x5f, 0x66, 0x70, 0x73, 0x69, 0x6d, 0x64, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05,
+ 0x76, 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, 0x76, 0x72, 0x65,
+ 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x70, 0x73, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x04, 0x66, 0x70, 0x73, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x70, 0x63, 0x72, 0x18, 0x03,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x66, 0x70, 0x63, 0x72, 0x22, 0xc9, 0x01, 0x0a, 0x13, 0x74,
+ 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x61, 0x61, 0x72, 0x63, 0x68,
+ 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x74, 0x69, 0x64, 0x5f,
+ 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08,
+ 0x01, 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12,
+ 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x74, 0x6c,
+ 0x73, 0x12, 0x37, 0x0a, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28,
+ 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34,
+ 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02,
+ 0x08, 0x01, 0x52, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x70,
+ 0x73, 0x69, 0x6d, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x75, 0x73, 0x65,
+ 0x72, 0x5f, 0x61, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34, 0x5f, 0x66, 0x70, 0x73, 0x69, 0x6d, 0x64,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06,
+ 0x66, 0x70, 0x73, 0x69, 0x6d, 0x64,
+}
+
+var (
+ file_core_aarch64_proto_rawDescOnce sync.Once
+ file_core_aarch64_proto_rawDescData = file_core_aarch64_proto_rawDesc
+)
+
+func file_core_aarch64_proto_rawDescGZIP() []byte {
+ file_core_aarch64_proto_rawDescOnce.Do(func() {
+ file_core_aarch64_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_aarch64_proto_rawDescData)
+ })
+ return file_core_aarch64_proto_rawDescData
+}
+
+var file_core_aarch64_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_core_aarch64_proto_goTypes = []interface{}{
+ (*UserAarch64RegsEntry)(nil), // 0: user_aarch64_regs_entry
+ (*UserAarch64FpsimdContextEntry)(nil), // 1: user_aarch64_fpsimd_context_entry
+ (*ThreadInfoAarch64)(nil), // 2: thread_info_aarch64
+}
+var file_core_aarch64_proto_depIdxs = []int32{
+ 0, // 0: thread_info_aarch64.gpregs:type_name -> user_aarch64_regs_entry
+ 1, // 1: thread_info_aarch64.fpsimd:type_name -> user_aarch64_fpsimd_context_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_core_aarch64_proto_init() }
+func file_core_aarch64_proto_init() {
+ if File_core_aarch64_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_core_aarch64_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserAarch64RegsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_aarch64_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserAarch64FpsimdContextEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_aarch64_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadInfoAarch64); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_core_aarch64_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_core_aarch64_proto_goTypes,
+ DependencyIndexes: file_core_aarch64_proto_depIdxs,
+ MessageInfos: file_core_aarch64_proto_msgTypes,
+ }.Build()
+ File_core_aarch64_proto = out.File
+ file_core_aarch64_proto_rawDesc = nil
+ file_core_aarch64_proto_goTypes = nil
+ file_core_aarch64_proto_depIdxs = nil
+}
diff --git a/crit/images/core-aarch64.proto b/crit/images/core-aarch64.proto
new file mode 100644
index 0000000..3356e6b
--- /dev/null
+++ b/crit/images/core-aarch64.proto
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message user_aarch64_regs_entry {
+ repeated uint64 regs = 1;
+ required uint64 sp = 2;
+ required uint64 pc = 3;
+ required uint64 pstate = 4;
+}
+
+message user_aarch64_fpsimd_context_entry {
+ repeated uint64 vregs = 1;
+ required uint32 fpsr = 2;
+ required uint32 fpcr = 3;
+}
+
+message thread_info_aarch64 {
+ required uint64 clear_tid_addr = 1[(criu).hex = true];
+ required uint64 tls = 2;
+ required user_aarch64_regs_entry gpregs = 3[(criu).hex = true];
+ required user_aarch64_fpsimd_context_entry fpsimd = 4;
+}
diff --git a/crit/images/core-arm.pb.go b/crit/images/core-arm.pb.go
new file mode 100644
index 0000000..d59fd6b
--- /dev/null
+++ b/crit/images/core-arm.pb.go
@@ -0,0 +1,497 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: core-arm.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserArmRegsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ R0 *uint32 `protobuf:"varint,1,req,name=r0" json:"r0,omitempty"`
+ R1 *uint32 `protobuf:"varint,2,req,name=r1" json:"r1,omitempty"`
+ R2 *uint32 `protobuf:"varint,3,req,name=r2" json:"r2,omitempty"`
+ R3 *uint32 `protobuf:"varint,4,req,name=r3" json:"r3,omitempty"`
+ R4 *uint32 `protobuf:"varint,5,req,name=r4" json:"r4,omitempty"`
+ R5 *uint32 `protobuf:"varint,6,req,name=r5" json:"r5,omitempty"`
+ R6 *uint32 `protobuf:"varint,7,req,name=r6" json:"r6,omitempty"`
+ R7 *uint32 `protobuf:"varint,8,req,name=r7" json:"r7,omitempty"`
+ R8 *uint32 `protobuf:"varint,9,req,name=r8" json:"r8,omitempty"`
+ R9 *uint32 `protobuf:"varint,10,req,name=r9" json:"r9,omitempty"`
+ R10 *uint32 `protobuf:"varint,11,req,name=r10" json:"r10,omitempty"`
+ Fp *uint32 `protobuf:"varint,12,req,name=fp" json:"fp,omitempty"`
+ Ip *uint32 `protobuf:"varint,13,req,name=ip" json:"ip,omitempty"`
+ Sp *uint32 `protobuf:"varint,14,req,name=sp" json:"sp,omitempty"`
+ Lr *uint32 `protobuf:"varint,15,req,name=lr" json:"lr,omitempty"`
+ Pc *uint32 `protobuf:"varint,16,req,name=pc" json:"pc,omitempty"`
+ Cpsr *uint32 `protobuf:"varint,17,req,name=cpsr" json:"cpsr,omitempty"`
+ OrigR0 *uint32 `protobuf:"varint,18,req,name=orig_r0,json=origR0" json:"orig_r0,omitempty"`
+}
+
+func (x *UserArmRegsEntry) Reset() {
+ *x = UserArmRegsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_arm_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserArmRegsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserArmRegsEntry) ProtoMessage() {}
+
+func (x *UserArmRegsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_arm_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserArmRegsEntry.ProtoReflect.Descriptor instead.
+func (*UserArmRegsEntry) Descriptor() ([]byte, []int) {
+ return file_core_arm_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserArmRegsEntry) GetR0() uint32 {
+ if x != nil && x.R0 != nil {
+ return *x.R0
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR1() uint32 {
+ if x != nil && x.R1 != nil {
+ return *x.R1
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR2() uint32 {
+ if x != nil && x.R2 != nil {
+ return *x.R2
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR3() uint32 {
+ if x != nil && x.R3 != nil {
+ return *x.R3
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR4() uint32 {
+ if x != nil && x.R4 != nil {
+ return *x.R4
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR5() uint32 {
+ if x != nil && x.R5 != nil {
+ return *x.R5
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR6() uint32 {
+ if x != nil && x.R6 != nil {
+ return *x.R6
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR7() uint32 {
+ if x != nil && x.R7 != nil {
+ return *x.R7
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR8() uint32 {
+ if x != nil && x.R8 != nil {
+ return *x.R8
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR9() uint32 {
+ if x != nil && x.R9 != nil {
+ return *x.R9
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetR10() uint32 {
+ if x != nil && x.R10 != nil {
+ return *x.R10
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetFp() uint32 {
+ if x != nil && x.Fp != nil {
+ return *x.Fp
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetIp() uint32 {
+ if x != nil && x.Ip != nil {
+ return *x.Ip
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetSp() uint32 {
+ if x != nil && x.Sp != nil {
+ return *x.Sp
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetLr() uint32 {
+ if x != nil && x.Lr != nil {
+ return *x.Lr
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetPc() uint32 {
+ if x != nil && x.Pc != nil {
+ return *x.Pc
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetCpsr() uint32 {
+ if x != nil && x.Cpsr != nil {
+ return *x.Cpsr
+ }
+ return 0
+}
+
+func (x *UserArmRegsEntry) GetOrigR0() uint32 {
+ if x != nil && x.OrigR0 != nil {
+ return *x.OrigR0
+ }
+ return 0
+}
+
+type UserArmVfpstateEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ VfpRegs []uint64 `protobuf:"varint,1,rep,name=vfp_regs,json=vfpRegs" json:"vfp_regs,omitempty"`
+ Fpscr *uint32 `protobuf:"varint,2,req,name=fpscr" json:"fpscr,omitempty"`
+ Fpexc *uint32 `protobuf:"varint,3,req,name=fpexc" json:"fpexc,omitempty"`
+ Fpinst *uint32 `protobuf:"varint,4,req,name=fpinst" json:"fpinst,omitempty"`
+ Fpinst2 *uint32 `protobuf:"varint,5,req,name=fpinst2" json:"fpinst2,omitempty"`
+}
+
+func (x *UserArmVfpstateEntry) Reset() {
+ *x = UserArmVfpstateEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_arm_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserArmVfpstateEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserArmVfpstateEntry) ProtoMessage() {}
+
+func (x *UserArmVfpstateEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_arm_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserArmVfpstateEntry.ProtoReflect.Descriptor instead.
+func (*UserArmVfpstateEntry) Descriptor() ([]byte, []int) {
+ return file_core_arm_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserArmVfpstateEntry) GetVfpRegs() []uint64 {
+ if x != nil {
+ return x.VfpRegs
+ }
+ return nil
+}
+
+func (x *UserArmVfpstateEntry) GetFpscr() uint32 {
+ if x != nil && x.Fpscr != nil {
+ return *x.Fpscr
+ }
+ return 0
+}
+
+func (x *UserArmVfpstateEntry) GetFpexc() uint32 {
+ if x != nil && x.Fpexc != nil {
+ return *x.Fpexc
+ }
+ return 0
+}
+
+func (x *UserArmVfpstateEntry) GetFpinst() uint32 {
+ if x != nil && x.Fpinst != nil {
+ return *x.Fpinst
+ }
+ return 0
+}
+
+func (x *UserArmVfpstateEntry) GetFpinst2() uint32 {
+ if x != nil && x.Fpinst2 != nil {
+ return *x.Fpinst2
+ }
+ return 0
+}
+
+type ThreadInfoArm struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ClearTidAddr *uint64 `protobuf:"varint,1,req,name=clear_tid_addr,json=clearTidAddr" json:"clear_tid_addr,omitempty"`
+ Tls *uint32 `protobuf:"varint,2,req,name=tls" json:"tls,omitempty"`
+ Gpregs *UserArmRegsEntry `protobuf:"bytes,3,req,name=gpregs" json:"gpregs,omitempty"`
+ Fpstate *UserArmVfpstateEntry `protobuf:"bytes,4,req,name=fpstate" json:"fpstate,omitempty"`
+}
+
+func (x *ThreadInfoArm) Reset() {
+ *x = ThreadInfoArm{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_arm_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadInfoArm) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadInfoArm) ProtoMessage() {}
+
+func (x *ThreadInfoArm) ProtoReflect() protoreflect.Message {
+ mi := &file_core_arm_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadInfoArm.ProtoReflect.Descriptor instead.
+func (*ThreadInfoArm) Descriptor() ([]byte, []int) {
+ return file_core_arm_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ThreadInfoArm) GetClearTidAddr() uint64 {
+ if x != nil && x.ClearTidAddr != nil {
+ return *x.ClearTidAddr
+ }
+ return 0
+}
+
+func (x *ThreadInfoArm) GetTls() uint32 {
+ if x != nil && x.Tls != nil {
+ return *x.Tls
+ }
+ return 0
+}
+
+func (x *ThreadInfoArm) GetGpregs() *UserArmRegsEntry {
+ if x != nil {
+ return x.Gpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoArm) GetFpstate() *UserArmVfpstateEntry {
+ if x != nil {
+ return x.Fpstate
+ }
+ return nil
+}
+
+var File_core_arm_proto protoreflect.FileDescriptor
+
+var file_core_arm_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x61, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x02, 0x0a,
+ 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x72, 0x6d, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x30, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x30, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x31, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x32, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x33, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x34, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x34, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x35, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x35, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x36, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x36, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x37, 0x18, 0x08, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x37, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x38, 0x18, 0x09, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x38, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x39, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x72, 0x39, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x30, 0x18, 0x0b, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x03, 0x72, 0x31, 0x30, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x70, 0x18, 0x0c, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x02, 0x66, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0d, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x02, 0x69, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x73, 0x70, 0x18, 0x0e, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x02, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x72, 0x18, 0x0f, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x02, 0x6c, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x63, 0x18, 0x10, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x02, 0x70, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x70, 0x73, 0x72, 0x18, 0x11,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x70, 0x73, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x72,
+ 0x69, 0x67, 0x5f, 0x72, 0x30, 0x18, 0x12, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x72, 0x69,
+ 0x67, 0x52, 0x30, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x72, 0x6d,
+ 0x5f, 0x76, 0x66, 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x19, 0x0a, 0x08, 0x76, 0x66, 0x70, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x04, 0x52, 0x07, 0x76, 0x66, 0x70, 0x52, 0x65, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x70,
+ 0x73, 0x63, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x70, 0x73, 0x63, 0x72,
+ 0x12, 0x14, 0x0a, 0x05, 0x66, 0x70, 0x65, 0x78, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x05, 0x66, 0x70, 0x65, 0x78, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x70, 0x69, 0x6e, 0x73, 0x74,
+ 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x66, 0x70, 0x69, 0x6e, 0x73, 0x74, 0x12, 0x18,
+ 0x0a, 0x07, 0x66, 0x70, 0x69, 0x6e, 0x73, 0x74, 0x32, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x07, 0x66, 0x70, 0x69, 0x6e, 0x73, 0x74, 0x32, 0x22, 0xb9, 0x01, 0x0a, 0x0f, 0x74, 0x68, 0x72,
+ 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x61, 0x72, 0x6d, 0x12, 0x2b, 0x0a, 0x0e,
+ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x74, 0x69, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x63, 0x6c, 0x65,
+ 0x61, 0x72, 0x54, 0x69, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73,
+ 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x33, 0x0a, 0x06, 0x67,
+ 0x70, 0x72, 0x65, 0x67, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x75, 0x73,
+ 0x65, 0x72, 0x5f, 0x61, 0x72, 0x6d, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73,
+ 0x12, 0x32, 0x0a, 0x07, 0x66, 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28,
+ 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x72, 0x6d, 0x5f, 0x76, 0x66, 0x70,
+ 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x70, 0x73,
+ 0x74, 0x61, 0x74, 0x65,
+}
+
+var (
+ file_core_arm_proto_rawDescOnce sync.Once
+ file_core_arm_proto_rawDescData = file_core_arm_proto_rawDesc
+)
+
+func file_core_arm_proto_rawDescGZIP() []byte {
+ file_core_arm_proto_rawDescOnce.Do(func() {
+ file_core_arm_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_arm_proto_rawDescData)
+ })
+ return file_core_arm_proto_rawDescData
+}
+
+var file_core_arm_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_core_arm_proto_goTypes = []interface{}{
+ (*UserArmRegsEntry)(nil), // 0: user_arm_regs_entry
+ (*UserArmVfpstateEntry)(nil), // 1: user_arm_vfpstate_entry
+ (*ThreadInfoArm)(nil), // 2: thread_info_arm
+}
+var file_core_arm_proto_depIdxs = []int32{
+ 0, // 0: thread_info_arm.gpregs:type_name -> user_arm_regs_entry
+ 1, // 1: thread_info_arm.fpstate:type_name -> user_arm_vfpstate_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_core_arm_proto_init() }
+func file_core_arm_proto_init() {
+ if File_core_arm_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_core_arm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserArmRegsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_arm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserArmVfpstateEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_arm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadInfoArm); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_core_arm_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_core_arm_proto_goTypes,
+ DependencyIndexes: file_core_arm_proto_depIdxs,
+ MessageInfos: file_core_arm_proto_msgTypes,
+ }.Build()
+ File_core_arm_proto = out.File
+ file_core_arm_proto_rawDesc = nil
+ file_core_arm_proto_goTypes = nil
+ file_core_arm_proto_depIdxs = nil
+}
diff --git a/crit/images/core-arm.proto b/crit/images/core-arm.proto
new file mode 100644
index 0000000..f9c9e80
--- /dev/null
+++ b/crit/images/core-arm.proto
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message user_arm_regs_entry {
+ required uint32 r0 = 1;
+ required uint32 r1 = 2;
+ required uint32 r2 = 3;
+ required uint32 r3 = 4;
+ required uint32 r4 = 5;
+ required uint32 r5 = 6;
+ required uint32 r6 = 7;
+ required uint32 r7 = 8;
+ required uint32 r8 = 9;
+ required uint32 r9 = 10;
+ required uint32 r10 = 11;
+ required uint32 fp = 12;
+ required uint32 ip = 13;
+ required uint32 sp = 14;
+ required uint32 lr = 15;
+ required uint32 pc = 16;
+ required uint32 cpsr = 17;
+ required uint32 orig_r0 = 18;
+}
+
+message user_arm_vfpstate_entry {
+ repeated uint64 vfp_regs = 1;
+ required uint32 fpscr = 2;
+ required uint32 fpexc = 3;
+ required uint32 fpinst = 4;
+ required uint32 fpinst2 = 5;
+}
+
+message thread_info_arm {
+ required uint64 clear_tid_addr = 1[(criu).hex = true];
+ required uint32 tls = 2;
+ required user_arm_regs_entry gpregs = 3[(criu).hex = true];
+ required user_arm_vfpstate_entry fpstate = 4;
+}
diff --git a/crit/images/core-mips.pb.go b/crit/images/core-mips.pb.go
new file mode 100644
index 0000000..9b9e798
--- /dev/null
+++ b/crit/images/core-mips.pb.go
@@ -0,0 +1,963 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: core-mips.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserMipsRegsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ R0 *uint64 `protobuf:"varint,1,req,name=r0" json:"r0,omitempty"`
+ R1 *uint64 `protobuf:"varint,2,req,name=r1" json:"r1,omitempty"`
+ R2 *uint64 `protobuf:"varint,3,req,name=r2" json:"r2,omitempty"`
+ R3 *uint64 `protobuf:"varint,4,req,name=r3" json:"r3,omitempty"`
+ R4 *uint64 `protobuf:"varint,5,req,name=r4" json:"r4,omitempty"`
+ R5 *uint64 `protobuf:"varint,6,req,name=r5" json:"r5,omitempty"`
+ R6 *uint64 `protobuf:"varint,7,req,name=r6" json:"r6,omitempty"`
+ R7 *uint64 `protobuf:"varint,8,req,name=r7" json:"r7,omitempty"`
+ R8 *uint64 `protobuf:"varint,9,req,name=r8" json:"r8,omitempty"`
+ R9 *uint64 `protobuf:"varint,10,req,name=r9" json:"r9,omitempty"`
+ R10 *uint64 `protobuf:"varint,11,req,name=r10" json:"r10,omitempty"`
+ R11 *uint64 `protobuf:"varint,12,req,name=r11" json:"r11,omitempty"`
+ R12 *uint64 `protobuf:"varint,13,req,name=r12" json:"r12,omitempty"`
+ R13 *uint64 `protobuf:"varint,14,req,name=r13" json:"r13,omitempty"`
+ R14 *uint64 `protobuf:"varint,15,req,name=r14" json:"r14,omitempty"`
+ R15 *uint64 `protobuf:"varint,16,req,name=r15" json:"r15,omitempty"`
+ R16 *uint64 `protobuf:"varint,17,req,name=r16" json:"r16,omitempty"`
+ R17 *uint64 `protobuf:"varint,18,req,name=r17" json:"r17,omitempty"`
+ R18 *uint64 `protobuf:"varint,19,req,name=r18" json:"r18,omitempty"`
+ R19 *uint64 `protobuf:"varint,20,req,name=r19" json:"r19,omitempty"`
+ R20 *uint64 `protobuf:"varint,21,req,name=r20" json:"r20,omitempty"`
+ R21 *uint64 `protobuf:"varint,22,req,name=r21" json:"r21,omitempty"`
+ R22 *uint64 `protobuf:"varint,23,req,name=r22" json:"r22,omitempty"`
+ R23 *uint64 `protobuf:"varint,24,req,name=r23" json:"r23,omitempty"`
+ R24 *uint64 `protobuf:"varint,25,req,name=r24" json:"r24,omitempty"`
+ R25 *uint64 `protobuf:"varint,26,req,name=r25" json:"r25,omitempty"`
+ R26 *uint64 `protobuf:"varint,27,req,name=r26" json:"r26,omitempty"`
+ R27 *uint64 `protobuf:"varint,28,req,name=r27" json:"r27,omitempty"`
+ R28 *uint64 `protobuf:"varint,29,req,name=r28" json:"r28,omitempty"`
+ R29 *uint64 `protobuf:"varint,30,req,name=r29" json:"r29,omitempty"`
+ R30 *uint64 `protobuf:"varint,31,req,name=r30" json:"r30,omitempty"`
+ R31 *uint64 `protobuf:"varint,32,req,name=r31" json:"r31,omitempty"`
+ Lo *uint64 `protobuf:"varint,33,req,name=lo" json:"lo,omitempty"`
+ Hi *uint64 `protobuf:"varint,34,req,name=hi" json:"hi,omitempty"`
+ Cp0Epc *uint64 `protobuf:"varint,35,req,name=cp0_epc,json=cp0Epc" json:"cp0_epc,omitempty"`
+ Cp0Badvaddr *uint64 `protobuf:"varint,36,req,name=cp0_badvaddr,json=cp0Badvaddr" json:"cp0_badvaddr,omitempty"`
+ Cp0Status *uint64 `protobuf:"varint,37,req,name=cp0_status,json=cp0Status" json:"cp0_status,omitempty"`
+ Cp0Cause *uint64 `protobuf:"varint,38,req,name=cp0_cause,json=cp0Cause" json:"cp0_cause,omitempty"`
+}
+
+func (x *UserMipsRegsEntry) Reset() {
+ *x = UserMipsRegsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_mips_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserMipsRegsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserMipsRegsEntry) ProtoMessage() {}
+
+func (x *UserMipsRegsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_mips_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserMipsRegsEntry.ProtoReflect.Descriptor instead.
+func (*UserMipsRegsEntry) Descriptor() ([]byte, []int) {
+ return file_core_mips_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserMipsRegsEntry) GetR0() uint64 {
+ if x != nil && x.R0 != nil {
+ return *x.R0
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR1() uint64 {
+ if x != nil && x.R1 != nil {
+ return *x.R1
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR2() uint64 {
+ if x != nil && x.R2 != nil {
+ return *x.R2
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR3() uint64 {
+ if x != nil && x.R3 != nil {
+ return *x.R3
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR4() uint64 {
+ if x != nil && x.R4 != nil {
+ return *x.R4
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR5() uint64 {
+ if x != nil && x.R5 != nil {
+ return *x.R5
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR6() uint64 {
+ if x != nil && x.R6 != nil {
+ return *x.R6
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR7() uint64 {
+ if x != nil && x.R7 != nil {
+ return *x.R7
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR8() uint64 {
+ if x != nil && x.R8 != nil {
+ return *x.R8
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR9() uint64 {
+ if x != nil && x.R9 != nil {
+ return *x.R9
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR10() uint64 {
+ if x != nil && x.R10 != nil {
+ return *x.R10
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR11() uint64 {
+ if x != nil && x.R11 != nil {
+ return *x.R11
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR12() uint64 {
+ if x != nil && x.R12 != nil {
+ return *x.R12
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR13() uint64 {
+ if x != nil && x.R13 != nil {
+ return *x.R13
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR14() uint64 {
+ if x != nil && x.R14 != nil {
+ return *x.R14
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR15() uint64 {
+ if x != nil && x.R15 != nil {
+ return *x.R15
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR16() uint64 {
+ if x != nil && x.R16 != nil {
+ return *x.R16
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR17() uint64 {
+ if x != nil && x.R17 != nil {
+ return *x.R17
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR18() uint64 {
+ if x != nil && x.R18 != nil {
+ return *x.R18
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR19() uint64 {
+ if x != nil && x.R19 != nil {
+ return *x.R19
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR20() uint64 {
+ if x != nil && x.R20 != nil {
+ return *x.R20
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR21() uint64 {
+ if x != nil && x.R21 != nil {
+ return *x.R21
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR22() uint64 {
+ if x != nil && x.R22 != nil {
+ return *x.R22
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR23() uint64 {
+ if x != nil && x.R23 != nil {
+ return *x.R23
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR24() uint64 {
+ if x != nil && x.R24 != nil {
+ return *x.R24
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR25() uint64 {
+ if x != nil && x.R25 != nil {
+ return *x.R25
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR26() uint64 {
+ if x != nil && x.R26 != nil {
+ return *x.R26
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR27() uint64 {
+ if x != nil && x.R27 != nil {
+ return *x.R27
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR28() uint64 {
+ if x != nil && x.R28 != nil {
+ return *x.R28
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR29() uint64 {
+ if x != nil && x.R29 != nil {
+ return *x.R29
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR30() uint64 {
+ if x != nil && x.R30 != nil {
+ return *x.R30
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetR31() uint64 {
+ if x != nil && x.R31 != nil {
+ return *x.R31
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetLo() uint64 {
+ if x != nil && x.Lo != nil {
+ return *x.Lo
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetHi() uint64 {
+ if x != nil && x.Hi != nil {
+ return *x.Hi
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetCp0Epc() uint64 {
+ if x != nil && x.Cp0Epc != nil {
+ return *x.Cp0Epc
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetCp0Badvaddr() uint64 {
+ if x != nil && x.Cp0Badvaddr != nil {
+ return *x.Cp0Badvaddr
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetCp0Status() uint64 {
+ if x != nil && x.Cp0Status != nil {
+ return *x.Cp0Status
+ }
+ return 0
+}
+
+func (x *UserMipsRegsEntry) GetCp0Cause() uint64 {
+ if x != nil && x.Cp0Cause != nil {
+ return *x.Cp0Cause
+ }
+ return 0
+}
+
+type UserMipsFpregsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ R0 *uint64 `protobuf:"varint,1,req,name=r0" json:"r0,omitempty"`
+ R1 *uint64 `protobuf:"varint,2,req,name=r1" json:"r1,omitempty"`
+ R2 *uint64 `protobuf:"varint,3,req,name=r2" json:"r2,omitempty"`
+ R3 *uint64 `protobuf:"varint,4,req,name=r3" json:"r3,omitempty"`
+ R4 *uint64 `protobuf:"varint,5,req,name=r4" json:"r4,omitempty"`
+ R5 *uint64 `protobuf:"varint,6,req,name=r5" json:"r5,omitempty"`
+ R6 *uint64 `protobuf:"varint,7,req,name=r6" json:"r6,omitempty"`
+ R7 *uint64 `protobuf:"varint,8,req,name=r7" json:"r7,omitempty"`
+ R8 *uint64 `protobuf:"varint,9,req,name=r8" json:"r8,omitempty"`
+ R9 *uint64 `protobuf:"varint,10,req,name=r9" json:"r9,omitempty"`
+ R10 *uint64 `protobuf:"varint,11,req,name=r10" json:"r10,omitempty"`
+ R11 *uint64 `protobuf:"varint,12,req,name=r11" json:"r11,omitempty"`
+ R12 *uint64 `protobuf:"varint,13,req,name=r12" json:"r12,omitempty"`
+ R13 *uint64 `protobuf:"varint,14,req,name=r13" json:"r13,omitempty"`
+ R14 *uint64 `protobuf:"varint,15,req,name=r14" json:"r14,omitempty"`
+ R15 *uint64 `protobuf:"varint,16,req,name=r15" json:"r15,omitempty"`
+ R16 *uint64 `protobuf:"varint,17,req,name=r16" json:"r16,omitempty"`
+ R17 *uint64 `protobuf:"varint,18,req,name=r17" json:"r17,omitempty"`
+ R18 *uint64 `protobuf:"varint,19,req,name=r18" json:"r18,omitempty"`
+ R19 *uint64 `protobuf:"varint,20,req,name=r19" json:"r19,omitempty"`
+ R20 *uint64 `protobuf:"varint,21,req,name=r20" json:"r20,omitempty"`
+ R21 *uint64 `protobuf:"varint,22,req,name=r21" json:"r21,omitempty"`
+ R22 *uint64 `protobuf:"varint,23,req,name=r22" json:"r22,omitempty"`
+ R23 *uint64 `protobuf:"varint,24,req,name=r23" json:"r23,omitempty"`
+ R24 *uint64 `protobuf:"varint,25,req,name=r24" json:"r24,omitempty"`
+ R25 *uint64 `protobuf:"varint,26,req,name=r25" json:"r25,omitempty"`
+ R26 *uint64 `protobuf:"varint,27,req,name=r26" json:"r26,omitempty"`
+ R27 *uint64 `protobuf:"varint,28,req,name=r27" json:"r27,omitempty"`
+ R28 *uint64 `protobuf:"varint,29,req,name=r28" json:"r28,omitempty"`
+ R29 *uint64 `protobuf:"varint,30,req,name=r29" json:"r29,omitempty"`
+ R30 *uint64 `protobuf:"varint,31,req,name=r30" json:"r30,omitempty"`
+ R31 *uint64 `protobuf:"varint,32,req,name=r31" json:"r31,omitempty"`
+ Lo *uint64 `protobuf:"varint,33,req,name=lo" json:"lo,omitempty"`
+ Hi *uint64 `protobuf:"varint,34,req,name=hi" json:"hi,omitempty"`
+ FpuFcr31 *uint32 `protobuf:"varint,35,req,name=fpu_fcr31,json=fpuFcr31" json:"fpu_fcr31,omitempty"`
+ FpuId *uint32 `protobuf:"varint,36,req,name=fpu_id,json=fpuId" json:"fpu_id,omitempty"`
+}
+
+func (x *UserMipsFpregsEntry) Reset() {
+ *x = UserMipsFpregsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_mips_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserMipsFpregsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserMipsFpregsEntry) ProtoMessage() {}
+
+func (x *UserMipsFpregsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_mips_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserMipsFpregsEntry.ProtoReflect.Descriptor instead.
+func (*UserMipsFpregsEntry) Descriptor() ([]byte, []int) {
+ return file_core_mips_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserMipsFpregsEntry) GetR0() uint64 {
+ if x != nil && x.R0 != nil {
+ return *x.R0
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR1() uint64 {
+ if x != nil && x.R1 != nil {
+ return *x.R1
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR2() uint64 {
+ if x != nil && x.R2 != nil {
+ return *x.R2
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR3() uint64 {
+ if x != nil && x.R3 != nil {
+ return *x.R3
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR4() uint64 {
+ if x != nil && x.R4 != nil {
+ return *x.R4
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR5() uint64 {
+ if x != nil && x.R5 != nil {
+ return *x.R5
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR6() uint64 {
+ if x != nil && x.R6 != nil {
+ return *x.R6
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR7() uint64 {
+ if x != nil && x.R7 != nil {
+ return *x.R7
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR8() uint64 {
+ if x != nil && x.R8 != nil {
+ return *x.R8
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR9() uint64 {
+ if x != nil && x.R9 != nil {
+ return *x.R9
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR10() uint64 {
+ if x != nil && x.R10 != nil {
+ return *x.R10
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR11() uint64 {
+ if x != nil && x.R11 != nil {
+ return *x.R11
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR12() uint64 {
+ if x != nil && x.R12 != nil {
+ return *x.R12
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR13() uint64 {
+ if x != nil && x.R13 != nil {
+ return *x.R13
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR14() uint64 {
+ if x != nil && x.R14 != nil {
+ return *x.R14
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR15() uint64 {
+ if x != nil && x.R15 != nil {
+ return *x.R15
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR16() uint64 {
+ if x != nil && x.R16 != nil {
+ return *x.R16
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR17() uint64 {
+ if x != nil && x.R17 != nil {
+ return *x.R17
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR18() uint64 {
+ if x != nil && x.R18 != nil {
+ return *x.R18
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR19() uint64 {
+ if x != nil && x.R19 != nil {
+ return *x.R19
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR20() uint64 {
+ if x != nil && x.R20 != nil {
+ return *x.R20
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR21() uint64 {
+ if x != nil && x.R21 != nil {
+ return *x.R21
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR22() uint64 {
+ if x != nil && x.R22 != nil {
+ return *x.R22
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR23() uint64 {
+ if x != nil && x.R23 != nil {
+ return *x.R23
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR24() uint64 {
+ if x != nil && x.R24 != nil {
+ return *x.R24
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR25() uint64 {
+ if x != nil && x.R25 != nil {
+ return *x.R25
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR26() uint64 {
+ if x != nil && x.R26 != nil {
+ return *x.R26
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR27() uint64 {
+ if x != nil && x.R27 != nil {
+ return *x.R27
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR28() uint64 {
+ if x != nil && x.R28 != nil {
+ return *x.R28
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR29() uint64 {
+ if x != nil && x.R29 != nil {
+ return *x.R29
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR30() uint64 {
+ if x != nil && x.R30 != nil {
+ return *x.R30
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetR31() uint64 {
+ if x != nil && x.R31 != nil {
+ return *x.R31
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetLo() uint64 {
+ if x != nil && x.Lo != nil {
+ return *x.Lo
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetHi() uint64 {
+ if x != nil && x.Hi != nil {
+ return *x.Hi
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetFpuFcr31() uint32 {
+ if x != nil && x.FpuFcr31 != nil {
+ return *x.FpuFcr31
+ }
+ return 0
+}
+
+func (x *UserMipsFpregsEntry) GetFpuId() uint32 {
+ if x != nil && x.FpuId != nil {
+ return *x.FpuId
+ }
+ return 0
+}
+
+type ThreadInfoMips struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ClearTidAddr *uint64 `protobuf:"varint,1,req,name=clear_tid_addr,json=clearTidAddr" json:"clear_tid_addr,omitempty"`
+ Tls *uint64 `protobuf:"varint,2,req,name=tls" json:"tls,omitempty"`
+ Gpregs *UserMipsRegsEntry `protobuf:"bytes,3,req,name=gpregs" json:"gpregs,omitempty"`
+ Fpregs *UserMipsFpregsEntry `protobuf:"bytes,4,req,name=fpregs" json:"fpregs,omitempty"`
+}
+
+func (x *ThreadInfoMips) Reset() {
+ *x = ThreadInfoMips{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_mips_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadInfoMips) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadInfoMips) ProtoMessage() {}
+
+func (x *ThreadInfoMips) ProtoReflect() protoreflect.Message {
+ mi := &file_core_mips_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadInfoMips.ProtoReflect.Descriptor instead.
+func (*ThreadInfoMips) Descriptor() ([]byte, []int) {
+ return file_core_mips_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ThreadInfoMips) GetClearTidAddr() uint64 {
+ if x != nil && x.ClearTidAddr != nil {
+ return *x.ClearTidAddr
+ }
+ return 0
+}
+
+func (x *ThreadInfoMips) GetTls() uint64 {
+ if x != nil && x.Tls != nil {
+ return *x.Tls
+ }
+ return 0
+}
+
+func (x *ThreadInfoMips) GetGpregs() *UserMipsRegsEntry {
+ if x != nil {
+ return x.Gpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoMips) GetFpregs() *UserMipsFpregsEntry {
+ if x != nil {
+ return x.Fpregs
+ }
+ return nil
+}
+
+var File_core_mips_proto protoreflect.FileDescriptor
+
+var file_core_mips_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x6d, 0x69, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x05,
+ 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x73,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x30, 0x18, 0x01, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x30, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x31, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x32, 0x18, 0x03, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x33, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x34, 0x18, 0x05, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x34, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x35, 0x18, 0x06, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x35, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x36, 0x18, 0x07, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x36, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x37, 0x18, 0x08, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x37, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x38, 0x18, 0x09, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x38, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x39, 0x18, 0x0a, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x02, 0x72, 0x39, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x30, 0x18, 0x0b, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x30, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x31, 0x18,
+ 0x0c, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x31, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31,
+ 0x32, 0x18, 0x0d, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x32, 0x12, 0x10, 0x0a, 0x03,
+ 0x72, 0x31, 0x33, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x33, 0x12, 0x10,
+ 0x0a, 0x03, 0x72, 0x31, 0x34, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x34,
+ 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x35, 0x18, 0x10, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72,
+ 0x31, 0x35, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x36, 0x18, 0x11, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x03, 0x72, 0x31, 0x36, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x37, 0x18, 0x12, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x03, 0x72, 0x31, 0x37, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x38, 0x18, 0x13, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x38, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x39, 0x18,
+ 0x14, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x39, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32,
+ 0x30, 0x18, 0x15, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x30, 0x12, 0x10, 0x0a, 0x03,
+ 0x72, 0x32, 0x31, 0x18, 0x16, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x31, 0x12, 0x10,
+ 0x0a, 0x03, 0x72, 0x32, 0x32, 0x18, 0x17, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x32,
+ 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x33, 0x18, 0x18, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72,
+ 0x32, 0x33, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x34, 0x18, 0x19, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x03, 0x72, 0x32, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x35, 0x18, 0x1a, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x03, 0x72, 0x32, 0x35, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x36, 0x18, 0x1b, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x36, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x37, 0x18,
+ 0x1c, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x37, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32,
+ 0x38, 0x18, 0x1d, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x38, 0x12, 0x10, 0x0a, 0x03,
+ 0x72, 0x32, 0x39, 0x18, 0x1e, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x39, 0x12, 0x10,
+ 0x0a, 0x03, 0x72, 0x33, 0x30, 0x18, 0x1f, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x33, 0x30,
+ 0x12, 0x10, 0x0a, 0x03, 0x72, 0x33, 0x31, 0x18, 0x20, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72,
+ 0x33, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x6f, 0x18, 0x21, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02,
+ 0x6c, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x69, 0x18, 0x22, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02,
+ 0x68, 0x69, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x70, 0x30, 0x5f, 0x65, 0x70, 0x63, 0x18, 0x23, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x06, 0x63, 0x70, 0x30, 0x45, 0x70, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x63,
+ 0x70, 0x30, 0x5f, 0x62, 0x61, 0x64, 0x76, 0x61, 0x64, 0x64, 0x72, 0x18, 0x24, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x0b, 0x63, 0x70, 0x30, 0x42, 0x61, 0x64, 0x76, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1d,
+ 0x0a, 0x0a, 0x63, 0x70, 0x30, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x25, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x09, 0x63, 0x70, 0x30, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a,
+ 0x09, 0x63, 0x70, 0x30, 0x5f, 0x63, 0x61, 0x75, 0x73, 0x65, 0x18, 0x26, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x08, 0x63, 0x70, 0x30, 0x43, 0x61, 0x75, 0x73, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x16, 0x75,
+ 0x73, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x70, 0x73, 0x5f, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x30, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x30, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x31, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x32, 0x18, 0x03, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x33, 0x18, 0x04, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x34, 0x18, 0x05, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x34, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x35, 0x18, 0x06, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x35, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x36, 0x18, 0x07, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x36, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x37, 0x18, 0x08, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x37, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x38, 0x18, 0x09, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x38, 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x39, 0x18, 0x0a, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x02, 0x72, 0x39, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x30, 0x18, 0x0b, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x30, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x31, 0x18, 0x0c,
+ 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x31, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x32,
+ 0x18, 0x0d, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x72,
+ 0x31, 0x33, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x33, 0x12, 0x10, 0x0a,
+ 0x03, 0x72, 0x31, 0x34, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x34, 0x12,
+ 0x10, 0x0a, 0x03, 0x72, 0x31, 0x35, 0x18, 0x10, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31,
+ 0x35, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x36, 0x18, 0x11, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03,
+ 0x72, 0x31, 0x36, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x37, 0x18, 0x12, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x03, 0x72, 0x31, 0x37, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x38, 0x18, 0x13, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x38, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x39, 0x18, 0x14,
+ 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x39, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x30,
+ 0x18, 0x15, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x30, 0x12, 0x10, 0x0a, 0x03, 0x72,
+ 0x32, 0x31, 0x18, 0x16, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x31, 0x12, 0x10, 0x0a,
+ 0x03, 0x72, 0x32, 0x32, 0x18, 0x17, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x32, 0x12,
+ 0x10, 0x0a, 0x03, 0x72, 0x32, 0x33, 0x18, 0x18, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32,
+ 0x33, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x34, 0x18, 0x19, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03,
+ 0x72, 0x32, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x35, 0x18, 0x1a, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x03, 0x72, 0x32, 0x35, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x36, 0x18, 0x1b, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x36, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x37, 0x18, 0x1c,
+ 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x37, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x32, 0x38,
+ 0x18, 0x1d, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x38, 0x12, 0x10, 0x0a, 0x03, 0x72,
+ 0x32, 0x39, 0x18, 0x1e, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x32, 0x39, 0x12, 0x10, 0x0a,
+ 0x03, 0x72, 0x33, 0x30, 0x18, 0x1f, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x33, 0x30, 0x12,
+ 0x10, 0x0a, 0x03, 0x72, 0x33, 0x31, 0x18, 0x20, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x33,
+ 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x6f, 0x18, 0x21, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x6c,
+ 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x69, 0x18, 0x22, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x68,
+ 0x69, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x70, 0x75, 0x5f, 0x66, 0x63, 0x72, 0x33, 0x31, 0x18, 0x23,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x66, 0x70, 0x75, 0x46, 0x63, 0x72, 0x33, 0x31, 0x12, 0x15,
+ 0x0a, 0x06, 0x66, 0x70, 0x75, 0x5f, 0x69, 0x64, 0x18, 0x24, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05,
+ 0x66, 0x70, 0x75, 0x49, 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x10, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64,
+ 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x6d, 0x69, 0x70, 0x73, 0x12, 0x2b, 0x0a, 0x0e, 0x63, 0x6c,
+ 0x65, 0x61, 0x72, 0x5f, 0x74, 0x69, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x02,
+ 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72,
+ 0x54, 0x69, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x02,
+ 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x67, 0x70, 0x72,
+ 0x65, 0x67, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72,
+ 0x5f, 0x6d, 0x69, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x12,
+ 0x36, 0x0a, 0x06, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32,
+ 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x70, 0x73, 0x5f, 0x66, 0x70, 0x72, 0x65,
+ 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52,
+ 0x06, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73,
+}
+
+var (
+ file_core_mips_proto_rawDescOnce sync.Once
+ file_core_mips_proto_rawDescData = file_core_mips_proto_rawDesc
+)
+
+func file_core_mips_proto_rawDescGZIP() []byte {
+ file_core_mips_proto_rawDescOnce.Do(func() {
+ file_core_mips_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_mips_proto_rawDescData)
+ })
+ return file_core_mips_proto_rawDescData
+}
+
+var file_core_mips_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_core_mips_proto_goTypes = []interface{}{
+ (*UserMipsRegsEntry)(nil), // 0: user_mips_regs_entry
+ (*UserMipsFpregsEntry)(nil), // 1: user_mips_fpregs_entry
+ (*ThreadInfoMips)(nil), // 2: thread_info_mips
+}
+var file_core_mips_proto_depIdxs = []int32{
+ 0, // 0: thread_info_mips.gpregs:type_name -> user_mips_regs_entry
+ 1, // 1: thread_info_mips.fpregs:type_name -> user_mips_fpregs_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_core_mips_proto_init() }
+func file_core_mips_proto_init() {
+ if File_core_mips_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_core_mips_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserMipsRegsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_mips_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserMipsFpregsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_mips_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadInfoMips); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_core_mips_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_core_mips_proto_goTypes,
+ DependencyIndexes: file_core_mips_proto_depIdxs,
+ MessageInfos: file_core_mips_proto_msgTypes,
+ }.Build()
+ File_core_mips_proto = out.File
+ file_core_mips_proto_rawDesc = nil
+ file_core_mips_proto_goTypes = nil
+ file_core_mips_proto_depIdxs = nil
+}
diff --git a/crit/images/core-mips.proto b/crit/images/core-mips.proto
new file mode 100755
index 0000000..ec06d69
--- /dev/null
+++ b/crit/images/core-mips.proto
@@ -0,0 +1,92 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message user_mips_regs_entry {
+ required uint64 r0 = 1;
+ required uint64 r1 = 2;
+ required uint64 r2 = 3;
+ required uint64 r3 = 4;
+ required uint64 r4 = 5;
+ required uint64 r5 = 6;
+ required uint64 r6 = 7;
+ required uint64 r7 = 8;
+ required uint64 r8 = 9;
+ required uint64 r9 = 10;
+ required uint64 r10 = 11;
+ required uint64 r11 = 12;
+ required uint64 r12 = 13;
+ required uint64 r13 = 14;
+ required uint64 r14 = 15;
+ required uint64 r15 = 16;
+ required uint64 r16 = 17;
+ required uint64 r17 = 18;
+ required uint64 r18 = 19;
+ required uint64 r19 = 20;
+ required uint64 r20 = 21;
+ required uint64 r21 = 22;
+ required uint64 r22 = 23;
+ required uint64 r23 = 24;
+ required uint64 r24 = 25;
+ required uint64 r25 = 26;
+ required uint64 r26 = 27;
+ required uint64 r27 = 28;
+ required uint64 r28 = 29;
+ required uint64 r29 = 30;
+ required uint64 r30 = 31;
+ required uint64 r31 = 32;
+ required uint64 lo = 33;
+ required uint64 hi = 34;
+ required uint64 cp0_epc = 35;
+ required uint64 cp0_badvaddr = 36;
+ required uint64 cp0_status = 37;
+ required uint64 cp0_cause = 38;
+}
+
+message user_mips_fpregs_entry {
+ required uint64 r0 = 1;
+ required uint64 r1 = 2;
+ required uint64 r2 = 3;
+ required uint64 r3 = 4;
+ required uint64 r4 = 5;
+ required uint64 r5 = 6;
+ required uint64 r6 = 7;
+ required uint64 r7 = 8;
+ required uint64 r8 = 9;
+ required uint64 r9 = 10;
+ required uint64 r10 = 11;
+ required uint64 r11 = 12;
+ required uint64 r12 = 13;
+ required uint64 r13 = 14;
+ required uint64 r14 = 15;
+ required uint64 r15 = 16;
+ required uint64 r16 = 17;
+ required uint64 r17 = 18;
+ required uint64 r18 = 19;
+ required uint64 r19 = 20;
+ required uint64 r20 = 21;
+ required uint64 r21 = 22;
+ required uint64 r22 = 23;
+ required uint64 r23 = 24;
+ required uint64 r24 = 25;
+ required uint64 r25 = 26;
+ required uint64 r26 = 27;
+ required uint64 r27 = 28;
+ required uint64 r28 = 29;
+ required uint64 r29 = 30;
+ required uint64 r30 = 31;
+ required uint64 r31 = 32;
+ required uint64 lo = 33;
+ required uint64 hi = 34;
+ required uint32 fpu_fcr31 = 35;
+ required uint32 fpu_id = 36;
+}
+
+message thread_info_mips {
+ required uint64 clear_tid_addr = 1[(criu).hex = true];
+ required uint64 tls = 2;
+ required user_mips_regs_entry gpregs = 3[(criu).hex = true];
+ required user_mips_fpregs_entry fpregs = 4[(criu).hex = true];
+}
diff --git a/crit/images/core-ppc64.pb.go b/crit/images/core-ppc64.pb.go
new file mode 100644
index 0000000..b6eb9d5
--- /dev/null
+++ b/crit/images/core-ppc64.pb.go
@@ -0,0 +1,695 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: core-ppc64.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserPpc64RegsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Following is the list of registers starting at r0.
+ Gpr []uint64 `protobuf:"varint,1,rep,name=gpr" json:"gpr,omitempty"`
+ Nip *uint64 `protobuf:"varint,2,req,name=nip" json:"nip,omitempty"`
+ Msr *uint64 `protobuf:"varint,3,req,name=msr" json:"msr,omitempty"`
+ OrigGpr3 *uint64 `protobuf:"varint,4,req,name=orig_gpr3,json=origGpr3" json:"orig_gpr3,omitempty"`
+ Ctr *uint64 `protobuf:"varint,5,req,name=ctr" json:"ctr,omitempty"`
+ Link *uint64 `protobuf:"varint,6,req,name=link" json:"link,omitempty"`
+ Xer *uint64 `protobuf:"varint,7,req,name=xer" json:"xer,omitempty"`
+ Ccr *uint64 `protobuf:"varint,8,req,name=ccr" json:"ccr,omitempty"`
+ Trap *uint64 `protobuf:"varint,9,req,name=trap" json:"trap,omitempty"`
+ // For Transactional memory support since P8
+ Texasr *uint64 `protobuf:"varint,10,opt,name=texasr" json:"texasr,omitempty"`
+ Tfhar *uint64 `protobuf:"varint,11,opt,name=tfhar" json:"tfhar,omitempty"`
+ Tfiar *uint64 `protobuf:"varint,12,opt,name=tfiar" json:"tfiar,omitempty"`
+}
+
+func (x *UserPpc64RegsEntry) Reset() {
+ *x = UserPpc64RegsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_ppc64_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserPpc64RegsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserPpc64RegsEntry) ProtoMessage() {}
+
+func (x *UserPpc64RegsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_ppc64_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserPpc64RegsEntry.ProtoReflect.Descriptor instead.
+func (*UserPpc64RegsEntry) Descriptor() ([]byte, []int) {
+ return file_core_ppc64_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserPpc64RegsEntry) GetGpr() []uint64 {
+ if x != nil {
+ return x.Gpr
+ }
+ return nil
+}
+
+func (x *UserPpc64RegsEntry) GetNip() uint64 {
+ if x != nil && x.Nip != nil {
+ return *x.Nip
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetMsr() uint64 {
+ if x != nil && x.Msr != nil {
+ return *x.Msr
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetOrigGpr3() uint64 {
+ if x != nil && x.OrigGpr3 != nil {
+ return *x.OrigGpr3
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetCtr() uint64 {
+ if x != nil && x.Ctr != nil {
+ return *x.Ctr
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetLink() uint64 {
+ if x != nil && x.Link != nil {
+ return *x.Link
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetXer() uint64 {
+ if x != nil && x.Xer != nil {
+ return *x.Xer
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetCcr() uint64 {
+ if x != nil && x.Ccr != nil {
+ return *x.Ccr
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetTrap() uint64 {
+ if x != nil && x.Trap != nil {
+ return *x.Trap
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetTexasr() uint64 {
+ if x != nil && x.Texasr != nil {
+ return *x.Texasr
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetTfhar() uint64 {
+ if x != nil && x.Tfhar != nil {
+ return *x.Tfhar
+ }
+ return 0
+}
+
+func (x *UserPpc64RegsEntry) GetTfiar() uint64 {
+ if x != nil && x.Tfiar != nil {
+ return *x.Tfiar
+ }
+ return 0
+}
+
+type UserPpc64FpstateEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Following is the list of registers starting at fpr0
+ Fpregs []uint64 `protobuf:"varint,1,rep,name=fpregs" json:"fpregs,omitempty"`
+}
+
+func (x *UserPpc64FpstateEntry) Reset() {
+ *x = UserPpc64FpstateEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_ppc64_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserPpc64FpstateEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserPpc64FpstateEntry) ProtoMessage() {}
+
+func (x *UserPpc64FpstateEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_ppc64_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserPpc64FpstateEntry.ProtoReflect.Descriptor instead.
+func (*UserPpc64FpstateEntry) Descriptor() ([]byte, []int) {
+ return file_core_ppc64_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserPpc64FpstateEntry) GetFpregs() []uint64 {
+ if x != nil {
+ return x.Fpregs
+ }
+ return nil
+}
+
+type UserPpc64VrstateEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Altivec registers
+ // The vector registers are 128bit registers (VSR[32..63]).
+ // The following vregs entry will store first the high part then the
+ // low one:
+ //
+ // VR0 = vrregs[0] << 64 | vrregs[1];
+ // VR1 = vrregs[2] << 64 | vrregs[3];
+ // ..
+ //
+ // The last entry stores in a 128bit field the VSCR which is a 32bit
+ // value returned by the kernel in a 128 field.
+ Vrregs []uint64 `protobuf:"varint,1,rep,name=vrregs" json:"vrregs,omitempty"`
+ Vrsave *uint32 `protobuf:"varint,2,req,name=vrsave" json:"vrsave,omitempty"`
+}
+
+func (x *UserPpc64VrstateEntry) Reset() {
+ *x = UserPpc64VrstateEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_ppc64_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserPpc64VrstateEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserPpc64VrstateEntry) ProtoMessage() {}
+
+func (x *UserPpc64VrstateEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_ppc64_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserPpc64VrstateEntry.ProtoReflect.Descriptor instead.
+func (*UserPpc64VrstateEntry) Descriptor() ([]byte, []int) {
+ return file_core_ppc64_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *UserPpc64VrstateEntry) GetVrregs() []uint64 {
+ if x != nil {
+ return x.Vrregs
+ }
+ return nil
+}
+
+func (x *UserPpc64VrstateEntry) GetVrsave() uint32 {
+ if x != nil && x.Vrsave != nil {
+ return *x.Vrsave
+ }
+ return 0
+}
+
+type UserPpc64VsxstateEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // VSX registers
+ // The vector-scale registers are 128bit registers (VSR[0..64]).
+ // Since there is an overlapping over the VSX registers by the FPR and
+ // the Altivec registers, only the lower part of the first 32 VSX
+ // registers have to be saved.
+ Vsxregs []uint64 `protobuf:"varint,1,rep,name=vsxregs" json:"vsxregs,omitempty"`
+}
+
+func (x *UserPpc64VsxstateEntry) Reset() {
+ *x = UserPpc64VsxstateEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_ppc64_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserPpc64VsxstateEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserPpc64VsxstateEntry) ProtoMessage() {}
+
+func (x *UserPpc64VsxstateEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_ppc64_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserPpc64VsxstateEntry.ProtoReflect.Descriptor instead.
+func (*UserPpc64VsxstateEntry) Descriptor() ([]byte, []int) {
+ return file_core_ppc64_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *UserPpc64VsxstateEntry) GetVsxregs() []uint64 {
+ if x != nil {
+ return x.Vsxregs
+ }
+ return nil
+}
+
+// Transactional memory operation's state
+type UserPpc64TmRegsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Gpregs *UserPpc64RegsEntry `protobuf:"bytes,1,req,name=gpregs" json:"gpregs,omitempty"`
+ Fpstate *UserPpc64FpstateEntry `protobuf:"bytes,2,opt,name=fpstate" json:"fpstate,omitempty"`
+ Vrstate *UserPpc64VrstateEntry `protobuf:"bytes,3,opt,name=vrstate" json:"vrstate,omitempty"`
+ Vsxstate *UserPpc64VsxstateEntry `protobuf:"bytes,4,opt,name=vsxstate" json:"vsxstate,omitempty"`
+}
+
+func (x *UserPpc64TmRegsEntry) Reset() {
+ *x = UserPpc64TmRegsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_ppc64_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserPpc64TmRegsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserPpc64TmRegsEntry) ProtoMessage() {}
+
+func (x *UserPpc64TmRegsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_ppc64_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserPpc64TmRegsEntry.ProtoReflect.Descriptor instead.
+func (*UserPpc64TmRegsEntry) Descriptor() ([]byte, []int) {
+ return file_core_ppc64_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UserPpc64TmRegsEntry) GetGpregs() *UserPpc64RegsEntry {
+ if x != nil {
+ return x.Gpregs
+ }
+ return nil
+}
+
+func (x *UserPpc64TmRegsEntry) GetFpstate() *UserPpc64FpstateEntry {
+ if x != nil {
+ return x.Fpstate
+ }
+ return nil
+}
+
+func (x *UserPpc64TmRegsEntry) GetVrstate() *UserPpc64VrstateEntry {
+ if x != nil {
+ return x.Vrstate
+ }
+ return nil
+}
+
+func (x *UserPpc64TmRegsEntry) GetVsxstate() *UserPpc64VsxstateEntry {
+ if x != nil {
+ return x.Vsxstate
+ }
+ return nil
+}
+
+type ThreadInfoPpc64 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ClearTidAddr *uint64 `protobuf:"varint,1,req,name=clear_tid_addr,json=clearTidAddr" json:"clear_tid_addr,omitempty"`
+ Gpregs *UserPpc64RegsEntry `protobuf:"bytes,2,req,name=gpregs" json:"gpregs,omitempty"`
+ Fpstate *UserPpc64FpstateEntry `protobuf:"bytes,3,opt,name=fpstate" json:"fpstate,omitempty"`
+ Vrstate *UserPpc64VrstateEntry `protobuf:"bytes,4,opt,name=vrstate" json:"vrstate,omitempty"`
+ Vsxstate *UserPpc64VsxstateEntry `protobuf:"bytes,5,opt,name=vsxstate" json:"vsxstate,omitempty"`
+ Tmstate *UserPpc64TmRegsEntry `protobuf:"bytes,6,opt,name=tmstate" json:"tmstate,omitempty"`
+}
+
+func (x *ThreadInfoPpc64) Reset() {
+ *x = ThreadInfoPpc64{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_ppc64_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadInfoPpc64) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadInfoPpc64) ProtoMessage() {}
+
+func (x *ThreadInfoPpc64) ProtoReflect() protoreflect.Message {
+ mi := &file_core_ppc64_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadInfoPpc64.ProtoReflect.Descriptor instead.
+func (*ThreadInfoPpc64) Descriptor() ([]byte, []int) {
+ return file_core_ppc64_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ThreadInfoPpc64) GetClearTidAddr() uint64 {
+ if x != nil && x.ClearTidAddr != nil {
+ return *x.ClearTidAddr
+ }
+ return 0
+}
+
+func (x *ThreadInfoPpc64) GetGpregs() *UserPpc64RegsEntry {
+ if x != nil {
+ return x.Gpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoPpc64) GetFpstate() *UserPpc64FpstateEntry {
+ if x != nil {
+ return x.Fpstate
+ }
+ return nil
+}
+
+func (x *ThreadInfoPpc64) GetVrstate() *UserPpc64VrstateEntry {
+ if x != nil {
+ return x.Vrstate
+ }
+ return nil
+}
+
+func (x *ThreadInfoPpc64) GetVsxstate() *UserPpc64VsxstateEntry {
+ if x != nil {
+ return x.Vsxstate
+ }
+ return nil
+}
+
+func (x *ThreadInfoPpc64) GetTmstate() *UserPpc64TmRegsEntry {
+ if x != nil {
+ return x.Tmstate
+ }
+ return nil
+}
+
+var File_core_ppc64_proto protoreflect.FileDescriptor
+
+var file_core_ppc64_proto_rawDesc = []byte{
+ 0x0a, 0x10, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x70, 0x70, 0x63, 0x36, 0x34, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c,
+ 0x02, 0x0a, 0x15, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x72, 0x65,
+ 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x70, 0x72, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x03, 0x67, 0x70, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69,
+ 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x6e, 0x69, 0x70, 0x12, 0x10, 0x0a, 0x03,
+ 0x6d, 0x73, 0x72, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x6d, 0x73, 0x72, 0x12, 0x1b,
+ 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x5f, 0x67, 0x70, 0x72, 0x33, 0x18, 0x04, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x47, 0x70, 0x72, 0x33, 0x12, 0x10, 0x0a, 0x03, 0x63,
+ 0x74, 0x72, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x63, 0x74, 0x72, 0x12, 0x12, 0x0a,
+ 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x6c, 0x69, 0x6e,
+ 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x78, 0x65, 0x72, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03,
+ 0x78, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x63, 0x72, 0x18, 0x08, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x03, 0x63, 0x63, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x72, 0x61, 0x70, 0x18, 0x09, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x04, 0x74, 0x72, 0x61, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x78,
+ 0x61, 0x73, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x65, 0x78, 0x61, 0x73,
+ 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x66, 0x68, 0x61, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x05, 0x74, 0x66, 0x68, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x66, 0x69, 0x61, 0x72,
+ 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x66, 0x69, 0x61, 0x72, 0x22, 0x32, 0x0a,
+ 0x18, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x66, 0x70, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x70, 0x72,
+ 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x66, 0x70, 0x72, 0x65, 0x67,
+ 0x73, 0x22, 0x4a, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f,
+ 0x76, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a,
+ 0x06, 0x76, 0x72, 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x76,
+ 0x72, 0x72, 0x65, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x72, 0x73, 0x61, 0x76, 0x65, 0x18,
+ 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x72, 0x73, 0x61, 0x76, 0x65, 0x22, 0x35, 0x0a,
+ 0x19, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x76, 0x73, 0x78, 0x73,
+ 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x73,
+ 0x78, 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x76, 0x73, 0x78,
+ 0x72, 0x65, 0x67, 0x73, 0x22, 0xec, 0x01, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70,
+ 0x63, 0x36, 0x34, 0x5f, 0x74, 0x6d, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x72,
+ 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67,
+ 0x73, 0x12, 0x33, 0x0a, 0x07, 0x66, 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f,
+ 0x66, 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66,
+ 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x76, 0x72, 0x73, 0x74, 0x61, 0x74,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70,
+ 0x70, 0x63, 0x36, 0x34, 0x5f, 0x76, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x07, 0x76, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x76,
+ 0x73, 0x78, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+ 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x76, 0x73, 0x78, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x76, 0x73, 0x78, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x22, 0xce, 0x02, 0x0a, 0x11, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69,
+ 0x6e, 0x66, 0x6f, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0e, 0x63, 0x6c, 0x65,
+ 0x61, 0x72, 0x5f, 0x74, 0x69, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54,
+ 0x69, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x35, 0x0a, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73,
+ 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70,
+ 0x63, 0x36, 0x34, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05,
+ 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x12, 0x33, 0x0a,
+ 0x07, 0x66, 0x70, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x66, 0x70, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x70, 0x73, 0x74, 0x61,
+ 0x74, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x76, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34,
+ 0x5f, 0x76, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07,
+ 0x76, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x76, 0x73, 0x78, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72,
+ 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x76, 0x73, 0x78, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x76, 0x73, 0x78, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
+ 0x33, 0x0a, 0x07, 0x74, 0x6d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x74, 0x6d,
+ 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x6d, 0x73,
+ 0x74, 0x61, 0x74, 0x65,
+}
+
+var (
+ file_core_ppc64_proto_rawDescOnce sync.Once
+ file_core_ppc64_proto_rawDescData = file_core_ppc64_proto_rawDesc
+)
+
+func file_core_ppc64_proto_rawDescGZIP() []byte {
+ file_core_ppc64_proto_rawDescOnce.Do(func() {
+ file_core_ppc64_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_ppc64_proto_rawDescData)
+ })
+ return file_core_ppc64_proto_rawDescData
+}
+
+var file_core_ppc64_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_core_ppc64_proto_goTypes = []interface{}{
+ (*UserPpc64RegsEntry)(nil), // 0: user_ppc64_regs_entry
+ (*UserPpc64FpstateEntry)(nil), // 1: user_ppc64_fpstate_entry
+ (*UserPpc64VrstateEntry)(nil), // 2: user_ppc64_vrstate_entry
+ (*UserPpc64VsxstateEntry)(nil), // 3: user_ppc64_vsxstate_entry
+ (*UserPpc64TmRegsEntry)(nil), // 4: user_ppc64_tm_regs_entry
+ (*ThreadInfoPpc64)(nil), // 5: thread_info_ppc64
+}
+var file_core_ppc64_proto_depIdxs = []int32{
+ 0, // 0: user_ppc64_tm_regs_entry.gpregs:type_name -> user_ppc64_regs_entry
+ 1, // 1: user_ppc64_tm_regs_entry.fpstate:type_name -> user_ppc64_fpstate_entry
+ 2, // 2: user_ppc64_tm_regs_entry.vrstate:type_name -> user_ppc64_vrstate_entry
+ 3, // 3: user_ppc64_tm_regs_entry.vsxstate:type_name -> user_ppc64_vsxstate_entry
+ 0, // 4: thread_info_ppc64.gpregs:type_name -> user_ppc64_regs_entry
+ 1, // 5: thread_info_ppc64.fpstate:type_name -> user_ppc64_fpstate_entry
+ 2, // 6: thread_info_ppc64.vrstate:type_name -> user_ppc64_vrstate_entry
+ 3, // 7: thread_info_ppc64.vsxstate:type_name -> user_ppc64_vsxstate_entry
+ 4, // 8: thread_info_ppc64.tmstate:type_name -> user_ppc64_tm_regs_entry
+ 9, // [9:9] is the sub-list for method output_type
+ 9, // [9:9] is the sub-list for method input_type
+ 9, // [9:9] is the sub-list for extension type_name
+ 9, // [9:9] is the sub-list for extension extendee
+ 0, // [0:9] is the sub-list for field type_name
+}
+
+func init() { file_core_ppc64_proto_init() }
+func file_core_ppc64_proto_init() {
+ if File_core_ppc64_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_core_ppc64_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserPpc64RegsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_ppc64_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserPpc64FpstateEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_ppc64_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserPpc64VrstateEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_ppc64_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserPpc64VsxstateEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_ppc64_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserPpc64TmRegsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_ppc64_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadInfoPpc64); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_core_ppc64_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_core_ppc64_proto_goTypes,
+ DependencyIndexes: file_core_ppc64_proto_depIdxs,
+ MessageInfos: file_core_ppc64_proto_msgTypes,
+ }.Build()
+ File_core_ppc64_proto = out.File
+ file_core_ppc64_proto_rawDesc = nil
+ file_core_ppc64_proto_goTypes = nil
+ file_core_ppc64_proto_depIdxs = nil
+}
diff --git a/crit/images/core-ppc64.proto b/crit/images/core-ppc64.proto
new file mode 100644
index 0000000..bb07e09
--- /dev/null
+++ b/crit/images/core-ppc64.proto
@@ -0,0 +1,73 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message user_ppc64_regs_entry {
+ /* Following is the list of registers starting at r0. */
+ repeated uint64 gpr = 1;
+ required uint64 nip = 2;
+ required uint64 msr = 3;
+ required uint64 orig_gpr3 = 4;
+ required uint64 ctr = 5;
+ required uint64 link = 6;
+ required uint64 xer = 7;
+ required uint64 ccr = 8;
+ required uint64 trap = 9;
+ /* For Transactional memory support since P8 */
+ optional uint64 texasr = 10;
+ optional uint64 tfhar = 11;
+ optional uint64 tfiar = 12;
+}
+
+message user_ppc64_fpstate_entry {
+ /* Following is the list of registers starting at fpr0 */
+ repeated uint64 fpregs = 1;
+}
+
+message user_ppc64_vrstate_entry {
+ /*
+ * Altivec registers
+ * The vector registers are 128bit registers (VSR[32..63]).
+ * The following vregs entry will store first the high part then the
+ * low one:
+ * VR0 = vrregs[0] << 64 | vrregs[1];
+ * VR1 = vrregs[2] << 64 | vrregs[3];
+ * ..
+ * The last entry stores in a 128bit field the VSCR which is a 32bit
+ * value returned by the kernel in a 128 field.
+ */
+ repeated uint64 vrregs = 1;
+ required uint32 vrsave = 2;
+}
+
+message user_ppc64_vsxstate_entry {
+ /*
+ * VSX registers
+ * The vector-scale registers are 128bit registers (VSR[0..64]).
+ * Since there is an overlapping over the VSX registers by the FPR and
+ * the Altivec registers, only the lower part of the first 32 VSX
+ * registers have to be saved.
+ */
+ repeated uint64 vsxregs = 1;
+}
+
+/*
+ * Transactional memory operation's state
+ */
+message user_ppc64_tm_regs_entry {
+ required user_ppc64_regs_entry gpregs = 1;
+ optional user_ppc64_fpstate_entry fpstate = 2;
+ optional user_ppc64_vrstate_entry vrstate = 3;
+ optional user_ppc64_vsxstate_entry vsxstate = 4;
+}
+
+message thread_info_ppc64 {
+ required uint64 clear_tid_addr = 1[(criu).hex = true];
+ required user_ppc64_regs_entry gpregs = 2[(criu).hex = true];
+ optional user_ppc64_fpstate_entry fpstate = 3;
+ optional user_ppc64_vrstate_entry vrstate = 4;
+ optional user_ppc64_vsxstate_entry vsxstate = 5;
+ optional user_ppc64_tm_regs_entry tmstate = 6;
+}
diff --git a/crit/images/core-s390.pb.go b/crit/images/core-s390.pb.go
new file mode 100644
index 0000000..67b0eda
--- /dev/null
+++ b/crit/images/core-s390.pb.go
@@ -0,0 +1,681 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: core-s390.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserS390RegsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PswMask *uint64 `protobuf:"varint,1,req,name=psw_mask,json=pswMask" json:"psw_mask,omitempty"`
+ PswAddr *uint64 `protobuf:"varint,2,req,name=psw_addr,json=pswAddr" json:"psw_addr,omitempty"`
+ Gprs []uint64 `protobuf:"varint,3,rep,name=gprs" json:"gprs,omitempty"`
+ Acrs []uint32 `protobuf:"varint,4,rep,name=acrs" json:"acrs,omitempty"`
+ OrigGpr2 *uint64 `protobuf:"varint,5,req,name=orig_gpr2,json=origGpr2" json:"orig_gpr2,omitempty"`
+ SystemCall *uint32 `protobuf:"varint,6,req,name=system_call,json=systemCall" json:"system_call,omitempty"`
+}
+
+func (x *UserS390RegsEntry) Reset() {
+ *x = UserS390RegsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_s390_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserS390RegsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserS390RegsEntry) ProtoMessage() {}
+
+func (x *UserS390RegsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_s390_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserS390RegsEntry.ProtoReflect.Descriptor instead.
+func (*UserS390RegsEntry) Descriptor() ([]byte, []int) {
+ return file_core_s390_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserS390RegsEntry) GetPswMask() uint64 {
+ if x != nil && x.PswMask != nil {
+ return *x.PswMask
+ }
+ return 0
+}
+
+func (x *UserS390RegsEntry) GetPswAddr() uint64 {
+ if x != nil && x.PswAddr != nil {
+ return *x.PswAddr
+ }
+ return 0
+}
+
+func (x *UserS390RegsEntry) GetGprs() []uint64 {
+ if x != nil {
+ return x.Gprs
+ }
+ return nil
+}
+
+func (x *UserS390RegsEntry) GetAcrs() []uint32 {
+ if x != nil {
+ return x.Acrs
+ }
+ return nil
+}
+
+func (x *UserS390RegsEntry) GetOrigGpr2() uint64 {
+ if x != nil && x.OrigGpr2 != nil {
+ return *x.OrigGpr2
+ }
+ return 0
+}
+
+func (x *UserS390RegsEntry) GetSystemCall() uint32 {
+ if x != nil && x.SystemCall != nil {
+ return *x.SystemCall
+ }
+ return 0
+}
+
+type UserS390VxrsLowEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Regs []uint64 `protobuf:"varint,1,rep,name=regs" json:"regs,omitempty"`
+}
+
+func (x *UserS390VxrsLowEntry) Reset() {
+ *x = UserS390VxrsLowEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_s390_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserS390VxrsLowEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserS390VxrsLowEntry) ProtoMessage() {}
+
+func (x *UserS390VxrsLowEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_s390_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserS390VxrsLowEntry.ProtoReflect.Descriptor instead.
+func (*UserS390VxrsLowEntry) Descriptor() ([]byte, []int) {
+ return file_core_s390_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserS390VxrsLowEntry) GetRegs() []uint64 {
+ if x != nil {
+ return x.Regs
+ }
+ return nil
+}
+
+// The vxrs_high registers have 128 bit:
+//
+// vxrs_high_0 = regs[0] << 64 | regs[1];
+// vxrs_high_1 = regs[2] << 64 | regs[3];
+type UserS390VxrsHighEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Regs []uint64 `protobuf:"varint,1,rep,name=regs" json:"regs,omitempty"`
+}
+
+func (x *UserS390VxrsHighEntry) Reset() {
+ *x = UserS390VxrsHighEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_s390_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserS390VxrsHighEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserS390VxrsHighEntry) ProtoMessage() {}
+
+func (x *UserS390VxrsHighEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_s390_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserS390VxrsHighEntry.ProtoReflect.Descriptor instead.
+func (*UserS390VxrsHighEntry) Descriptor() ([]byte, []int) {
+ return file_core_s390_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *UserS390VxrsHighEntry) GetRegs() []uint64 {
+ if x != nil {
+ return x.Regs
+ }
+ return nil
+}
+
+type UserS390FpregsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Fpc *uint32 `protobuf:"varint,1,req,name=fpc" json:"fpc,omitempty"`
+ Fprs []uint64 `protobuf:"varint,2,rep,name=fprs" json:"fprs,omitempty"`
+}
+
+func (x *UserS390FpregsEntry) Reset() {
+ *x = UserS390FpregsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_s390_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserS390FpregsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserS390FpregsEntry) ProtoMessage() {}
+
+func (x *UserS390FpregsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_s390_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserS390FpregsEntry.ProtoReflect.Descriptor instead.
+func (*UserS390FpregsEntry) Descriptor() ([]byte, []int) {
+ return file_core_s390_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *UserS390FpregsEntry) GetFpc() uint32 {
+ if x != nil && x.Fpc != nil {
+ return *x.Fpc
+ }
+ return 0
+}
+
+func (x *UserS390FpregsEntry) GetFprs() []uint64 {
+ if x != nil {
+ return x.Fprs
+ }
+ return nil
+}
+
+type UserS390GsCbEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Regs []uint64 `protobuf:"varint,1,rep,name=regs" json:"regs,omitempty"`
+}
+
+func (x *UserS390GsCbEntry) Reset() {
+ *x = UserS390GsCbEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_s390_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserS390GsCbEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserS390GsCbEntry) ProtoMessage() {}
+
+func (x *UserS390GsCbEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_s390_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserS390GsCbEntry.ProtoReflect.Descriptor instead.
+func (*UserS390GsCbEntry) Descriptor() ([]byte, []int) {
+ return file_core_s390_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UserS390GsCbEntry) GetRegs() []uint64 {
+ if x != nil {
+ return x.Regs
+ }
+ return nil
+}
+
+type UserS390RiEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RiOn *uint32 `protobuf:"varint,1,req,name=ri_on,json=riOn" json:"ri_on,omitempty"`
+ Regs []uint64 `protobuf:"varint,2,rep,name=regs" json:"regs,omitempty"`
+}
+
+func (x *UserS390RiEntry) Reset() {
+ *x = UserS390RiEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_s390_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserS390RiEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserS390RiEntry) ProtoMessage() {}
+
+func (x *UserS390RiEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_s390_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserS390RiEntry.ProtoReflect.Descriptor instead.
+func (*UserS390RiEntry) Descriptor() ([]byte, []int) {
+ return file_core_s390_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *UserS390RiEntry) GetRiOn() uint32 {
+ if x != nil && x.RiOn != nil {
+ return *x.RiOn
+ }
+ return 0
+}
+
+func (x *UserS390RiEntry) GetRegs() []uint64 {
+ if x != nil {
+ return x.Regs
+ }
+ return nil
+}
+
+type ThreadInfoS390 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ClearTidAddr *uint64 `protobuf:"varint,1,req,name=clear_tid_addr,json=clearTidAddr" json:"clear_tid_addr,omitempty"`
+ Gpregs *UserS390RegsEntry `protobuf:"bytes,2,req,name=gpregs" json:"gpregs,omitempty"`
+ Fpregs *UserS390FpregsEntry `protobuf:"bytes,3,req,name=fpregs" json:"fpregs,omitempty"`
+ VxrsLow *UserS390VxrsLowEntry `protobuf:"bytes,4,opt,name=vxrs_low,json=vxrsLow" json:"vxrs_low,omitempty"`
+ VxrsHigh *UserS390VxrsHighEntry `protobuf:"bytes,5,opt,name=vxrs_high,json=vxrsHigh" json:"vxrs_high,omitempty"`
+ GsCb *UserS390GsCbEntry `protobuf:"bytes,6,opt,name=gs_cb,json=gsCb" json:"gs_cb,omitempty"`
+ GsBc *UserS390GsCbEntry `protobuf:"bytes,7,opt,name=gs_bc,json=gsBc" json:"gs_bc,omitempty"`
+ RiCb *UserS390RiEntry `protobuf:"bytes,8,opt,name=ri_cb,json=riCb" json:"ri_cb,omitempty"`
+}
+
+func (x *ThreadInfoS390) Reset() {
+ *x = ThreadInfoS390{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_s390_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadInfoS390) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadInfoS390) ProtoMessage() {}
+
+func (x *ThreadInfoS390) ProtoReflect() protoreflect.Message {
+ mi := &file_core_s390_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadInfoS390.ProtoReflect.Descriptor instead.
+func (*ThreadInfoS390) Descriptor() ([]byte, []int) {
+ return file_core_s390_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ThreadInfoS390) GetClearTidAddr() uint64 {
+ if x != nil && x.ClearTidAddr != nil {
+ return *x.ClearTidAddr
+ }
+ return 0
+}
+
+func (x *ThreadInfoS390) GetGpregs() *UserS390RegsEntry {
+ if x != nil {
+ return x.Gpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoS390) GetFpregs() *UserS390FpregsEntry {
+ if x != nil {
+ return x.Fpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoS390) GetVxrsLow() *UserS390VxrsLowEntry {
+ if x != nil {
+ return x.VxrsLow
+ }
+ return nil
+}
+
+func (x *ThreadInfoS390) GetVxrsHigh() *UserS390VxrsHighEntry {
+ if x != nil {
+ return x.VxrsHigh
+ }
+ return nil
+}
+
+func (x *ThreadInfoS390) GetGsCb() *UserS390GsCbEntry {
+ if x != nil {
+ return x.GsCb
+ }
+ return nil
+}
+
+func (x *ThreadInfoS390) GetGsBc() *UserS390GsCbEntry {
+ if x != nil {
+ return x.GsBc
+ }
+ return nil
+}
+
+func (x *ThreadInfoS390) GetRiCb() *UserS390RiEntry {
+ if x != nil {
+ return x.RiCb
+ }
+ return nil
+}
+
+var File_core_s390_proto protoreflect.FileDescriptor
+
+var file_core_s390_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x73, 0x33, 0x39, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x01,
+ 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x72, 0x65, 0x67, 0x73,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x73, 0x77, 0x5f, 0x6d, 0x61,
+ 0x73, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x70, 0x73, 0x77, 0x4d, 0x61, 0x73,
+ 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x73, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x07, 0x70, 0x73, 0x77, 0x41, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04,
+ 0x67, 0x70, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x67, 0x70, 0x72, 0x73,
+ 0x12, 0x12, 0x0a, 0x04, 0x61, 0x63, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x04,
+ 0x61, 0x63, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x5f, 0x67, 0x70, 0x72,
+ 0x32, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x47, 0x70, 0x72,
+ 0x32, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
+ 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61,
+ 0x6c, 0x6c, 0x22, 0x2e, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f,
+ 0x76, 0x78, 0x72, 0x73, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12,
+ 0x0a, 0x04, 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x72, 0x65,
+ 0x67, 0x73, 0x22, 0x2f, 0x0a, 0x19, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f,
+ 0x76, 0x78, 0x72, 0x73, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x12, 0x0a, 0x04, 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x72,
+ 0x65, 0x67, 0x73, 0x22, 0x3e, 0x0a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30,
+ 0x5f, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x66, 0x70, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x66, 0x70, 0x63, 0x12,
+ 0x12, 0x0a, 0x04, 0x66, 0x70, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x66,
+ 0x70, 0x72, 0x73, 0x22, 0x2b, 0x0a, 0x15, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30,
+ 0x5f, 0x67, 0x73, 0x5f, 0x63, 0x62, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04,
+ 0x72, 0x65, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x72, 0x65, 0x67, 0x73,
+ 0x22, 0x3d, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x72, 0x69,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x13, 0x0a, 0x05, 0x72, 0x69, 0x5f, 0x6f, 0x6e, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x69, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72,
+ 0x65, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x72, 0x65, 0x67, 0x73, 0x22,
+ 0xc3, 0x03, 0x0a, 0x10, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f,
+ 0x73, 0x33, 0x39, 0x30, 0x12, 0x2b, 0x0a, 0x0e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x74, 0x69,
+ 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f,
+ 0x02, 0x08, 0x01, 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x64, 0x41, 0x64, 0x64,
+ 0x72, 0x12, 0x34, 0x0a, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x72, 0x65,
+ 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52,
+ 0x06, 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x70, 0x72, 0x65, 0x67,
+ 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73,
+ 0x33, 0x39, 0x30, 0x5f, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73, 0x12,
+ 0x3b, 0x0a, 0x08, 0x76, 0x78, 0x72, 0x73, 0x5f, 0x6c, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x76, 0x78,
+ 0x72, 0x73, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f,
+ 0x02, 0x08, 0x01, 0x52, 0x07, 0x76, 0x78, 0x72, 0x73, 0x4c, 0x6f, 0x77, 0x12, 0x3e, 0x0a, 0x09,
+ 0x76, 0x78, 0x72, 0x73, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x76, 0x78, 0x72, 0x73,
+ 0x5f, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02,
+ 0x08, 0x01, 0x52, 0x08, 0x76, 0x78, 0x72, 0x73, 0x48, 0x69, 0x67, 0x68, 0x12, 0x32, 0x0a, 0x05,
+ 0x67, 0x73, 0x5f, 0x63, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x73,
+ 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x67, 0x73, 0x5f, 0x63, 0x62, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x04, 0x67, 0x73, 0x43, 0x62,
+ 0x12, 0x32, 0x0a, 0x05, 0x67, 0x73, 0x5f, 0x62, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x67, 0x73, 0x5f, 0x63,
+ 0x62, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x04,
+ 0x67, 0x73, 0x42, 0x63, 0x12, 0x2f, 0x0a, 0x05, 0x72, 0x69, 0x5f, 0x63, 0x62, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f,
+ 0x72, 0x69, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52,
+ 0x04, 0x72, 0x69, 0x43, 0x62,
+}
+
+var (
+ file_core_s390_proto_rawDescOnce sync.Once
+ file_core_s390_proto_rawDescData = file_core_s390_proto_rawDesc
+)
+
+func file_core_s390_proto_rawDescGZIP() []byte {
+ file_core_s390_proto_rawDescOnce.Do(func() {
+ file_core_s390_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_s390_proto_rawDescData)
+ })
+ return file_core_s390_proto_rawDescData
+}
+
+var file_core_s390_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_core_s390_proto_goTypes = []interface{}{
+ (*UserS390RegsEntry)(nil), // 0: user_s390_regs_entry
+ (*UserS390VxrsLowEntry)(nil), // 1: user_s390_vxrs_low_entry
+ (*UserS390VxrsHighEntry)(nil), // 2: user_s390_vxrs_high_entry
+ (*UserS390FpregsEntry)(nil), // 3: user_s390_fpregs_entry
+ (*UserS390GsCbEntry)(nil), // 4: user_s390_gs_cb_entry
+ (*UserS390RiEntry)(nil), // 5: user_s390_ri_entry
+ (*ThreadInfoS390)(nil), // 6: thread_info_s390
+}
+var file_core_s390_proto_depIdxs = []int32{
+ 0, // 0: thread_info_s390.gpregs:type_name -> user_s390_regs_entry
+ 3, // 1: thread_info_s390.fpregs:type_name -> user_s390_fpregs_entry
+ 1, // 2: thread_info_s390.vxrs_low:type_name -> user_s390_vxrs_low_entry
+ 2, // 3: thread_info_s390.vxrs_high:type_name -> user_s390_vxrs_high_entry
+ 4, // 4: thread_info_s390.gs_cb:type_name -> user_s390_gs_cb_entry
+ 4, // 5: thread_info_s390.gs_bc:type_name -> user_s390_gs_cb_entry
+ 5, // 6: thread_info_s390.ri_cb:type_name -> user_s390_ri_entry
+ 7, // [7:7] is the sub-list for method output_type
+ 7, // [7:7] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_core_s390_proto_init() }
+func file_core_s390_proto_init() {
+ if File_core_s390_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_core_s390_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserS390RegsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_s390_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserS390VxrsLowEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_s390_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserS390VxrsHighEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_s390_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserS390FpregsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_s390_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserS390GsCbEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_s390_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserS390RiEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_s390_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadInfoS390); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_core_s390_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_core_s390_proto_goTypes,
+ DependencyIndexes: file_core_s390_proto_depIdxs,
+ MessageInfos: file_core_s390_proto_msgTypes,
+ }.Build()
+ File_core_s390_proto = out.File
+ file_core_s390_proto_rawDesc = nil
+ file_core_s390_proto_goTypes = nil
+ file_core_s390_proto_depIdxs = nil
+}
diff --git a/crit/images/core-s390.proto b/crit/images/core-s390.proto
new file mode 100644
index 0000000..44130f2
--- /dev/null
+++ b/crit/images/core-s390.proto
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message user_s390_regs_entry {
+ required uint64 psw_mask = 1;
+ required uint64 psw_addr = 2;
+ repeated uint64 gprs = 3;
+ repeated uint32 acrs = 4;
+ required uint64 orig_gpr2 = 5;
+ required uint32 system_call = 6;
+}
+
+message user_s390_vxrs_low_entry {
+ repeated uint64 regs = 1;
+}
+
+/*
+ * The vxrs_high registers have 128 bit:
+ *
+ * vxrs_high_0 = regs[0] << 64 | regs[1];
+ * vxrs_high_1 = regs[2] << 64 | regs[3];
+ */
+message user_s390_vxrs_high_entry {
+ repeated uint64 regs = 1;
+}
+
+message user_s390_fpregs_entry {
+ required uint32 fpc = 1;
+ repeated uint64 fprs = 2;
+}
+
+message user_s390_gs_cb_entry {
+ repeated uint64 regs = 1;
+}
+
+message user_s390_ri_entry {
+ required uint32 ri_on = 1;
+ repeated uint64 regs = 2;
+}
+
+message thread_info_s390 {
+ required uint64 clear_tid_addr = 1[(criu).hex = true];
+ required user_s390_regs_entry gpregs = 2[(criu).hex = true];
+ required user_s390_fpregs_entry fpregs = 3[(criu).hex = true];
+ optional user_s390_vxrs_low_entry vxrs_low = 4[(criu).hex = true];
+ optional user_s390_vxrs_high_entry vxrs_high = 5[(criu).hex = true];
+ optional user_s390_gs_cb_entry gs_cb = 6[(criu).hex = true];
+ optional user_s390_gs_cb_entry gs_bc = 7[(criu).hex = true];
+ optional user_s390_ri_entry ri_cb = 8[(criu).hex = true];
+}
diff --git a/crit/images/core-x86.pb.go b/crit/images/core-x86.pb.go
new file mode 100644
index 0000000..be6be9e
--- /dev/null
+++ b/crit/images/core-x86.pb.go
@@ -0,0 +1,1029 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: core-x86.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserX86RegsMode int32
+
+const (
+ UserX86RegsMode_NATIVE UserX86RegsMode = 1
+ UserX86RegsMode_COMPAT UserX86RegsMode = 2
+)
+
+// Enum value maps for UserX86RegsMode.
+var (
+ UserX86RegsMode_name = map[int32]string{
+ 1: "NATIVE",
+ 2: "COMPAT",
+ }
+ UserX86RegsMode_value = map[string]int32{
+ "NATIVE": 1,
+ "COMPAT": 2,
+ }
+)
+
+func (x UserX86RegsMode) Enum() *UserX86RegsMode {
+ p := new(UserX86RegsMode)
+ *p = x
+ return p
+}
+
+func (x UserX86RegsMode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserX86RegsMode) Descriptor() protoreflect.EnumDescriptor {
+ return file_core_x86_proto_enumTypes[0].Descriptor()
+}
+
+func (UserX86RegsMode) Type() protoreflect.EnumType {
+ return &file_core_x86_proto_enumTypes[0]
+}
+
+func (x UserX86RegsMode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *UserX86RegsMode) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = UserX86RegsMode(num)
+ return nil
+}
+
+// Deprecated: Use UserX86RegsMode.Descriptor instead.
+func (UserX86RegsMode) EnumDescriptor() ([]byte, []int) {
+ return file_core_x86_proto_rawDescGZIP(), []int{0}
+}
+
+// Reusing entry for both 64 and 32 bits register sets
+type UserX86RegsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ R15 *uint64 `protobuf:"varint,1,req,name=r15" json:"r15,omitempty"`
+ R14 *uint64 `protobuf:"varint,2,req,name=r14" json:"r14,omitempty"`
+ R13 *uint64 `protobuf:"varint,3,req,name=r13" json:"r13,omitempty"`
+ R12 *uint64 `protobuf:"varint,4,req,name=r12" json:"r12,omitempty"`
+ Bp *uint64 `protobuf:"varint,5,req,name=bp" json:"bp,omitempty"`
+ Bx *uint64 `protobuf:"varint,6,req,name=bx" json:"bx,omitempty"`
+ R11 *uint64 `protobuf:"varint,7,req,name=r11" json:"r11,omitempty"`
+ R10 *uint64 `protobuf:"varint,8,req,name=r10" json:"r10,omitempty"`
+ R9 *uint64 `protobuf:"varint,9,req,name=r9" json:"r9,omitempty"`
+ R8 *uint64 `protobuf:"varint,10,req,name=r8" json:"r8,omitempty"`
+ Ax *uint64 `protobuf:"varint,11,req,name=ax" json:"ax,omitempty"`
+ Cx *uint64 `protobuf:"varint,12,req,name=cx" json:"cx,omitempty"`
+ Dx *uint64 `protobuf:"varint,13,req,name=dx" json:"dx,omitempty"`
+ Si *uint64 `protobuf:"varint,14,req,name=si" json:"si,omitempty"`
+ Di *uint64 `protobuf:"varint,15,req,name=di" json:"di,omitempty"`
+ OrigAx *uint64 `protobuf:"varint,16,req,name=orig_ax,json=origAx" json:"orig_ax,omitempty"`
+ Ip *uint64 `protobuf:"varint,17,req,name=ip" json:"ip,omitempty"`
+ Cs *uint64 `protobuf:"varint,18,req,name=cs" json:"cs,omitempty"`
+ Flags *uint64 `protobuf:"varint,19,req,name=flags" json:"flags,omitempty"`
+ Sp *uint64 `protobuf:"varint,20,req,name=sp" json:"sp,omitempty"`
+ Ss *uint64 `protobuf:"varint,21,req,name=ss" json:"ss,omitempty"`
+ FsBase *uint64 `protobuf:"varint,22,req,name=fs_base,json=fsBase" json:"fs_base,omitempty"`
+ GsBase *uint64 `protobuf:"varint,23,req,name=gs_base,json=gsBase" json:"gs_base,omitempty"`
+ Ds *uint64 `protobuf:"varint,24,req,name=ds" json:"ds,omitempty"`
+ Es *uint64 `protobuf:"varint,25,req,name=es" json:"es,omitempty"`
+ Fs *uint64 `protobuf:"varint,26,req,name=fs" json:"fs,omitempty"`
+ Gs *uint64 `protobuf:"varint,27,req,name=gs" json:"gs,omitempty"`
+ Mode *UserX86RegsMode `protobuf:"varint,28,opt,name=mode,enum=UserX86RegsMode,def=1" json:"mode,omitempty"`
+}
+
+// Default values for UserX86RegsEntry fields.
+const (
+ Default_UserX86RegsEntry_Mode = UserX86RegsMode_NATIVE
+)
+
+func (x *UserX86RegsEntry) Reset() {
+ *x = UserX86RegsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_x86_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserX86RegsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserX86RegsEntry) ProtoMessage() {}
+
+func (x *UserX86RegsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_x86_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserX86RegsEntry.ProtoReflect.Descriptor instead.
+func (*UserX86RegsEntry) Descriptor() ([]byte, []int) {
+ return file_core_x86_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserX86RegsEntry) GetR15() uint64 {
+ if x != nil && x.R15 != nil {
+ return *x.R15
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetR14() uint64 {
+ if x != nil && x.R14 != nil {
+ return *x.R14
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetR13() uint64 {
+ if x != nil && x.R13 != nil {
+ return *x.R13
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetR12() uint64 {
+ if x != nil && x.R12 != nil {
+ return *x.R12
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetBp() uint64 {
+ if x != nil && x.Bp != nil {
+ return *x.Bp
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetBx() uint64 {
+ if x != nil && x.Bx != nil {
+ return *x.Bx
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetR11() uint64 {
+ if x != nil && x.R11 != nil {
+ return *x.R11
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetR10() uint64 {
+ if x != nil && x.R10 != nil {
+ return *x.R10
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetR9() uint64 {
+ if x != nil && x.R9 != nil {
+ return *x.R9
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetR8() uint64 {
+ if x != nil && x.R8 != nil {
+ return *x.R8
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetAx() uint64 {
+ if x != nil && x.Ax != nil {
+ return *x.Ax
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetCx() uint64 {
+ if x != nil && x.Cx != nil {
+ return *x.Cx
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetDx() uint64 {
+ if x != nil && x.Dx != nil {
+ return *x.Dx
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetSi() uint64 {
+ if x != nil && x.Si != nil {
+ return *x.Si
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetDi() uint64 {
+ if x != nil && x.Di != nil {
+ return *x.Di
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetOrigAx() uint64 {
+ if x != nil && x.OrigAx != nil {
+ return *x.OrigAx
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetIp() uint64 {
+ if x != nil && x.Ip != nil {
+ return *x.Ip
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetCs() uint64 {
+ if x != nil && x.Cs != nil {
+ return *x.Cs
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetFlags() uint64 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetSp() uint64 {
+ if x != nil && x.Sp != nil {
+ return *x.Sp
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetSs() uint64 {
+ if x != nil && x.Ss != nil {
+ return *x.Ss
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetFsBase() uint64 {
+ if x != nil && x.FsBase != nil {
+ return *x.FsBase
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetGsBase() uint64 {
+ if x != nil && x.GsBase != nil {
+ return *x.GsBase
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetDs() uint64 {
+ if x != nil && x.Ds != nil {
+ return *x.Ds
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetEs() uint64 {
+ if x != nil && x.Es != nil {
+ return *x.Es
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetFs() uint64 {
+ if x != nil && x.Fs != nil {
+ return *x.Fs
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetGs() uint64 {
+ if x != nil && x.Gs != nil {
+ return *x.Gs
+ }
+ return 0
+}
+
+func (x *UserX86RegsEntry) GetMode() UserX86RegsMode {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return Default_UserX86RegsEntry_Mode
+}
+
+type UserX86XsaveEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // standard xsave features
+ XstateBv *uint64 `protobuf:"varint,1,req,name=xstate_bv,json=xstateBv" json:"xstate_bv,omitempty"`
+ // AVX components: 16x 256-bit ymm registers, hi 128 bits
+ YmmhSpace []uint32 `protobuf:"varint,2,rep,name=ymmh_space,json=ymmhSpace" json:"ymmh_space,omitempty"`
+ // MPX components
+ BndregState []uint64 `protobuf:"varint,3,rep,name=bndreg_state,json=bndregState" json:"bndreg_state,omitempty"`
+ BndcsrState []uint64 `protobuf:"varint,4,rep,name=bndcsr_state,json=bndcsrState" json:"bndcsr_state,omitempty"`
+ // AVX512 components: k0-k7, ZMM_Hi256, Hi16_ZMM
+ OpmaskReg []uint64 `protobuf:"varint,5,rep,name=opmask_reg,json=opmaskReg" json:"opmask_reg,omitempty"`
+ ZmmUpper []uint64 `protobuf:"varint,6,rep,name=zmm_upper,json=zmmUpper" json:"zmm_upper,omitempty"`
+ Hi16Zmm []uint64 `protobuf:"varint,7,rep,name=hi16_zmm,json=hi16Zmm" json:"hi16_zmm,omitempty"`
+ // Protected keys
+ Pkru []uint32 `protobuf:"varint,8,rep,name=pkru" json:"pkru,omitempty"`
+}
+
+func (x *UserX86XsaveEntry) Reset() {
+ *x = UserX86XsaveEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_x86_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserX86XsaveEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserX86XsaveEntry) ProtoMessage() {}
+
+func (x *UserX86XsaveEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_x86_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserX86XsaveEntry.ProtoReflect.Descriptor instead.
+func (*UserX86XsaveEntry) Descriptor() ([]byte, []int) {
+ return file_core_x86_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserX86XsaveEntry) GetXstateBv() uint64 {
+ if x != nil && x.XstateBv != nil {
+ return *x.XstateBv
+ }
+ return 0
+}
+
+func (x *UserX86XsaveEntry) GetYmmhSpace() []uint32 {
+ if x != nil {
+ return x.YmmhSpace
+ }
+ return nil
+}
+
+func (x *UserX86XsaveEntry) GetBndregState() []uint64 {
+ if x != nil {
+ return x.BndregState
+ }
+ return nil
+}
+
+func (x *UserX86XsaveEntry) GetBndcsrState() []uint64 {
+ if x != nil {
+ return x.BndcsrState
+ }
+ return nil
+}
+
+func (x *UserX86XsaveEntry) GetOpmaskReg() []uint64 {
+ if x != nil {
+ return x.OpmaskReg
+ }
+ return nil
+}
+
+func (x *UserX86XsaveEntry) GetZmmUpper() []uint64 {
+ if x != nil {
+ return x.ZmmUpper
+ }
+ return nil
+}
+
+func (x *UserX86XsaveEntry) GetHi16Zmm() []uint64 {
+ if x != nil {
+ return x.Hi16Zmm
+ }
+ return nil
+}
+
+func (x *UserX86XsaveEntry) GetPkru() []uint32 {
+ if x != nil {
+ return x.Pkru
+ }
+ return nil
+}
+
+type UserX86FpregsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // fxsave data
+ Cwd *uint32 `protobuf:"varint,1,req,name=cwd" json:"cwd,omitempty"`
+ Swd *uint32 `protobuf:"varint,2,req,name=swd" json:"swd,omitempty"`
+ Twd *uint32 `protobuf:"varint,3,req,name=twd" json:"twd,omitempty"`
+ Fop *uint32 `protobuf:"varint,4,req,name=fop" json:"fop,omitempty"`
+ Rip *uint64 `protobuf:"varint,5,req,name=rip" json:"rip,omitempty"`
+ Rdp *uint64 `protobuf:"varint,6,req,name=rdp" json:"rdp,omitempty"`
+ Mxcsr *uint32 `protobuf:"varint,7,req,name=mxcsr" json:"mxcsr,omitempty"`
+ MxcsrMask *uint32 `protobuf:"varint,8,req,name=mxcsr_mask,json=mxcsrMask" json:"mxcsr_mask,omitempty"`
+ StSpace []uint32 `protobuf:"varint,9,rep,name=st_space,json=stSpace" json:"st_space,omitempty"`
+ XmmSpace []uint32 `protobuf:"varint,10,rep,name=xmm_space,json=xmmSpace" json:"xmm_space,omitempty"`
+ // Unused, but present for backward compatibility
+ Padding []uint32 `protobuf:"varint,11,rep,name=padding" json:"padding,omitempty"`
+ // xsave extension
+ Xsave *UserX86XsaveEntry `protobuf:"bytes,13,opt,name=xsave" json:"xsave,omitempty"`
+}
+
+func (x *UserX86FpregsEntry) Reset() {
+ *x = UserX86FpregsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_x86_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserX86FpregsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserX86FpregsEntry) ProtoMessage() {}
+
+func (x *UserX86FpregsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_core_x86_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserX86FpregsEntry.ProtoReflect.Descriptor instead.
+func (*UserX86FpregsEntry) Descriptor() ([]byte, []int) {
+ return file_core_x86_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *UserX86FpregsEntry) GetCwd() uint32 {
+ if x != nil && x.Cwd != nil {
+ return *x.Cwd
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetSwd() uint32 {
+ if x != nil && x.Swd != nil {
+ return *x.Swd
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetTwd() uint32 {
+ if x != nil && x.Twd != nil {
+ return *x.Twd
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetFop() uint32 {
+ if x != nil && x.Fop != nil {
+ return *x.Fop
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetRip() uint64 {
+ if x != nil && x.Rip != nil {
+ return *x.Rip
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetRdp() uint64 {
+ if x != nil && x.Rdp != nil {
+ return *x.Rdp
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetMxcsr() uint32 {
+ if x != nil && x.Mxcsr != nil {
+ return *x.Mxcsr
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetMxcsrMask() uint32 {
+ if x != nil && x.MxcsrMask != nil {
+ return *x.MxcsrMask
+ }
+ return 0
+}
+
+func (x *UserX86FpregsEntry) GetStSpace() []uint32 {
+ if x != nil {
+ return x.StSpace
+ }
+ return nil
+}
+
+func (x *UserX86FpregsEntry) GetXmmSpace() []uint32 {
+ if x != nil {
+ return x.XmmSpace
+ }
+ return nil
+}
+
+func (x *UserX86FpregsEntry) GetPadding() []uint32 {
+ if x != nil {
+ return x.Padding
+ }
+ return nil
+}
+
+func (x *UserX86FpregsEntry) GetXsave() *UserX86XsaveEntry {
+ if x != nil {
+ return x.Xsave
+ }
+ return nil
+}
+
+type UserDescT struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ EntryNumber *uint32 `protobuf:"varint,1,req,name=entry_number,json=entryNumber" json:"entry_number,omitempty"`
+ // this is for GDT, not for MSRs - 32-bit base
+ BaseAddr *uint32 `protobuf:"varint,2,req,name=base_addr,json=baseAddr" json:"base_addr,omitempty"`
+ Limit *uint32 `protobuf:"varint,3,req,name=limit" json:"limit,omitempty"`
+ Seg_32Bit *bool `protobuf:"varint,4,req,name=seg_32bit,json=seg32bit" json:"seg_32bit,omitempty"`
+ ContentsH *bool `protobuf:"varint,5,req,name=contents_h,json=contentsH" json:"contents_h,omitempty"`
+ ContentsL *bool `protobuf:"varint,6,req,name=contents_l,json=contentsL" json:"contents_l,omitempty"`
+ ReadExecOnly *bool `protobuf:"varint,7,req,name=read_exec_only,json=readExecOnly,def=1" json:"read_exec_only,omitempty"`
+ LimitInPages *bool `protobuf:"varint,8,req,name=limit_in_pages,json=limitInPages" json:"limit_in_pages,omitempty"`
+ SegNotPresent *bool `protobuf:"varint,9,req,name=seg_not_present,json=segNotPresent,def=1" json:"seg_not_present,omitempty"`
+ Usable *bool `protobuf:"varint,10,req,name=usable" json:"usable,omitempty"`
+}
+
+// Default values for UserDescT fields.
+const (
+ Default_UserDescT_ReadExecOnly = bool(true)
+ Default_UserDescT_SegNotPresent = bool(true)
+)
+
+func (x *UserDescT) Reset() {
+ *x = UserDescT{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_x86_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserDescT) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserDescT) ProtoMessage() {}
+
+func (x *UserDescT) ProtoReflect() protoreflect.Message {
+ mi := &file_core_x86_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserDescT.ProtoReflect.Descriptor instead.
+func (*UserDescT) Descriptor() ([]byte, []int) {
+ return file_core_x86_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *UserDescT) GetEntryNumber() uint32 {
+ if x != nil && x.EntryNumber != nil {
+ return *x.EntryNumber
+ }
+ return 0
+}
+
+func (x *UserDescT) GetBaseAddr() uint32 {
+ if x != nil && x.BaseAddr != nil {
+ return *x.BaseAddr
+ }
+ return 0
+}
+
+func (x *UserDescT) GetLimit() uint32 {
+ if x != nil && x.Limit != nil {
+ return *x.Limit
+ }
+ return 0
+}
+
+func (x *UserDescT) GetSeg_32Bit() bool {
+ if x != nil && x.Seg_32Bit != nil {
+ return *x.Seg_32Bit
+ }
+ return false
+}
+
+func (x *UserDescT) GetContentsH() bool {
+ if x != nil && x.ContentsH != nil {
+ return *x.ContentsH
+ }
+ return false
+}
+
+func (x *UserDescT) GetContentsL() bool {
+ if x != nil && x.ContentsL != nil {
+ return *x.ContentsL
+ }
+ return false
+}
+
+func (x *UserDescT) GetReadExecOnly() bool {
+ if x != nil && x.ReadExecOnly != nil {
+ return *x.ReadExecOnly
+ }
+ return Default_UserDescT_ReadExecOnly
+}
+
+func (x *UserDescT) GetLimitInPages() bool {
+ if x != nil && x.LimitInPages != nil {
+ return *x.LimitInPages
+ }
+ return false
+}
+
+func (x *UserDescT) GetSegNotPresent() bool {
+ if x != nil && x.SegNotPresent != nil {
+ return *x.SegNotPresent
+ }
+ return Default_UserDescT_SegNotPresent
+}
+
+func (x *UserDescT) GetUsable() bool {
+ if x != nil && x.Usable != nil {
+ return *x.Usable
+ }
+ return false
+}
+
+type ThreadInfoX86 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ClearTidAddr *uint64 `protobuf:"varint,1,req,name=clear_tid_addr,json=clearTidAddr" json:"clear_tid_addr,omitempty"`
+ Gpregs *UserX86RegsEntry `protobuf:"bytes,2,req,name=gpregs" json:"gpregs,omitempty"`
+ Fpregs *UserX86FpregsEntry `protobuf:"bytes,3,req,name=fpregs" json:"fpregs,omitempty"`
+ Tls []*UserDescT `protobuf:"bytes,4,rep,name=tls" json:"tls,omitempty"`
+}
+
+func (x *ThreadInfoX86) Reset() {
+ *x = ThreadInfoX86{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_core_x86_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadInfoX86) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadInfoX86) ProtoMessage() {}
+
+func (x *ThreadInfoX86) ProtoReflect() protoreflect.Message {
+ mi := &file_core_x86_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadInfoX86.ProtoReflect.Descriptor instead.
+func (*ThreadInfoX86) Descriptor() ([]byte, []int) {
+ return file_core_x86_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ThreadInfoX86) GetClearTidAddr() uint64 {
+ if x != nil && x.ClearTidAddr != nil {
+ return *x.ClearTidAddr
+ }
+ return 0
+}
+
+func (x *ThreadInfoX86) GetGpregs() *UserX86RegsEntry {
+ if x != nil {
+ return x.Gpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoX86) GetFpregs() *UserX86FpregsEntry {
+ if x != nil {
+ return x.Fpregs
+ }
+ return nil
+}
+
+func (x *ThreadInfoX86) GetTls() []*UserDescT {
+ if x != nil {
+ return x.Tls
+ }
+ return nil
+}
+
+var File_core_x86_proto protoreflect.FileDescriptor
+
+var file_core_x86_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x78, 0x38, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x04, 0x0a,
+ 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x35, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x03, 0x72, 0x31, 0x35, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x34, 0x18, 0x02, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31, 0x33, 0x18,
+ 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x33, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x31,
+ 0x32, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x32, 0x12, 0x0e, 0x0a, 0x02,
+ 0x62, 0x70, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x62, 0x70, 0x12, 0x0e, 0x0a, 0x02,
+ 0x62, 0x78, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x62, 0x78, 0x12, 0x10, 0x0a, 0x03,
+ 0x72, 0x31, 0x31, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x31, 0x12, 0x10,
+ 0x0a, 0x03, 0x72, 0x31, 0x30, 0x18, 0x08, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x31, 0x30,
+ 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x39, 0x18, 0x09, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x72, 0x39,
+ 0x12, 0x0e, 0x0a, 0x02, 0x72, 0x38, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x72, 0x38,
+ 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x78, 0x18, 0x0b, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x61, 0x78,
+ 0x12, 0x0e, 0x0a, 0x02, 0x63, 0x78, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x63, 0x78,
+ 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x78, 0x18, 0x0d, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x64, 0x78,
+ 0x12, 0x0e, 0x0a, 0x02, 0x73, 0x69, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x73, 0x69,
+ 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x69, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x64, 0x69,
+ 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x72, 0x69, 0x67, 0x5f, 0x61, 0x78, 0x18, 0x10, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x41, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18,
+ 0x11, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x69, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x63, 0x73, 0x18,
+ 0x12, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x18, 0x13, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12,
+ 0x0e, 0x0a, 0x02, 0x73, 0x70, 0x18, 0x14, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x73, 0x70, 0x12,
+ 0x0e, 0x0a, 0x02, 0x73, 0x73, 0x18, 0x15, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x73, 0x73, 0x12,
+ 0x17, 0x0a, 0x07, 0x66, 0x73, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x18, 0x16, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x06, 0x66, 0x73, 0x42, 0x61, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x73, 0x5f, 0x62,
+ 0x61, 0x73, 0x65, 0x18, 0x17, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x67, 0x73, 0x42, 0x61, 0x73,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x73, 0x18, 0x18, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x64,
+ 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x73, 0x18, 0x19, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x65,
+ 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x73, 0x18, 0x1a, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x66,
+ 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x73, 0x18, 0x1b, 0x20, 0x02, 0x28, 0x04, 0x52, 0x02, 0x67,
+ 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f,
+ 0x6d, 0x6f, 0x64, 0x65, 0x3a, 0x06, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, 0x52, 0x04, 0x6d, 0x6f,
+ 0x64, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f,
+ 0x78, 0x73, 0x61, 0x76, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x78,
+ 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x76, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x08,
+ 0x78, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x76, 0x12, 0x1d, 0x0a, 0x0a, 0x79, 0x6d, 0x6d, 0x68,
+ 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x79, 0x6d,
+ 0x6d, 0x68, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6e, 0x64, 0x72, 0x65,
+ 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0b, 0x62,
+ 0x6e, 0x64, 0x72, 0x65, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6e,
+ 0x64, 0x63, 0x73, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04,
+ 0x52, 0x0b, 0x62, 0x6e, 0x64, 0x63, 0x73, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x6f, 0x70, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x65, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28,
+ 0x04, 0x52, 0x09, 0x6f, 0x70, 0x6d, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x12, 0x1b, 0x0a, 0x09,
+ 0x7a, 0x6d, 0x6d, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52,
+ 0x08, 0x7a, 0x6d, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x69, 0x31,
+ 0x36, 0x5f, 0x7a, 0x6d, 0x6d, 0x18, 0x07, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x68, 0x69, 0x31,
+ 0x36, 0x5a, 0x6d, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6b, 0x72, 0x75, 0x18, 0x08, 0x20, 0x03,
+ 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6b, 0x72, 0x75, 0x22, 0xb7, 0x02, 0x0a, 0x15, 0x75, 0x73, 0x65,
+ 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x77, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x03, 0x63, 0x77, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x77, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x03, 0x73, 0x77, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x77, 0x64, 0x18, 0x03, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x77, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x70, 0x18,
+ 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x66, 0x6f, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69,
+ 0x70, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x69, 0x70, 0x12, 0x10, 0x0a, 0x03,
+ 0x72, 0x64, 0x70, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x72, 0x64, 0x70, 0x12, 0x14,
+ 0x0a, 0x05, 0x6d, 0x78, 0x63, 0x73, 0x72, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6d,
+ 0x78, 0x63, 0x73, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x78, 0x63, 0x73, 0x72, 0x5f, 0x6d, 0x61,
+ 0x73, 0x6b, 0x18, 0x08, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x6d, 0x78, 0x63, 0x73, 0x72, 0x4d,
+ 0x61, 0x73, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18,
+ 0x09, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b,
+ 0x0a, 0x09, 0x78, 0x6d, 0x6d, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28,
+ 0x0d, 0x52, 0x08, 0x78, 0x6d, 0x6d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70,
+ 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x61,
+ 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2b, 0x0a, 0x05, 0x78, 0x73, 0x61, 0x76, 0x65, 0x18, 0x0d,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f,
+ 0x78, 0x73, 0x61, 0x76, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x78, 0x73, 0x61,
+ 0x76, 0x65, 0x22, 0xd6, 0x02, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x63,
+ 0x5f, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x6e, 0x75, 0x6d, 0x62,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x4e,
+ 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x64,
+ 0x64, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x41, 0x64,
+ 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x67, 0x5f,
+ 0x33, 0x32, 0x62, 0x69, 0x74, 0x18, 0x04, 0x20, 0x02, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x67,
+ 0x33, 0x32, 0x62, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
+ 0x73, 0x5f, 0x68, 0x18, 0x05, 0x20, 0x02, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x6e, 0x74, 0x73, 0x48, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73,
+ 0x5f, 0x6c, 0x18, 0x06, 0x20, 0x02, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+ 0x74, 0x73, 0x4c, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x65, 0x78, 0x65, 0x63,
+ 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x02, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75,
+ 0x65, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x45, 0x78, 0x65, 0x63, 0x4f, 0x6e, 0x6c, 0x79, 0x12,
+ 0x24, 0x0a, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x67, 0x65,
+ 0x73, 0x18, 0x08, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0c, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x49, 0x6e,
+ 0x50, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x73, 0x65, 0x67, 0x5f, 0x6e, 0x6f, 0x74,
+ 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x02, 0x28, 0x08, 0x3a, 0x04,
+ 0x74, 0x72, 0x75, 0x65, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x4e, 0x6f, 0x74, 0x50, 0x72, 0x65, 0x73,
+ 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20,
+ 0x02, 0x28, 0x08, 0x52, 0x06, 0x75, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0f,
+ 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x78, 0x38, 0x36, 0x12,
+ 0x2b, 0x0a, 0x0e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x74, 0x69, 0x64, 0x5f, 0x61, 0x64, 0x64,
+ 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0c,
+ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a, 0x06,
+ 0x67, 0x70, 0x72, 0x65, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x75,
+ 0x73, 0x65, 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x72, 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x67, 0x70, 0x72, 0x65, 0x67,
+ 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x66, 0x70, 0x72, 0x65, 0x67, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28,
+ 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x66, 0x70, 0x72,
+ 0x65, 0x67, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, 0x70, 0x72, 0x65, 0x67,
+ 0x73, 0x12, 0x1e, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c,
+ 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x74, 0x52, 0x03, 0x74, 0x6c,
+ 0x73, 0x2a, 0x2c, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x72, 0x65,
+ 0x67, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x41, 0x54, 0x49, 0x56,
+ 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x10, 0x02,
+}
+
+var (
+ file_core_x86_proto_rawDescOnce sync.Once
+ file_core_x86_proto_rawDescData = file_core_x86_proto_rawDesc
+)
+
+func file_core_x86_proto_rawDescGZIP() []byte {
+ file_core_x86_proto_rawDescOnce.Do(func() {
+ file_core_x86_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_x86_proto_rawDescData)
+ })
+ return file_core_x86_proto_rawDescData
+}
+
+var file_core_x86_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_core_x86_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_core_x86_proto_goTypes = []interface{}{
+ (UserX86RegsMode)(0), // 0: user_x86_regs_mode
+ (*UserX86RegsEntry)(nil), // 1: user_x86_regs_entry
+ (*UserX86XsaveEntry)(nil), // 2: user_x86_xsave_entry
+ (*UserX86FpregsEntry)(nil), // 3: user_x86_fpregs_entry
+ (*UserDescT)(nil), // 4: user_desc_t
+ (*ThreadInfoX86)(nil), // 5: thread_info_x86
+}
+var file_core_x86_proto_depIdxs = []int32{
+ 0, // 0: user_x86_regs_entry.mode:type_name -> user_x86_regs_mode
+ 2, // 1: user_x86_fpregs_entry.xsave:type_name -> user_x86_xsave_entry
+ 1, // 2: thread_info_x86.gpregs:type_name -> user_x86_regs_entry
+ 3, // 3: thread_info_x86.fpregs:type_name -> user_x86_fpregs_entry
+ 4, // 4: thread_info_x86.tls:type_name -> user_desc_t
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_core_x86_proto_init() }
+func file_core_x86_proto_init() {
+ if File_core_x86_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_core_x86_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserX86RegsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_x86_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserX86XsaveEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_x86_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserX86FpregsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_x86_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserDescT); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_core_x86_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadInfoX86); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_core_x86_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_core_x86_proto_goTypes,
+ DependencyIndexes: file_core_x86_proto_depIdxs,
+ EnumInfos: file_core_x86_proto_enumTypes,
+ MessageInfos: file_core_x86_proto_msgTypes,
+ }.Build()
+ File_core_x86_proto = out.File
+ file_core_x86_proto_rawDesc = nil
+ file_core_x86_proto_goTypes = nil
+ file_core_x86_proto_depIdxs = nil
+}
diff --git a/crit/images/core-x86.proto b/crit/images/core-x86.proto
new file mode 100644
index 0000000..815cf21
--- /dev/null
+++ b/crit/images/core-x86.proto
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+enum user_x86_regs_mode {
+ NATIVE = 1;
+ COMPAT = 2;
+}
+
+/* Reusing entry for both 64 and 32 bits register sets */
+message user_x86_regs_entry {
+ required uint64 r15 = 1;
+ required uint64 r14 = 2;
+ required uint64 r13 = 3;
+ required uint64 r12 = 4;
+ required uint64 bp = 5;
+ required uint64 bx = 6;
+ required uint64 r11 = 7;
+ required uint64 r10 = 8;
+ required uint64 r9 = 9;
+ required uint64 r8 = 10;
+ required uint64 ax = 11;
+ required uint64 cx = 12;
+ required uint64 dx = 13;
+ required uint64 si = 14;
+ required uint64 di = 15;
+ required uint64 orig_ax = 16;
+ required uint64 ip = 17;
+ required uint64 cs = 18;
+ required uint64 flags = 19;
+ required uint64 sp = 20;
+ required uint64 ss = 21;
+ required uint64 fs_base = 22;
+ required uint64 gs_base = 23;
+ required uint64 ds = 24;
+ required uint64 es = 25;
+ required uint64 fs = 26;
+ required uint64 gs = 27;
+ optional user_x86_regs_mode mode = 28 [default = NATIVE];
+}
+
+message user_x86_xsave_entry {
+ /* standard xsave features */
+ required uint64 xstate_bv = 1;
+
+ /* AVX components: 16x 256-bit ymm registers, hi 128 bits */
+ repeated uint32 ymmh_space = 2;
+
+ /* MPX components */
+ repeated uint64 bndreg_state = 3;
+ repeated uint64 bndcsr_state = 4;
+
+ /* AVX512 components: k0-k7, ZMM_Hi256, Hi16_ZMM */
+ repeated uint64 opmask_reg = 5;
+ repeated uint64 zmm_upper = 6;
+ repeated uint64 hi16_zmm = 7;
+
+ /* Protected keys */
+ repeated uint32 pkru = 8;
+
+ /*
+ * Processor trace (PT) and hardware duty cycling (HDC)
+ * are supervisor state components and only managed by
+ * xsaves/xrstors on cpl=0, so ignore them.
+ */
+}
+
+message user_x86_fpregs_entry {
+
+ /* fxsave data */
+ required uint32 cwd = 1;
+ required uint32 swd = 2;
+ required uint32 twd = 3;
+ required uint32 fop = 4;
+ required uint64 rip = 5;
+ required uint64 rdp = 6;
+ required uint32 mxcsr = 7;
+ required uint32 mxcsr_mask = 8;
+ repeated uint32 st_space = 9;
+ repeated uint32 xmm_space = 10;
+
+ /* Unused, but present for backward compatibility */
+ repeated uint32 padding = 11;
+
+ /* xsave extension */
+ optional user_x86_xsave_entry xsave = 13;
+}
+
+message user_desc_t {
+ required uint32 entry_number = 1;
+ /* this is for GDT, not for MSRs - 32-bit base */
+ required uint32 base_addr = 2;
+ required uint32 limit = 3;
+ required bool seg_32bit = 4;
+ required bool contents_h = 5;
+ required bool contents_l = 6;
+ required bool read_exec_only = 7 [default = true];
+ required bool limit_in_pages = 8;
+ required bool seg_not_present = 9 [default = true];
+ required bool usable = 10;
+}
+
+message thread_info_x86 {
+ required uint64 clear_tid_addr = 1[(criu).hex = true];
+ required user_x86_regs_entry gpregs = 2[(criu).hex = true];
+ required user_x86_fpregs_entry fpregs = 3;
+ repeated user_desc_t tls = 4;
+}
diff --git a/crit/images/cpuinfo.pb.go b/crit/images/cpuinfo.pb.go
new file mode 100644
index 0000000..5cff4dc
--- /dev/null
+++ b/crit/images/cpuinfo.pb.go
@@ -0,0 +1,591 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: cpuinfo.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CpuinfoX86EntryVendor int32
+
+const (
+ CpuinfoX86Entry_UNKNOWN CpuinfoX86EntryVendor = 0
+ CpuinfoX86Entry_INTEL CpuinfoX86EntryVendor = 1
+ CpuinfoX86Entry_AMD CpuinfoX86EntryVendor = 2
+)
+
+// Enum value maps for CpuinfoX86EntryVendor.
+var (
+ CpuinfoX86EntryVendor_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "INTEL",
+ 2: "AMD",
+ }
+ CpuinfoX86EntryVendor_value = map[string]int32{
+ "UNKNOWN": 0,
+ "INTEL": 1,
+ "AMD": 2,
+ }
+)
+
+func (x CpuinfoX86EntryVendor) Enum() *CpuinfoX86EntryVendor {
+ p := new(CpuinfoX86EntryVendor)
+ *p = x
+ return p
+}
+
+func (x CpuinfoX86EntryVendor) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CpuinfoX86EntryVendor) Descriptor() protoreflect.EnumDescriptor {
+ return file_cpuinfo_proto_enumTypes[0].Descriptor()
+}
+
+func (CpuinfoX86EntryVendor) Type() protoreflect.EnumType {
+ return &file_cpuinfo_proto_enumTypes[0]
+}
+
+func (x CpuinfoX86EntryVendor) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CpuinfoX86EntryVendor) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CpuinfoX86EntryVendor(num)
+ return nil
+}
+
+// Deprecated: Use CpuinfoX86EntryVendor.Descriptor instead.
+func (CpuinfoX86EntryVendor) EnumDescriptor() ([]byte, []int) {
+ return file_cpuinfo_proto_rawDescGZIP(), []int{0, 0}
+}
+
+type CpuinfoPpc64EntryEndianness int32
+
+const (
+ CpuinfoPpc64Entry_BIGENDIAN CpuinfoPpc64EntryEndianness = 0
+ CpuinfoPpc64Entry_LITTLEENDIAN CpuinfoPpc64EntryEndianness = 1
+)
+
+// Enum value maps for CpuinfoPpc64EntryEndianness.
+var (
+ CpuinfoPpc64EntryEndianness_name = map[int32]string{
+ 0: "BIGENDIAN",
+ 1: "LITTLEENDIAN",
+ }
+ CpuinfoPpc64EntryEndianness_value = map[string]int32{
+ "BIGENDIAN": 0,
+ "LITTLEENDIAN": 1,
+ }
+)
+
+func (x CpuinfoPpc64EntryEndianness) Enum() *CpuinfoPpc64EntryEndianness {
+ p := new(CpuinfoPpc64EntryEndianness)
+ *p = x
+ return p
+}
+
+func (x CpuinfoPpc64EntryEndianness) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CpuinfoPpc64EntryEndianness) Descriptor() protoreflect.EnumDescriptor {
+ return file_cpuinfo_proto_enumTypes[1].Descriptor()
+}
+
+func (CpuinfoPpc64EntryEndianness) Type() protoreflect.EnumType {
+ return &file_cpuinfo_proto_enumTypes[1]
+}
+
+func (x CpuinfoPpc64EntryEndianness) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CpuinfoPpc64EntryEndianness) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CpuinfoPpc64EntryEndianness(num)
+ return nil
+}
+
+// Deprecated: Use CpuinfoPpc64EntryEndianness.Descriptor instead.
+func (CpuinfoPpc64EntryEndianness) EnumDescriptor() ([]byte, []int) {
+ return file_cpuinfo_proto_rawDescGZIP(), []int{1, 0}
+}
+
+type CpuinfoX86Entry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ VendorId *CpuinfoX86EntryVendor `protobuf:"varint,1,req,name=vendor_id,json=vendorId,enum=CpuinfoX86EntryVendor" json:"vendor_id,omitempty"`
+ CpuFamily *uint32 `protobuf:"varint,2,req,name=cpu_family,json=cpuFamily" json:"cpu_family,omitempty"`
+ Model *uint32 `protobuf:"varint,3,req,name=model" json:"model,omitempty"`
+ Stepping *uint32 `protobuf:"varint,4,req,name=stepping" json:"stepping,omitempty"`
+ CapabilityVer *uint32 `protobuf:"varint,5,req,name=capability_ver,json=capabilityVer" json:"capability_ver,omitempty"`
+ Capability []uint32 `protobuf:"varint,6,rep,name=capability" json:"capability,omitempty"`
+ ModelId *string `protobuf:"bytes,7,opt,name=model_id,json=modelId" json:"model_id,omitempty"`
+ XfeaturesMask *uint64 `protobuf:"varint,8,opt,name=xfeatures_mask,json=xfeaturesMask" json:"xfeatures_mask,omitempty"`
+ XsaveSize *uint32 `protobuf:"varint,9,opt,name=xsave_size,json=xsaveSize" json:"xsave_size,omitempty"`
+ XsaveSizeMax *uint32 `protobuf:"varint,10,opt,name=xsave_size_max,json=xsaveSizeMax" json:"xsave_size_max,omitempty"`
+}
+
+func (x *CpuinfoX86Entry) Reset() {
+ *x = CpuinfoX86Entry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cpuinfo_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CpuinfoX86Entry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CpuinfoX86Entry) ProtoMessage() {}
+
+func (x *CpuinfoX86Entry) ProtoReflect() protoreflect.Message {
+ mi := &file_cpuinfo_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CpuinfoX86Entry.ProtoReflect.Descriptor instead.
+func (*CpuinfoX86Entry) Descriptor() ([]byte, []int) {
+ return file_cpuinfo_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CpuinfoX86Entry) GetVendorId() CpuinfoX86EntryVendor {
+ if x != nil && x.VendorId != nil {
+ return *x.VendorId
+ }
+ return CpuinfoX86Entry_UNKNOWN
+}
+
+func (x *CpuinfoX86Entry) GetCpuFamily() uint32 {
+ if x != nil && x.CpuFamily != nil {
+ return *x.CpuFamily
+ }
+ return 0
+}
+
+func (x *CpuinfoX86Entry) GetModel() uint32 {
+ if x != nil && x.Model != nil {
+ return *x.Model
+ }
+ return 0
+}
+
+func (x *CpuinfoX86Entry) GetStepping() uint32 {
+ if x != nil && x.Stepping != nil {
+ return *x.Stepping
+ }
+ return 0
+}
+
+func (x *CpuinfoX86Entry) GetCapabilityVer() uint32 {
+ if x != nil && x.CapabilityVer != nil {
+ return *x.CapabilityVer
+ }
+ return 0
+}
+
+func (x *CpuinfoX86Entry) GetCapability() []uint32 {
+ if x != nil {
+ return x.Capability
+ }
+ return nil
+}
+
+func (x *CpuinfoX86Entry) GetModelId() string {
+ if x != nil && x.ModelId != nil {
+ return *x.ModelId
+ }
+ return ""
+}
+
+func (x *CpuinfoX86Entry) GetXfeaturesMask() uint64 {
+ if x != nil && x.XfeaturesMask != nil {
+ return *x.XfeaturesMask
+ }
+ return 0
+}
+
+func (x *CpuinfoX86Entry) GetXsaveSize() uint32 {
+ if x != nil && x.XsaveSize != nil {
+ return *x.XsaveSize
+ }
+ return 0
+}
+
+func (x *CpuinfoX86Entry) GetXsaveSizeMax() uint32 {
+ if x != nil && x.XsaveSizeMax != nil {
+ return *x.XsaveSizeMax
+ }
+ return 0
+}
+
+type CpuinfoPpc64Entry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Endian *CpuinfoPpc64EntryEndianness `protobuf:"varint,1,req,name=endian,enum=CpuinfoPpc64EntryEndianness" json:"endian,omitempty"`
+ Hwcap []uint64 `protobuf:"varint,2,rep,name=hwcap" json:"hwcap,omitempty"`
+}
+
+func (x *CpuinfoPpc64Entry) Reset() {
+ *x = CpuinfoPpc64Entry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cpuinfo_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CpuinfoPpc64Entry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CpuinfoPpc64Entry) ProtoMessage() {}
+
+func (x *CpuinfoPpc64Entry) ProtoReflect() protoreflect.Message {
+ mi := &file_cpuinfo_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CpuinfoPpc64Entry.ProtoReflect.Descriptor instead.
+func (*CpuinfoPpc64Entry) Descriptor() ([]byte, []int) {
+ return file_cpuinfo_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CpuinfoPpc64Entry) GetEndian() CpuinfoPpc64EntryEndianness {
+ if x != nil && x.Endian != nil {
+ return *x.Endian
+ }
+ return CpuinfoPpc64Entry_BIGENDIAN
+}
+
+func (x *CpuinfoPpc64Entry) GetHwcap() []uint64 {
+ if x != nil {
+ return x.Hwcap
+ }
+ return nil
+}
+
+type CpuinfoS390Entry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Hwcap []uint64 `protobuf:"varint,2,rep,name=hwcap" json:"hwcap,omitempty"`
+}
+
+func (x *CpuinfoS390Entry) Reset() {
+ *x = CpuinfoS390Entry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cpuinfo_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CpuinfoS390Entry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CpuinfoS390Entry) ProtoMessage() {}
+
+func (x *CpuinfoS390Entry) ProtoReflect() protoreflect.Message {
+ mi := &file_cpuinfo_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CpuinfoS390Entry.ProtoReflect.Descriptor instead.
+func (*CpuinfoS390Entry) Descriptor() ([]byte, []int) {
+ return file_cpuinfo_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CpuinfoS390Entry) GetHwcap() []uint64 {
+ if x != nil {
+ return x.Hwcap
+ }
+ return nil
+}
+
+type CpuinfoEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Usually on SMP system there should be same CPUs
+ // installed, but it might happen that system carries
+ // various CPUs so @repeated used.
+ X86Entry []*CpuinfoX86Entry `protobuf:"bytes,1,rep,name=x86_entry,json=x86Entry" json:"x86_entry,omitempty"`
+ Ppc64Entry []*CpuinfoPpc64Entry `protobuf:"bytes,2,rep,name=ppc64_entry,json=ppc64Entry" json:"ppc64_entry,omitempty"`
+ S390Entry []*CpuinfoS390Entry `protobuf:"bytes,3,rep,name=s390_entry,json=s390Entry" json:"s390_entry,omitempty"`
+}
+
+func (x *CpuinfoEntry) Reset() {
+ *x = CpuinfoEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_cpuinfo_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CpuinfoEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CpuinfoEntry) ProtoMessage() {}
+
+func (x *CpuinfoEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_cpuinfo_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CpuinfoEntry.ProtoReflect.Descriptor instead.
+func (*CpuinfoEntry) Descriptor() ([]byte, []int) {
+ return file_cpuinfo_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CpuinfoEntry) GetX86Entry() []*CpuinfoX86Entry {
+ if x != nil {
+ return x.X86Entry
+ }
+ return nil
+}
+
+func (x *CpuinfoEntry) GetPpc64Entry() []*CpuinfoPpc64Entry {
+ if x != nil {
+ return x.Ppc64Entry
+ }
+ return nil
+}
+
+func (x *CpuinfoEntry) GetS390Entry() []*CpuinfoS390Entry {
+ if x != nil {
+ return x.S390Entry
+ }
+ return nil
+}
+
+var File_cpuinfo_proto protoreflect.FileDescriptor
+
+var file_cpuinfo_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x95, 0x03, 0x0a, 0x11, 0x63, 0x70, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x78, 0x38, 0x36, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x09, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x70, 0x75, 0x69, 0x6e,
+ 0x66, 0x6f, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x65, 0x6e,
+ 0x64, 0x6f, 0x72, 0x52, 0x08, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x63, 0x70, 0x75, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x09, 0x63, 0x70, 0x75, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05,
+ 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x65, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x04,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x25,
+ 0x0a, 0x0e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x76, 0x65, 0x72,
+ 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
+ 0x74, 0x79, 0x56, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69,
+ 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64,
+ 0x12, 0x25, 0x0a, 0x0e, 0x78, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x6d, 0x61,
+ 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x78, 0x66, 0x65, 0x61, 0x74, 0x75,
+ 0x72, 0x65, 0x73, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x78, 0x73, 0x61, 0x76, 0x65,
+ 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x78, 0x73, 0x61,
+ 0x76, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x78, 0x73, 0x61, 0x76, 0x65, 0x5f,
+ 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c,
+ 0x78, 0x73, 0x61, 0x76, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4d, 0x61, 0x78, 0x22, 0x29, 0x0a, 0x06,
+ 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
+ 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x45, 0x4c, 0x10, 0x01, 0x12, 0x07,
+ 0x0a, 0x03, 0x41, 0x4d, 0x44, 0x10, 0x02, 0x22, 0x93, 0x01, 0x0a, 0x13, 0x63, 0x70, 0x75, 0x69,
+ 0x6e, 0x66, 0x6f, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x37, 0x0a, 0x06, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32,
+ 0x1f, 0x2e, 0x63, 0x70, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x6e, 0x65, 0x73, 0x73,
+ 0x52, 0x06, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x77, 0x63, 0x61,
+ 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, 0x68, 0x77, 0x63, 0x61, 0x70, 0x22, 0x2d,
+ 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x0d, 0x0a, 0x09,
+ 0x42, 0x49, 0x47, 0x45, 0x4e, 0x44, 0x49, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4c,
+ 0x49, 0x54, 0x54, 0x4c, 0x45, 0x45, 0x4e, 0x44, 0x49, 0x41, 0x4e, 0x10, 0x01, 0x22, 0x2a, 0x0a,
+ 0x12, 0x63, 0x70, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x77, 0x63, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x04, 0x52, 0x05, 0x68, 0x77, 0x63, 0x61, 0x70, 0x22, 0xab, 0x01, 0x0a, 0x0d, 0x63, 0x70,
+ 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x09, 0x78,
+ 0x38, 0x36, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12,
+ 0x2e, 0x63, 0x70, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x78, 0x38, 0x36, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x08, 0x78, 0x38, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x35, 0x0a, 0x0b,
+ 0x70, 0x70, 0x63, 0x36, 0x34, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x70, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x70, 0x70, 0x63, 0x36,
+ 0x34, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x70, 0x63, 0x36, 0x34, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x70, 0x75, 0x69, 0x6e, 0x66,
+ 0x6f, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x33,
+ 0x39, 0x30, 0x45, 0x6e, 0x74, 0x72, 0x79,
+}
+
+var (
+ file_cpuinfo_proto_rawDescOnce sync.Once
+ file_cpuinfo_proto_rawDescData = file_cpuinfo_proto_rawDesc
+)
+
+func file_cpuinfo_proto_rawDescGZIP() []byte {
+ file_cpuinfo_proto_rawDescOnce.Do(func() {
+ file_cpuinfo_proto_rawDescData = protoimpl.X.CompressGZIP(file_cpuinfo_proto_rawDescData)
+ })
+ return file_cpuinfo_proto_rawDescData
+}
+
+var file_cpuinfo_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_cpuinfo_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_cpuinfo_proto_goTypes = []interface{}{
+ (CpuinfoX86EntryVendor)(0), // 0: cpuinfo_x86_entry.vendor
+ (CpuinfoPpc64EntryEndianness)(0), // 1: cpuinfo_ppc64_entry.endianness
+ (*CpuinfoX86Entry)(nil), // 2: cpuinfo_x86_entry
+ (*CpuinfoPpc64Entry)(nil), // 3: cpuinfo_ppc64_entry
+ (*CpuinfoS390Entry)(nil), // 4: cpuinfo_s390_entry
+ (*CpuinfoEntry)(nil), // 5: cpuinfo_entry
+}
+var file_cpuinfo_proto_depIdxs = []int32{
+ 0, // 0: cpuinfo_x86_entry.vendor_id:type_name -> cpuinfo_x86_entry.vendor
+ 1, // 1: cpuinfo_ppc64_entry.endian:type_name -> cpuinfo_ppc64_entry.endianness
+ 2, // 2: cpuinfo_entry.x86_entry:type_name -> cpuinfo_x86_entry
+ 3, // 3: cpuinfo_entry.ppc64_entry:type_name -> cpuinfo_ppc64_entry
+ 4, // 4: cpuinfo_entry.s390_entry:type_name -> cpuinfo_s390_entry
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_cpuinfo_proto_init() }
+func file_cpuinfo_proto_init() {
+ if File_cpuinfo_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_cpuinfo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CpuinfoX86Entry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cpuinfo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CpuinfoPpc64Entry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cpuinfo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CpuinfoS390Entry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_cpuinfo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CpuinfoEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_cpuinfo_proto_rawDesc,
+ NumEnums: 2,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_cpuinfo_proto_goTypes,
+ DependencyIndexes: file_cpuinfo_proto_depIdxs,
+ EnumInfos: file_cpuinfo_proto_enumTypes,
+ MessageInfos: file_cpuinfo_proto_msgTypes,
+ }.Build()
+ File_cpuinfo_proto = out.File
+ file_cpuinfo_proto_rawDesc = nil
+ file_cpuinfo_proto_goTypes = nil
+ file_cpuinfo_proto_depIdxs = nil
+}
diff --git a/crit/images/cpuinfo.proto b/crit/images/cpuinfo.proto
new file mode 100644
index 0000000..15860a9
--- /dev/null
+++ b/crit/images/cpuinfo.proto
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message cpuinfo_x86_entry {
+ enum vendor {
+ UNKNOWN = 0;
+ INTEL = 1;
+ AMD = 2;
+ }
+
+ required vendor vendor_id = 1;
+ required uint32 cpu_family = 2;
+ required uint32 model = 3;
+ required uint32 stepping = 4;
+ required uint32 capability_ver = 5;
+ repeated uint32 capability = 6;
+
+ optional string model_id = 7;
+
+ optional uint64 xfeatures_mask = 8;
+ optional uint32 xsave_size = 9;
+ optional uint32 xsave_size_max = 10;
+}
+
+message cpuinfo_ppc64_entry {
+ enum endianness {
+ BIGENDIAN = 0;
+ LITTLEENDIAN = 1;
+ }
+
+ required endianness endian = 1;
+ repeated uint64 hwcap = 2;
+}
+
+message cpuinfo_s390_entry {
+ repeated uint64 hwcap = 2;
+}
+
+message cpuinfo_entry {
+ /*
+ * Usually on SMP system there should be same CPUs
+ * installed, but it might happen that system carries
+ * various CPUs so @repeated used.
+ */
+ repeated cpuinfo_x86_entry x86_entry = 1;
+ repeated cpuinfo_ppc64_entry ppc64_entry = 2;
+ repeated cpuinfo_s390_entry s390_entry = 3;
+}
diff --git a/crit/images/creds.pb.go b/crit/images/creds.pb.go
new file mode 100644
index 0000000..87e504a
--- /dev/null
+++ b/crit/images/creds.pb.go
@@ -0,0 +1,294 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: creds.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CredsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Uid *uint32 `protobuf:"varint,1,req,name=uid" json:"uid,omitempty"`
+ Gid *uint32 `protobuf:"varint,2,req,name=gid" json:"gid,omitempty"`
+ Euid *uint32 `protobuf:"varint,3,req,name=euid" json:"euid,omitempty"`
+ Egid *uint32 `protobuf:"varint,4,req,name=egid" json:"egid,omitempty"`
+ Suid *uint32 `protobuf:"varint,5,req,name=suid" json:"suid,omitempty"`
+ Sgid *uint32 `protobuf:"varint,6,req,name=sgid" json:"sgid,omitempty"`
+ Fsuid *uint32 `protobuf:"varint,7,req,name=fsuid" json:"fsuid,omitempty"`
+ Fsgid *uint32 `protobuf:"varint,8,req,name=fsgid" json:"fsgid,omitempty"`
+ CapInh []uint32 `protobuf:"varint,9,rep,name=cap_inh,json=capInh" json:"cap_inh,omitempty"`
+ CapPrm []uint32 `protobuf:"varint,10,rep,name=cap_prm,json=capPrm" json:"cap_prm,omitempty"`
+ CapEff []uint32 `protobuf:"varint,11,rep,name=cap_eff,json=capEff" json:"cap_eff,omitempty"`
+ CapBnd []uint32 `protobuf:"varint,12,rep,name=cap_bnd,json=capBnd" json:"cap_bnd,omitempty"`
+ Secbits *uint32 `protobuf:"varint,13,req,name=secbits" json:"secbits,omitempty"`
+ Groups []uint32 `protobuf:"varint,14,rep,name=groups" json:"groups,omitempty"`
+ LsmProfile *string `protobuf:"bytes,15,opt,name=lsm_profile,json=lsmProfile" json:"lsm_profile,omitempty"`
+ LsmSockcreate *string `protobuf:"bytes,16,opt,name=lsm_sockcreate,json=lsmSockcreate" json:"lsm_sockcreate,omitempty"`
+ ApparmorData []byte `protobuf:"bytes,17,opt,name=apparmor_data,json=apparmorData" json:"apparmor_data,omitempty"`
+}
+
+func (x *CredsEntry) Reset() {
+ *x = CredsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_creds_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CredsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CredsEntry) ProtoMessage() {}
+
+func (x *CredsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_creds_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CredsEntry.ProtoReflect.Descriptor instead.
+func (*CredsEntry) Descriptor() ([]byte, []int) {
+ return file_creds_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CredsEntry) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetGid() uint32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetEuid() uint32 {
+ if x != nil && x.Euid != nil {
+ return *x.Euid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetEgid() uint32 {
+ if x != nil && x.Egid != nil {
+ return *x.Egid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetSuid() uint32 {
+ if x != nil && x.Suid != nil {
+ return *x.Suid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetSgid() uint32 {
+ if x != nil && x.Sgid != nil {
+ return *x.Sgid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetFsuid() uint32 {
+ if x != nil && x.Fsuid != nil {
+ return *x.Fsuid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetFsgid() uint32 {
+ if x != nil && x.Fsgid != nil {
+ return *x.Fsgid
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetCapInh() []uint32 {
+ if x != nil {
+ return x.CapInh
+ }
+ return nil
+}
+
+func (x *CredsEntry) GetCapPrm() []uint32 {
+ if x != nil {
+ return x.CapPrm
+ }
+ return nil
+}
+
+func (x *CredsEntry) GetCapEff() []uint32 {
+ if x != nil {
+ return x.CapEff
+ }
+ return nil
+}
+
+func (x *CredsEntry) GetCapBnd() []uint32 {
+ if x != nil {
+ return x.CapBnd
+ }
+ return nil
+}
+
+func (x *CredsEntry) GetSecbits() uint32 {
+ if x != nil && x.Secbits != nil {
+ return *x.Secbits
+ }
+ return 0
+}
+
+func (x *CredsEntry) GetGroups() []uint32 {
+ if x != nil {
+ return x.Groups
+ }
+ return nil
+}
+
+func (x *CredsEntry) GetLsmProfile() string {
+ if x != nil && x.LsmProfile != nil {
+ return *x.LsmProfile
+ }
+ return ""
+}
+
+func (x *CredsEntry) GetLsmSockcreate() string {
+ if x != nil && x.LsmSockcreate != nil {
+ return *x.LsmSockcreate
+ }
+ return ""
+}
+
+func (x *CredsEntry) GetApparmorData() []byte {
+ if x != nil {
+ return x.ApparmorData
+ }
+ return nil
+}
+
+var File_creds_proto protoreflect.FileDescriptor
+
+var file_creds_proto_rawDesc = []byte{
+ 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x03,
+ 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
+ 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x04, 0x65, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x67, 0x69, 0x64, 0x18, 0x04, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x04, 0x65, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69,
+ 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a,
+ 0x04, 0x73, 0x67, 0x69, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x67, 0x69,
+ 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x73, 0x75, 0x69, 0x64, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x05, 0x66, 0x73, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x73, 0x67, 0x69, 0x64,
+ 0x18, 0x08, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x73, 0x67, 0x69, 0x64, 0x12, 0x17, 0x0a,
+ 0x07, 0x63, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x68, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06,
+ 0x63, 0x61, 0x70, 0x49, 0x6e, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x5f, 0x70, 0x72,
+ 0x6d, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x61, 0x70, 0x50, 0x72, 0x6d, 0x12,
+ 0x17, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x5f, 0x65, 0x66, 0x66, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d,
+ 0x52, 0x06, 0x63, 0x61, 0x70, 0x45, 0x66, 0x66, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x5f,
+ 0x62, 0x6e, 0x64, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x61, 0x70, 0x42, 0x6e,
+ 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x62, 0x69, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x07, 0x73, 0x65, 0x63, 0x62, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x67,
+ 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x73, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69,
+ 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x73, 0x6d, 0x50, 0x72, 0x6f,
+ 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x73, 0x6d, 0x5f, 0x73, 0x6f, 0x63, 0x6b,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x73,
+ 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61,
+ 0x70, 0x70, 0x61, 0x72, 0x6d, 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x11, 0x20, 0x01,
+ 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x61, 0x72, 0x6d, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61,
+}
+
+var (
+ file_creds_proto_rawDescOnce sync.Once
+ file_creds_proto_rawDescData = file_creds_proto_rawDesc
+)
+
+func file_creds_proto_rawDescGZIP() []byte {
+ file_creds_proto_rawDescOnce.Do(func() {
+ file_creds_proto_rawDescData = protoimpl.X.CompressGZIP(file_creds_proto_rawDescData)
+ })
+ return file_creds_proto_rawDescData
+}
+
+var file_creds_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_creds_proto_goTypes = []interface{}{
+ (*CredsEntry)(nil), // 0: creds_entry
+}
+var file_creds_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_creds_proto_init() }
+func file_creds_proto_init() {
+ if File_creds_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_creds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CredsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_creds_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_creds_proto_goTypes,
+ DependencyIndexes: file_creds_proto_depIdxs,
+ MessageInfos: file_creds_proto_msgTypes,
+ }.Build()
+ File_creds_proto = out.File
+ file_creds_proto_rawDesc = nil
+ file_creds_proto_goTypes = nil
+ file_creds_proto_depIdxs = nil
+}
diff --git a/crit/images/creds.proto b/crit/images/creds.proto
new file mode 100644
index 0000000..6228f7f
--- /dev/null
+++ b/crit/images/creds.proto
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message creds_entry {
+ required uint32 uid = 1;
+ required uint32 gid = 2;
+ required uint32 euid = 3;
+ required uint32 egid = 4;
+ required uint32 suid = 5;
+ required uint32 sgid = 6;
+ required uint32 fsuid = 7;
+ required uint32 fsgid = 8;
+
+ repeated uint32 cap_inh = 9;
+ repeated uint32 cap_prm = 10;
+ repeated uint32 cap_eff = 11;
+ repeated uint32 cap_bnd = 12;
+
+ required uint32 secbits = 13;
+
+ repeated uint32 groups = 14;
+
+ optional string lsm_profile = 15;
+ optional string lsm_sockcreate = 16;
+ optional bytes apparmor_data = 17;
+}
diff --git a/crit/images/criu-core.pb.go b/crit/images/criu-core.pb.go
new file mode 100644
index 0000000..cb93204
--- /dev/null
+++ b/crit/images/criu-core.pb.go
@@ -0,0 +1,1200 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: criu-core.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// These match the SECCOMP_MODE_* flags from <linux/seccomp.h>.
+type SeccompMode int32
+
+const (
+ SeccompMode_disabled SeccompMode = 0
+ SeccompMode_strict SeccompMode = 1
+ SeccompMode_filter SeccompMode = 2
+)
+
+// Enum value maps for SeccompMode.
+var (
+ SeccompMode_name = map[int32]string{
+ 0: "disabled",
+ 1: "strict",
+ 2: "filter",
+ }
+ SeccompMode_value = map[string]int32{
+ "disabled": 0,
+ "strict": 1,
+ "filter": 2,
+ }
+)
+
+func (x SeccompMode) Enum() *SeccompMode {
+ p := new(SeccompMode)
+ *p = x
+ return p
+}
+
+func (x SeccompMode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SeccompMode) Descriptor() protoreflect.EnumDescriptor {
+ return file_criu_core_proto_enumTypes[0].Descriptor()
+}
+
+func (SeccompMode) Type() protoreflect.EnumType {
+ return &file_criu_core_proto_enumTypes[0]
+}
+
+func (x SeccompMode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SeccompMode) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = SeccompMode(num)
+ return nil
+}
+
+// Deprecated: Use SeccompMode.Descriptor instead.
+func (SeccompMode) EnumDescriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{0}
+}
+
+type CoreEntryMarch int32
+
+const (
+ CoreEntry_UNKNOWN CoreEntryMarch = 0
+ CoreEntry_X86_64 CoreEntryMarch = 1
+ CoreEntry_ARM CoreEntryMarch = 2
+ CoreEntry_AARCH64 CoreEntryMarch = 3
+ CoreEntry_PPC64 CoreEntryMarch = 4
+ CoreEntry_S390 CoreEntryMarch = 5
+ CoreEntry_MIPS CoreEntryMarch = 6
+)
+
+// Enum value maps for CoreEntryMarch.
+var (
+ CoreEntryMarch_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "X86_64",
+ 2: "ARM",
+ 3: "AARCH64",
+ 4: "PPC64",
+ 5: "S390",
+ 6: "MIPS",
+ }
+ CoreEntryMarch_value = map[string]int32{
+ "UNKNOWN": 0,
+ "X86_64": 1,
+ "ARM": 2,
+ "AARCH64": 3,
+ "PPC64": 4,
+ "S390": 5,
+ "MIPS": 6,
+ }
+)
+
+func (x CoreEntryMarch) Enum() *CoreEntryMarch {
+ p := new(CoreEntryMarch)
+ *p = x
+ return p
+}
+
+func (x CoreEntryMarch) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CoreEntryMarch) Descriptor() protoreflect.EnumDescriptor {
+ return file_criu_core_proto_enumTypes[1].Descriptor()
+}
+
+func (CoreEntryMarch) Type() protoreflect.EnumType {
+ return &file_criu_core_proto_enumTypes[1]
+}
+
+func (x CoreEntryMarch) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CoreEntryMarch) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CoreEntryMarch(num)
+ return nil
+}
+
+// Deprecated: Use CoreEntryMarch.Descriptor instead.
+func (CoreEntryMarch) EnumDescriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{5, 0}
+}
+
+type TaskCoreEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskState *uint32 `protobuf:"varint,1,req,name=task_state,json=taskState" json:"task_state,omitempty"`
+ ExitCode *uint32 `protobuf:"varint,2,req,name=exit_code,json=exitCode" json:"exit_code,omitempty"`
+ Personality *uint32 `protobuf:"varint,3,req,name=personality" json:"personality,omitempty"`
+ Flags *uint32 `protobuf:"varint,4,req,name=flags" json:"flags,omitempty"`
+ BlkSigset *uint64 `protobuf:"varint,5,req,name=blk_sigset,json=blkSigset" json:"blk_sigset,omitempty"`
+ Comm *string `protobuf:"bytes,6,req,name=comm" json:"comm,omitempty"`
+ Timers *TaskTimersEntry `protobuf:"bytes,7,opt,name=timers" json:"timers,omitempty"`
+ Rlimits *TaskRlimitsEntry `protobuf:"bytes,8,opt,name=rlimits" json:"rlimits,omitempty"`
+ CgSet *uint32 `protobuf:"varint,9,opt,name=cg_set,json=cgSet" json:"cg_set,omitempty"`
+ SignalsS *SignalQueueEntry `protobuf:"bytes,10,opt,name=signals_s,json=signalsS" json:"signals_s,omitempty"`
+ // These two are deprecated, should be per-thread
+ OldSeccompMode *SeccompMode `protobuf:"varint,11,opt,name=old_seccomp_mode,json=oldSeccompMode,enum=SeccompMode" json:"old_seccomp_mode,omitempty"`
+ OldSeccompFilter *uint32 `protobuf:"varint,12,opt,name=old_seccomp_filter,json=oldSeccompFilter" json:"old_seccomp_filter,omitempty"`
+ Loginuid *uint32 `protobuf:"varint,13,opt,name=loginuid" json:"loginuid,omitempty"`
+ OomScoreAdj *int32 `protobuf:"varint,14,opt,name=oom_score_adj,json=oomScoreAdj" json:"oom_score_adj,omitempty"`
+ Sigactions []*SaEntry `protobuf:"bytes,15,rep,name=sigactions" json:"sigactions,omitempty"`
+ ChildSubreaper *bool `protobuf:"varint,18,opt,name=child_subreaper,json=childSubreaper" json:"child_subreaper,omitempty"`
+ // Reserved for container relative start time
+ // optional uint64 start_time = 19;
+ BlkSigsetExtended *uint64 `protobuf:"varint,20,opt,name=blk_sigset_extended,json=blkSigsetExtended" json:"blk_sigset_extended,omitempty"`
+}
+
+func (x *TaskCoreEntry) Reset() {
+ *x = TaskCoreEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_criu_core_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TaskCoreEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskCoreEntry) ProtoMessage() {}
+
+func (x *TaskCoreEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_criu_core_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TaskCoreEntry.ProtoReflect.Descriptor instead.
+func (*TaskCoreEntry) Descriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TaskCoreEntry) GetTaskState() uint32 {
+ if x != nil && x.TaskState != nil {
+ return *x.TaskState
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetExitCode() uint32 {
+ if x != nil && x.ExitCode != nil {
+ return *x.ExitCode
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetPersonality() uint32 {
+ if x != nil && x.Personality != nil {
+ return *x.Personality
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetBlkSigset() uint64 {
+ if x != nil && x.BlkSigset != nil {
+ return *x.BlkSigset
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetComm() string {
+ if x != nil && x.Comm != nil {
+ return *x.Comm
+ }
+ return ""
+}
+
+func (x *TaskCoreEntry) GetTimers() *TaskTimersEntry {
+ if x != nil {
+ return x.Timers
+ }
+ return nil
+}
+
+func (x *TaskCoreEntry) GetRlimits() *TaskRlimitsEntry {
+ if x != nil {
+ return x.Rlimits
+ }
+ return nil
+}
+
+func (x *TaskCoreEntry) GetCgSet() uint32 {
+ if x != nil && x.CgSet != nil {
+ return *x.CgSet
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetSignalsS() *SignalQueueEntry {
+ if x != nil {
+ return x.SignalsS
+ }
+ return nil
+}
+
+func (x *TaskCoreEntry) GetOldSeccompMode() SeccompMode {
+ if x != nil && x.OldSeccompMode != nil {
+ return *x.OldSeccompMode
+ }
+ return SeccompMode_disabled
+}
+
+func (x *TaskCoreEntry) GetOldSeccompFilter() uint32 {
+ if x != nil && x.OldSeccompFilter != nil {
+ return *x.OldSeccompFilter
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetLoginuid() uint32 {
+ if x != nil && x.Loginuid != nil {
+ return *x.Loginuid
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetOomScoreAdj() int32 {
+ if x != nil && x.OomScoreAdj != nil {
+ return *x.OomScoreAdj
+ }
+ return 0
+}
+
+func (x *TaskCoreEntry) GetSigactions() []*SaEntry {
+ if x != nil {
+ return x.Sigactions
+ }
+ return nil
+}
+
+func (x *TaskCoreEntry) GetChildSubreaper() bool {
+ if x != nil && x.ChildSubreaper != nil {
+ return *x.ChildSubreaper
+ }
+ return false
+}
+
+func (x *TaskCoreEntry) GetBlkSigsetExtended() uint64 {
+ if x != nil && x.BlkSigsetExtended != nil {
+ return *x.BlkSigsetExtended
+ }
+ return 0
+}
+
+type TaskKobjIdsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ VmId *uint32 `protobuf:"varint,1,req,name=vm_id,json=vmId" json:"vm_id,omitempty"`
+ FilesId *uint32 `protobuf:"varint,2,req,name=files_id,json=filesId" json:"files_id,omitempty"`
+ FsId *uint32 `protobuf:"varint,3,req,name=fs_id,json=fsId" json:"fs_id,omitempty"`
+ SighandId *uint32 `protobuf:"varint,4,req,name=sighand_id,json=sighandId" json:"sighand_id,omitempty"`
+ PidNsId *uint32 `protobuf:"varint,5,opt,name=pid_ns_id,json=pidNsId" json:"pid_ns_id,omitempty"`
+ NetNsId *uint32 `protobuf:"varint,6,opt,name=net_ns_id,json=netNsId" json:"net_ns_id,omitempty"`
+ IpcNsId *uint32 `protobuf:"varint,7,opt,name=ipc_ns_id,json=ipcNsId" json:"ipc_ns_id,omitempty"`
+ UtsNsId *uint32 `protobuf:"varint,8,opt,name=uts_ns_id,json=utsNsId" json:"uts_ns_id,omitempty"`
+ MntNsId *uint32 `protobuf:"varint,9,opt,name=mnt_ns_id,json=mntNsId" json:"mnt_ns_id,omitempty"`
+ UserNsId *uint32 `protobuf:"varint,10,opt,name=user_ns_id,json=userNsId" json:"user_ns_id,omitempty"`
+ CgroupNsId *uint32 `protobuf:"varint,11,opt,name=cgroup_ns_id,json=cgroupNsId" json:"cgroup_ns_id,omitempty"`
+ TimeNsId *uint32 `protobuf:"varint,12,opt,name=time_ns_id,json=timeNsId" json:"time_ns_id,omitempty"`
+}
+
+func (x *TaskKobjIdsEntry) Reset() {
+ *x = TaskKobjIdsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_criu_core_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TaskKobjIdsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskKobjIdsEntry) ProtoMessage() {}
+
+func (x *TaskKobjIdsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_criu_core_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TaskKobjIdsEntry.ProtoReflect.Descriptor instead.
+func (*TaskKobjIdsEntry) Descriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *TaskKobjIdsEntry) GetVmId() uint32 {
+ if x != nil && x.VmId != nil {
+ return *x.VmId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetFilesId() uint32 {
+ if x != nil && x.FilesId != nil {
+ return *x.FilesId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetFsId() uint32 {
+ if x != nil && x.FsId != nil {
+ return *x.FsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetSighandId() uint32 {
+ if x != nil && x.SighandId != nil {
+ return *x.SighandId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetPidNsId() uint32 {
+ if x != nil && x.PidNsId != nil {
+ return *x.PidNsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetNetNsId() uint32 {
+ if x != nil && x.NetNsId != nil {
+ return *x.NetNsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetIpcNsId() uint32 {
+ if x != nil && x.IpcNsId != nil {
+ return *x.IpcNsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetUtsNsId() uint32 {
+ if x != nil && x.UtsNsId != nil {
+ return *x.UtsNsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetMntNsId() uint32 {
+ if x != nil && x.MntNsId != nil {
+ return *x.MntNsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetUserNsId() uint32 {
+ if x != nil && x.UserNsId != nil {
+ return *x.UserNsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetCgroupNsId() uint32 {
+ if x != nil && x.CgroupNsId != nil {
+ return *x.CgroupNsId
+ }
+ return 0
+}
+
+func (x *TaskKobjIdsEntry) GetTimeNsId() uint32 {
+ if x != nil && x.TimeNsId != nil {
+ return *x.TimeNsId
+ }
+ return 0
+}
+
+type ThreadSasEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SsSp *uint64 `protobuf:"varint,1,req,name=ss_sp,json=ssSp" json:"ss_sp,omitempty"`
+ SsSize *uint64 `protobuf:"varint,2,req,name=ss_size,json=ssSize" json:"ss_size,omitempty"`
+ SsFlags *uint32 `protobuf:"varint,3,req,name=ss_flags,json=ssFlags" json:"ss_flags,omitempty"`
+}
+
+func (x *ThreadSasEntry) Reset() {
+ *x = ThreadSasEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_criu_core_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadSasEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadSasEntry) ProtoMessage() {}
+
+func (x *ThreadSasEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_criu_core_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadSasEntry.ProtoReflect.Descriptor instead.
+func (*ThreadSasEntry) Descriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ThreadSasEntry) GetSsSp() uint64 {
+ if x != nil && x.SsSp != nil {
+ return *x.SsSp
+ }
+ return 0
+}
+
+func (x *ThreadSasEntry) GetSsSize() uint64 {
+ if x != nil && x.SsSize != nil {
+ return *x.SsSize
+ }
+ return 0
+}
+
+func (x *ThreadSasEntry) GetSsFlags() uint32 {
+ if x != nil && x.SsFlags != nil {
+ return *x.SsFlags
+ }
+ return 0
+}
+
+type ThreadCoreEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ FutexRla *uint64 `protobuf:"varint,1,req,name=futex_rla,json=futexRla" json:"futex_rla,omitempty"`
+ FutexRlaLen *uint32 `protobuf:"varint,2,req,name=futex_rla_len,json=futexRlaLen" json:"futex_rla_len,omitempty"`
+ SchedNice *int32 `protobuf:"zigzag32,3,opt,name=sched_nice,json=schedNice" json:"sched_nice,omitempty"`
+ SchedPolicy *uint32 `protobuf:"varint,4,opt,name=sched_policy,json=schedPolicy" json:"sched_policy,omitempty"`
+ SchedPrio *uint32 `protobuf:"varint,5,opt,name=sched_prio,json=schedPrio" json:"sched_prio,omitempty"`
+ BlkSigset *uint64 `protobuf:"varint,6,opt,name=blk_sigset,json=blkSigset" json:"blk_sigset,omitempty"`
+ Sas *ThreadSasEntry `protobuf:"bytes,7,opt,name=sas" json:"sas,omitempty"`
+ PdeathSig *uint32 `protobuf:"varint,8,opt,name=pdeath_sig,json=pdeathSig" json:"pdeath_sig,omitempty"`
+ SignalsP *SignalQueueEntry `protobuf:"bytes,9,opt,name=signals_p,json=signalsP" json:"signals_p,omitempty"`
+ Creds *CredsEntry `protobuf:"bytes,10,opt,name=creds" json:"creds,omitempty"`
+ SeccompMode *SeccompMode `protobuf:"varint,11,opt,name=seccomp_mode,json=seccompMode,enum=SeccompMode" json:"seccomp_mode,omitempty"`
+ SeccompFilter *uint32 `protobuf:"varint,12,opt,name=seccomp_filter,json=seccompFilter" json:"seccomp_filter,omitempty"`
+ Comm *string `protobuf:"bytes,13,opt,name=comm" json:"comm,omitempty"`
+ BlkSigsetExtended *uint64 `protobuf:"varint,14,opt,name=blk_sigset_extended,json=blkSigsetExtended" json:"blk_sigset_extended,omitempty"`
+ RseqEntry *RseqEntry `protobuf:"bytes,15,opt,name=rseq_entry,json=rseqEntry" json:"rseq_entry,omitempty"`
+}
+
+func (x *ThreadCoreEntry) Reset() {
+ *x = ThreadCoreEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_criu_core_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ThreadCoreEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ThreadCoreEntry) ProtoMessage() {}
+
+func (x *ThreadCoreEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_criu_core_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ThreadCoreEntry.ProtoReflect.Descriptor instead.
+func (*ThreadCoreEntry) Descriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ThreadCoreEntry) GetFutexRla() uint64 {
+ if x != nil && x.FutexRla != nil {
+ return *x.FutexRla
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetFutexRlaLen() uint32 {
+ if x != nil && x.FutexRlaLen != nil {
+ return *x.FutexRlaLen
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetSchedNice() int32 {
+ if x != nil && x.SchedNice != nil {
+ return *x.SchedNice
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetSchedPolicy() uint32 {
+ if x != nil && x.SchedPolicy != nil {
+ return *x.SchedPolicy
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetSchedPrio() uint32 {
+ if x != nil && x.SchedPrio != nil {
+ return *x.SchedPrio
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetBlkSigset() uint64 {
+ if x != nil && x.BlkSigset != nil {
+ return *x.BlkSigset
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetSas() *ThreadSasEntry {
+ if x != nil {
+ return x.Sas
+ }
+ return nil
+}
+
+func (x *ThreadCoreEntry) GetPdeathSig() uint32 {
+ if x != nil && x.PdeathSig != nil {
+ return *x.PdeathSig
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetSignalsP() *SignalQueueEntry {
+ if x != nil {
+ return x.SignalsP
+ }
+ return nil
+}
+
+func (x *ThreadCoreEntry) GetCreds() *CredsEntry {
+ if x != nil {
+ return x.Creds
+ }
+ return nil
+}
+
+func (x *ThreadCoreEntry) GetSeccompMode() SeccompMode {
+ if x != nil && x.SeccompMode != nil {
+ return *x.SeccompMode
+ }
+ return SeccompMode_disabled
+}
+
+func (x *ThreadCoreEntry) GetSeccompFilter() uint32 {
+ if x != nil && x.SeccompFilter != nil {
+ return *x.SeccompFilter
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetComm() string {
+ if x != nil && x.Comm != nil {
+ return *x.Comm
+ }
+ return ""
+}
+
+func (x *ThreadCoreEntry) GetBlkSigsetExtended() uint64 {
+ if x != nil && x.BlkSigsetExtended != nil {
+ return *x.BlkSigsetExtended
+ }
+ return 0
+}
+
+func (x *ThreadCoreEntry) GetRseqEntry() *RseqEntry {
+ if x != nil {
+ return x.RseqEntry
+ }
+ return nil
+}
+
+type TaskRlimitsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Rlimits []*RlimitEntry `protobuf:"bytes,1,rep,name=rlimits" json:"rlimits,omitempty"`
+}
+
+func (x *TaskRlimitsEntry) Reset() {
+ *x = TaskRlimitsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_criu_core_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TaskRlimitsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskRlimitsEntry) ProtoMessage() {}
+
+func (x *TaskRlimitsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_criu_core_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TaskRlimitsEntry.ProtoReflect.Descriptor instead.
+func (*TaskRlimitsEntry) Descriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *TaskRlimitsEntry) GetRlimits() []*RlimitEntry {
+ if x != nil {
+ return x.Rlimits
+ }
+ return nil
+}
+
+type CoreEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Mtype *CoreEntryMarch `protobuf:"varint,1,req,name=mtype,enum=CoreEntryMarch" json:"mtype,omitempty"`
+ ThreadInfo *ThreadInfoX86 `protobuf:"bytes,2,opt,name=thread_info,json=threadInfo" json:"thread_info,omitempty"`
+ TiArm *ThreadInfoArm `protobuf:"bytes,6,opt,name=ti_arm,json=tiArm" json:"ti_arm,omitempty"`
+ TiAarch64 *ThreadInfoAarch64 `protobuf:"bytes,8,opt,name=ti_aarch64,json=tiAarch64" json:"ti_aarch64,omitempty"`
+ TiPpc64 *ThreadInfoPpc64 `protobuf:"bytes,9,opt,name=ti_ppc64,json=tiPpc64" json:"ti_ppc64,omitempty"`
+ TiS390 *ThreadInfoS390 `protobuf:"bytes,10,opt,name=ti_s390,json=tiS390" json:"ti_s390,omitempty"`
+ TiMips *ThreadInfoMips `protobuf:"bytes,11,opt,name=ti_mips,json=tiMips" json:"ti_mips,omitempty"`
+ Tc *TaskCoreEntry `protobuf:"bytes,3,opt,name=tc" json:"tc,omitempty"`
+ Ids *TaskKobjIdsEntry `protobuf:"bytes,4,opt,name=ids" json:"ids,omitempty"`
+ ThreadCore *ThreadCoreEntry `protobuf:"bytes,5,opt,name=thread_core,json=threadCore" json:"thread_core,omitempty"`
+}
+
+func (x *CoreEntry) Reset() {
+ *x = CoreEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_criu_core_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CoreEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CoreEntry) ProtoMessage() {}
+
+func (x *CoreEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_criu_core_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CoreEntry.ProtoReflect.Descriptor instead.
+func (*CoreEntry) Descriptor() ([]byte, []int) {
+ return file_criu_core_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CoreEntry) GetMtype() CoreEntryMarch {
+ if x != nil && x.Mtype != nil {
+ return *x.Mtype
+ }
+ return CoreEntry_UNKNOWN
+}
+
+func (x *CoreEntry) GetThreadInfo() *ThreadInfoX86 {
+ if x != nil {
+ return x.ThreadInfo
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetTiArm() *ThreadInfoArm {
+ if x != nil {
+ return x.TiArm
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetTiAarch64() *ThreadInfoAarch64 {
+ if x != nil {
+ return x.TiAarch64
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetTiPpc64() *ThreadInfoPpc64 {
+ if x != nil {
+ return x.TiPpc64
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetTiS390() *ThreadInfoS390 {
+ if x != nil {
+ return x.TiS390
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetTiMips() *ThreadInfoMips {
+ if x != nil {
+ return x.TiMips
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetTc() *TaskCoreEntry {
+ if x != nil {
+ return x.Tc
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetIds() *TaskKobjIdsEntry {
+ if x != nil {
+ return x.Ids
+ }
+ return nil
+}
+
+func (x *CoreEntry) GetThreadCore() *ThreadCoreEntry {
+ if x != nil {
+ return x.ThreadCore
+ }
+ return nil
+}
+
+var File_criu_core_proto protoreflect.FileDescriptor
+
+var file_criu_core_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x63, 0x72, 0x69, 0x75, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x0e, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x78, 0x38, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x0e, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x61, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x61, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x70, 0x70, 0x63, 0x36,
+ 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x73, 0x33,
+ 0x39, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x63, 0x6f, 0x72, 0x65, 0x2d, 0x6d,
+ 0x69, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x72, 0x6c, 0x69, 0x6d, 0x69,
+ 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x0d, 0x63, 0x72, 0x69, 0x75, 0x2d, 0x73, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0d, 0x73, 0x69, 0x67, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x72, 0x73, 0x65, 0x71, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x05, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b,
+ 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0a, 0x74,
+ 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x42,
+ 0x08, 0xd2, 0x3f, 0x05, 0x32, 0x03, 0x67, 0x65, 0x6e, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x53,
+ 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64,
+ 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64,
+ 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79,
+ 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c,
+ 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x0a, 0x62, 0x6c, 0x6b,
+ 0x5f, 0x73, 0x69, 0x67, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2,
+ 0x3f, 0x02, 0x08, 0x01, 0x52, 0x09, 0x62, 0x6c, 0x6b, 0x53, 0x69, 0x67, 0x73, 0x65, 0x74, 0x12,
+ 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6d, 0x6d, 0x18, 0x06, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x12, 0x2a, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72,
+ 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x12,
+ 0x2d, 0x0a, 0x07, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x13, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x15,
+ 0x0a, 0x06, 0x63, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05,
+ 0x63, 0x67, 0x53, 0x65, 0x74, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73,
+ 0x5f, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73,
+ 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x12, 0x37, 0x0a, 0x10, 0x6f, 0x6c, 0x64, 0x5f, 0x73,
+ 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x0d, 0x2e, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
+ 0x52, 0x0e, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65,
+ 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x6f, 0x6c,
+ 0x64, 0x53, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a,
+ 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x75, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x75, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x6f,
+ 0x6d, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x64, 0x6a, 0x18, 0x0e, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x0b, 0x6f, 0x6f, 0x6d, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x41, 0x64, 0x6a, 0x12, 0x29,
+ 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x73, 0x61, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x73,
+ 0x69, 0x67, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x68, 0x69,
+ 0x6c, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x72, 0x65, 0x61, 0x70, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x0e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x75, 0x62, 0x72, 0x65, 0x61, 0x70,
+ 0x65, 0x72, 0x12, 0x35, 0x0a, 0x13, 0x62, 0x6c, 0x6b, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x65, 0x74,
+ 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x42,
+ 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x11, 0x62, 0x6c, 0x6b, 0x53, 0x69, 0x67, 0x73, 0x65,
+ 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x74, 0x61,
+ 0x73, 0x6b, 0x5f, 0x6b, 0x6f, 0x62, 0x6a, 0x5f, 0x69, 0x64, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f,
+ 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x49,
+ 0x64, 0x12, 0x13, 0x0a, 0x05, 0x66, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x04, 0x66, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x68, 0x61, 0x6e,
+ 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x69, 0x67, 0x68,
+ 0x61, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x09, 0x70, 0x69, 0x64, 0x5f, 0x6e, 0x73, 0x5f,
+ 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x69, 0x64, 0x4e, 0x73, 0x49,
+ 0x64, 0x12, 0x1a, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x4e, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a,
+ 0x09, 0x69, 0x70, 0x63, 0x5f, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x07, 0x69, 0x70, 0x63, 0x4e, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x09, 0x75, 0x74, 0x73,
+ 0x5f, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x75, 0x74,
+ 0x73, 0x4e, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x09, 0x6d, 0x6e, 0x74, 0x5f, 0x6e, 0x73, 0x5f,
+ 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x6e, 0x74, 0x4e, 0x73, 0x49,
+ 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18,
+ 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x73, 0x49, 0x64, 0x12,
+ 0x20, 0x0a, 0x0c, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18,
+ 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x73, 0x49,
+ 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18,
+ 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x49, 0x64, 0x22,
+ 0x5b, 0x0a, 0x10, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x61, 0x73, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x73, 0x5f, 0x73, 0x70, 0x18, 0x01, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x04, 0x73, 0x73, 0x53, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x73, 0x5f, 0x73,
+ 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x73, 0x73, 0x53, 0x69, 0x7a,
+ 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x22, 0xb7, 0x04, 0x0a,
+ 0x11, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x72, 0x6c, 0x61, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x08, 0x66, 0x75, 0x74, 0x65, 0x78, 0x52, 0x6c, 0x61, 0x12,
+ 0x22, 0x0a, 0x0d, 0x66, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x72, 0x6c, 0x61, 0x5f, 0x6c, 0x65, 0x6e,
+ 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x66, 0x75, 0x74, 0x65, 0x78, 0x52, 0x6c, 0x61,
+ 0x4c, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x6e, 0x69, 0x63,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x64, 0x4e, 0x69,
+ 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x70,
+ 0x72, 0x69, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x64,
+ 0x50, 0x72, 0x69, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6b, 0x5f, 0x73, 0x69, 0x67, 0x73,
+ 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6b, 0x53, 0x69, 0x67,
+ 0x73, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x11, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x61, 0x73, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x03, 0x73, 0x61, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x64, 0x65, 0x61,
+ 0x74, 0x68, 0x5f, 0x73, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x64,
+ 0x65, 0x61, 0x74, 0x68, 0x53, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x73, 0x5f, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x69, 0x67,
+ 0x6e, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x50, 0x12, 0x22, 0x0a, 0x05, 0x63, 0x72, 0x65,
+ 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x72, 0x65, 0x64, 0x73,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, 0x72, 0x65, 0x64, 0x73, 0x12, 0x30, 0x0a,
+ 0x0c, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x6d, 0x6f,
+ 0x64, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x12,
+ 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65,
+ 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70,
+ 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6d, 0x6d, 0x18, 0x0d,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x6d, 0x6d, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x6c,
+ 0x6b, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65,
+ 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x62, 0x6c, 0x6b, 0x53, 0x69, 0x67, 0x73,
+ 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x0a, 0x72, 0x73,
+ 0x65, 0x71, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
+ 0x2e, 0x72, 0x73, 0x65, 0x71, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x73, 0x65,
+ 0x71, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x3d, 0x0a, 0x12, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72,
+ 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x07,
+ 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
+ 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x6c,
+ 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0xa3, 0x04, 0x0a, 0x0a, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x6d, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x2e, 0x6d, 0x61, 0x72, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x74, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a,
+ 0x0b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
+ 0x5f, 0x78, 0x38, 0x36, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x66, 0x6f,
+ 0x12, 0x27, 0x0a, 0x06, 0x74, 0x69, 0x5f, 0x61, 0x72, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x10, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x61,
+ 0x72, 0x6d, 0x52, 0x05, 0x74, 0x69, 0x41, 0x72, 0x6d, 0x12, 0x33, 0x0a, 0x0a, 0x74, 0x69, 0x5f,
+ 0x61, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x61, 0x61, 0x72, 0x63,
+ 0x68, 0x36, 0x34, 0x52, 0x09, 0x74, 0x69, 0x41, 0x61, 0x72, 0x63, 0x68, 0x36, 0x34, 0x12, 0x2d,
+ 0x0a, 0x08, 0x74, 0x69, 0x5f, 0x70, 0x70, 0x63, 0x36, 0x34, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x12, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x70,
+ 0x70, 0x63, 0x36, 0x34, 0x52, 0x07, 0x74, 0x69, 0x50, 0x70, 0x63, 0x36, 0x34, 0x12, 0x2a, 0x0a,
+ 0x07, 0x74, 0x69, 0x5f, 0x73, 0x33, 0x39, 0x30, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
+ 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x73, 0x33, 0x39,
+ 0x30, 0x52, 0x06, 0x74, 0x69, 0x53, 0x33, 0x39, 0x30, 0x12, 0x2a, 0x0a, 0x07, 0x74, 0x69, 0x5f,
+ 0x6d, 0x69, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x68, 0x72,
+ 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x6d, 0x69, 0x70, 0x73, 0x52, 0x06, 0x74,
+ 0x69, 0x4d, 0x69, 0x70, 0x73, 0x12, 0x20, 0x0a, 0x02, 0x74, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x02, 0x74, 0x63, 0x12, 0x26, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6b, 0x6f, 0x62, 0x6a,
+ 0x5f, 0x69, 0x64, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12,
+ 0x33, 0x0a, 0x0b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f,
+ 0x72, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64,
+ 0x43, 0x6f, 0x72, 0x65, 0x22, 0x55, 0x0a, 0x05, 0x6d, 0x61, 0x72, 0x63, 0x68, 0x12, 0x0b, 0x0a,
+ 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x58, 0x38,
+ 0x36, 0x5f, 0x36, 0x34, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x52, 0x4d, 0x10, 0x02, 0x12,
+ 0x0b, 0x0a, 0x07, 0x41, 0x41, 0x52, 0x43, 0x48, 0x36, 0x34, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05,
+ 0x50, 0x50, 0x43, 0x36, 0x34, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x33, 0x39, 0x30, 0x10,
+ 0x05, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x49, 0x50, 0x53, 0x10, 0x06, 0x2a, 0x34, 0x0a, 0x0c, 0x73,
+ 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x64,
+ 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x73, 0x74, 0x72,
+ 0x69, 0x63, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x10,
+ 0x02,
+}
+
+var (
+ file_criu_core_proto_rawDescOnce sync.Once
+ file_criu_core_proto_rawDescData = file_criu_core_proto_rawDesc
+)
+
+func file_criu_core_proto_rawDescGZIP() []byte {
+ file_criu_core_proto_rawDescOnce.Do(func() {
+ file_criu_core_proto_rawDescData = protoimpl.X.CompressGZIP(file_criu_core_proto_rawDescData)
+ })
+ return file_criu_core_proto_rawDescData
+}
+
+var file_criu_core_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_criu_core_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_criu_core_proto_goTypes = []interface{}{
+ (SeccompMode)(0), // 0: seccomp_mode
+ (CoreEntryMarch)(0), // 1: core_entry.march
+ (*TaskCoreEntry)(nil), // 2: task_core_entry
+ (*TaskKobjIdsEntry)(nil), // 3: task_kobj_ids_entry
+ (*ThreadSasEntry)(nil), // 4: thread_sas_entry
+ (*ThreadCoreEntry)(nil), // 5: thread_core_entry
+ (*TaskRlimitsEntry)(nil), // 6: task_rlimits_entry
+ (*CoreEntry)(nil), // 7: core_entry
+ (*TaskTimersEntry)(nil), // 8: task_timers_entry
+ (*SignalQueueEntry)(nil), // 9: signal_queue_entry
+ (*SaEntry)(nil), // 10: sa_entry
+ (*CredsEntry)(nil), // 11: creds_entry
+ (*RseqEntry)(nil), // 12: rseq_entry
+ (*RlimitEntry)(nil), // 13: rlimit_entry
+ (*ThreadInfoX86)(nil), // 14: thread_info_x86
+ (*ThreadInfoArm)(nil), // 15: thread_info_arm
+ (*ThreadInfoAarch64)(nil), // 16: thread_info_aarch64
+ (*ThreadInfoPpc64)(nil), // 17: thread_info_ppc64
+ (*ThreadInfoS390)(nil), // 18: thread_info_s390
+ (*ThreadInfoMips)(nil), // 19: thread_info_mips
+}
+var file_criu_core_proto_depIdxs = []int32{
+ 8, // 0: task_core_entry.timers:type_name -> task_timers_entry
+ 6, // 1: task_core_entry.rlimits:type_name -> task_rlimits_entry
+ 9, // 2: task_core_entry.signals_s:type_name -> signal_queue_entry
+ 0, // 3: task_core_entry.old_seccomp_mode:type_name -> seccomp_mode
+ 10, // 4: task_core_entry.sigactions:type_name -> sa_entry
+ 4, // 5: thread_core_entry.sas:type_name -> thread_sas_entry
+ 9, // 6: thread_core_entry.signals_p:type_name -> signal_queue_entry
+ 11, // 7: thread_core_entry.creds:type_name -> creds_entry
+ 0, // 8: thread_core_entry.seccomp_mode:type_name -> seccomp_mode
+ 12, // 9: thread_core_entry.rseq_entry:type_name -> rseq_entry
+ 13, // 10: task_rlimits_entry.rlimits:type_name -> rlimit_entry
+ 1, // 11: core_entry.mtype:type_name -> core_entry.march
+ 14, // 12: core_entry.thread_info:type_name -> thread_info_x86
+ 15, // 13: core_entry.ti_arm:type_name -> thread_info_arm
+ 16, // 14: core_entry.ti_aarch64:type_name -> thread_info_aarch64
+ 17, // 15: core_entry.ti_ppc64:type_name -> thread_info_ppc64
+ 18, // 16: core_entry.ti_s390:type_name -> thread_info_s390
+ 19, // 17: core_entry.ti_mips:type_name -> thread_info_mips
+ 2, // 18: core_entry.tc:type_name -> task_core_entry
+ 3, // 19: core_entry.ids:type_name -> task_kobj_ids_entry
+ 5, // 20: core_entry.thread_core:type_name -> thread_core_entry
+ 21, // [21:21] is the sub-list for method output_type
+ 21, // [21:21] is the sub-list for method input_type
+ 21, // [21:21] is the sub-list for extension type_name
+ 21, // [21:21] is the sub-list for extension extendee
+ 0, // [0:21] is the sub-list for field type_name
+}
+
+func init() { file_criu_core_proto_init() }
+func file_criu_core_proto_init() {
+ if File_criu_core_proto != nil {
+ return
+ }
+ file_core_x86_proto_init()
+ file_core_arm_proto_init()
+ file_core_aarch64_proto_init()
+ file_core_ppc64_proto_init()
+ file_core_s390_proto_init()
+ file_core_mips_proto_init()
+ file_rlimit_proto_init()
+ file_timer_proto_init()
+ file_creds_proto_init()
+ file_criu_sa_proto_init()
+ file_siginfo_proto_init()
+ file_rseq_proto_init()
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_criu_core_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TaskCoreEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_criu_core_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TaskKobjIdsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_criu_core_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadSasEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_criu_core_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ThreadCoreEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_criu_core_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TaskRlimitsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_criu_core_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CoreEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_criu_core_proto_rawDesc,
+ NumEnums: 2,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_criu_core_proto_goTypes,
+ DependencyIndexes: file_criu_core_proto_depIdxs,
+ EnumInfos: file_criu_core_proto_enumTypes,
+ MessageInfos: file_criu_core_proto_msgTypes,
+ }.Build()
+ File_criu_core_proto = out.File
+ file_criu_core_proto_rawDesc = nil
+ file_criu_core_proto_goTypes = nil
+ file_criu_core_proto_depIdxs = nil
+}
diff --git a/crit/images/criu-core.proto b/crit/images/criu-core.proto
new file mode 100644
index 0000000..8bf0d8a
--- /dev/null
+++ b/crit/images/criu-core.proto
@@ -0,0 +1,134 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "core-x86.proto";
+import "core-arm.proto";
+import "core-aarch64.proto";
+import "core-ppc64.proto";
+import "core-s390.proto";
+import "core-mips.proto";
+
+import "rlimit.proto";
+import "timer.proto";
+import "creds.proto";
+import "criu-sa.proto";
+import "siginfo.proto";
+import "rseq.proto";
+
+import "opts.proto";
+
+/*
+ * These match the SECCOMP_MODE_* flags from <linux/seccomp.h>.
+ */
+enum seccomp_mode {
+ disabled = 0;
+ strict = 1;
+ filter = 2;
+};
+
+message task_core_entry {
+ required uint32 task_state = 1 [(criu).dict = "gen"];
+ required uint32 exit_code = 2;
+
+ required uint32 personality = 3;
+ required uint32 flags = 4;
+ required uint64 blk_sigset = 5[(criu).hex = true];
+
+ required string comm = 6;
+
+ optional task_timers_entry timers = 7;
+ optional task_rlimits_entry rlimits = 8;
+
+ optional uint32 cg_set = 9;
+
+ optional signal_queue_entry signals_s = 10;
+
+ /* These two are deprecated, should be per-thread */
+ optional seccomp_mode old_seccomp_mode = 11;
+ optional uint32 old_seccomp_filter = 12;
+
+ optional uint32 loginuid = 13;
+
+ optional int32 oom_score_adj = 14;
+ repeated sa_entry sigactions = 15;
+ // Reserved for tty inheritance
+ //optional int32 tty_nr = 16;
+ //optional int32 tty_pgrp = 17;
+
+ optional bool child_subreaper = 18;
+ // Reserved for container relative start time
+ //optional uint64 start_time = 19;
+ optional uint64 blk_sigset_extended = 20[(criu).hex = true];
+}
+
+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;
+
+ 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;
+ optional uint32 user_ns_id = 10;
+ optional uint32 cgroup_ns_id = 11;
+ optional uint32 time_ns_id = 12;
+}
+
+message thread_sas_entry {
+ required uint64 ss_sp = 1;
+ required uint64 ss_size = 2;
+ required uint32 ss_flags = 3;
+}
+
+message thread_core_entry {
+ required uint64 futex_rla = 1;
+ required uint32 futex_rla_len = 2;
+ optional sint32 sched_nice = 3;
+ optional uint32 sched_policy = 4;
+ optional uint32 sched_prio = 5;
+ optional uint64 blk_sigset = 6;
+ optional thread_sas_entry sas = 7;
+ optional uint32 pdeath_sig = 8;
+
+ optional signal_queue_entry signals_p = 9;
+ optional creds_entry creds = 10;
+
+ optional seccomp_mode seccomp_mode = 11;
+ optional uint32 seccomp_filter = 12;
+
+ optional string comm = 13;
+ optional uint64 blk_sigset_extended = 14;
+ optional rseq_entry rseq_entry = 15;
+}
+
+message task_rlimits_entry {
+ repeated rlimit_entry rlimits = 1;
+};
+
+message core_entry {
+ enum march {
+ UNKNOWN = 0;
+ X86_64 = 1;
+ ARM = 2;
+ AARCH64 = 3;
+ PPC64 = 4;
+ S390 = 5;
+ MIPS = 6;
+ }
+
+ required march mtype = 1;
+ optional thread_info_x86 thread_info = 2;
+ optional thread_info_arm ti_arm = 6;
+ optional thread_info_aarch64 ti_aarch64 = 8;
+ optional thread_info_ppc64 ti_ppc64 = 9;
+ optional thread_info_s390 ti_s390 = 10;
+ optional thread_info_mips ti_mips = 11;
+
+ optional task_core_entry tc = 3;
+ optional task_kobj_ids_entry ids = 4;
+ optional thread_core_entry thread_core = 5;
+}
diff --git a/crit/images/criu-sa.pb.go b/crit/images/criu-sa.pb.go
new file mode 100644
index 0000000..126ec67
--- /dev/null
+++ b/crit/images/criu-sa.pb.go
@@ -0,0 +1,195 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: criu-sa.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SaEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Sigaction *uint64 `protobuf:"varint,1,req,name=sigaction" json:"sigaction,omitempty"`
+ Flags *uint64 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Restorer *uint64 `protobuf:"varint,3,req,name=restorer" json:"restorer,omitempty"`
+ Mask *uint64 `protobuf:"varint,4,req,name=mask" json:"mask,omitempty"`
+ CompatSigaction *bool `protobuf:"varint,5,opt,name=compat_sigaction,json=compatSigaction" json:"compat_sigaction,omitempty"`
+ MaskExtended *uint64 `protobuf:"varint,6,opt,name=mask_extended,json=maskExtended" json:"mask_extended,omitempty"`
+}
+
+func (x *SaEntry) Reset() {
+ *x = SaEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_criu_sa_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SaEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SaEntry) ProtoMessage() {}
+
+func (x *SaEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_criu_sa_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SaEntry.ProtoReflect.Descriptor instead.
+func (*SaEntry) Descriptor() ([]byte, []int) {
+ return file_criu_sa_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SaEntry) GetSigaction() uint64 {
+ if x != nil && x.Sigaction != nil {
+ return *x.Sigaction
+ }
+ return 0
+}
+
+func (x *SaEntry) GetFlags() uint64 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *SaEntry) GetRestorer() uint64 {
+ if x != nil && x.Restorer != nil {
+ return *x.Restorer
+ }
+ return 0
+}
+
+func (x *SaEntry) GetMask() uint64 {
+ if x != nil && x.Mask != nil {
+ return *x.Mask
+ }
+ return 0
+}
+
+func (x *SaEntry) GetCompatSigaction() bool {
+ if x != nil && x.CompatSigaction != nil {
+ return *x.CompatSigaction
+ }
+ return false
+}
+
+func (x *SaEntry) GetMaskExtended() uint64 {
+ if x != nil && x.MaskExtended != nil {
+ return *x.MaskExtended
+ }
+ return 0
+}
+
+var File_criu_sa_proto protoreflect.FileDescriptor
+
+var file_criu_sa_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x63, 0x72, 0x69, 0x75, 0x2d, 0x73, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x01, 0x0a, 0x08,
+ 0x73, 0x61, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02,
+ 0x08, 0x01, 0x52, 0x09, 0x73, 0x69, 0x67, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a,
+ 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f,
+ 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x21, 0x0a, 0x08, 0x72, 0x65,
+ 0x73, 0x74, 0x6f, 0x72, 0x65, 0x72, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f,
+ 0x02, 0x08, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x19, 0x0a,
+ 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02,
+ 0x08, 0x01, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70,
+ 0x61, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x53, 0x69, 0x67, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x0d, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x64, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08,
+ 0x01, 0x52, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64,
+}
+
+var (
+ file_criu_sa_proto_rawDescOnce sync.Once
+ file_criu_sa_proto_rawDescData = file_criu_sa_proto_rawDesc
+)
+
+func file_criu_sa_proto_rawDescGZIP() []byte {
+ file_criu_sa_proto_rawDescOnce.Do(func() {
+ file_criu_sa_proto_rawDescData = protoimpl.X.CompressGZIP(file_criu_sa_proto_rawDescData)
+ })
+ return file_criu_sa_proto_rawDescData
+}
+
+var file_criu_sa_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_criu_sa_proto_goTypes = []interface{}{
+ (*SaEntry)(nil), // 0: sa_entry
+}
+var file_criu_sa_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_criu_sa_proto_init() }
+func file_criu_sa_proto_init() {
+ if File_criu_sa_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_criu_sa_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SaEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_criu_sa_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_criu_sa_proto_goTypes,
+ DependencyIndexes: file_criu_sa_proto_depIdxs,
+ MessageInfos: file_criu_sa_proto_msgTypes,
+ }.Build()
+ File_criu_sa_proto = out.File
+ file_criu_sa_proto_rawDesc = nil
+ file_criu_sa_proto_goTypes = nil
+ file_criu_sa_proto_depIdxs = nil
+}
diff --git a/crit/images/criu-sa.proto b/crit/images/criu-sa.proto
new file mode 100644
index 0000000..07f71c3
--- /dev/null
+++ b/crit/images/criu-sa.proto
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message sa_entry {
+ required uint64 sigaction = 1 [(criu).hex = true];
+ required uint64 flags = 2 [(criu).hex = true];
+ required uint64 restorer = 3 [(criu).hex = true];
+ required uint64 mask = 4 [(criu).hex = true];
+ optional bool compat_sigaction = 5;
+ optional uint64 mask_extended = 6 [(criu).hex = true];
+}
diff --git a/crit/images/eventfd.pb.go b/crit/images/eventfd.pb.go
new file mode 100644
index 0000000..59b5cad
--- /dev/null
+++ b/crit/images/eventfd.pb.go
@@ -0,0 +1,175 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: eventfd.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type EventfdFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,3,req,name=fown" json:"fown,omitempty"`
+ Counter *uint64 `protobuf:"varint,4,req,name=counter" json:"counter,omitempty"`
+}
+
+func (x *EventfdFileEntry) Reset() {
+ *x = EventfdFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_eventfd_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *EventfdFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EventfdFileEntry) ProtoMessage() {}
+
+func (x *EventfdFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_eventfd_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use EventfdFileEntry.ProtoReflect.Descriptor instead.
+func (*EventfdFileEntry) Descriptor() ([]byte, []int) {
+ return file_eventfd_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *EventfdFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *EventfdFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *EventfdFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *EventfdFileEntry) GetCounter() uint64 {
+ if x != nil && x.Counter != nil {
+ return *x.Counter
+ }
+ return 0
+}
+
+var File_eventfd_proto protoreflect.FileDescriptor
+
+var file_eventfd_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x66, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x75, 0x0a, 0x12, 0x65,
+ 0x76, 0x65, 0x6e, 0x74, 0x66, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18,
+ 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x65, 0x72,
+}
+
+var (
+ file_eventfd_proto_rawDescOnce sync.Once
+ file_eventfd_proto_rawDescData = file_eventfd_proto_rawDesc
+)
+
+func file_eventfd_proto_rawDescGZIP() []byte {
+ file_eventfd_proto_rawDescOnce.Do(func() {
+ file_eventfd_proto_rawDescData = protoimpl.X.CompressGZIP(file_eventfd_proto_rawDescData)
+ })
+ return file_eventfd_proto_rawDescData
+}
+
+var file_eventfd_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_eventfd_proto_goTypes = []interface{}{
+ (*EventfdFileEntry)(nil), // 0: eventfd_file_entry
+ (*FownEntry)(nil), // 1: fown_entry
+}
+var file_eventfd_proto_depIdxs = []int32{
+ 1, // 0: eventfd_file_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_eventfd_proto_init() }
+func file_eventfd_proto_init() {
+ if File_eventfd_proto != nil {
+ return
+ }
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_eventfd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EventfdFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_eventfd_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_eventfd_proto_goTypes,
+ DependencyIndexes: file_eventfd_proto_depIdxs,
+ MessageInfos: file_eventfd_proto_msgTypes,
+ }.Build()
+ File_eventfd_proto = out.File
+ file_eventfd_proto_rawDesc = nil
+ file_eventfd_proto_goTypes = nil
+ file_eventfd_proto_depIdxs = nil
+}
diff --git a/crit/images/eventfd.proto b/crit/images/eventfd.proto
new file mode 100644
index 0000000..225462f
--- /dev/null
+++ b/crit/images/eventfd.proto
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "fown.proto";
+
+message eventfd_file_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2;
+ required fown_entry fown = 3;
+ required uint64 counter = 4;
+}
diff --git a/crit/images/eventpoll.pb.go b/crit/images/eventpoll.pb.go
new file mode 100644
index 0000000..01b9676
--- /dev/null
+++ b/crit/images/eventpoll.pb.go
@@ -0,0 +1,296 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: eventpoll.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type EventpollTfdEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Tfd *uint32 `protobuf:"varint,2,req,name=tfd" json:"tfd,omitempty"`
+ Events *uint32 `protobuf:"varint,3,req,name=events" json:"events,omitempty"`
+ Data *uint64 `protobuf:"varint,4,req,name=data" json:"data,omitempty"`
+ // to find dup'ed target files
+ Dev *uint32 `protobuf:"varint,5,opt,name=dev" json:"dev,omitempty"`
+ Inode *uint64 `protobuf:"varint,6,opt,name=inode" json:"inode,omitempty"`
+ Pos *uint64 `protobuf:"varint,7,opt,name=pos" json:"pos,omitempty"`
+}
+
+func (x *EventpollTfdEntry) Reset() {
+ *x = EventpollTfdEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_eventpoll_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *EventpollTfdEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EventpollTfdEntry) ProtoMessage() {}
+
+func (x *EventpollTfdEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_eventpoll_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use EventpollTfdEntry.ProtoReflect.Descriptor instead.
+func (*EventpollTfdEntry) Descriptor() ([]byte, []int) {
+ return file_eventpoll_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *EventpollTfdEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *EventpollTfdEntry) GetTfd() uint32 {
+ if x != nil && x.Tfd != nil {
+ return *x.Tfd
+ }
+ return 0
+}
+
+func (x *EventpollTfdEntry) GetEvents() uint32 {
+ if x != nil && x.Events != nil {
+ return *x.Events
+ }
+ return 0
+}
+
+func (x *EventpollTfdEntry) GetData() uint64 {
+ if x != nil && x.Data != nil {
+ return *x.Data
+ }
+ return 0
+}
+
+func (x *EventpollTfdEntry) GetDev() uint32 {
+ if x != nil && x.Dev != nil {
+ return *x.Dev
+ }
+ return 0
+}
+
+func (x *EventpollTfdEntry) GetInode() uint64 {
+ if x != nil && x.Inode != nil {
+ return *x.Inode
+ }
+ return 0
+}
+
+func (x *EventpollTfdEntry) GetPos() uint64 {
+ if x != nil && x.Pos != nil {
+ return *x.Pos
+ }
+ return 0
+}
+
+type EventpollFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,3,req,name=fown" json:"fown,omitempty"`
+ Tfd []*EventpollTfdEntry `protobuf:"bytes,4,rep,name=tfd" json:"tfd,omitempty"`
+}
+
+func (x *EventpollFileEntry) Reset() {
+ *x = EventpollFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_eventpoll_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *EventpollFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EventpollFileEntry) ProtoMessage() {}
+
+func (x *EventpollFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_eventpoll_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use EventpollFileEntry.ProtoReflect.Descriptor instead.
+func (*EventpollFileEntry) Descriptor() ([]byte, []int) {
+ return file_eventpoll_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *EventpollFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *EventpollFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *EventpollFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *EventpollFileEntry) GetTfd() []*EventpollTfdEntry {
+ if x != nil {
+ return x.Tfd
+ }
+ return nil
+}
+
+var File_eventpoll_proto protoreflect.FileDescriptor
+
+var file_eventpoll_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x6f, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01,
+ 0x0a, 0x13, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x66, 0x64, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x66, 0x64, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x03, 0x74, 0x66, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74,
+ 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12,
+ 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x64,
+ 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x03, 0x64, 0x65, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70,
+ 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x22, 0x85, 0x01,
+ 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18,
+ 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x04,
+ 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77,
+ 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x26, 0x0a,
+ 0x03, 0x74, 0x66, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x76, 0x65,
+ 0x6e, 0x74, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x66, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x03, 0x74, 0x66, 0x64,
+}
+
+var (
+ file_eventpoll_proto_rawDescOnce sync.Once
+ file_eventpoll_proto_rawDescData = file_eventpoll_proto_rawDesc
+)
+
+func file_eventpoll_proto_rawDescGZIP() []byte {
+ file_eventpoll_proto_rawDescOnce.Do(func() {
+ file_eventpoll_proto_rawDescData = protoimpl.X.CompressGZIP(file_eventpoll_proto_rawDescData)
+ })
+ return file_eventpoll_proto_rawDescData
+}
+
+var file_eventpoll_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_eventpoll_proto_goTypes = []interface{}{
+ (*EventpollTfdEntry)(nil), // 0: eventpoll_tfd_entry
+ (*EventpollFileEntry)(nil), // 1: eventpoll_file_entry
+ (*FownEntry)(nil), // 2: fown_entry
+}
+var file_eventpoll_proto_depIdxs = []int32{
+ 2, // 0: eventpoll_file_entry.fown:type_name -> fown_entry
+ 0, // 1: eventpoll_file_entry.tfd:type_name -> eventpoll_tfd_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_eventpoll_proto_init() }
+func file_eventpoll_proto_init() {
+ if File_eventpoll_proto != nil {
+ return
+ }
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_eventpoll_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EventpollTfdEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_eventpoll_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EventpollFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_eventpoll_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_eventpoll_proto_goTypes,
+ DependencyIndexes: file_eventpoll_proto_depIdxs,
+ MessageInfos: file_eventpoll_proto_msgTypes,
+ }.Build()
+ File_eventpoll_proto = out.File
+ file_eventpoll_proto_rawDesc = nil
+ file_eventpoll_proto_goTypes = nil
+ file_eventpoll_proto_depIdxs = nil
+}
diff --git a/crit/images/eventpoll.proto b/crit/images/eventpoll.proto
new file mode 100644
index 0000000..0f3e8a8
--- /dev/null
+++ b/crit/images/eventpoll.proto
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "fown.proto";
+
+message eventpoll_tfd_entry {
+ required uint32 id = 1;
+ required uint32 tfd = 2;
+ required uint32 events = 3;
+ required uint64 data = 4;
+
+ /* to find dup'ed target files */
+ optional uint32 dev = 5;
+ optional uint64 inode = 6;
+ optional uint64 pos = 7;
+}
+
+message eventpoll_file_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2;
+ required fown_entry fown = 3;
+ repeated eventpoll_tfd_entry tfd = 4;
+}
diff --git a/crit/images/ext-file.pb.go b/crit/images/ext-file.pb.go
new file mode 100644
index 0000000..714a0ea
--- /dev/null
+++ b/crit/images/ext-file.pb.go
@@ -0,0 +1,155 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ext-file.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ExtFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,5,req,name=fown" json:"fown,omitempty"`
+}
+
+func (x *ExtFileEntry) Reset() {
+ *x = ExtFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ext_file_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExtFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtFileEntry) ProtoMessage() {}
+
+func (x *ExtFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ext_file_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExtFileEntry.ProtoReflect.Descriptor instead.
+func (*ExtFileEntry) Descriptor() ([]byte, []int) {
+ return file_ext_file_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ExtFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *ExtFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+var File_ext_file_proto protoreflect.FileDescriptor
+
+var file_ext_file_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x0e,
+ 0x65, 0x78, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f,
+ 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66,
+ 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e,
+}
+
+var (
+ file_ext_file_proto_rawDescOnce sync.Once
+ file_ext_file_proto_rawDescData = file_ext_file_proto_rawDesc
+)
+
+func file_ext_file_proto_rawDescGZIP() []byte {
+ file_ext_file_proto_rawDescOnce.Do(func() {
+ file_ext_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_ext_file_proto_rawDescData)
+ })
+ return file_ext_file_proto_rawDescData
+}
+
+var file_ext_file_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_ext_file_proto_goTypes = []interface{}{
+ (*ExtFileEntry)(nil), // 0: ext_file_entry
+ (*FownEntry)(nil), // 1: fown_entry
+}
+var file_ext_file_proto_depIdxs = []int32{
+ 1, // 0: ext_file_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_ext_file_proto_init() }
+func file_ext_file_proto_init() {
+ if File_ext_file_proto != nil {
+ return
+ }
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_ext_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExtFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ext_file_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ext_file_proto_goTypes,
+ DependencyIndexes: file_ext_file_proto_depIdxs,
+ MessageInfos: file_ext_file_proto_msgTypes,
+ }.Build()
+ File_ext_file_proto = out.File
+ file_ext_file_proto_rawDesc = nil
+ file_ext_file_proto_goTypes = nil
+ file_ext_file_proto_depIdxs = nil
+}
diff --git a/crit/images/ext-file.proto b/crit/images/ext-file.proto
new file mode 100644
index 0000000..8b4f825
--- /dev/null
+++ b/crit/images/ext-file.proto
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "fown.proto";
+
+message ext_file_entry {
+ required uint32 id = 1;
+ required fown_entry fown = 5;
+}
diff --git a/crit/images/fdinfo.pb.go b/crit/images/fdinfo.pb.go
new file mode 100644
index 0000000..80abb2c
--- /dev/null
+++ b/crit/images/fdinfo.pb.go
@@ -0,0 +1,661 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: fdinfo.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FdTypes int32
+
+const (
+ FdTypes_UND FdTypes = 0
+ FdTypes_REG FdTypes = 1
+ FdTypes_PIPE FdTypes = 2
+ FdTypes_FIFO FdTypes = 3
+ FdTypes_INETSK FdTypes = 4
+ FdTypes_UNIXSK FdTypes = 5
+ FdTypes_EVENTFD FdTypes = 6
+ FdTypes_EVENTPOLL FdTypes = 7
+ FdTypes_INOTIFY FdTypes = 8
+ FdTypes_SIGNALFD FdTypes = 9
+ FdTypes_PACKETSK FdTypes = 10
+ FdTypes_TTY FdTypes = 11
+ FdTypes_FANOTIFY FdTypes = 12
+ FdTypes_NETLINKSK FdTypes = 13
+ FdTypes_NS FdTypes = 14
+ FdTypes_TUNF FdTypes = 15
+ FdTypes_EXT FdTypes = 16
+ FdTypes_TIMERFD FdTypes = 17
+ FdTypes_MEMFD FdTypes = 18
+ FdTypes_BPFMAP FdTypes = 19
+ // Any number above the real used. Not stored to image
+ FdTypes_CTL_TTY FdTypes = 65534
+ FdTypes_AUTOFS_PIPE FdTypes = 65535
+)
+
+// Enum value maps for FdTypes.
+var (
+ FdTypes_name = map[int32]string{
+ 0: "UND",
+ 1: "REG",
+ 2: "PIPE",
+ 3: "FIFO",
+ 4: "INETSK",
+ 5: "UNIXSK",
+ 6: "EVENTFD",
+ 7: "EVENTPOLL",
+ 8: "INOTIFY",
+ 9: "SIGNALFD",
+ 10: "PACKETSK",
+ 11: "TTY",
+ 12: "FANOTIFY",
+ 13: "NETLINKSK",
+ 14: "NS",
+ 15: "TUNF",
+ 16: "EXT",
+ 17: "TIMERFD",
+ 18: "MEMFD",
+ 19: "BPFMAP",
+ 65534: "CTL_TTY",
+ 65535: "AUTOFS_PIPE",
+ }
+ FdTypes_value = map[string]int32{
+ "UND": 0,
+ "REG": 1,
+ "PIPE": 2,
+ "FIFO": 3,
+ "INETSK": 4,
+ "UNIXSK": 5,
+ "EVENTFD": 6,
+ "EVENTPOLL": 7,
+ "INOTIFY": 8,
+ "SIGNALFD": 9,
+ "PACKETSK": 10,
+ "TTY": 11,
+ "FANOTIFY": 12,
+ "NETLINKSK": 13,
+ "NS": 14,
+ "TUNF": 15,
+ "EXT": 16,
+ "TIMERFD": 17,
+ "MEMFD": 18,
+ "BPFMAP": 19,
+ "CTL_TTY": 65534,
+ "AUTOFS_PIPE": 65535,
+ }
+)
+
+func (x FdTypes) Enum() *FdTypes {
+ p := new(FdTypes)
+ *p = x
+ return p
+}
+
+func (x FdTypes) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FdTypes) Descriptor() protoreflect.EnumDescriptor {
+ return file_fdinfo_proto_enumTypes[0].Descriptor()
+}
+
+func (FdTypes) Type() protoreflect.EnumType {
+ return &file_fdinfo_proto_enumTypes[0]
+}
+
+func (x FdTypes) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FdTypes) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FdTypes(num)
+ return nil
+}
+
+// Deprecated: Use FdTypes.Descriptor instead.
+func (FdTypes) EnumDescriptor() ([]byte, []int) {
+ return file_fdinfo_proto_rawDescGZIP(), []int{0}
+}
+
+type FdinfoEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Type *FdTypes `protobuf:"varint,3,req,name=type,enum=FdTypes" json:"type,omitempty"`
+ Fd *uint32 `protobuf:"varint,4,req,name=fd" json:"fd,omitempty"`
+ XattrSecuritySelinux *string `protobuf:"bytes,5,opt,name=xattr_security_selinux,json=xattrSecuritySelinux" json:"xattr_security_selinux,omitempty"`
+}
+
+func (x *FdinfoEntry) Reset() {
+ *x = FdinfoEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fdinfo_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FdinfoEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FdinfoEntry) ProtoMessage() {}
+
+func (x *FdinfoEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fdinfo_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FdinfoEntry.ProtoReflect.Descriptor instead.
+func (*FdinfoEntry) Descriptor() ([]byte, []int) {
+ return file_fdinfo_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FdinfoEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *FdinfoEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *FdinfoEntry) GetType() FdTypes {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return FdTypes_UND
+}
+
+func (x *FdinfoEntry) GetFd() uint32 {
+ if x != nil && x.Fd != nil {
+ return *x.Fd
+ }
+ return 0
+}
+
+func (x *FdinfoEntry) GetXattrSecuritySelinux() string {
+ if x != nil && x.XattrSecuritySelinux != nil {
+ return *x.XattrSecuritySelinux
+ }
+ return ""
+}
+
+type FileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Type *FdTypes `protobuf:"varint,1,req,name=type,enum=FdTypes" json:"type,omitempty"`
+ Id *uint32 `protobuf:"varint,2,req,name=id" json:"id,omitempty"`
+ Reg *RegFileEntry `protobuf:"bytes,3,opt,name=reg" json:"reg,omitempty"`
+ Isk *InetSkEntry `protobuf:"bytes,4,opt,name=isk" json:"isk,omitempty"`
+ Nsf *NsFileEntry `protobuf:"bytes,5,opt,name=nsf" json:"nsf,omitempty"`
+ Psk *PacketSockEntry `protobuf:"bytes,6,opt,name=psk" json:"psk,omitempty"`
+ Nlsk *NetlinkSkEntry `protobuf:"bytes,7,opt,name=nlsk" json:"nlsk,omitempty"`
+ Efd *EventfdFileEntry `protobuf:"bytes,8,opt,name=efd" json:"efd,omitempty"`
+ Epfd *EventpollFileEntry `protobuf:"bytes,9,opt,name=epfd" json:"epfd,omitempty"`
+ Sgfd *SignalfdEntry `protobuf:"bytes,10,opt,name=sgfd" json:"sgfd,omitempty"`
+ Tunf *TunfileEntry `protobuf:"bytes,11,opt,name=tunf" json:"tunf,omitempty"`
+ Tfd *TimerfdEntry `protobuf:"bytes,12,opt,name=tfd" json:"tfd,omitempty"`
+ Ify *InotifyFileEntry `protobuf:"bytes,13,opt,name=ify" json:"ify,omitempty"`
+ Ffy *FanotifyFileEntry `protobuf:"bytes,14,opt,name=ffy" json:"ffy,omitempty"`
+ Ext *ExtFileEntry `protobuf:"bytes,15,opt,name=ext" json:"ext,omitempty"`
+ Usk *UnixSkEntry `protobuf:"bytes,16,opt,name=usk" json:"usk,omitempty"`
+ Fifo *FifoEntry `protobuf:"bytes,17,opt,name=fifo" json:"fifo,omitempty"`
+ Pipe *PipeEntry `protobuf:"bytes,18,opt,name=pipe" json:"pipe,omitempty"`
+ Tty *TtyFileEntry `protobuf:"bytes,19,opt,name=tty" json:"tty,omitempty"`
+ Memfd *MemfdFileEntry `protobuf:"bytes,20,opt,name=memfd" json:"memfd,omitempty"`
+ Bpf *BpfmapFileEntry `protobuf:"bytes,21,opt,name=bpf" json:"bpf,omitempty"`
+}
+
+func (x *FileEntry) Reset() {
+ *x = FileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fdinfo_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileEntry) ProtoMessage() {}
+
+func (x *FileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fdinfo_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FileEntry.ProtoReflect.Descriptor instead.
+func (*FileEntry) Descriptor() ([]byte, []int) {
+ return file_fdinfo_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *FileEntry) GetType() FdTypes {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return FdTypes_UND
+}
+
+func (x *FileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *FileEntry) GetReg() *RegFileEntry {
+ if x != nil {
+ return x.Reg
+ }
+ return nil
+}
+
+func (x *FileEntry) GetIsk() *InetSkEntry {
+ if x != nil {
+ return x.Isk
+ }
+ return nil
+}
+
+func (x *FileEntry) GetNsf() *NsFileEntry {
+ if x != nil {
+ return x.Nsf
+ }
+ return nil
+}
+
+func (x *FileEntry) GetPsk() *PacketSockEntry {
+ if x != nil {
+ return x.Psk
+ }
+ return nil
+}
+
+func (x *FileEntry) GetNlsk() *NetlinkSkEntry {
+ if x != nil {
+ return x.Nlsk
+ }
+ return nil
+}
+
+func (x *FileEntry) GetEfd() *EventfdFileEntry {
+ if x != nil {
+ return x.Efd
+ }
+ return nil
+}
+
+func (x *FileEntry) GetEpfd() *EventpollFileEntry {
+ if x != nil {
+ return x.Epfd
+ }
+ return nil
+}
+
+func (x *FileEntry) GetSgfd() *SignalfdEntry {
+ if x != nil {
+ return x.Sgfd
+ }
+ return nil
+}
+
+func (x *FileEntry) GetTunf() *TunfileEntry {
+ if x != nil {
+ return x.Tunf
+ }
+ return nil
+}
+
+func (x *FileEntry) GetTfd() *TimerfdEntry {
+ if x != nil {
+ return x.Tfd
+ }
+ return nil
+}
+
+func (x *FileEntry) GetIfy() *InotifyFileEntry {
+ if x != nil {
+ return x.Ify
+ }
+ return nil
+}
+
+func (x *FileEntry) GetFfy() *FanotifyFileEntry {
+ if x != nil {
+ return x.Ffy
+ }
+ return nil
+}
+
+func (x *FileEntry) GetExt() *ExtFileEntry {
+ if x != nil {
+ return x.Ext
+ }
+ return nil
+}
+
+func (x *FileEntry) GetUsk() *UnixSkEntry {
+ if x != nil {
+ return x.Usk
+ }
+ return nil
+}
+
+func (x *FileEntry) GetFifo() *FifoEntry {
+ if x != nil {
+ return x.Fifo
+ }
+ return nil
+}
+
+func (x *FileEntry) GetPipe() *PipeEntry {
+ if x != nil {
+ return x.Pipe
+ }
+ return nil
+}
+
+func (x *FileEntry) GetTty() *TtyFileEntry {
+ if x != nil {
+ return x.Tty
+ }
+ return nil
+}
+
+func (x *FileEntry) GetMemfd() *MemfdFileEntry {
+ if x != nil {
+ return x.Memfd
+ }
+ return nil
+}
+
+func (x *FileEntry) GetBpf() *BpfmapFileEntry {
+ if x != nil {
+ return x.Bpf
+ }
+ return nil
+}
+
+var File_fdinfo_proto protoreflect.FileDescriptor
+
+var file_fdinfo_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x66, 0x64, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
+ 0x72, 0x65, 0x67, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73,
+ 0x6b, 0x2d, 0x69, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x08, 0x6e, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x73,
+ 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x73, 0x6b, 0x2d, 0x6e, 0x65,
+ 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x65, 0x76, 0x65,
+ 0x6e, 0x74, 0x66, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x65, 0x76, 0x65, 0x6e,
+ 0x74, 0x70, 0x6f, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x73, 0x69, 0x67,
+ 0x6e, 0x61, 0x6c, 0x66, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x74, 0x75, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x66, 0x64, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x66, 0x73, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x65, 0x78, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x6b, 0x2d, 0x75, 0x6e, 0x69, 0x78, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x69, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x74, 0x74,
+ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6d, 0x65, 0x6d, 0x66, 0x64, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x62, 0x70, 0x66, 0x6d, 0x61, 0x70, 0x2d, 0x66, 0x69, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x0c, 0x66, 0x64, 0x69, 0x6e,
+ 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67,
+ 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1d,
+ 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x66,
+ 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a,
+ 0x02, 0x66, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x66, 0x64, 0x12, 0x34, 0x0a,
+ 0x16, 0x78, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f,
+ 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x78,
+ 0x61, 0x74, 0x74, 0x72, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x69,
+ 0x6e, 0x75, 0x78, 0x22, 0xf4, 0x05, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e,
+ 0x32, 0x09, 0x2e, 0x66, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x21, 0x0a, 0x03, 0x72, 0x65, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
+ 0x2e, 0x72, 0x65, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x03, 0x72, 0x65, 0x67, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x0e, 0x2e, 0x69, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x03, 0x69, 0x73, 0x6b, 0x12, 0x20, 0x0a, 0x03, 0x6e, 0x73, 0x66, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x03, 0x6e, 0x73, 0x66, 0x12, 0x24, 0x0a, 0x03, 0x70, 0x73, 0x6b, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73,
+ 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x70, 0x73, 0x6b, 0x12, 0x25,
+ 0x0a, 0x04, 0x6e, 0x6c, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e,
+ 0x65, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x04, 0x6e, 0x6c, 0x73, 0x6b, 0x12, 0x25, 0x0a, 0x03, 0x65, 0x66, 0x64, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x66, 0x64, 0x5f, 0x66, 0x69, 0x6c,
+ 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x66, 0x64, 0x12, 0x29, 0x0a, 0x04,
+ 0x65, 0x70, 0x66, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x76, 0x65,
+ 0x6e, 0x74, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x04, 0x65, 0x70, 0x66, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x73, 0x67, 0x66, 0x64, 0x18,
+ 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x66, 0x64,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x73, 0x67, 0x66, 0x64, 0x12, 0x22, 0x0a, 0x04,
+ 0x74, 0x75, 0x6e, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x75, 0x6e,
+ 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x75, 0x6e, 0x66,
+ 0x12, 0x20, 0x0a, 0x03, 0x74, 0x66, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
+ 0x74, 0x69, 0x6d, 0x65, 0x72, 0x66, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x74,
+ 0x66, 0x64, 0x12, 0x25, 0x0a, 0x03, 0x69, 0x66, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x13, 0x2e, 0x69, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x69, 0x66, 0x79, 0x12, 0x26, 0x0a, 0x03, 0x66, 0x66, 0x79,
+ 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x61, 0x6e, 0x6f, 0x74, 0x69, 0x66,
+ 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x66, 0x66,
+ 0x79, 0x12, 0x21, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
+ 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x03, 0x65, 0x78, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x75, 0x73, 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x0e, 0x2e, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x03, 0x75, 0x73, 0x6b, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x69, 0x66, 0x6f, 0x18, 0x11,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x69, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x04, 0x66, 0x69, 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x69, 0x70, 0x65, 0x18,
+ 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x04, 0x70, 0x69, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x74, 0x74, 0x79, 0x18,
+ 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x74, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x74, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x6d,
+ 0x65, 0x6d, 0x66, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d,
+ 0x66, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6d,
+ 0x65, 0x6d, 0x66, 0x64, 0x12, 0x24, 0x0a, 0x03, 0x62, 0x70, 0x66, 0x18, 0x15, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x70, 0x66, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x62, 0x70, 0x66, 0x2a, 0x94, 0x02, 0x0a, 0x08, 0x66,
+ 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x4e, 0x44, 0x10, 0x00,
+ 0x12, 0x07, 0x0a, 0x03, 0x52, 0x45, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x49, 0x50,
+ 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x46, 0x4f, 0x10, 0x03, 0x12, 0x0a, 0x0a,
+ 0x06, 0x49, 0x4e, 0x45, 0x54, 0x53, 0x4b, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x49,
+ 0x58, 0x53, 0x4b, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x46, 0x44,
+ 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x50, 0x4f, 0x4c, 0x4c, 0x10,
+ 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x10, 0x08, 0x12, 0x0c,
+ 0x0a, 0x08, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x46, 0x44, 0x10, 0x09, 0x12, 0x0c, 0x0a, 0x08,
+ 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x53, 0x4b, 0x10, 0x0a, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x54,
+ 0x59, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x41, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x10,
+ 0x0c, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x45, 0x54, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x4b, 0x10, 0x0d,
+ 0x12, 0x06, 0x0a, 0x02, 0x4e, 0x53, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x55, 0x4e, 0x46,
+ 0x10, 0x0f, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x58, 0x54, 0x10, 0x10, 0x12, 0x0b, 0x0a, 0x07, 0x54,
+ 0x49, 0x4d, 0x45, 0x52, 0x46, 0x44, 0x10, 0x11, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x45, 0x4d, 0x46,
+ 0x44, 0x10, 0x12, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x50, 0x46, 0x4d, 0x41, 0x50, 0x10, 0x13, 0x12,
+ 0x0d, 0x0a, 0x07, 0x43, 0x54, 0x4c, 0x5f, 0x54, 0x54, 0x59, 0x10, 0xfe, 0xff, 0x03, 0x12, 0x11,
+ 0x0a, 0x0b, 0x41, 0x55, 0x54, 0x4f, 0x46, 0x53, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x10, 0xff, 0xff,
+ 0x03,
+}
+
+var (
+ file_fdinfo_proto_rawDescOnce sync.Once
+ file_fdinfo_proto_rawDescData = file_fdinfo_proto_rawDesc
+)
+
+func file_fdinfo_proto_rawDescGZIP() []byte {
+ file_fdinfo_proto_rawDescOnce.Do(func() {
+ file_fdinfo_proto_rawDescData = protoimpl.X.CompressGZIP(file_fdinfo_proto_rawDescData)
+ })
+ return file_fdinfo_proto_rawDescData
+}
+
+var file_fdinfo_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_fdinfo_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_fdinfo_proto_goTypes = []interface{}{
+ (FdTypes)(0), // 0: fd_types
+ (*FdinfoEntry)(nil), // 1: fdinfo_entry
+ (*FileEntry)(nil), // 2: file_entry
+ (*RegFileEntry)(nil), // 3: reg_file_entry
+ (*InetSkEntry)(nil), // 4: inet_sk_entry
+ (*NsFileEntry)(nil), // 5: ns_file_entry
+ (*PacketSockEntry)(nil), // 6: packet_sock_entry
+ (*NetlinkSkEntry)(nil), // 7: netlink_sk_entry
+ (*EventfdFileEntry)(nil), // 8: eventfd_file_entry
+ (*EventpollFileEntry)(nil), // 9: eventpoll_file_entry
+ (*SignalfdEntry)(nil), // 10: signalfd_entry
+ (*TunfileEntry)(nil), // 11: tunfile_entry
+ (*TimerfdEntry)(nil), // 12: timerfd_entry
+ (*InotifyFileEntry)(nil), // 13: inotify_file_entry
+ (*FanotifyFileEntry)(nil), // 14: fanotify_file_entry
+ (*ExtFileEntry)(nil), // 15: ext_file_entry
+ (*UnixSkEntry)(nil), // 16: unix_sk_entry
+ (*FifoEntry)(nil), // 17: fifo_entry
+ (*PipeEntry)(nil), // 18: pipe_entry
+ (*TtyFileEntry)(nil), // 19: tty_file_entry
+ (*MemfdFileEntry)(nil), // 20: memfd_file_entry
+ (*BpfmapFileEntry)(nil), // 21: bpfmap_file_entry
+}
+var file_fdinfo_proto_depIdxs = []int32{
+ 0, // 0: fdinfo_entry.type:type_name -> fd_types
+ 0, // 1: file_entry.type:type_name -> fd_types
+ 3, // 2: file_entry.reg:type_name -> reg_file_entry
+ 4, // 3: file_entry.isk:type_name -> inet_sk_entry
+ 5, // 4: file_entry.nsf:type_name -> ns_file_entry
+ 6, // 5: file_entry.psk:type_name -> packet_sock_entry
+ 7, // 6: file_entry.nlsk:type_name -> netlink_sk_entry
+ 8, // 7: file_entry.efd:type_name -> eventfd_file_entry
+ 9, // 8: file_entry.epfd:type_name -> eventpoll_file_entry
+ 10, // 9: file_entry.sgfd:type_name -> signalfd_entry
+ 11, // 10: file_entry.tunf:type_name -> tunfile_entry
+ 12, // 11: file_entry.tfd:type_name -> timerfd_entry
+ 13, // 12: file_entry.ify:type_name -> inotify_file_entry
+ 14, // 13: file_entry.ffy:type_name -> fanotify_file_entry
+ 15, // 14: file_entry.ext:type_name -> ext_file_entry
+ 16, // 15: file_entry.usk:type_name -> unix_sk_entry
+ 17, // 16: file_entry.fifo:type_name -> fifo_entry
+ 18, // 17: file_entry.pipe:type_name -> pipe_entry
+ 19, // 18: file_entry.tty:type_name -> tty_file_entry
+ 20, // 19: file_entry.memfd:type_name -> memfd_file_entry
+ 21, // 20: file_entry.bpf:type_name -> bpfmap_file_entry
+ 21, // [21:21] is the sub-list for method output_type
+ 21, // [21:21] is the sub-list for method input_type
+ 21, // [21:21] is the sub-list for extension type_name
+ 21, // [21:21] is the sub-list for extension extendee
+ 0, // [0:21] is the sub-list for field type_name
+}
+
+func init() { file_fdinfo_proto_init() }
+func file_fdinfo_proto_init() {
+ if File_fdinfo_proto != nil {
+ return
+ }
+ file_regfile_proto_init()
+ file_sk_inet_proto_init()
+ file_ns_proto_init()
+ file_packet_sock_proto_init()
+ file_sk_netlink_proto_init()
+ file_eventfd_proto_init()
+ file_eventpoll_proto_init()
+ file_signalfd_proto_init()
+ file_tun_proto_init()
+ file_timerfd_proto_init()
+ file_fsnotify_proto_init()
+ file_ext_file_proto_init()
+ file_sk_unix_proto_init()
+ file_fifo_proto_init()
+ file_pipe_proto_init()
+ file_tty_proto_init()
+ file_memfd_proto_init()
+ file_bpfmap_file_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_fdinfo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FdinfoEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_fdinfo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_fdinfo_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_fdinfo_proto_goTypes,
+ DependencyIndexes: file_fdinfo_proto_depIdxs,
+ EnumInfos: file_fdinfo_proto_enumTypes,
+ MessageInfos: file_fdinfo_proto_msgTypes,
+ }.Build()
+ File_fdinfo_proto = out.File
+ file_fdinfo_proto_rawDesc = nil
+ file_fdinfo_proto_goTypes = nil
+ file_fdinfo_proto_depIdxs = nil
+}
diff --git a/crit/images/fdinfo.proto b/crit/images/fdinfo.proto
new file mode 100644
index 0000000..88f1c11
--- /dev/null
+++ b/crit/images/fdinfo.proto
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "regfile.proto";
+import "sk-inet.proto";
+import "ns.proto";
+import "packet-sock.proto";
+import "sk-netlink.proto";
+import "eventfd.proto";
+import "eventpoll.proto";
+import "signalfd.proto";
+import "tun.proto";
+import "timerfd.proto";
+import "fsnotify.proto";
+import "ext-file.proto";
+import "sk-unix.proto";
+import "fifo.proto";
+import "pipe.proto";
+import "tty.proto";
+import "memfd.proto";
+import "bpfmap-file.proto";
+
+enum fd_types {
+ UND = 0;
+ REG = 1;
+ PIPE = 2;
+ FIFO = 3;
+ INETSK = 4;
+ UNIXSK = 5;
+ EVENTFD = 6;
+ EVENTPOLL = 7;
+ INOTIFY = 8;
+ SIGNALFD = 9;
+ PACKETSK = 10;
+ TTY = 11;
+ FANOTIFY = 12;
+ NETLINKSK = 13;
+ NS = 14;
+ TUNF = 15;
+ EXT = 16;
+ TIMERFD = 17;
+ MEMFD = 18;
+ BPFMAP = 19;
+
+ /* Any number above the real used. Not stored to image */
+ CTL_TTY = 65534;
+ AUTOFS_PIPE = 65535;
+}
+
+message fdinfo_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2;
+ required fd_types type = 3;
+ required uint32 fd = 4;
+ optional string xattr_security_selinux = 5;
+}
+
+message file_entry {
+ required fd_types type = 1;
+ required uint32 id = 2;
+ optional reg_file_entry reg = 3;
+ optional inet_sk_entry isk = 4;
+ optional ns_file_entry nsf = 5;
+ optional packet_sock_entry psk = 6;
+ optional netlink_sk_entry nlsk = 7;
+ optional eventfd_file_entry efd = 8;
+ optional eventpoll_file_entry epfd = 9;
+ optional signalfd_entry sgfd = 10;
+ optional tunfile_entry tunf = 11;
+ optional timerfd_entry tfd = 12;
+ optional inotify_file_entry ify = 13;
+ optional fanotify_file_entry ffy = 14;
+ optional ext_file_entry ext = 15;
+ optional unix_sk_entry usk = 16;
+ optional fifo_entry fifo = 17;
+ optional pipe_entry pipe = 18;
+ optional tty_file_entry tty = 19;
+ optional memfd_file_entry memfd = 20;
+ optional bpfmap_file_entry bpf = 21;
+}
diff --git a/crit/images/fh.pb.go b/crit/images/fh.pb.go
new file mode 100644
index 0000000..c67a02c
--- /dev/null
+++ b/crit/images/fh.pb.go
@@ -0,0 +1,321 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: fh.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FhEntrySizes int32
+
+const (
+ FhEntrySizes_min_entries FhEntrySizes = 16
+)
+
+// Enum value maps for FhEntrySizes.
+var (
+ FhEntrySizes_name = map[int32]string{
+ 16: "min_entries",
+ }
+ FhEntrySizes_value = map[string]int32{
+ "min_entries": 16,
+ }
+)
+
+func (x FhEntrySizes) Enum() *FhEntrySizes {
+ p := new(FhEntrySizes)
+ *p = x
+ return p
+}
+
+func (x FhEntrySizes) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FhEntrySizes) Descriptor() protoreflect.EnumDescriptor {
+ return file_fh_proto_enumTypes[0].Descriptor()
+}
+
+func (FhEntrySizes) Type() protoreflect.EnumType {
+ return &file_fh_proto_enumTypes[0]
+}
+
+func (x FhEntrySizes) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FhEntrySizes) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FhEntrySizes(num)
+ return nil
+}
+
+// Deprecated: Use FhEntrySizes.Descriptor instead.
+func (FhEntrySizes) EnumDescriptor() ([]byte, []int) {
+ return file_fh_proto_rawDescGZIP(), []int{0}
+}
+
+type FhEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Bytes *uint32 `protobuf:"varint,1,req,name=bytes" json:"bytes,omitempty"`
+ Type *uint32 `protobuf:"varint,2,req,name=type" json:"type,omitempty"`
+ // The minimum is fh_n_handle repetitions
+ Handle []uint64 `protobuf:"varint,3,rep,name=handle" json:"handle,omitempty"`
+ Path *string `protobuf:"bytes,4,opt,name=path" json:"path,omitempty"`
+ MntId *uint32 `protobuf:"varint,5,opt,name=mnt_id,json=mntId" json:"mnt_id,omitempty"`
+}
+
+func (x *FhEntry) Reset() {
+ *x = FhEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fh_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FhEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FhEntry) ProtoMessage() {}
+
+func (x *FhEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fh_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FhEntry.ProtoReflect.Descriptor instead.
+func (*FhEntry) Descriptor() ([]byte, []int) {
+ return file_fh_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FhEntry) GetBytes() uint32 {
+ if x != nil && x.Bytes != nil {
+ return *x.Bytes
+ }
+ return 0
+}
+
+func (x *FhEntry) GetType() uint32 {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return 0
+}
+
+func (x *FhEntry) GetHandle() []uint64 {
+ if x != nil {
+ return x.Handle
+ }
+ return nil
+}
+
+func (x *FhEntry) GetPath() string {
+ if x != nil && x.Path != nil {
+ return *x.Path
+ }
+ return ""
+}
+
+func (x *FhEntry) GetMntId() uint32 {
+ if x != nil && x.MntId != nil {
+ return *x.MntId
+ }
+ return 0
+}
+
+type IrmapCacheEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Dev *uint32 `protobuf:"varint,1,req,name=dev" json:"dev,omitempty"`
+ Inode *uint64 `protobuf:"varint,2,req,name=inode" json:"inode,omitempty"`
+ Path *string `protobuf:"bytes,3,req,name=path" json:"path,omitempty"`
+}
+
+func (x *IrmapCacheEntry) Reset() {
+ *x = IrmapCacheEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fh_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IrmapCacheEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IrmapCacheEntry) ProtoMessage() {}
+
+func (x *IrmapCacheEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fh_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IrmapCacheEntry.ProtoReflect.Descriptor instead.
+func (*IrmapCacheEntry) Descriptor() ([]byte, []int) {
+ return file_fh_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *IrmapCacheEntry) GetDev() uint32 {
+ if x != nil && x.Dev != nil {
+ return *x.Dev
+ }
+ return 0
+}
+
+func (x *IrmapCacheEntry) GetInode() uint64 {
+ if x != nil && x.Inode != nil {
+ return *x.Inode
+ }
+ return 0
+}
+
+func (x *IrmapCacheEntry) GetPath() string {
+ if x != nil && x.Path != nil {
+ return *x.Path
+ }
+ return ""
+}
+
+var File_fh_proto protoreflect.FileDescriptor
+
+var file_fh_proto_rawDesc = []byte{
+ 0x0a, 0x08, 0x66, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x08, 0x66, 0x68, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x6e, 0x74, 0x5f,
+ 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x6e, 0x74, 0x49, 0x64, 0x22,
+ 0x5b, 0x0a, 0x11, 0x69, 0x72, 0x6d, 0x61, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x03, 0x64, 0x65, 0x76, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x0d, 0x42, 0x0a, 0xd2, 0x3f, 0x02, 0x20, 0x01, 0xd2, 0x3f, 0x02, 0x28, 0x01, 0x52, 0x03, 0x64,
+ 0x65, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
+ 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x2a, 0x21, 0x0a, 0x0e,
+ 0x66, 0x68, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x12, 0x0f,
+ 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x10, 0x10,
+}
+
+var (
+ file_fh_proto_rawDescOnce sync.Once
+ file_fh_proto_rawDescData = file_fh_proto_rawDesc
+)
+
+func file_fh_proto_rawDescGZIP() []byte {
+ file_fh_proto_rawDescOnce.Do(func() {
+ file_fh_proto_rawDescData = protoimpl.X.CompressGZIP(file_fh_proto_rawDescData)
+ })
+ return file_fh_proto_rawDescData
+}
+
+var file_fh_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_fh_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_fh_proto_goTypes = []interface{}{
+ (FhEntrySizes)(0), // 0: fh_entry_sizes
+ (*FhEntry)(nil), // 1: fh_entry
+ (*IrmapCacheEntry)(nil), // 2: irmap_cache_entry
+}
+var file_fh_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_fh_proto_init() }
+func file_fh_proto_init() {
+ if File_fh_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_fh_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FhEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_fh_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IrmapCacheEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_fh_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_fh_proto_goTypes,
+ DependencyIndexes: file_fh_proto_depIdxs,
+ EnumInfos: file_fh_proto_enumTypes,
+ MessageInfos: file_fh_proto_msgTypes,
+ }.Build()
+ File_fh_proto = out.File
+ file_fh_proto_rawDesc = nil
+ file_fh_proto_goTypes = nil
+ file_fh_proto_depIdxs = nil
+}
diff --git a/crit/images/fh.proto b/crit/images/fh.proto
new file mode 100644
index 0000000..7a2ce48
--- /dev/null
+++ b/crit/images/fh.proto
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+enum fh_entry_sizes {
+ min_entries = 16;
+}
+
+message fh_entry {
+ required uint32 bytes = 1;
+ required uint32 type = 2;
+
+ /* The minimum is fh_n_handle repetitions */
+ repeated uint64 handle = 3;
+ optional string path = 4;
+ optional uint32 mnt_id = 5;
+}
+
+message irmap_cache_entry {
+ required uint32 dev = 1 [(criu).dev = true, (criu).odev = true];
+ required uint64 inode = 2;
+ required string path = 3;
+}
diff --git a/crit/images/fifo.pb.go b/crit/images/fifo.pb.go
new file mode 100644
index 0000000..57dfd4f
--- /dev/null
+++ b/crit/images/fifo.pb.go
@@ -0,0 +1,160 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: fifo.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FifoEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ PipeId *uint32 `protobuf:"varint,2,req,name=pipe_id,json=pipeId" json:"pipe_id,omitempty"`
+ RegfId *uint32 `protobuf:"varint,3,opt,name=regf_id,json=regfId" json:"regf_id,omitempty"`
+}
+
+func (x *FifoEntry) Reset() {
+ *x = FifoEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fifo_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FifoEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FifoEntry) ProtoMessage() {}
+
+func (x *FifoEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fifo_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FifoEntry.ProtoReflect.Descriptor instead.
+func (*FifoEntry) Descriptor() ([]byte, []int) {
+ return file_fifo_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FifoEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *FifoEntry) GetPipeId() uint32 {
+ if x != nil && x.PipeId != nil {
+ return *x.PipeId
+ }
+ return 0
+}
+
+func (x *FifoEntry) GetRegfId() uint32 {
+ if x != nil && x.RegfId != nil {
+ return *x.RegfId
+ }
+ return 0
+}
+
+var File_fifo_proto protoreflect.FileDescriptor
+
+var file_fifo_proto_rawDesc = []byte{
+ 0x0a, 0x0a, 0x66, 0x69, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x0a,
+ 0x66, 0x69, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x69,
+ 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x69, 0x70,
+ 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x67, 0x66, 0x49, 0x64,
+}
+
+var (
+ file_fifo_proto_rawDescOnce sync.Once
+ file_fifo_proto_rawDescData = file_fifo_proto_rawDesc
+)
+
+func file_fifo_proto_rawDescGZIP() []byte {
+ file_fifo_proto_rawDescOnce.Do(func() {
+ file_fifo_proto_rawDescData = protoimpl.X.CompressGZIP(file_fifo_proto_rawDescData)
+ })
+ return file_fifo_proto_rawDescData
+}
+
+var file_fifo_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_fifo_proto_goTypes = []interface{}{
+ (*FifoEntry)(nil), // 0: fifo_entry
+}
+var file_fifo_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_fifo_proto_init() }
+func file_fifo_proto_init() {
+ if File_fifo_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_fifo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FifoEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_fifo_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_fifo_proto_goTypes,
+ DependencyIndexes: file_fifo_proto_depIdxs,
+ MessageInfos: file_fifo_proto_msgTypes,
+ }.Build()
+ File_fifo_proto = out.File
+ file_fifo_proto_rawDesc = nil
+ file_fifo_proto_goTypes = nil
+ file_fifo_proto_depIdxs = nil
+}
diff --git a/crit/images/fifo.proto b/crit/images/fifo.proto
new file mode 100644
index 0000000..ae6f481
--- /dev/null
+++ b/crit/images/fifo.proto
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message fifo_entry {
+ required uint32 id = 1;
+ required uint32 pipe_id = 2;
+ optional uint32 regf_id = 3;
+}
diff --git a/crit/images/file-lock.pb.go b/crit/images/file-lock.pb.go
new file mode 100644
index 0000000..29af237
--- /dev/null
+++ b/crit/images/file-lock.pb.go
@@ -0,0 +1,188 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: file-lock.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FileLockEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Flag *uint32 `protobuf:"varint,1,req,name=flag" json:"flag,omitempty"`
+ Type *uint32 `protobuf:"varint,2,req,name=type" json:"type,omitempty"`
+ Pid *int32 `protobuf:"varint,3,req,name=pid" json:"pid,omitempty"`
+ Fd *int32 `protobuf:"varint,4,req,name=fd" json:"fd,omitempty"`
+ Start *int64 `protobuf:"varint,5,req,name=start" json:"start,omitempty"`
+ Len *int64 `protobuf:"varint,6,req,name=len" json:"len,omitempty"`
+}
+
+func (x *FileLockEntry) Reset() {
+ *x = FileLockEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_file_lock_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FileLockEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileLockEntry) ProtoMessage() {}
+
+func (x *FileLockEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_file_lock_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FileLockEntry.ProtoReflect.Descriptor instead.
+func (*FileLockEntry) Descriptor() ([]byte, []int) {
+ return file_file_lock_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FileLockEntry) GetFlag() uint32 {
+ if x != nil && x.Flag != nil {
+ return *x.Flag
+ }
+ return 0
+}
+
+func (x *FileLockEntry) GetType() uint32 {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return 0
+}
+
+func (x *FileLockEntry) GetPid() int32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+func (x *FileLockEntry) GetFd() int32 {
+ if x != nil && x.Fd != nil {
+ return *x.Fd
+ }
+ return 0
+}
+
+func (x *FileLockEntry) GetStart() int64 {
+ if x != nil && x.Start != nil {
+ return *x.Start
+ }
+ return 0
+}
+
+func (x *FileLockEntry) GetLen() int64 {
+ if x != nil && x.Len != nil {
+ return *x.Len
+ }
+ return 0
+}
+
+var File_file_lock_proto protoreflect.FileDescriptor
+
+var file_file_lock_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a,
+ 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12,
+ 0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x05, 0x52, 0x02, 0x66, 0x64, 0x12,
+ 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x05, 0x20, 0x02, 0x28, 0x03, 0x52, 0x05,
+ 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x02,
+ 0x28, 0x03, 0x52, 0x03, 0x6c, 0x65, 0x6e,
+}
+
+var (
+ file_file_lock_proto_rawDescOnce sync.Once
+ file_file_lock_proto_rawDescData = file_file_lock_proto_rawDesc
+)
+
+func file_file_lock_proto_rawDescGZIP() []byte {
+ file_file_lock_proto_rawDescOnce.Do(func() {
+ file_file_lock_proto_rawDescData = protoimpl.X.CompressGZIP(file_file_lock_proto_rawDescData)
+ })
+ return file_file_lock_proto_rawDescData
+}
+
+var file_file_lock_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_file_lock_proto_goTypes = []interface{}{
+ (*FileLockEntry)(nil), // 0: file_lock_entry
+}
+var file_file_lock_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_file_lock_proto_init() }
+func file_file_lock_proto_init() {
+ if File_file_lock_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_file_lock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FileLockEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_file_lock_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_file_lock_proto_goTypes,
+ DependencyIndexes: file_file_lock_proto_depIdxs,
+ MessageInfos: file_file_lock_proto_msgTypes,
+ }.Build()
+ File_file_lock_proto = out.File
+ file_file_lock_proto_rawDesc = nil
+ file_file_lock_proto_goTypes = nil
+ file_file_lock_proto_depIdxs = nil
+}
diff --git a/crit/images/file-lock.proto b/crit/images/file-lock.proto
new file mode 100644
index 0000000..dcf3d87
--- /dev/null
+++ b/crit/images/file-lock.proto
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message file_lock_entry {
+ required uint32 flag = 1;
+ required uint32 type = 2;
+ required int32 pid = 3;
+ required int32 fd = 4;
+ required int64 start = 5;
+ required int64 len = 6;
+}
diff --git a/crit/images/fown.pb.go b/crit/images/fown.pb.go
new file mode 100644
index 0000000..94c4779
--- /dev/null
+++ b/crit/images/fown.pb.go
@@ -0,0 +1,179 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: fown.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FownEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Uid *uint32 `protobuf:"varint,1,req,name=uid" json:"uid,omitempty"`
+ Euid *uint32 `protobuf:"varint,2,req,name=euid" json:"euid,omitempty"`
+ Signum *uint32 `protobuf:"varint,3,req,name=signum" json:"signum,omitempty"`
+ PidType *uint32 `protobuf:"varint,4,req,name=pid_type,json=pidType" json:"pid_type,omitempty"`
+ Pid *uint32 `protobuf:"varint,5,req,name=pid" json:"pid,omitempty"`
+}
+
+func (x *FownEntry) Reset() {
+ *x = FownEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fown_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FownEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FownEntry) ProtoMessage() {}
+
+func (x *FownEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fown_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FownEntry.ProtoReflect.Descriptor instead.
+func (*FownEntry) Descriptor() ([]byte, []int) {
+ return file_fown_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FownEntry) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *FownEntry) GetEuid() uint32 {
+ if x != nil && x.Euid != nil {
+ return *x.Euid
+ }
+ return 0
+}
+
+func (x *FownEntry) GetSignum() uint32 {
+ if x != nil && x.Signum != nil {
+ return *x.Signum
+ }
+ return 0
+}
+
+func (x *FownEntry) GetPidType() uint32 {
+ if x != nil && x.PidType != nil {
+ return *x.PidType
+ }
+ return 0
+}
+
+func (x *FownEntry) GetPid() uint32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+var File_fown_proto protoreflect.FileDescriptor
+
+var file_fown_proto_rawDesc = []byte{
+ 0x0a, 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x0a,
+ 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
+ 0x65, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x65, 0x75, 0x69, 0x64,
+ 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x69, 0x64, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x69, 0x64, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x03, 0x70, 0x69, 0x64,
+}
+
+var (
+ file_fown_proto_rawDescOnce sync.Once
+ file_fown_proto_rawDescData = file_fown_proto_rawDesc
+)
+
+func file_fown_proto_rawDescGZIP() []byte {
+ file_fown_proto_rawDescOnce.Do(func() {
+ file_fown_proto_rawDescData = protoimpl.X.CompressGZIP(file_fown_proto_rawDescData)
+ })
+ return file_fown_proto_rawDescData
+}
+
+var file_fown_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_fown_proto_goTypes = []interface{}{
+ (*FownEntry)(nil), // 0: fown_entry
+}
+var file_fown_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_fown_proto_init() }
+func file_fown_proto_init() {
+ if File_fown_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_fown_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FownEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_fown_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_fown_proto_goTypes,
+ DependencyIndexes: file_fown_proto_depIdxs,
+ MessageInfos: file_fown_proto_msgTypes,
+ }.Build()
+ File_fown_proto = out.File
+ file_fown_proto_rawDesc = nil
+ file_fown_proto_goTypes = nil
+ file_fown_proto_depIdxs = nil
+}
diff --git a/crit/images/fown.proto b/crit/images/fown.proto
new file mode 100644
index 0000000..b2e20b6
--- /dev/null
+++ b/crit/images/fown.proto
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message fown_entry {
+ required uint32 uid = 1;
+ required uint32 euid = 2;
+ required uint32 signum = 3;
+ required uint32 pid_type = 4;
+ required uint32 pid = 5;
+}
diff --git a/crit/images/fs.pb.go b/crit/images/fs.pb.go
new file mode 100644
index 0000000..06e2f32
--- /dev/null
+++ b/crit/images/fs.pb.go
@@ -0,0 +1,160 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: fs.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CwdId *uint32 `protobuf:"varint,1,req,name=cwd_id,json=cwdId" json:"cwd_id,omitempty"`
+ RootId *uint32 `protobuf:"varint,2,req,name=root_id,json=rootId" json:"root_id,omitempty"`
+ Umask *uint32 `protobuf:"varint,3,opt,name=umask" json:"umask,omitempty"`
+}
+
+func (x *FsEntry) Reset() {
+ *x = FsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fs_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FsEntry) ProtoMessage() {}
+
+func (x *FsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fs_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FsEntry.ProtoReflect.Descriptor instead.
+func (*FsEntry) Descriptor() ([]byte, []int) {
+ return file_fs_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FsEntry) GetCwdId() uint32 {
+ if x != nil && x.CwdId != nil {
+ return *x.CwdId
+ }
+ return 0
+}
+
+func (x *FsEntry) GetRootId() uint32 {
+ if x != nil && x.RootId != nil {
+ return *x.RootId
+ }
+ return 0
+}
+
+func (x *FsEntry) GetUmask() uint32 {
+ if x != nil && x.Umask != nil {
+ return *x.Umask
+ }
+ return 0
+}
+
+var File_fs_proto protoreflect.FileDescriptor
+
+var file_fs_proto_rawDesc = []byte{
+ 0x0a, 0x08, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x08, 0x66, 0x73,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x77, 0x64, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x77, 0x64, 0x49, 0x64, 0x12, 0x17, 0x0a,
+ 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06,
+ 0x72, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6d, 0x61, 0x73, 0x6b, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x75, 0x6d, 0x61, 0x73, 0x6b,
+}
+
+var (
+ file_fs_proto_rawDescOnce sync.Once
+ file_fs_proto_rawDescData = file_fs_proto_rawDesc
+)
+
+func file_fs_proto_rawDescGZIP() []byte {
+ file_fs_proto_rawDescOnce.Do(func() {
+ file_fs_proto_rawDescData = protoimpl.X.CompressGZIP(file_fs_proto_rawDescData)
+ })
+ return file_fs_proto_rawDescData
+}
+
+var file_fs_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_fs_proto_goTypes = []interface{}{
+ (*FsEntry)(nil), // 0: fs_entry
+}
+var file_fs_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_fs_proto_init() }
+func file_fs_proto_init() {
+ if File_fs_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_fs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_fs_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_fs_proto_goTypes,
+ DependencyIndexes: file_fs_proto_depIdxs,
+ MessageInfos: file_fs_proto_msgTypes,
+ }.Build()
+ File_fs_proto = out.File
+ file_fs_proto_rawDesc = nil
+ file_fs_proto_goTypes = nil
+ file_fs_proto_depIdxs = nil
+}
diff --git a/crit/images/fs.proto b/crit/images/fs.proto
new file mode 100644
index 0000000..158501a
--- /dev/null
+++ b/crit/images/fs.proto
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message fs_entry {
+ required uint32 cwd_id = 1;
+ required uint32 root_id = 2;
+ optional uint32 umask = 3;
+}
diff --git a/crit/images/fsnotify.pb.go b/crit/images/fsnotify.pb.go
new file mode 100644
index 0000000..8200687
--- /dev/null
+++ b/crit/images/fsnotify.pb.go
@@ -0,0 +1,763 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: fsnotify.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MarkType int32
+
+const (
+ MarkType_INODE MarkType = 1
+ MarkType_MOUNT MarkType = 2
+)
+
+// Enum value maps for MarkType.
+var (
+ MarkType_name = map[int32]string{
+ 1: "INODE",
+ 2: "MOUNT",
+ }
+ MarkType_value = map[string]int32{
+ "INODE": 1,
+ "MOUNT": 2,
+ }
+)
+
+func (x MarkType) Enum() *MarkType {
+ p := new(MarkType)
+ *p = x
+ return p
+}
+
+func (x MarkType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MarkType) Descriptor() protoreflect.EnumDescriptor {
+ return file_fsnotify_proto_enumTypes[0].Descriptor()
+}
+
+func (MarkType) Type() protoreflect.EnumType {
+ return &file_fsnotify_proto_enumTypes[0]
+}
+
+func (x MarkType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *MarkType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = MarkType(num)
+ return nil
+}
+
+// Deprecated: Use MarkType.Descriptor instead.
+func (MarkType) EnumDescriptor() ([]byte, []int) {
+ return file_fsnotify_proto_rawDescGZIP(), []int{0}
+}
+
+type InotifyWdEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ IIno *uint64 `protobuf:"varint,2,req,name=i_ino,json=iIno" json:"i_ino,omitempty"`
+ Mask *uint32 `protobuf:"varint,3,req,name=mask" json:"mask,omitempty"`
+ IgnoredMask *uint32 `protobuf:"varint,4,req,name=ignored_mask,json=ignoredMask" json:"ignored_mask,omitempty"`
+ SDev *uint32 `protobuf:"varint,5,req,name=s_dev,json=sDev" json:"s_dev,omitempty"`
+ Wd *uint32 `protobuf:"varint,6,req,name=wd" json:"wd,omitempty"`
+ FHandle *FhEntry `protobuf:"bytes,7,req,name=f_handle,json=fHandle" json:"f_handle,omitempty"`
+}
+
+func (x *InotifyWdEntry) Reset() {
+ *x = InotifyWdEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fsnotify_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InotifyWdEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InotifyWdEntry) ProtoMessage() {}
+
+func (x *InotifyWdEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fsnotify_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InotifyWdEntry.ProtoReflect.Descriptor instead.
+func (*InotifyWdEntry) Descriptor() ([]byte, []int) {
+ return file_fsnotify_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *InotifyWdEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *InotifyWdEntry) GetIIno() uint64 {
+ if x != nil && x.IIno != nil {
+ return *x.IIno
+ }
+ return 0
+}
+
+func (x *InotifyWdEntry) GetMask() uint32 {
+ if x != nil && x.Mask != nil {
+ return *x.Mask
+ }
+ return 0
+}
+
+func (x *InotifyWdEntry) GetIgnoredMask() uint32 {
+ if x != nil && x.IgnoredMask != nil {
+ return *x.IgnoredMask
+ }
+ return 0
+}
+
+func (x *InotifyWdEntry) GetSDev() uint32 {
+ if x != nil && x.SDev != nil {
+ return *x.SDev
+ }
+ return 0
+}
+
+func (x *InotifyWdEntry) GetWd() uint32 {
+ if x != nil && x.Wd != nil {
+ return *x.Wd
+ }
+ return 0
+}
+
+func (x *InotifyWdEntry) GetFHandle() *FhEntry {
+ if x != nil {
+ return x.FHandle
+ }
+ return nil
+}
+
+type InotifyFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,4,req,name=fown" json:"fown,omitempty"`
+ Wd []*InotifyWdEntry `protobuf:"bytes,5,rep,name=wd" json:"wd,omitempty"`
+}
+
+func (x *InotifyFileEntry) Reset() {
+ *x = InotifyFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fsnotify_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InotifyFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InotifyFileEntry) ProtoMessage() {}
+
+func (x *InotifyFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fsnotify_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InotifyFileEntry.ProtoReflect.Descriptor instead.
+func (*InotifyFileEntry) Descriptor() ([]byte, []int) {
+ return file_fsnotify_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *InotifyFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *InotifyFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *InotifyFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *InotifyFileEntry) GetWd() []*InotifyWdEntry {
+ if x != nil {
+ return x.Wd
+ }
+ return nil
+}
+
+type FanotifyInodeMarkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ IIno *uint64 `protobuf:"varint,1,req,name=i_ino,json=iIno" json:"i_ino,omitempty"`
+ FHandle *FhEntry `protobuf:"bytes,2,req,name=f_handle,json=fHandle" json:"f_handle,omitempty"`
+}
+
+func (x *FanotifyInodeMarkEntry) Reset() {
+ *x = FanotifyInodeMarkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fsnotify_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FanotifyInodeMarkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FanotifyInodeMarkEntry) ProtoMessage() {}
+
+func (x *FanotifyInodeMarkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fsnotify_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FanotifyInodeMarkEntry.ProtoReflect.Descriptor instead.
+func (*FanotifyInodeMarkEntry) Descriptor() ([]byte, []int) {
+ return file_fsnotify_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *FanotifyInodeMarkEntry) GetIIno() uint64 {
+ if x != nil && x.IIno != nil {
+ return *x.IIno
+ }
+ return 0
+}
+
+func (x *FanotifyInodeMarkEntry) GetFHandle() *FhEntry {
+ if x != nil {
+ return x.FHandle
+ }
+ return nil
+}
+
+type FanotifyMountMarkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MntId *uint32 `protobuf:"varint,1,req,name=mnt_id,json=mntId" json:"mnt_id,omitempty"`
+ Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
+}
+
+func (x *FanotifyMountMarkEntry) Reset() {
+ *x = FanotifyMountMarkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fsnotify_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FanotifyMountMarkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FanotifyMountMarkEntry) ProtoMessage() {}
+
+func (x *FanotifyMountMarkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fsnotify_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FanotifyMountMarkEntry.ProtoReflect.Descriptor instead.
+func (*FanotifyMountMarkEntry) Descriptor() ([]byte, []int) {
+ return file_fsnotify_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *FanotifyMountMarkEntry) GetMntId() uint32 {
+ if x != nil && x.MntId != nil {
+ return *x.MntId
+ }
+ return 0
+}
+
+func (x *FanotifyMountMarkEntry) GetPath() string {
+ if x != nil && x.Path != nil {
+ return *x.Path
+ }
+ return ""
+}
+
+type FanotifyMarkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Type *MarkType `protobuf:"varint,2,req,name=type,enum=MarkType" json:"type,omitempty"`
+ Mflags *uint32 `protobuf:"varint,3,req,name=mflags" json:"mflags,omitempty"`
+ Mask *uint32 `protobuf:"varint,4,req,name=mask" json:"mask,omitempty"`
+ IgnoredMask *uint32 `protobuf:"varint,5,req,name=ignored_mask,json=ignoredMask" json:"ignored_mask,omitempty"`
+ SDev *uint32 `protobuf:"varint,6,req,name=s_dev,json=sDev" json:"s_dev,omitempty"`
+ Ie *FanotifyInodeMarkEntry `protobuf:"bytes,7,opt,name=ie" json:"ie,omitempty"`
+ Me *FanotifyMountMarkEntry `protobuf:"bytes,8,opt,name=me" json:"me,omitempty"`
+}
+
+func (x *FanotifyMarkEntry) Reset() {
+ *x = FanotifyMarkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fsnotify_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FanotifyMarkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FanotifyMarkEntry) ProtoMessage() {}
+
+func (x *FanotifyMarkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fsnotify_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FanotifyMarkEntry.ProtoReflect.Descriptor instead.
+func (*FanotifyMarkEntry) Descriptor() ([]byte, []int) {
+ return file_fsnotify_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *FanotifyMarkEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *FanotifyMarkEntry) GetType() MarkType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return MarkType_INODE
+}
+
+func (x *FanotifyMarkEntry) GetMflags() uint32 {
+ if x != nil && x.Mflags != nil {
+ return *x.Mflags
+ }
+ return 0
+}
+
+func (x *FanotifyMarkEntry) GetMask() uint32 {
+ if x != nil && x.Mask != nil {
+ return *x.Mask
+ }
+ return 0
+}
+
+func (x *FanotifyMarkEntry) GetIgnoredMask() uint32 {
+ if x != nil && x.IgnoredMask != nil {
+ return *x.IgnoredMask
+ }
+ return 0
+}
+
+func (x *FanotifyMarkEntry) GetSDev() uint32 {
+ if x != nil && x.SDev != nil {
+ return *x.SDev
+ }
+ return 0
+}
+
+func (x *FanotifyMarkEntry) GetIe() *FanotifyInodeMarkEntry {
+ if x != nil {
+ return x.Ie
+ }
+ return nil
+}
+
+func (x *FanotifyMarkEntry) GetMe() *FanotifyMountMarkEntry {
+ if x != nil {
+ return x.Me
+ }
+ return nil
+}
+
+type FanotifyFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,3,req,name=fown" json:"fown,omitempty"`
+ Faflags *uint32 `protobuf:"varint,4,req,name=faflags" json:"faflags,omitempty"`
+ Evflags *uint32 `protobuf:"varint,5,req,name=evflags" json:"evflags,omitempty"`
+ Mark []*FanotifyMarkEntry `protobuf:"bytes,6,rep,name=mark" json:"mark,omitempty"`
+}
+
+func (x *FanotifyFileEntry) Reset() {
+ *x = FanotifyFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_fsnotify_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FanotifyFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FanotifyFileEntry) ProtoMessage() {}
+
+func (x *FanotifyFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_fsnotify_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FanotifyFileEntry.ProtoReflect.Descriptor instead.
+func (*FanotifyFileEntry) Descriptor() ([]byte, []int) {
+ return file_fsnotify_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *FanotifyFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *FanotifyFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *FanotifyFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *FanotifyFileEntry) GetFaflags() uint32 {
+ if x != nil && x.Faflags != nil {
+ return *x.Faflags
+ }
+ return 0
+}
+
+func (x *FanotifyFileEntry) GetEvflags() uint32 {
+ if x != nil && x.Evflags != nil {
+ return *x.Evflags
+ }
+ return 0
+}
+
+func (x *FanotifyFileEntry) GetMark() []*FanotifyMarkEntry {
+ if x != nil {
+ return x.Mark
+ }
+ return nil
+}
+
+var File_fsnotify_proto protoreflect.FileDescriptor
+
+var file_fsnotify_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x66, 0x73, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x08, 0x66, 0x68,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x10, 0x69, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x77,
+ 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x69, 0x5f, 0x69, 0x6e, 0x6f,
+ 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x69, 0x49, 0x6e, 0x6f, 0x12, 0x19, 0x0a, 0x04,
+ 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08,
+ 0x01, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72,
+ 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2,
+ 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x4d, 0x61, 0x73,
+ 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x73, 0x5f, 0x64, 0x65, 0x76, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d,
+ 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x20, 0x01, 0x52, 0x04, 0x73, 0x44, 0x65, 0x76, 0x12, 0x0e, 0x0a,
+ 0x02, 0x77, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x77, 0x64, 0x12, 0x24, 0x0a,
+ 0x08, 0x66, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0b, 0x32,
+ 0x09, 0x2e, 0x66, 0x68, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x48, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x69, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f,
+ 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01,
+ 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18,
+ 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x21, 0x0a, 0x02, 0x77, 0x64, 0x18, 0x05,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x77,
+ 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x02, 0x77, 0x64, 0x22, 0x56, 0x0a, 0x19, 0x66,
+ 0x61, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x61,
+ 0x72, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x13, 0x0a, 0x05, 0x69, 0x5f, 0x69, 0x6e,
+ 0x6f, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x69, 0x49, 0x6e, 0x6f, 0x12, 0x24, 0x0a,
+ 0x08, 0x66, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32,
+ 0x09, 0x2e, 0x66, 0x68, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x48, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x22, 0x46, 0x0a, 0x19, 0x66, 0x61, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f,
+ 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x05, 0x6d, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x9d, 0x02, 0x0a, 0x13,
+ 0x66, 0x61, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x0e, 0x32, 0x0a, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x6d, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20,
+ 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x6d, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x12, 0x19, 0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d,
+ 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x28, 0x0a,
+ 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20,
+ 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f,
+ 0x72, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x73, 0x5f, 0x64, 0x65, 0x76,
+ 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x20, 0x01, 0x52, 0x04, 0x73,
+ 0x44, 0x65, 0x76, 0x12, 0x2a, 0x0a, 0x02, 0x69, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x66, 0x61, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65,
+ 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x02, 0x69, 0x65, 0x12,
+ 0x2a, 0x0a, 0x02, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x61,
+ 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72,
+ 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x02, 0x6d, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x13,
+ 0x66, 0x61, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73,
+ 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b,
+ 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77,
+ 0x6e, 0x12, 0x1f, 0x0a, 0x07, 0x66, 0x61, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x07, 0x66, 0x61, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x07, 0x65, 0x76, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20,
+ 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x07, 0x65, 0x76, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x06, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x61, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x6d, 0x61, 0x72,
+ 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x2a, 0x21, 0x0a,
+ 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e,
+ 0x4f, 0x44, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x02,
+}
+
+var (
+ file_fsnotify_proto_rawDescOnce sync.Once
+ file_fsnotify_proto_rawDescData = file_fsnotify_proto_rawDesc
+)
+
+func file_fsnotify_proto_rawDescGZIP() []byte {
+ file_fsnotify_proto_rawDescOnce.Do(func() {
+ file_fsnotify_proto_rawDescData = protoimpl.X.CompressGZIP(file_fsnotify_proto_rawDescData)
+ })
+ return file_fsnotify_proto_rawDescData
+}
+
+var file_fsnotify_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_fsnotify_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_fsnotify_proto_goTypes = []interface{}{
+ (MarkType)(0), // 0: mark_type
+ (*InotifyWdEntry)(nil), // 1: inotify_wd_entry
+ (*InotifyFileEntry)(nil), // 2: inotify_file_entry
+ (*FanotifyInodeMarkEntry)(nil), // 3: fanotify_inode_mark_entry
+ (*FanotifyMountMarkEntry)(nil), // 4: fanotify_mount_mark_entry
+ (*FanotifyMarkEntry)(nil), // 5: fanotify_mark_entry
+ (*FanotifyFileEntry)(nil), // 6: fanotify_file_entry
+ (*FhEntry)(nil), // 7: fh_entry
+ (*FownEntry)(nil), // 8: fown_entry
+}
+var file_fsnotify_proto_depIdxs = []int32{
+ 7, // 0: inotify_wd_entry.f_handle:type_name -> fh_entry
+ 8, // 1: inotify_file_entry.fown:type_name -> fown_entry
+ 1, // 2: inotify_file_entry.wd:type_name -> inotify_wd_entry
+ 7, // 3: fanotify_inode_mark_entry.f_handle:type_name -> fh_entry
+ 0, // 4: fanotify_mark_entry.type:type_name -> mark_type
+ 3, // 5: fanotify_mark_entry.ie:type_name -> fanotify_inode_mark_entry
+ 4, // 6: fanotify_mark_entry.me:type_name -> fanotify_mount_mark_entry
+ 8, // 7: fanotify_file_entry.fown:type_name -> fown_entry
+ 5, // 8: fanotify_file_entry.mark:type_name -> fanotify_mark_entry
+ 9, // [9:9] is the sub-list for method output_type
+ 9, // [9:9] is the sub-list for method input_type
+ 9, // [9:9] is the sub-list for extension type_name
+ 9, // [9:9] is the sub-list for extension extendee
+ 0, // [0:9] is the sub-list for field type_name
+}
+
+func init() { file_fsnotify_proto_init() }
+func file_fsnotify_proto_init() {
+ if File_fsnotify_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fh_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_fsnotify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InotifyWdEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_fsnotify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InotifyFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_fsnotify_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FanotifyInodeMarkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_fsnotify_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FanotifyMountMarkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_fsnotify_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FanotifyMarkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_fsnotify_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FanotifyFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_fsnotify_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_fsnotify_proto_goTypes,
+ DependencyIndexes: file_fsnotify_proto_depIdxs,
+ EnumInfos: file_fsnotify_proto_enumTypes,
+ MessageInfos: file_fsnotify_proto_msgTypes,
+ }.Build()
+ File_fsnotify_proto = out.File
+ file_fsnotify_proto_rawDesc = nil
+ file_fsnotify_proto_goTypes = nil
+ file_fsnotify_proto_depIdxs = nil
+}
diff --git a/crit/images/fsnotify.proto b/crit/images/fsnotify.proto
new file mode 100644
index 0000000..df6a667
--- /dev/null
+++ b/crit/images/fsnotify.proto
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fh.proto";
+import "fown.proto";
+
+message inotify_wd_entry {
+ required uint32 id = 1;
+ required uint64 i_ino = 2;
+ required uint32 mask = 3 [(criu).hex = true];
+ required uint32 ignored_mask = 4 [(criu).hex = true];
+ required uint32 s_dev = 5 [(criu).dev = true];
+ required uint32 wd = 6;
+ required fh_entry f_handle = 7;
+}
+
+message inotify_file_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2 [(criu).hex = true];
+ required fown_entry fown = 4;
+ repeated inotify_wd_entry wd = 5;
+}
+
+enum mark_type {
+ INODE = 1;
+ MOUNT = 2;
+}
+
+message fanotify_inode_mark_entry {
+ required uint64 i_ino = 1;
+ required fh_entry f_handle = 2;
+}
+
+message fanotify_mount_mark_entry {
+ required uint32 mnt_id = 1;
+ optional string path = 2;
+}
+
+message fanotify_mark_entry {
+ required uint32 id = 1;
+ required mark_type type = 2;
+
+ required uint32 mflags = 3 [(criu).hex = true];
+ required uint32 mask = 4 [(criu).hex = true];
+ required uint32 ignored_mask = 5 [(criu).hex = true];
+ required uint32 s_dev = 6 [(criu).dev = true];
+
+ optional fanotify_inode_mark_entry ie = 7;
+ optional fanotify_mount_mark_entry me = 8;
+}
+
+message fanotify_file_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2 [(criu).hex = true];
+ required fown_entry fown = 3;
+
+ required uint32 faflags = 4 [(criu).hex = true];
+ required uint32 evflags = 5 [(criu).hex = true];
+ repeated fanotify_mark_entry mark = 6;
+}
diff --git a/crit/images/ghost-file.pb.go b/crit/images/ghost-file.pb.go
new file mode 100644
index 0000000..f4c198c
--- /dev/null
+++ b/crit/images/ghost-file.pb.go
@@ -0,0 +1,317 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ghost-file.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GhostFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Uid *uint32 `protobuf:"varint,1,req,name=uid" json:"uid,omitempty"`
+ Gid *uint32 `protobuf:"varint,2,req,name=gid" json:"gid,omitempty"`
+ Mode *uint32 `protobuf:"varint,3,req,name=mode" json:"mode,omitempty"`
+ Dev *uint32 `protobuf:"varint,4,opt,name=dev" json:"dev,omitempty"`
+ Ino *uint64 `protobuf:"varint,5,opt,name=ino" json:"ino,omitempty"`
+ Rdev *uint32 `protobuf:"varint,6,opt,name=rdev" json:"rdev,omitempty"`
+ Atim *Timeval `protobuf:"bytes,7,opt,name=atim" json:"atim,omitempty"`
+ Mtim *Timeval `protobuf:"bytes,8,opt,name=mtim" json:"mtim,omitempty"`
+ Chunks *bool `protobuf:"varint,9,opt,name=chunks" json:"chunks,omitempty"`
+ Size *uint64 `protobuf:"varint,10,opt,name=size" json:"size,omitempty"`
+ // this field makes sense only when S_ISLNK(mode)
+ SymlnkTarget *string `protobuf:"bytes,11,opt,name=symlnk_target,json=symlnkTarget" json:"symlnk_target,omitempty"`
+}
+
+func (x *GhostFileEntry) Reset() {
+ *x = GhostFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ghost_file_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GhostFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GhostFileEntry) ProtoMessage() {}
+
+func (x *GhostFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ghost_file_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GhostFileEntry.ProtoReflect.Descriptor instead.
+func (*GhostFileEntry) Descriptor() ([]byte, []int) {
+ return file_ghost_file_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GhostFileEntry) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *GhostFileEntry) GetGid() uint32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+func (x *GhostFileEntry) GetMode() uint32 {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return 0
+}
+
+func (x *GhostFileEntry) GetDev() uint32 {
+ if x != nil && x.Dev != nil {
+ return *x.Dev
+ }
+ return 0
+}
+
+func (x *GhostFileEntry) GetIno() uint64 {
+ if x != nil && x.Ino != nil {
+ return *x.Ino
+ }
+ return 0
+}
+
+func (x *GhostFileEntry) GetRdev() uint32 {
+ if x != nil && x.Rdev != nil {
+ return *x.Rdev
+ }
+ return 0
+}
+
+func (x *GhostFileEntry) GetAtim() *Timeval {
+ if x != nil {
+ return x.Atim
+ }
+ return nil
+}
+
+func (x *GhostFileEntry) GetMtim() *Timeval {
+ if x != nil {
+ return x.Mtim
+ }
+ return nil
+}
+
+func (x *GhostFileEntry) GetChunks() bool {
+ if x != nil && x.Chunks != nil {
+ return *x.Chunks
+ }
+ return false
+}
+
+func (x *GhostFileEntry) GetSize() uint64 {
+ if x != nil && x.Size != nil {
+ return *x.Size
+ }
+ return 0
+}
+
+func (x *GhostFileEntry) GetSymlnkTarget() string {
+ if x != nil && x.SymlnkTarget != nil {
+ return *x.SymlnkTarget
+ }
+ return ""
+}
+
+type GhostChunkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Len *uint64 `protobuf:"varint,1,req,name=len" json:"len,omitempty"`
+ Off *uint64 `protobuf:"varint,2,req,name=off" json:"off,omitempty"`
+}
+
+func (x *GhostChunkEntry) Reset() {
+ *x = GhostChunkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ghost_file_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GhostChunkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GhostChunkEntry) ProtoMessage() {}
+
+func (x *GhostChunkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ghost_file_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GhostChunkEntry.ProtoReflect.Descriptor instead.
+func (*GhostChunkEntry) Descriptor() ([]byte, []int) {
+ return file_ghost_file_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GhostChunkEntry) GetLen() uint64 {
+ if x != nil && x.Len != nil {
+ return *x.Len
+ }
+ return 0
+}
+
+func (x *GhostChunkEntry) GetOff() uint64 {
+ if x != nil && x.Off != nil {
+ return *x.Off
+ }
+ return 0
+}
+
+var File_ghost_file_proto protoreflect.FileDescriptor
+
+var file_ghost_file_proto_rawDesc = []byte{
+ 0x0a, 0x10, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a,
+ 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x67,
+ 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69,
+ 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03,
+ 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x03, 0x64, 0x65, 0x76, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x20, 0x01, 0x52, 0x03, 0x64, 0x65, 0x76,
+ 0x12, 0x10, 0x0a, 0x03, 0x69, 0x6e, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x69,
+ 0x6e, 0x6f, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x64, 0x65, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d,
+ 0x42, 0x0a, 0xd2, 0x3f, 0x02, 0x20, 0x01, 0xd2, 0x3f, 0x02, 0x28, 0x01, 0x52, 0x04, 0x72, 0x64,
+ 0x65, 0x76, 0x12, 0x1c, 0x0a, 0x04, 0x61, 0x74, 0x69, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x08, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x76, 0x61, 0x6c, 0x52, 0x04, 0x61, 0x74, 0x69, 0x6d,
+ 0x12, 0x1c, 0x0a, 0x04, 0x6d, 0x74, 0x69, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08,
+ 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x76, 0x61, 0x6c, 0x52, 0x04, 0x6d, 0x74, 0x69, 0x6d, 0x12, 0x16,
+ 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
+ 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x79,
+ 0x6d, 0x6c, 0x6e, 0x6b, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x73, 0x79, 0x6d, 0x6c, 0x6e, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22,
+ 0x37, 0x0a, 0x11, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x66, 0x66, 0x18, 0x02, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x03, 0x6f, 0x66, 0x66,
+}
+
+var (
+ file_ghost_file_proto_rawDescOnce sync.Once
+ file_ghost_file_proto_rawDescData = file_ghost_file_proto_rawDesc
+)
+
+func file_ghost_file_proto_rawDescGZIP() []byte {
+ file_ghost_file_proto_rawDescOnce.Do(func() {
+ file_ghost_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_ghost_file_proto_rawDescData)
+ })
+ return file_ghost_file_proto_rawDescData
+}
+
+var file_ghost_file_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_ghost_file_proto_goTypes = []interface{}{
+ (*GhostFileEntry)(nil), // 0: ghost_file_entry
+ (*GhostChunkEntry)(nil), // 1: ghost_chunk_entry
+ (*Timeval)(nil), // 2: timeval
+}
+var file_ghost_file_proto_depIdxs = []int32{
+ 2, // 0: ghost_file_entry.atim:type_name -> timeval
+ 2, // 1: ghost_file_entry.mtim:type_name -> timeval
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_ghost_file_proto_init() }
+func file_ghost_file_proto_init() {
+ if File_ghost_file_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_time_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_ghost_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GhostFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ghost_file_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GhostChunkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ghost_file_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ghost_file_proto_goTypes,
+ DependencyIndexes: file_ghost_file_proto_depIdxs,
+ MessageInfos: file_ghost_file_proto_msgTypes,
+ }.Build()
+ File_ghost_file_proto = out.File
+ file_ghost_file_proto_rawDesc = nil
+ file_ghost_file_proto_goTypes = nil
+ file_ghost_file_proto_depIdxs = nil
+}
diff --git a/crit/images/ghost-file.proto b/crit/images/ghost-file.proto
new file mode 100644
index 0000000..9ecee41
--- /dev/null
+++ b/crit/images/ghost-file.proto
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "time.proto";
+
+message ghost_file_entry {
+ required uint32 uid = 1;
+ required uint32 gid = 2;
+ required uint32 mode = 3;
+
+ optional uint32 dev = 4 [(criu).dev = true];
+ optional uint64 ino = 5;
+ optional uint32 rdev = 6 [(criu).dev = true, (criu).odev = true];
+ optional timeval atim = 7;
+ optional timeval mtim = 8;
+ optional bool chunks = 9;
+ optional uint64 size = 10;
+ /* this field makes sense only when S_ISLNK(mode) */
+ optional string symlnk_target = 11;
+}
+
+message ghost_chunk_entry {
+ required uint64 len = 1;
+ required uint64 off = 2;
+}
diff --git a/crit/images/handler.go b/crit/images/handler.go
new file mode 100644
index 0000000..f622946
--- /dev/null
+++ b/crit/images/handler.go
@@ -0,0 +1,142 @@
+package images
+
+import (
+ "errors"
+ "fmt"
+
+ "google.golang.org/protobuf/proto"
+)
+
+func ProtoHandler(magic string) (proto.Message, error) {
+ switch magic {
+ case "APPARMOR":
+ return &ApparmorEntry{}, nil
+ case "AUTOFS":
+ return &AutofsEntry{}, nil
+ case "BINFMT_MISC":
+ return &BinfmtMiscEntry{}, nil
+ case "BPFMAP_DATA":
+ return &BpfmapDataEntry{}, nil
+ case "BPFMAP_FILE":
+ return &BpfmapFileEntry{}, nil
+ case "CGROUP":
+ return &CgroupEntry{}, nil
+ case "CORE":
+ return &CoreEntry{}, nil
+ case "CPUINFO":
+ return &CpuinfoEntry{}, nil
+ case "CREDS":
+ return &CredsEntry{}, nil
+ case "EVENTFD_FILE":
+ return &EventfdFileEntry{}, nil
+ case "EVENTPOLL_FILE":
+ return &EventpollFileEntry{}, nil
+ case "EVENTPOLL_TFD":
+ return &EventpollTfdEntry{}, nil
+ case "EXT_FILES":
+ return &ExtFileEntry{}, nil
+ case "FANOTIFY_FILE":
+ return &FanotifyFileEntry{}, nil
+ case "FANOTIFY_MARK":
+ return &FanotifyMarkEntry{}, nil
+ case "FDINFO":
+ return &FdinfoEntry{}, nil
+ case "FIFO":
+ return &FifoEntry{}, nil
+ case "FIFO_DATA":
+ return &PipeDataEntry{}, nil
+ case "FILES":
+ return &FileEntry{}, nil
+ case "FILE_LOCKS":
+ return &FileLockEntry{}, nil
+ case "FS":
+ return &FsEntry{}, nil
+ case "IDS":
+ return &TaskKobjIdsEntry{}, nil
+ case "INETSK":
+ return &InetSkEntry{}, nil
+ case "INOTIFY_FILE":
+ return &InotifyFileEntry{}, nil
+ case "INOTIFY_WD":
+ return &InotifyWdEntry{}, nil
+ case "INVENTORY":
+ return &InventoryEntry{}, nil
+ case "IPCNS_MSG":
+ return &IpcMsgEntry{}, nil
+ case "IPCNS_SEM":
+ return &IpcSemEntry{}, nil
+ case "IPCNS_SHM":
+ return &IpcShmEntry{}, nil
+ case "IPC_VAR":
+ return &IpcVarEntry{}, nil
+ case "IRMAP_CACHE":
+ return &IrmapCacheEntry{}, nil
+ case "ITIMERS":
+ return &ItimerEntry{}, nil
+ case "MEMFD_INODE":
+ return &MemfdInodeEntry{}, nil
+ case "MM":
+ return &MmEntry{}, nil
+ case "MNTS":
+ return &MntEntry{}, nil
+ case "NETDEV":
+ return &NetDeviceEntry{}, nil
+ case "NETLINK_SK":
+ return &NetlinkSkEntry{}, nil
+ case "NETNS":
+ return &NetnsEntry{}, nil
+ case "NS_FILES":
+ return &NsFileEntry{}, nil
+ case "PACKETSK":
+ return &PacketSockEntry{}, nil
+ case "PIDNS":
+ return &PidnsEntry{}, nil
+ case "PIPES":
+ return &PipeEntry{}, nil
+ case "PIPES_DATA":
+ return &PipeDataEntry{}, nil
+ case "POSIX_TIMERS":
+ return &PosixTimerEntry{}, nil
+ case "PSTREE":
+ return &PstreeEntry{}, nil
+ case "REG_FILES":
+ return &RegFileEntry{}, nil
+ case "REMAP_FPATH":
+ return &RemapFilePathEntry{}, nil
+ case "RLIMIT":
+ return &RlimitEntry{}, nil
+ case "SECCOMP":
+ return &SeccompEntry{}, nil
+ case "SIGACT":
+ return &SaEntry{}, nil
+ case "SIGNALFD":
+ return &SignalfdEntry{}, nil
+ case "SK_QUEUES":
+ return &SkPacketEntry{}, nil
+ case "STATS":
+ return &StatsEntry{}, nil
+ case "TCP_STREAM":
+ return &TcpStreamEntry{}, nil
+ case "TIMENS":
+ return &TimensEntry{}, nil
+ case "TIMERFD":
+ return &TimerfdEntry{}, nil
+ case "TTY_DATA":
+ return &TtyDataEntry{}, nil
+ case "TTY_FILES":
+ return &TtyFileEntry{}, nil
+ case "TTY_INFO":
+ return &TtyInfoEntry{}, nil
+ case "TUNFILE":
+ return &TunfileEntry{}, nil
+ case "UNIXSK":
+ return &UnixSkEntry{}, nil
+ case "USERNS":
+ return &UsernsEntry{}, nil
+ case "UTSNS":
+ return &UtsnsEntry{}, nil
+ case "VMAS":
+ return &VmaEntry{}, nil
+ }
+ return nil, errors.New(fmt.Sprintf("No handler found for magic 0x%x", magic))
+}
diff --git a/crit/images/img-streamer.pb.go b/crit/images/img-streamer.pb.go
new file mode 100644
index 0000000..8f94a1b
--- /dev/null
+++ b/crit/images/img-streamer.pb.go
@@ -0,0 +1,214 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: img-streamer.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// This message is sent from CRIU to the streamer.
+// - During dump, it communicates the name of the file that is about to be sent
+// to the streamer.
+// - During restore, CRIU requests image files from the streamer. The message is
+// used to communicate the name of the desired file.
+type ImgStreamerRequestEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Filename *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"`
+}
+
+func (x *ImgStreamerRequestEntry) Reset() {
+ *x = ImgStreamerRequestEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_img_streamer_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ImgStreamerRequestEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImgStreamerRequestEntry) ProtoMessage() {}
+
+func (x *ImgStreamerRequestEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_img_streamer_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ImgStreamerRequestEntry.ProtoReflect.Descriptor instead.
+func (*ImgStreamerRequestEntry) Descriptor() ([]byte, []int) {
+ return file_img_streamer_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ImgStreamerRequestEntry) GetFilename() string {
+ if x != nil && x.Filename != nil {
+ return *x.Filename
+ }
+ return ""
+}
+
+// This message is sent from the streamer to CRIU. It is only used during
+// restore to report whether the requested file exists.
+type ImgStreamerReplyEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Exists *bool `protobuf:"varint,1,req,name=exists" json:"exists,omitempty"`
+}
+
+func (x *ImgStreamerReplyEntry) Reset() {
+ *x = ImgStreamerReplyEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_img_streamer_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ImgStreamerReplyEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImgStreamerReplyEntry) ProtoMessage() {}
+
+func (x *ImgStreamerReplyEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_img_streamer_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ImgStreamerReplyEntry.ProtoReflect.Descriptor instead.
+func (*ImgStreamerReplyEntry) Descriptor() ([]byte, []int) {
+ return file_img_streamer_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ImgStreamerReplyEntry) GetExists() bool {
+ if x != nil && x.Exists != nil {
+ return *x.Exists
+ }
+ return false
+}
+
+var File_img_streamer_proto protoreflect.FileDescriptor
+
+var file_img_streamer_proto_rawDesc = []byte{
+ 0x0a, 0x12, 0x69, 0x6d, 0x67, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x72, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x1a, 0x69, 0x6d, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x65,
+ 0x61, 0x6d, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x32,
+ 0x0a, 0x18, 0x69, 0x6d, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x72, 0x5f, 0x72,
+ 0x65, 0x70, 0x6c, 0x79, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78,
+ 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73,
+ 0x74, 0x73,
+}
+
+var (
+ file_img_streamer_proto_rawDescOnce sync.Once
+ file_img_streamer_proto_rawDescData = file_img_streamer_proto_rawDesc
+)
+
+func file_img_streamer_proto_rawDescGZIP() []byte {
+ file_img_streamer_proto_rawDescOnce.Do(func() {
+ file_img_streamer_proto_rawDescData = protoimpl.X.CompressGZIP(file_img_streamer_proto_rawDescData)
+ })
+ return file_img_streamer_proto_rawDescData
+}
+
+var file_img_streamer_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_img_streamer_proto_goTypes = []interface{}{
+ (*ImgStreamerRequestEntry)(nil), // 0: img_streamer_request_entry
+ (*ImgStreamerReplyEntry)(nil), // 1: img_streamer_reply_entry
+}
+var file_img_streamer_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_img_streamer_proto_init() }
+func file_img_streamer_proto_init() {
+ if File_img_streamer_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_img_streamer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ImgStreamerRequestEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_img_streamer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ImgStreamerReplyEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_img_streamer_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_img_streamer_proto_goTypes,
+ DependencyIndexes: file_img_streamer_proto_depIdxs,
+ MessageInfos: file_img_streamer_proto_msgTypes,
+ }.Build()
+ File_img_streamer_proto = out.File
+ file_img_streamer_proto_rawDesc = nil
+ file_img_streamer_proto_goTypes = nil
+ file_img_streamer_proto_depIdxs = nil
+}
diff --git a/crit/images/img-streamer.proto b/crit/images/img-streamer.proto
new file mode 100644
index 0000000..48a3a93
--- /dev/null
+++ b/crit/images/img-streamer.proto
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+// This message is sent from CRIU to the streamer.
+// * During dump, it communicates the name of the file that is about to be sent
+// to the streamer.
+// * During restore, CRIU requests image files from the streamer. The message is
+// used to communicate the name of the desired file.
+message img_streamer_request_entry {
+ required string filename = 1;
+}
+
+// This message is sent from the streamer to CRIU. It is only used during
+// restore to report whether the requested file exists.
+message img_streamer_reply_entry {
+ required bool exists = 1;
+}
diff --git a/crit/images/inventory.pb.go b/crit/images/inventory.pb.go
new file mode 100644
index 0000000..872e6d3
--- /dev/null
+++ b/crit/images/inventory.pb.go
@@ -0,0 +1,305 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: inventory.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Lsmtype int32
+
+const (
+ Lsmtype_NO_LSM Lsmtype = 0
+ Lsmtype_SELINUX Lsmtype = 1
+ Lsmtype_APPARMOR Lsmtype = 2
+)
+
+// Enum value maps for Lsmtype.
+var (
+ Lsmtype_name = map[int32]string{
+ 0: "NO_LSM",
+ 1: "SELINUX",
+ 2: "APPARMOR",
+ }
+ Lsmtype_value = map[string]int32{
+ "NO_LSM": 0,
+ "SELINUX": 1,
+ "APPARMOR": 2,
+ }
+)
+
+func (x Lsmtype) Enum() *Lsmtype {
+ p := new(Lsmtype)
+ *p = x
+ return p
+}
+
+func (x Lsmtype) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Lsmtype) Descriptor() protoreflect.EnumDescriptor {
+ return file_inventory_proto_enumTypes[0].Descriptor()
+}
+
+func (Lsmtype) Type() protoreflect.EnumType {
+ return &file_inventory_proto_enumTypes[0]
+}
+
+func (x Lsmtype) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Lsmtype) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Lsmtype(num)
+ return nil
+}
+
+// Deprecated: Use Lsmtype.Descriptor instead.
+func (Lsmtype) EnumDescriptor() ([]byte, []int) {
+ return file_inventory_proto_rawDescGZIP(), []int{0}
+}
+
+type InventoryEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ImgVersion *uint32 `protobuf:"varint,1,req,name=img_version,json=imgVersion" json:"img_version,omitempty"`
+ FdinfoPerId *bool `protobuf:"varint,2,opt,name=fdinfo_per_id,json=fdinfoPerId" json:"fdinfo_per_id,omitempty"`
+ RootIds *TaskKobjIdsEntry `protobuf:"bytes,3,opt,name=root_ids,json=rootIds" json:"root_ids,omitempty"`
+ NsPerId *bool `protobuf:"varint,4,opt,name=ns_per_id,json=nsPerId" json:"ns_per_id,omitempty"`
+ RootCgSet *uint32 `protobuf:"varint,5,opt,name=root_cg_set,json=rootCgSet" json:"root_cg_set,omitempty"`
+ Lsmtype *Lsmtype `protobuf:"varint,6,opt,name=lsmtype,enum=Lsmtype" json:"lsmtype,omitempty"`
+ DumpUptime *uint64 `protobuf:"varint,8,opt,name=dump_uptime,json=dumpUptime" json:"dump_uptime,omitempty"`
+ PreDumpMode *uint32 `protobuf:"varint,9,opt,name=pre_dump_mode,json=preDumpMode" json:"pre_dump_mode,omitempty"`
+ TcpClose *bool `protobuf:"varint,10,opt,name=tcp_close,json=tcpClose" json:"tcp_close,omitempty"`
+ NetworkLockMethod *uint32 `protobuf:"varint,11,opt,name=network_lock_method,json=networkLockMethod" json:"network_lock_method,omitempty"`
+}
+
+func (x *InventoryEntry) Reset() {
+ *x = InventoryEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InventoryEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InventoryEntry) ProtoMessage() {}
+
+func (x *InventoryEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InventoryEntry.ProtoReflect.Descriptor instead.
+func (*InventoryEntry) Descriptor() ([]byte, []int) {
+ return file_inventory_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *InventoryEntry) GetImgVersion() uint32 {
+ if x != nil && x.ImgVersion != nil {
+ return *x.ImgVersion
+ }
+ return 0
+}
+
+func (x *InventoryEntry) GetFdinfoPerId() bool {
+ if x != nil && x.FdinfoPerId != nil {
+ return *x.FdinfoPerId
+ }
+ return false
+}
+
+func (x *InventoryEntry) GetRootIds() *TaskKobjIdsEntry {
+ if x != nil {
+ return x.RootIds
+ }
+ return nil
+}
+
+func (x *InventoryEntry) GetNsPerId() bool {
+ if x != nil && x.NsPerId != nil {
+ return *x.NsPerId
+ }
+ return false
+}
+
+func (x *InventoryEntry) GetRootCgSet() uint32 {
+ if x != nil && x.RootCgSet != nil {
+ return *x.RootCgSet
+ }
+ return 0
+}
+
+func (x *InventoryEntry) GetLsmtype() Lsmtype {
+ if x != nil && x.Lsmtype != nil {
+ return *x.Lsmtype
+ }
+ return Lsmtype_NO_LSM
+}
+
+func (x *InventoryEntry) GetDumpUptime() uint64 {
+ if x != nil && x.DumpUptime != nil {
+ return *x.DumpUptime
+ }
+ return 0
+}
+
+func (x *InventoryEntry) GetPreDumpMode() uint32 {
+ if x != nil && x.PreDumpMode != nil {
+ return *x.PreDumpMode
+ }
+ return 0
+}
+
+func (x *InventoryEntry) GetTcpClose() bool {
+ if x != nil && x.TcpClose != nil {
+ return *x.TcpClose
+ }
+ return false
+}
+
+func (x *InventoryEntry) GetNetworkLockMethod() uint32 {
+ if x != nil && x.NetworkLockMethod != nil {
+ return *x.NetworkLockMethod
+ }
+ return 0
+}
+
+var File_inventory_proto protoreflect.FileDescriptor
+
+var file_inventory_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x0f, 0x63, 0x72, 0x69, 0x75, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x22, 0xf9, 0x02, 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6d, 0x67, 0x5f, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x69, 0x6d, 0x67,
+ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x66, 0x64, 0x69, 0x6e, 0x66,
+ 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b,
+ 0x66, 0x64, 0x69, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x08, 0x72,
+ 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6b, 0x6f, 0x62, 0x6a, 0x5f, 0x69, 0x64, 0x73, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x09,
+ 0x6e, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x07, 0x6e, 0x73, 0x50, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x72, 0x6f, 0x6f, 0x74,
+ 0x5f, 0x63, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72,
+ 0x6f, 0x6f, 0x74, 0x43, 0x67, 0x53, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x6c, 0x73, 0x6d, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x08, 0x2e, 0x6c, 0x73, 0x6d, 0x74,
+ 0x79, 0x70, 0x65, 0x52, 0x07, 0x6c, 0x73, 0x6d, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x04, 0x52, 0x0a, 0x64, 0x75, 0x6d, 0x70, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a,
+ 0x0d, 0x70, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x44, 0x75, 0x6d, 0x70, 0x4d, 0x6f, 0x64,
+ 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x2e,
+ 0x0a, 0x13, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6d,
+ 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6e, 0x65, 0x74,
+ 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2a, 0x30,
+ 0x0a, 0x07, 0x6c, 0x73, 0x6d, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x5f,
+ 0x4c, 0x53, 0x4d, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x4c, 0x49, 0x4e, 0x55, 0x58,
+ 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, 0x41, 0x52, 0x4d, 0x4f, 0x52, 0x10, 0x02,
+}
+
+var (
+ file_inventory_proto_rawDescOnce sync.Once
+ file_inventory_proto_rawDescData = file_inventory_proto_rawDesc
+)
+
+func file_inventory_proto_rawDescGZIP() []byte {
+ file_inventory_proto_rawDescOnce.Do(func() {
+ file_inventory_proto_rawDescData = protoimpl.X.CompressGZIP(file_inventory_proto_rawDescData)
+ })
+ return file_inventory_proto_rawDescData
+}
+
+var file_inventory_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_inventory_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_inventory_proto_goTypes = []interface{}{
+ (Lsmtype)(0), // 0: lsmtype
+ (*InventoryEntry)(nil), // 1: inventory_entry
+ (*TaskKobjIdsEntry)(nil), // 2: task_kobj_ids_entry
+}
+var file_inventory_proto_depIdxs = []int32{
+ 2, // 0: inventory_entry.root_ids:type_name -> task_kobj_ids_entry
+ 0, // 1: inventory_entry.lsmtype:type_name -> lsmtype
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_inventory_proto_init() }
+func file_inventory_proto_init() {
+ if File_inventory_proto != nil {
+ return
+ }
+ file_criu_core_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_inventory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InventoryEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_inventory_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_inventory_proto_goTypes,
+ DependencyIndexes: file_inventory_proto_depIdxs,
+ EnumInfos: file_inventory_proto_enumTypes,
+ MessageInfos: file_inventory_proto_msgTypes,
+ }.Build()
+ File_inventory_proto = out.File
+ file_inventory_proto_rawDesc = nil
+ file_inventory_proto_goTypes = nil
+ file_inventory_proto_depIdxs = nil
+}
diff --git a/crit/images/inventory.proto b/crit/images/inventory.proto
new file mode 100644
index 0000000..7bc1615
--- /dev/null
+++ b/crit/images/inventory.proto
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "criu-core.proto";
+
+enum lsmtype {
+ NO_LSM = 0;
+ SELINUX = 1;
+ APPARMOR = 2;
+}
+
+message inventory_entry {
+ required uint32 img_version = 1;
+ optional bool fdinfo_per_id = 2;
+ optional task_kobj_ids_entry root_ids = 3;
+ optional bool ns_per_id = 4;
+ optional uint32 root_cg_set = 5;
+ optional lsmtype lsmtype = 6;
+ optional uint64 dump_uptime = 8;
+ optional uint32 pre_dump_mode = 9;
+ optional bool tcp_close = 10;
+ optional uint32 network_lock_method = 11;
+}
diff --git a/crit/images/ipc-desc.pb.go b/crit/images/ipc-desc.pb.go
new file mode 100644
index 0000000..9a8a273
--- /dev/null
+++ b/crit/images/ipc-desc.pb.go
@@ -0,0 +1,197 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ipc-desc.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type IpcDescEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *uint32 `protobuf:"varint,1,req,name=key" json:"key,omitempty"`
+ Uid *uint32 `protobuf:"varint,2,req,name=uid" json:"uid,omitempty"`
+ Gid *uint32 `protobuf:"varint,3,req,name=gid" json:"gid,omitempty"`
+ Cuid *uint32 `protobuf:"varint,4,req,name=cuid" json:"cuid,omitempty"`
+ Cgid *uint32 `protobuf:"varint,5,req,name=cgid" json:"cgid,omitempty"`
+ Mode *uint32 `protobuf:"varint,6,req,name=mode" json:"mode,omitempty"`
+ Id *uint32 `protobuf:"varint,7,req,name=id" json:"id,omitempty"`
+}
+
+func (x *IpcDescEntry) Reset() {
+ *x = IpcDescEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ipc_desc_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpcDescEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpcDescEntry) ProtoMessage() {}
+
+func (x *IpcDescEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ipc_desc_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpcDescEntry.ProtoReflect.Descriptor instead.
+func (*IpcDescEntry) Descriptor() ([]byte, []int) {
+ return file_ipc_desc_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *IpcDescEntry) GetKey() uint32 {
+ if x != nil && x.Key != nil {
+ return *x.Key
+ }
+ return 0
+}
+
+func (x *IpcDescEntry) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *IpcDescEntry) GetGid() uint32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+func (x *IpcDescEntry) GetCuid() uint32 {
+ if x != nil && x.Cuid != nil {
+ return *x.Cuid
+ }
+ return 0
+}
+
+func (x *IpcDescEntry) GetCgid() uint32 {
+ if x != nil && x.Cgid != nil {
+ return *x.Cgid
+ }
+ return 0
+}
+
+func (x *IpcDescEntry) GetMode() uint32 {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return 0
+}
+
+func (x *IpcDescEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+var File_ipc_desc_proto protoreflect.FileDescriptor
+
+var file_ipc_desc_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x69, 0x70, 0x63, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x92, 0x01, 0x0a, 0x0e, 0x69, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x03,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x75, 0x69,
+ 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a,
+ 0x04, 0x63, 0x67, 0x69, 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x67, 0x69,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x02, 0x69, 0x64,
+}
+
+var (
+ file_ipc_desc_proto_rawDescOnce sync.Once
+ file_ipc_desc_proto_rawDescData = file_ipc_desc_proto_rawDesc
+)
+
+func file_ipc_desc_proto_rawDescGZIP() []byte {
+ file_ipc_desc_proto_rawDescOnce.Do(func() {
+ file_ipc_desc_proto_rawDescData = protoimpl.X.CompressGZIP(file_ipc_desc_proto_rawDescData)
+ })
+ return file_ipc_desc_proto_rawDescData
+}
+
+var file_ipc_desc_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_ipc_desc_proto_goTypes = []interface{}{
+ (*IpcDescEntry)(nil), // 0: ipc_desc_entry
+}
+var file_ipc_desc_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_ipc_desc_proto_init() }
+func file_ipc_desc_proto_init() {
+ if File_ipc_desc_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_ipc_desc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpcDescEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ipc_desc_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ipc_desc_proto_goTypes,
+ DependencyIndexes: file_ipc_desc_proto_depIdxs,
+ MessageInfos: file_ipc_desc_proto_msgTypes,
+ }.Build()
+ File_ipc_desc_proto = out.File
+ file_ipc_desc_proto_rawDesc = nil
+ file_ipc_desc_proto_goTypes = nil
+ file_ipc_desc_proto_depIdxs = nil
+}
diff --git a/crit/images/ipc-desc.proto b/crit/images/ipc-desc.proto
new file mode 100644
index 0000000..8b4c7f5
--- /dev/null
+++ b/crit/images/ipc-desc.proto
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message ipc_desc_entry {
+ required uint32 key = 1;
+ required uint32 uid = 2;
+ required uint32 gid = 3;
+ required uint32 cuid = 4;
+ required uint32 cgid = 5;
+ required uint32 mode = 6;
+ required uint32 id = 7;
+}
diff --git a/crit/images/ipc-msg.pb.go b/crit/images/ipc-msg.pb.go
new file mode 100644
index 0000000..d20331e
--- /dev/null
+++ b/crit/images/ipc-msg.pb.go
@@ -0,0 +1,237 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ipc-msg.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type IpcMsg struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Mtype *uint64 `protobuf:"varint,1,req,name=mtype" json:"mtype,omitempty"`
+ Msize *uint32 `protobuf:"varint,2,req,name=msize" json:"msize,omitempty"`
+}
+
+func (x *IpcMsg) Reset() {
+ *x = IpcMsg{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ipc_msg_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpcMsg) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpcMsg) ProtoMessage() {}
+
+func (x *IpcMsg) ProtoReflect() protoreflect.Message {
+ mi := &file_ipc_msg_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpcMsg.ProtoReflect.Descriptor instead.
+func (*IpcMsg) Descriptor() ([]byte, []int) {
+ return file_ipc_msg_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *IpcMsg) GetMtype() uint64 {
+ if x != nil && x.Mtype != nil {
+ return *x.Mtype
+ }
+ return 0
+}
+
+func (x *IpcMsg) GetMsize() uint32 {
+ if x != nil && x.Msize != nil {
+ return *x.Msize
+ }
+ return 0
+}
+
+type IpcMsgEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Desc *IpcDescEntry `protobuf:"bytes,1,req,name=desc" json:"desc,omitempty"`
+ Qbytes *uint32 `protobuf:"varint,2,req,name=qbytes" json:"qbytes,omitempty"`
+ Qnum *uint32 `protobuf:"varint,3,req,name=qnum" json:"qnum,omitempty"`
+}
+
+func (x *IpcMsgEntry) Reset() {
+ *x = IpcMsgEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ipc_msg_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpcMsgEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpcMsgEntry) ProtoMessage() {}
+
+func (x *IpcMsgEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ipc_msg_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpcMsgEntry.ProtoReflect.Descriptor instead.
+func (*IpcMsgEntry) Descriptor() ([]byte, []int) {
+ return file_ipc_msg_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *IpcMsgEntry) GetDesc() *IpcDescEntry {
+ if x != nil {
+ return x.Desc
+ }
+ return nil
+}
+
+func (x *IpcMsgEntry) GetQbytes() uint32 {
+ if x != nil && x.Qbytes != nil {
+ return *x.Qbytes
+ }
+ return 0
+}
+
+func (x *IpcMsgEntry) GetQnum() uint32 {
+ if x != nil && x.Qnum != nil {
+ return *x.Qnum
+ }
+ return 0
+}
+
+var File_ipc_msg_proto protoreflect.FileDescriptor
+
+var file_ipc_msg_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x2d, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0e, 0x69, 0x70, 0x63, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x35, 0x0a, 0x07, 0x69, 0x70, 0x63, 0x5f, 0x6d, 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x6d, 0x74, 0x79, 0x70, 0x65,
+ 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x05, 0x6d, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x60, 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x5f, 0x6d, 0x73,
+ 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x73, 0x63,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x16, 0x0a, 0x06,
+ 0x71, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x71, 0x62,
+ 0x79, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x71, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x04, 0x71, 0x6e, 0x75, 0x6d,
+}
+
+var (
+ file_ipc_msg_proto_rawDescOnce sync.Once
+ file_ipc_msg_proto_rawDescData = file_ipc_msg_proto_rawDesc
+)
+
+func file_ipc_msg_proto_rawDescGZIP() []byte {
+ file_ipc_msg_proto_rawDescOnce.Do(func() {
+ file_ipc_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_ipc_msg_proto_rawDescData)
+ })
+ return file_ipc_msg_proto_rawDescData
+}
+
+var file_ipc_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_ipc_msg_proto_goTypes = []interface{}{
+ (*IpcMsg)(nil), // 0: ipc_msg
+ (*IpcMsgEntry)(nil), // 1: ipc_msg_entry
+ (*IpcDescEntry)(nil), // 2: ipc_desc_entry
+}
+var file_ipc_msg_proto_depIdxs = []int32{
+ 2, // 0: ipc_msg_entry.desc:type_name -> ipc_desc_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_ipc_msg_proto_init() }
+func file_ipc_msg_proto_init() {
+ if File_ipc_msg_proto != nil {
+ return
+ }
+ file_ipc_desc_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_ipc_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpcMsg); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_ipc_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpcMsgEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ipc_msg_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ipc_msg_proto_goTypes,
+ DependencyIndexes: file_ipc_msg_proto_depIdxs,
+ MessageInfos: file_ipc_msg_proto_msgTypes,
+ }.Build()
+ File_ipc_msg_proto = out.File
+ file_ipc_msg_proto_rawDesc = nil
+ file_ipc_msg_proto_goTypes = nil
+ file_ipc_msg_proto_depIdxs = nil
+}
diff --git a/crit/images/ipc-msg.proto b/crit/images/ipc-msg.proto
new file mode 100644
index 0000000..5b31031
--- /dev/null
+++ b/crit/images/ipc-msg.proto
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "ipc-desc.proto";
+
+message ipc_msg {
+ required uint64 mtype = 1;
+ required uint32 msize = 2;
+}
+
+message ipc_msg_entry {
+ required ipc_desc_entry desc = 1;
+ required uint32 qbytes = 2;
+ required uint32 qnum = 3;
+}
diff --git a/crit/images/ipc-sem.pb.go b/crit/images/ipc-sem.pb.go
new file mode 100644
index 0000000..a4b2be8
--- /dev/null
+++ b/crit/images/ipc-sem.pb.go
@@ -0,0 +1,156 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ipc-sem.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type IpcSemEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Desc *IpcDescEntry `protobuf:"bytes,1,req,name=desc" json:"desc,omitempty"`
+ Nsems *uint32 `protobuf:"varint,2,req,name=nsems" json:"nsems,omitempty"`
+}
+
+func (x *IpcSemEntry) Reset() {
+ *x = IpcSemEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ipc_sem_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpcSemEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpcSemEntry) ProtoMessage() {}
+
+func (x *IpcSemEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ipc_sem_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpcSemEntry.ProtoReflect.Descriptor instead.
+func (*IpcSemEntry) Descriptor() ([]byte, []int) {
+ return file_ipc_sem_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *IpcSemEntry) GetDesc() *IpcDescEntry {
+ if x != nil {
+ return x.Desc
+ }
+ return nil
+}
+
+func (x *IpcSemEntry) GetNsems() uint32 {
+ if x != nil && x.Nsems != nil {
+ return *x.Nsems
+ }
+ return 0
+}
+
+var File_ipc_sem_proto protoreflect.FileDescriptor
+
+var file_ipc_sem_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x2d, 0x73, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0e, 0x69, 0x70, 0x63, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x4a, 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x6d, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x23, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0f,
+ 0x2e, 0x69, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x73, 0x65, 0x6d, 0x73, 0x18, 0x02,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x73, 0x65, 0x6d, 0x73,
+}
+
+var (
+ file_ipc_sem_proto_rawDescOnce sync.Once
+ file_ipc_sem_proto_rawDescData = file_ipc_sem_proto_rawDesc
+)
+
+func file_ipc_sem_proto_rawDescGZIP() []byte {
+ file_ipc_sem_proto_rawDescOnce.Do(func() {
+ file_ipc_sem_proto_rawDescData = protoimpl.X.CompressGZIP(file_ipc_sem_proto_rawDescData)
+ })
+ return file_ipc_sem_proto_rawDescData
+}
+
+var file_ipc_sem_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_ipc_sem_proto_goTypes = []interface{}{
+ (*IpcSemEntry)(nil), // 0: ipc_sem_entry
+ (*IpcDescEntry)(nil), // 1: ipc_desc_entry
+}
+var file_ipc_sem_proto_depIdxs = []int32{
+ 1, // 0: ipc_sem_entry.desc:type_name -> ipc_desc_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_ipc_sem_proto_init() }
+func file_ipc_sem_proto_init() {
+ if File_ipc_sem_proto != nil {
+ return
+ }
+ file_ipc_desc_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_ipc_sem_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpcSemEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ipc_sem_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ipc_sem_proto_goTypes,
+ DependencyIndexes: file_ipc_sem_proto_depIdxs,
+ MessageInfos: file_ipc_sem_proto_msgTypes,
+ }.Build()
+ File_ipc_sem_proto = out.File
+ file_ipc_sem_proto_rawDesc = nil
+ file_ipc_sem_proto_goTypes = nil
+ file_ipc_sem_proto_depIdxs = nil
+}
diff --git a/crit/images/ipc-sem.proto b/crit/images/ipc-sem.proto
new file mode 100644
index 0000000..71a2beb
--- /dev/null
+++ b/crit/images/ipc-sem.proto
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "ipc-desc.proto";
+
+message ipc_sem_entry {
+ required ipc_desc_entry desc = 1;
+ required uint32 nsems = 2;
+}
diff --git a/crit/images/ipc-shm.pb.go b/crit/images/ipc-shm.pb.go
new file mode 100644
index 0000000..8dd089c
--- /dev/null
+++ b/crit/images/ipc-shm.pb.go
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ipc-shm.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type IpcShmEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Desc *IpcDescEntry `protobuf:"bytes,1,req,name=desc" json:"desc,omitempty"`
+ Size *uint64 `protobuf:"varint,2,req,name=size" json:"size,omitempty"`
+ InPagemaps *bool `protobuf:"varint,3,opt,name=in_pagemaps,json=inPagemaps" json:"in_pagemaps,omitempty"`
+ HugetlbFlag *uint32 `protobuf:"varint,4,opt,name=hugetlb_flag,json=hugetlbFlag" json:"hugetlb_flag,omitempty"`
+}
+
+func (x *IpcShmEntry) Reset() {
+ *x = IpcShmEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ipc_shm_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpcShmEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpcShmEntry) ProtoMessage() {}
+
+func (x *IpcShmEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ipc_shm_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpcShmEntry.ProtoReflect.Descriptor instead.
+func (*IpcShmEntry) Descriptor() ([]byte, []int) {
+ return file_ipc_shm_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *IpcShmEntry) GetDesc() *IpcDescEntry {
+ if x != nil {
+ return x.Desc
+ }
+ return nil
+}
+
+func (x *IpcShmEntry) GetSize() uint64 {
+ if x != nil && x.Size != nil {
+ return *x.Size
+ }
+ return 0
+}
+
+func (x *IpcShmEntry) GetInPagemaps() bool {
+ if x != nil && x.InPagemaps != nil {
+ return *x.InPagemaps
+ }
+ return false
+}
+
+func (x *IpcShmEntry) GetHugetlbFlag() uint32 {
+ if x != nil && x.HugetlbFlag != nil {
+ return *x.HugetlbFlag
+ }
+ return 0
+}
+
+var File_ipc_shm_proto protoreflect.FileDescriptor
+
+var file_ipc_shm_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x2d, 0x73, 0x68, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0e, 0x69, 0x70, 0x63, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x8c, 0x01, 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x5f, 0x73, 0x68, 0x6d, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32,
+ 0x0f, 0x2e, 0x69, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02,
+ 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e,
+ 0x5f, 0x70, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0a, 0x69, 0x6e, 0x50, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x70, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x68,
+ 0x75, 0x67, 0x65, 0x74, 0x6c, 0x62, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x0b, 0x68, 0x75, 0x67, 0x65, 0x74, 0x6c, 0x62, 0x46, 0x6c, 0x61, 0x67,
+}
+
+var (
+ file_ipc_shm_proto_rawDescOnce sync.Once
+ file_ipc_shm_proto_rawDescData = file_ipc_shm_proto_rawDesc
+)
+
+func file_ipc_shm_proto_rawDescGZIP() []byte {
+ file_ipc_shm_proto_rawDescOnce.Do(func() {
+ file_ipc_shm_proto_rawDescData = protoimpl.X.CompressGZIP(file_ipc_shm_proto_rawDescData)
+ })
+ return file_ipc_shm_proto_rawDescData
+}
+
+var file_ipc_shm_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_ipc_shm_proto_goTypes = []interface{}{
+ (*IpcShmEntry)(nil), // 0: ipc_shm_entry
+ (*IpcDescEntry)(nil), // 1: ipc_desc_entry
+}
+var file_ipc_shm_proto_depIdxs = []int32{
+ 1, // 0: ipc_shm_entry.desc:type_name -> ipc_desc_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_ipc_shm_proto_init() }
+func file_ipc_shm_proto_init() {
+ if File_ipc_shm_proto != nil {
+ return
+ }
+ file_ipc_desc_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_ipc_shm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpcShmEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ipc_shm_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ipc_shm_proto_goTypes,
+ DependencyIndexes: file_ipc_shm_proto_depIdxs,
+ MessageInfos: file_ipc_shm_proto_msgTypes,
+ }.Build()
+ File_ipc_shm_proto = out.File
+ file_ipc_shm_proto_rawDesc = nil
+ file_ipc_shm_proto_goTypes = nil
+ file_ipc_shm_proto_depIdxs = nil
+}
diff --git a/crit/images/ipc-shm.proto b/crit/images/ipc-shm.proto
new file mode 100644
index 0000000..c5feeba
--- /dev/null
+++ b/crit/images/ipc-shm.proto
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "ipc-desc.proto";
+
+message ipc_shm_entry {
+ required ipc_desc_entry desc = 1;
+ required uint64 size = 2;
+ optional bool in_pagemaps = 3;
+ optional uint32 hugetlb_flag = 4;
+}
diff --git a/crit/images/ipc-var.pb.go b/crit/images/ipc-var.pb.go
new file mode 100644
index 0000000..cba7310
--- /dev/null
+++ b/crit/images/ipc-var.pb.go
@@ -0,0 +1,304 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ipc-var.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type IpcVarEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SemCtls []uint32 `protobuf:"varint,1,rep,name=sem_ctls,json=semCtls" json:"sem_ctls,omitempty"`
+ MsgCtlmax *uint32 `protobuf:"varint,2,req,name=msg_ctlmax,json=msgCtlmax" json:"msg_ctlmax,omitempty"`
+ MsgCtlmnb *uint32 `protobuf:"varint,3,req,name=msg_ctlmnb,json=msgCtlmnb" json:"msg_ctlmnb,omitempty"`
+ MsgCtlmni *uint32 `protobuf:"varint,4,req,name=msg_ctlmni,json=msgCtlmni" json:"msg_ctlmni,omitempty"`
+ AutoMsgmni *uint32 `protobuf:"varint,5,req,name=auto_msgmni,json=autoMsgmni" json:"auto_msgmni,omitempty"`
+ ShmCtlmax *uint64 `protobuf:"varint,6,req,name=shm_ctlmax,json=shmCtlmax" json:"shm_ctlmax,omitempty"`
+ ShmCtlall *uint64 `protobuf:"varint,7,req,name=shm_ctlall,json=shmCtlall" json:"shm_ctlall,omitempty"`
+ ShmCtlmni *uint32 `protobuf:"varint,8,req,name=shm_ctlmni,json=shmCtlmni" json:"shm_ctlmni,omitempty"`
+ ShmRmidForced *uint32 `protobuf:"varint,9,req,name=shm_rmid_forced,json=shmRmidForced" json:"shm_rmid_forced,omitempty"`
+ MqQueuesMax *uint32 `protobuf:"varint,10,req,name=mq_queues_max,json=mqQueuesMax" json:"mq_queues_max,omitempty"`
+ MqMsgMax *uint32 `protobuf:"varint,11,req,name=mq_msg_max,json=mqMsgMax" json:"mq_msg_max,omitempty"`
+ MqMsgsizeMax *uint32 `protobuf:"varint,12,req,name=mq_msgsize_max,json=mqMsgsizeMax" json:"mq_msgsize_max,omitempty"`
+ MqMsgDefault *uint32 `protobuf:"varint,13,opt,name=mq_msg_default,json=mqMsgDefault" json:"mq_msg_default,omitempty"`
+ MqMsgsizeDefault *uint32 `protobuf:"varint,14,opt,name=mq_msgsize_default,json=mqMsgsizeDefault" json:"mq_msgsize_default,omitempty"`
+ MsgNextId *uint32 `protobuf:"varint,15,opt,name=msg_next_id,json=msgNextId" json:"msg_next_id,omitempty"`
+ SemNextId *uint32 `protobuf:"varint,16,opt,name=sem_next_id,json=semNextId" json:"sem_next_id,omitempty"`
+ ShmNextId *uint32 `protobuf:"varint,17,opt,name=shm_next_id,json=shmNextId" json:"shm_next_id,omitempty"`
+}
+
+func (x *IpcVarEntry) Reset() {
+ *x = IpcVarEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ipc_var_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpcVarEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpcVarEntry) ProtoMessage() {}
+
+func (x *IpcVarEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ipc_var_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpcVarEntry.ProtoReflect.Descriptor instead.
+func (*IpcVarEntry) Descriptor() ([]byte, []int) {
+ return file_ipc_var_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *IpcVarEntry) GetSemCtls() []uint32 {
+ if x != nil {
+ return x.SemCtls
+ }
+ return nil
+}
+
+func (x *IpcVarEntry) GetMsgCtlmax() uint32 {
+ if x != nil && x.MsgCtlmax != nil {
+ return *x.MsgCtlmax
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMsgCtlmnb() uint32 {
+ if x != nil && x.MsgCtlmnb != nil {
+ return *x.MsgCtlmnb
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMsgCtlmni() uint32 {
+ if x != nil && x.MsgCtlmni != nil {
+ return *x.MsgCtlmni
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetAutoMsgmni() uint32 {
+ if x != nil && x.AutoMsgmni != nil {
+ return *x.AutoMsgmni
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetShmCtlmax() uint64 {
+ if x != nil && x.ShmCtlmax != nil {
+ return *x.ShmCtlmax
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetShmCtlall() uint64 {
+ if x != nil && x.ShmCtlall != nil {
+ return *x.ShmCtlall
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetShmCtlmni() uint32 {
+ if x != nil && x.ShmCtlmni != nil {
+ return *x.ShmCtlmni
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetShmRmidForced() uint32 {
+ if x != nil && x.ShmRmidForced != nil {
+ return *x.ShmRmidForced
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMqQueuesMax() uint32 {
+ if x != nil && x.MqQueuesMax != nil {
+ return *x.MqQueuesMax
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMqMsgMax() uint32 {
+ if x != nil && x.MqMsgMax != nil {
+ return *x.MqMsgMax
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMqMsgsizeMax() uint32 {
+ if x != nil && x.MqMsgsizeMax != nil {
+ return *x.MqMsgsizeMax
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMqMsgDefault() uint32 {
+ if x != nil && x.MqMsgDefault != nil {
+ return *x.MqMsgDefault
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMqMsgsizeDefault() uint32 {
+ if x != nil && x.MqMsgsizeDefault != nil {
+ return *x.MqMsgsizeDefault
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetMsgNextId() uint32 {
+ if x != nil && x.MsgNextId != nil {
+ return *x.MsgNextId
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetSemNextId() uint32 {
+ if x != nil && x.SemNextId != nil {
+ return *x.SemNextId
+ }
+ return 0
+}
+
+func (x *IpcVarEntry) GetShmNextId() uint32 {
+ if x != nil && x.ShmNextId != nil {
+ return *x.ShmNextId
+ }
+ return 0
+}
+
+var File_ipc_var_proto protoreflect.FileDescriptor
+
+var file_ipc_var_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x2d, 0x76, 0x61, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0xc9, 0x04, 0x0a, 0x0d, 0x69, 0x70, 0x63, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x5f, 0x63, 0x74, 0x6c, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x65, 0x6d, 0x43, 0x74, 0x6c, 0x73, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x6d, 0x73, 0x67, 0x5f, 0x63, 0x74, 0x6c, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x09, 0x6d, 0x73, 0x67, 0x43, 0x74, 0x6c, 0x6d, 0x61, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x6d,
+ 0x73, 0x67, 0x5f, 0x63, 0x74, 0x6c, 0x6d, 0x6e, 0x62, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x09, 0x6d, 0x73, 0x67, 0x43, 0x74, 0x6c, 0x6d, 0x6e, 0x62, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x73,
+ 0x67, 0x5f, 0x63, 0x74, 0x6c, 0x6d, 0x6e, 0x69, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09,
+ 0x6d, 0x73, 0x67, 0x43, 0x74, 0x6c, 0x6d, 0x6e, 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74,
+ 0x6f, 0x5f, 0x6d, 0x73, 0x67, 0x6d, 0x6e, 0x69, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a,
+ 0x61, 0x75, 0x74, 0x6f, 0x4d, 0x73, 0x67, 0x6d, 0x6e, 0x69, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68,
+ 0x6d, 0x5f, 0x63, 0x74, 0x6c, 0x6d, 0x61, 0x78, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09,
+ 0x73, 0x68, 0x6d, 0x43, 0x74, 0x6c, 0x6d, 0x61, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x6d,
+ 0x5f, 0x63, 0x74, 0x6c, 0x61, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x73,
+ 0x68, 0x6d, 0x43, 0x74, 0x6c, 0x61, 0x6c, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x6d, 0x5f,
+ 0x63, 0x74, 0x6c, 0x6d, 0x6e, 0x69, 0x18, 0x08, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x68,
+ 0x6d, 0x43, 0x74, 0x6c, 0x6d, 0x6e, 0x69, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x68, 0x6d, 0x5f, 0x72,
+ 0x6d, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, 0x09, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x0d, 0x73, 0x68, 0x6d, 0x52, 0x6d, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12,
+ 0x22, 0x0a, 0x0d, 0x6d, 0x71, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x5f, 0x6d, 0x61, 0x78,
+ 0x18, 0x0a, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x71, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73,
+ 0x4d, 0x61, 0x78, 0x12, 0x1c, 0x0a, 0x0a, 0x6d, 0x71, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x6d, 0x61,
+ 0x78, 0x18, 0x0b, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x6d, 0x71, 0x4d, 0x73, 0x67, 0x4d, 0x61,
+ 0x78, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x71, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x69, 0x7a, 0x65, 0x5f,
+ 0x6d, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x71, 0x4d, 0x73, 0x67,
+ 0x73, 0x69, 0x7a, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x71, 0x5f, 0x6d, 0x73,
+ 0x67, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x0c, 0x6d, 0x71, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x2c, 0x0a,
+ 0x12, 0x6d, 0x71, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x6d, 0x71, 0x4d, 0x73, 0x67,
+ 0x73, 0x69, 0x7a, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x6d,
+ 0x73, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x09, 0x6d, 0x73, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x73,
+ 0x65, 0x6d, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x09, 0x73, 0x65, 0x6d, 0x4e, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x73,
+ 0x68, 0x6d, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x09, 0x73, 0x68, 0x6d, 0x4e, 0x65, 0x78, 0x74, 0x49, 0x64,
+}
+
+var (
+ file_ipc_var_proto_rawDescOnce sync.Once
+ file_ipc_var_proto_rawDescData = file_ipc_var_proto_rawDesc
+)
+
+func file_ipc_var_proto_rawDescGZIP() []byte {
+ file_ipc_var_proto_rawDescOnce.Do(func() {
+ file_ipc_var_proto_rawDescData = protoimpl.X.CompressGZIP(file_ipc_var_proto_rawDescData)
+ })
+ return file_ipc_var_proto_rawDescData
+}
+
+var file_ipc_var_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_ipc_var_proto_goTypes = []interface{}{
+ (*IpcVarEntry)(nil), // 0: ipc_var_entry
+}
+var file_ipc_var_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_ipc_var_proto_init() }
+func file_ipc_var_proto_init() {
+ if File_ipc_var_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_ipc_var_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpcVarEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ipc_var_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ipc_var_proto_goTypes,
+ DependencyIndexes: file_ipc_var_proto_depIdxs,
+ MessageInfos: file_ipc_var_proto_msgTypes,
+ }.Build()
+ File_ipc_var_proto = out.File
+ file_ipc_var_proto_rawDesc = nil
+ file_ipc_var_proto_goTypes = nil
+ file_ipc_var_proto_depIdxs = nil
+}
diff --git a/crit/images/ipc-var.proto b/crit/images/ipc-var.proto
new file mode 100644
index 0000000..a5e2df9
--- /dev/null
+++ b/crit/images/ipc-var.proto
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message ipc_var_entry {
+ repeated uint32 sem_ctls = 1;
+ required uint32 msg_ctlmax = 2;
+ required uint32 msg_ctlmnb = 3;
+ required uint32 msg_ctlmni = 4;
+ required uint32 auto_msgmni = 5;
+ required uint64 shm_ctlmax = 6;
+ required uint64 shm_ctlall = 7;
+ required uint32 shm_ctlmni = 8;
+ required uint32 shm_rmid_forced = 9;
+ required uint32 mq_queues_max = 10;
+ required uint32 mq_msg_max = 11;
+ required uint32 mq_msgsize_max = 12;
+ optional uint32 mq_msg_default = 13;
+ optional uint32 mq_msgsize_default = 14;
+ optional uint32 msg_next_id = 15;
+ optional uint32 sem_next_id = 16;
+ optional uint32 shm_next_id = 17;
+}
diff --git a/crit/images/macvlan.pb.go b/crit/images/macvlan.pb.go
new file mode 100644
index 0000000..abab1c1
--- /dev/null
+++ b/crit/images/macvlan.pb.go
@@ -0,0 +1,151 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: macvlan.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MacvlanLinkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Mode *uint32 `protobuf:"varint,1,req,name=mode" json:"mode,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,opt,name=flags" json:"flags,omitempty"`
+}
+
+func (x *MacvlanLinkEntry) Reset() {
+ *x = MacvlanLinkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_macvlan_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MacvlanLinkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MacvlanLinkEntry) ProtoMessage() {}
+
+func (x *MacvlanLinkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_macvlan_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MacvlanLinkEntry.ProtoReflect.Descriptor instead.
+func (*MacvlanLinkEntry) Descriptor() ([]byte, []int) {
+ return file_macvlan_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MacvlanLinkEntry) GetMode() uint32 {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return 0
+}
+
+func (x *MacvlanLinkEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+var File_macvlan_proto protoreflect.FileDescriptor
+
+var file_macvlan_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x76, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x3e, 0x0a, 0x12, 0x6d, 0x61, 0x63, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73,
+}
+
+var (
+ file_macvlan_proto_rawDescOnce sync.Once
+ file_macvlan_proto_rawDescData = file_macvlan_proto_rawDesc
+)
+
+func file_macvlan_proto_rawDescGZIP() []byte {
+ file_macvlan_proto_rawDescOnce.Do(func() {
+ file_macvlan_proto_rawDescData = protoimpl.X.CompressGZIP(file_macvlan_proto_rawDescData)
+ })
+ return file_macvlan_proto_rawDescData
+}
+
+var file_macvlan_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_macvlan_proto_goTypes = []interface{}{
+ (*MacvlanLinkEntry)(nil), // 0: macvlan_link_entry
+}
+var file_macvlan_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_macvlan_proto_init() }
+func file_macvlan_proto_init() {
+ if File_macvlan_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_macvlan_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MacvlanLinkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_macvlan_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_macvlan_proto_goTypes,
+ DependencyIndexes: file_macvlan_proto_depIdxs,
+ MessageInfos: file_macvlan_proto_msgTypes,
+ }.Build()
+ File_macvlan_proto = out.File
+ file_macvlan_proto_rawDesc = nil
+ file_macvlan_proto_goTypes = nil
+ file_macvlan_proto_depIdxs = nil
+}
diff --git a/crit/images/macvlan.proto b/crit/images/macvlan.proto
new file mode 100644
index 0000000..6f78076
--- /dev/null
+++ b/crit/images/macvlan.proto
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message macvlan_link_entry {
+ required uint32 mode = 1;
+ optional uint32 flags = 2;
+}
diff --git a/crit/images/memfd.pb.go b/crit/images/memfd.pb.go
new file mode 100644
index 0000000..23005e9
--- /dev/null
+++ b/crit/images/memfd.pb.go
@@ -0,0 +1,316 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: memfd.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MemfdFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Pos *uint64 `protobuf:"varint,3,req,name=pos" json:"pos,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,4,req,name=fown" json:"fown,omitempty"`
+ InodeId *uint32 `protobuf:"varint,5,req,name=inode_id,json=inodeId" json:"inode_id,omitempty"`
+}
+
+func (x *MemfdFileEntry) Reset() {
+ *x = MemfdFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_memfd_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MemfdFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MemfdFileEntry) ProtoMessage() {}
+
+func (x *MemfdFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_memfd_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MemfdFileEntry.ProtoReflect.Descriptor instead.
+func (*MemfdFileEntry) Descriptor() ([]byte, []int) {
+ return file_memfd_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MemfdFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *MemfdFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *MemfdFileEntry) GetPos() uint64 {
+ if x != nil && x.Pos != nil {
+ return *x.Pos
+ }
+ return 0
+}
+
+func (x *MemfdFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *MemfdFileEntry) GetInodeId() uint32 {
+ if x != nil && x.InodeId != nil {
+ return *x.InodeId
+ }
+ return 0
+}
+
+type MemfdInodeEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
+ Uid *uint32 `protobuf:"varint,2,req,name=uid" json:"uid,omitempty"`
+ Gid *uint32 `protobuf:"varint,3,req,name=gid" json:"gid,omitempty"`
+ Size *uint64 `protobuf:"varint,4,req,name=size" json:"size,omitempty"`
+ Shmid *uint32 `protobuf:"varint,5,req,name=shmid" json:"shmid,omitempty"`
+ Seals *uint32 `protobuf:"varint,6,req,name=seals" json:"seals,omitempty"`
+ InodeId *uint64 `protobuf:"varint,7,req,name=inode_id,json=inodeId" json:"inode_id,omitempty"`
+ HugetlbFlag *uint32 `protobuf:"varint,8,opt,name=hugetlb_flag,json=hugetlbFlag" json:"hugetlb_flag,omitempty"`
+}
+
+func (x *MemfdInodeEntry) Reset() {
+ *x = MemfdInodeEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_memfd_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MemfdInodeEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MemfdInodeEntry) ProtoMessage() {}
+
+func (x *MemfdInodeEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_memfd_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MemfdInodeEntry.ProtoReflect.Descriptor instead.
+func (*MemfdInodeEntry) Descriptor() ([]byte, []int) {
+ return file_memfd_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *MemfdInodeEntry) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *MemfdInodeEntry) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *MemfdInodeEntry) GetGid() uint32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+func (x *MemfdInodeEntry) GetSize() uint64 {
+ if x != nil && x.Size != nil {
+ return *x.Size
+ }
+ return 0
+}
+
+func (x *MemfdInodeEntry) GetShmid() uint32 {
+ if x != nil && x.Shmid != nil {
+ return *x.Shmid
+ }
+ return 0
+}
+
+func (x *MemfdInodeEntry) GetSeals() uint32 {
+ if x != nil && x.Seals != nil {
+ return *x.Seals
+ }
+ return 0
+}
+
+func (x *MemfdInodeEntry) GetInodeId() uint64 {
+ if x != nil && x.InodeId != nil {
+ return *x.InodeId
+ }
+ return 0
+}
+
+func (x *MemfdInodeEntry) GetHugetlbFlag() uint32 {
+ if x != nil && x.HugetlbFlag != nil {
+ return *x.HugetlbFlag
+ }
+ return 0
+}
+
+var File_memfd_proto protoreflect.FileDescriptor
+
+var file_memfd_proto_rawDesc = []byte{
+ 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x66, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f,
+ 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x66, 0x64, 0x5f,
+ 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x10, 0xd2, 0x3f, 0x0d, 0x1a, 0x0b,
+ 0x72, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x03, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64,
+ 0x22, 0xdb, 0x01, 0x0a, 0x11, 0x6d, 0x65, 0x6d, 0x66, 0x64, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
+ 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03,
+ 0x67, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12,
+ 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69,
+ 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x6d, 0x69, 0x64, 0x18, 0x05, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x05, 0x73, 0x68, 0x6d, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x65, 0x61, 0x6c,
+ 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x10, 0xd2, 0x3f, 0x0d, 0x1a, 0x0b, 0x73, 0x65,
+ 0x61, 0x6c, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x73, 0x65, 0x61, 0x6c, 0x73,
+ 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x07, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x68,
+ 0x75, 0x67, 0x65, 0x74, 0x6c, 0x62, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x0b, 0x68, 0x75, 0x67, 0x65, 0x74, 0x6c, 0x62, 0x46, 0x6c, 0x61, 0x67,
+}
+
+var (
+ file_memfd_proto_rawDescOnce sync.Once
+ file_memfd_proto_rawDescData = file_memfd_proto_rawDesc
+)
+
+func file_memfd_proto_rawDescGZIP() []byte {
+ file_memfd_proto_rawDescOnce.Do(func() {
+ file_memfd_proto_rawDescData = protoimpl.X.CompressGZIP(file_memfd_proto_rawDescData)
+ })
+ return file_memfd_proto_rawDescData
+}
+
+var file_memfd_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_memfd_proto_goTypes = []interface{}{
+ (*MemfdFileEntry)(nil), // 0: memfd_file_entry
+ (*MemfdInodeEntry)(nil), // 1: memfd_inode_entry
+ (*FownEntry)(nil), // 2: fown_entry
+}
+var file_memfd_proto_depIdxs = []int32{
+ 2, // 0: memfd_file_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_memfd_proto_init() }
+func file_memfd_proto_init() {
+ if File_memfd_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_memfd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MemfdFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_memfd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MemfdInodeEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_memfd_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_memfd_proto_goTypes,
+ DependencyIndexes: file_memfd_proto_depIdxs,
+ MessageInfos: file_memfd_proto_msgTypes,
+ }.Build()
+ File_memfd_proto = out.File
+ file_memfd_proto_rawDesc = nil
+ file_memfd_proto_goTypes = nil
+ file_memfd_proto_depIdxs = nil
+}
diff --git a/crit/images/memfd.proto b/crit/images/memfd.proto
new file mode 100644
index 0000000..0e62541
--- /dev/null
+++ b/crit/images/memfd.proto
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+
+message memfd_file_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2 [(criu).flags = "rfile.flags"];
+ required uint64 pos = 3;
+ required fown_entry fown = 4;
+ required uint32 inode_id = 5;
+};
+
+message memfd_inode_entry {
+ required string name = 1;
+ required uint32 uid = 2;
+ required uint32 gid = 3;
+ required uint64 size = 4;
+ required uint32 shmid = 5;
+ required uint32 seals = 6 [(criu).flags = "seals.flags"];
+ required uint64 inode_id = 7;
+ optional uint32 hugetlb_flag = 8;
+};
diff --git a/crit/images/mm.pb.go b/crit/images/mm.pb.go
new file mode 100644
index 0000000..c76b33b
--- /dev/null
+++ b/crit/images/mm.pb.go
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: mm.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type AioRingEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ NrReq *uint32 `protobuf:"varint,2,req,name=nr_req,json=nrReq" json:"nr_req,omitempty"`
+ RingLen *uint32 `protobuf:"varint,3,req,name=ring_len,json=ringLen" json:"ring_len,omitempty"`
+}
+
+func (x *AioRingEntry) Reset() {
+ *x = AioRingEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_mm_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AioRingEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AioRingEntry) ProtoMessage() {}
+
+func (x *AioRingEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_mm_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AioRingEntry.ProtoReflect.Descriptor instead.
+func (*AioRingEntry) Descriptor() ([]byte, []int) {
+ return file_mm_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *AioRingEntry) GetId() uint64 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *AioRingEntry) GetNrReq() uint32 {
+ if x != nil && x.NrReq != nil {
+ return *x.NrReq
+ }
+ return 0
+}
+
+func (x *AioRingEntry) GetRingLen() uint32 {
+ if x != nil && x.RingLen != nil {
+ return *x.RingLen
+ }
+ return 0
+}
+
+type MmEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MmStartCode *uint64 `protobuf:"varint,1,req,name=mm_start_code,json=mmStartCode" json:"mm_start_code,omitempty"`
+ MmEndCode *uint64 `protobuf:"varint,2,req,name=mm_end_code,json=mmEndCode" json:"mm_end_code,omitempty"`
+ MmStartData *uint64 `protobuf:"varint,3,req,name=mm_start_data,json=mmStartData" json:"mm_start_data,omitempty"`
+ MmEndData *uint64 `protobuf:"varint,4,req,name=mm_end_data,json=mmEndData" json:"mm_end_data,omitempty"`
+ MmStartStack *uint64 `protobuf:"varint,5,req,name=mm_start_stack,json=mmStartStack" json:"mm_start_stack,omitempty"`
+ MmStartBrk *uint64 `protobuf:"varint,6,req,name=mm_start_brk,json=mmStartBrk" json:"mm_start_brk,omitempty"`
+ MmBrk *uint64 `protobuf:"varint,7,req,name=mm_brk,json=mmBrk" json:"mm_brk,omitempty"`
+ MmArgStart *uint64 `protobuf:"varint,8,req,name=mm_arg_start,json=mmArgStart" json:"mm_arg_start,omitempty"`
+ MmArgEnd *uint64 `protobuf:"varint,9,req,name=mm_arg_end,json=mmArgEnd" json:"mm_arg_end,omitempty"`
+ MmEnvStart *uint64 `protobuf:"varint,10,req,name=mm_env_start,json=mmEnvStart" json:"mm_env_start,omitempty"`
+ MmEnvEnd *uint64 `protobuf:"varint,11,req,name=mm_env_end,json=mmEnvEnd" json:"mm_env_end,omitempty"`
+ ExeFileId *uint32 `protobuf:"varint,12,req,name=exe_file_id,json=exeFileId" json:"exe_file_id,omitempty"`
+ MmSavedAuxv []uint64 `protobuf:"varint,13,rep,name=mm_saved_auxv,json=mmSavedAuxv" json:"mm_saved_auxv,omitempty"`
+ Vmas []*VmaEntry `protobuf:"bytes,14,rep,name=vmas" json:"vmas,omitempty"`
+ Dumpable *int32 `protobuf:"varint,15,opt,name=dumpable" json:"dumpable,omitempty"`
+ Aios []*AioRingEntry `protobuf:"bytes,16,rep,name=aios" json:"aios,omitempty"`
+ ThpDisabled *bool `protobuf:"varint,17,opt,name=thp_disabled,json=thpDisabled" json:"thp_disabled,omitempty"`
+}
+
+func (x *MmEntry) Reset() {
+ *x = MmEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_mm_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MmEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MmEntry) ProtoMessage() {}
+
+func (x *MmEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_mm_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MmEntry.ProtoReflect.Descriptor instead.
+func (*MmEntry) Descriptor() ([]byte, []int) {
+ return file_mm_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *MmEntry) GetMmStartCode() uint64 {
+ if x != nil && x.MmStartCode != nil {
+ return *x.MmStartCode
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmEndCode() uint64 {
+ if x != nil && x.MmEndCode != nil {
+ return *x.MmEndCode
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmStartData() uint64 {
+ if x != nil && x.MmStartData != nil {
+ return *x.MmStartData
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmEndData() uint64 {
+ if x != nil && x.MmEndData != nil {
+ return *x.MmEndData
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmStartStack() uint64 {
+ if x != nil && x.MmStartStack != nil {
+ return *x.MmStartStack
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmStartBrk() uint64 {
+ if x != nil && x.MmStartBrk != nil {
+ return *x.MmStartBrk
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmBrk() uint64 {
+ if x != nil && x.MmBrk != nil {
+ return *x.MmBrk
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmArgStart() uint64 {
+ if x != nil && x.MmArgStart != nil {
+ return *x.MmArgStart
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmArgEnd() uint64 {
+ if x != nil && x.MmArgEnd != nil {
+ return *x.MmArgEnd
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmEnvStart() uint64 {
+ if x != nil && x.MmEnvStart != nil {
+ return *x.MmEnvStart
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmEnvEnd() uint64 {
+ if x != nil && x.MmEnvEnd != nil {
+ return *x.MmEnvEnd
+ }
+ return 0
+}
+
+func (x *MmEntry) GetExeFileId() uint32 {
+ if x != nil && x.ExeFileId != nil {
+ return *x.ExeFileId
+ }
+ return 0
+}
+
+func (x *MmEntry) GetMmSavedAuxv() []uint64 {
+ if x != nil {
+ return x.MmSavedAuxv
+ }
+ return nil
+}
+
+func (x *MmEntry) GetVmas() []*VmaEntry {
+ if x != nil {
+ return x.Vmas
+ }
+ return nil
+}
+
+func (x *MmEntry) GetDumpable() int32 {
+ if x != nil && x.Dumpable != nil {
+ return *x.Dumpable
+ }
+ return 0
+}
+
+func (x *MmEntry) GetAios() []*AioRingEntry {
+ if x != nil {
+ return x.Aios
+ }
+ return nil
+}
+
+func (x *MmEntry) GetThpDisabled() bool {
+ if x != nil && x.ThpDisabled != nil {
+ return *x.ThpDisabled
+ }
+ return false
+}
+
+var File_mm_proto protoreflect.FileDescriptor
+
+var file_mm_proto_rawDesc = []byte{
+ 0x0a, 0x08, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x76, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x52, 0x0a, 0x0e, 0x61, 0x69, 0x6f, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x72, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x69,
+ 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x69,
+ 0x6e, 0x67, 0x4c, 0x65, 0x6e, 0x22, 0x86, 0x05, 0x0a, 0x08, 0x6d, 0x6d, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x29, 0x0a, 0x0d, 0x6d, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63,
+ 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01,
+ 0x52, 0x0b, 0x6d, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a,
+ 0x0b, 0x6d, 0x6d, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x09, 0x6d, 0x6d, 0x45, 0x6e, 0x64,
+ 0x43, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x0d, 0x6d, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74,
+ 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02,
+ 0x08, 0x01, 0x52, 0x0b, 0x6d, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12,
+ 0x25, 0x0a, 0x0b, 0x6d, 0x6d, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
+ 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x09, 0x6d, 0x6d, 0x45,
+ 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x6d, 0x5f, 0x73, 0x74, 0x61,
+ 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05,
+ 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x6d, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74,
+ 0x61, 0x63, 0x6b, 0x12, 0x27, 0x0a, 0x0c, 0x6d, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f,
+ 0x62, 0x72, 0x6b, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01,
+ 0x52, 0x0a, 0x6d, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x72, 0x6b, 0x12, 0x1c, 0x0a, 0x06,
+ 0x6d, 0x6d, 0x5f, 0x62, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f,
+ 0x02, 0x08, 0x01, 0x52, 0x05, 0x6d, 0x6d, 0x42, 0x72, 0x6b, 0x12, 0x27, 0x0a, 0x0c, 0x6d, 0x6d,
+ 0x5f, 0x61, 0x72, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x08, 0x20, 0x02, 0x28, 0x04,
+ 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x6d, 0x6d, 0x41, 0x72, 0x67, 0x53, 0x74,
+ 0x61, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x6d, 0x5f, 0x61, 0x72, 0x67, 0x5f, 0x65, 0x6e,
+ 0x64, 0x18, 0x09, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x08,
+ 0x6d, 0x6d, 0x41, 0x72, 0x67, 0x45, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x0c, 0x6d, 0x6d, 0x5f, 0x65,
+ 0x6e, 0x76, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05,
+ 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x6d, 0x6d, 0x45, 0x6e, 0x76, 0x53, 0x74, 0x61, 0x72,
+ 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x6d, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x65, 0x6e, 0x64, 0x18,
+ 0x0b, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x6d,
+ 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x5f, 0x66, 0x69,
+ 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x65, 0x78, 0x65,
+ 0x46, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x6d, 0x5f, 0x73, 0x61, 0x76,
+ 0x65, 0x64, 0x5f, 0x61, 0x75, 0x78, 0x76, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0b, 0x6d,
+ 0x6d, 0x53, 0x61, 0x76, 0x65, 0x64, 0x41, 0x75, 0x78, 0x76, 0x12, 0x1e, 0x0a, 0x04, 0x76, 0x6d,
+ 0x61, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x6d, 0x61, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x76, 0x6d, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75,
+ 0x6d, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75,
+ 0x6d, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x61, 0x69, 0x6f, 0x73, 0x18, 0x10,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x69, 0x6f, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x69, 0x6f, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74,
+ 0x68, 0x70, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0b, 0x74, 0x68, 0x70, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64,
+}
+
+var (
+ file_mm_proto_rawDescOnce sync.Once
+ file_mm_proto_rawDescData = file_mm_proto_rawDesc
+)
+
+func file_mm_proto_rawDescGZIP() []byte {
+ file_mm_proto_rawDescOnce.Do(func() {
+ file_mm_proto_rawDescData = protoimpl.X.CompressGZIP(file_mm_proto_rawDescData)
+ })
+ return file_mm_proto_rawDescData
+}
+
+var file_mm_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_mm_proto_goTypes = []interface{}{
+ (*AioRingEntry)(nil), // 0: aio_ring_entry
+ (*MmEntry)(nil), // 1: mm_entry
+ (*VmaEntry)(nil), // 2: vma_entry
+}
+var file_mm_proto_depIdxs = []int32{
+ 2, // 0: mm_entry.vmas:type_name -> vma_entry
+ 0, // 1: mm_entry.aios:type_name -> aio_ring_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_mm_proto_init() }
+func file_mm_proto_init() {
+ if File_mm_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_vma_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_mm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AioRingEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_mm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MmEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_mm_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_mm_proto_goTypes,
+ DependencyIndexes: file_mm_proto_depIdxs,
+ MessageInfos: file_mm_proto_msgTypes,
+ }.Build()
+ File_mm_proto = out.File
+ file_mm_proto_rawDesc = nil
+ file_mm_proto_goTypes = nil
+ file_mm_proto_depIdxs = nil
+}
diff --git a/crit/images/mm.proto b/crit/images/mm.proto
new file mode 100644
index 0000000..b37668c
--- /dev/null
+++ b/crit/images/mm.proto
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "vma.proto";
+
+message aio_ring_entry {
+ required uint64 id = 1;
+ required uint32 nr_req = 2;
+ required uint32 ring_len = 3;
+}
+
+message mm_entry {
+ required uint64 mm_start_code = 1 [(criu).hex = true];
+ required uint64 mm_end_code = 2 [(criu).hex = true];
+ required uint64 mm_start_data = 3 [(criu).hex = true];
+ required uint64 mm_end_data = 4 [(criu).hex = true];
+ required uint64 mm_start_stack = 5 [(criu).hex = true];
+ required uint64 mm_start_brk = 6 [(criu).hex = true];
+ required uint64 mm_brk = 7 [(criu).hex = true];
+ required uint64 mm_arg_start = 8 [(criu).hex = true];
+ required uint64 mm_arg_end = 9 [(criu).hex = true];
+ required uint64 mm_env_start = 10 [(criu).hex = true];
+ required uint64 mm_env_end = 11 [(criu).hex = true];
+ required uint32 exe_file_id = 12;
+
+ repeated uint64 mm_saved_auxv = 13;
+
+ repeated vma_entry vmas = 14;
+
+ optional int32 dumpable = 15;
+ repeated aio_ring_entry aios = 16;
+ optional bool thp_disabled = 17;
+}
diff --git a/crit/images/mnt.pb.go b/crit/images/mnt.pb.go
new file mode 100644
index 0000000..3c0a385
--- /dev/null
+++ b/crit/images/mnt.pb.go
@@ -0,0 +1,444 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: mnt.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Fstype int32
+
+const (
+ Fstype_UNSUPPORTED Fstype = 0
+ Fstype_PROC Fstype = 1
+ Fstype_SYSFS Fstype = 2
+ Fstype_DEVTMPFS Fstype = 3
+ Fstype_BINFMT_MISC Fstype = 4
+ Fstype_TMPFS Fstype = 5
+ Fstype_DEVPTS Fstype = 6
+ Fstype_SIMFS Fstype = 7
+ Fstype_PSTORE Fstype = 8
+ Fstype_SECURITYFS Fstype = 9
+ Fstype_FUSECTL Fstype = 10
+ Fstype_DEBUGFS Fstype = 11
+ Fstype_CGROUP Fstype = 12
+ Fstype_AUFS Fstype = 13
+ Fstype_MQUEUE Fstype = 14
+ Fstype_FUSE Fstype = 15
+ Fstype_AUTO Fstype = 16
+ Fstype_OVERLAYFS Fstype = 17
+ Fstype_AUTOFS Fstype = 18
+ Fstype_TRACEFS Fstype = 19
+ Fstype_CGROUP2 Fstype = 23
+)
+
+// Enum value maps for Fstype.
+var (
+ Fstype_name = map[int32]string{
+ 0: "UNSUPPORTED",
+ 1: "PROC",
+ 2: "SYSFS",
+ 3: "DEVTMPFS",
+ 4: "BINFMT_MISC",
+ 5: "TMPFS",
+ 6: "DEVPTS",
+ 7: "SIMFS",
+ 8: "PSTORE",
+ 9: "SECURITYFS",
+ 10: "FUSECTL",
+ 11: "DEBUGFS",
+ 12: "CGROUP",
+ 13: "AUFS",
+ 14: "MQUEUE",
+ 15: "FUSE",
+ 16: "AUTO",
+ 17: "OVERLAYFS",
+ 18: "AUTOFS",
+ 19: "TRACEFS",
+ 23: "CGROUP2",
+ }
+ Fstype_value = map[string]int32{
+ "UNSUPPORTED": 0,
+ "PROC": 1,
+ "SYSFS": 2,
+ "DEVTMPFS": 3,
+ "BINFMT_MISC": 4,
+ "TMPFS": 5,
+ "DEVPTS": 6,
+ "SIMFS": 7,
+ "PSTORE": 8,
+ "SECURITYFS": 9,
+ "FUSECTL": 10,
+ "DEBUGFS": 11,
+ "CGROUP": 12,
+ "AUFS": 13,
+ "MQUEUE": 14,
+ "FUSE": 15,
+ "AUTO": 16,
+ "OVERLAYFS": 17,
+ "AUTOFS": 18,
+ "TRACEFS": 19,
+ "CGROUP2": 23,
+ }
+)
+
+func (x Fstype) Enum() *Fstype {
+ p := new(Fstype)
+ *p = x
+ return p
+}
+
+func (x Fstype) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Fstype) Descriptor() protoreflect.EnumDescriptor {
+ return file_mnt_proto_enumTypes[0].Descriptor()
+}
+
+func (Fstype) Type() protoreflect.EnumType {
+ return &file_mnt_proto_enumTypes[0]
+}
+
+func (x Fstype) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Fstype) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Fstype(num)
+ return nil
+}
+
+// Deprecated: Use Fstype.Descriptor instead.
+func (Fstype) EnumDescriptor() ([]byte, []int) {
+ return file_mnt_proto_rawDescGZIP(), []int{0}
+}
+
+type MntEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Fstype *uint32 `protobuf:"varint,1,req,name=fstype" json:"fstype,omitempty"`
+ MntId *uint32 `protobuf:"varint,2,req,name=mnt_id,json=mntId" json:"mnt_id,omitempty"`
+ RootDev *uint32 `protobuf:"varint,3,req,name=root_dev,json=rootDev" json:"root_dev,omitempty"`
+ ParentMntId *uint32 `protobuf:"varint,4,req,name=parent_mnt_id,json=parentMntId" json:"parent_mnt_id,omitempty"`
+ Flags *uint32 `protobuf:"varint,5,req,name=flags" json:"flags,omitempty"`
+ Root *string `protobuf:"bytes,6,req,name=root" json:"root,omitempty"`
+ Mountpoint *string `protobuf:"bytes,7,req,name=mountpoint" json:"mountpoint,omitempty"`
+ Source *string `protobuf:"bytes,8,req,name=source" json:"source,omitempty"`
+ Options *string `protobuf:"bytes,9,req,name=options" json:"options,omitempty"`
+ SharedId *uint32 `protobuf:"varint,10,opt,name=shared_id,json=sharedId" json:"shared_id,omitempty"`
+ MasterId *uint32 `protobuf:"varint,11,opt,name=master_id,json=masterId" json:"master_id,omitempty"`
+ WithPlugin *bool `protobuf:"varint,12,opt,name=with_plugin,json=withPlugin" json:"with_plugin,omitempty"`
+ ExtMount *bool `protobuf:"varint,13,opt,name=ext_mount,json=extMount" json:"ext_mount,omitempty"`
+ Fsname *string `protobuf:"bytes,14,opt,name=fsname" json:"fsname,omitempty"`
+ InternalSharing *bool `protobuf:"varint,15,opt,name=internal_sharing,json=internalSharing" json:"internal_sharing,omitempty"`
+ Deleted *bool `protobuf:"varint,16,opt,name=deleted" json:"deleted,omitempty"`
+ SbFlags *uint32 `protobuf:"varint,17,opt,name=sb_flags,json=sbFlags" json:"sb_flags,omitempty"`
+ // user defined mapping for external mount
+ ExtKey *string `protobuf:"bytes,18,opt,name=ext_key,json=extKey" json:"ext_key,omitempty"`
+}
+
+func (x *MntEntry) Reset() {
+ *x = MntEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_mnt_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MntEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MntEntry) ProtoMessage() {}
+
+func (x *MntEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_mnt_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MntEntry.ProtoReflect.Descriptor instead.
+func (*MntEntry) Descriptor() ([]byte, []int) {
+ return file_mnt_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MntEntry) GetFstype() uint32 {
+ if x != nil && x.Fstype != nil {
+ return *x.Fstype
+ }
+ return 0
+}
+
+func (x *MntEntry) GetMntId() uint32 {
+ if x != nil && x.MntId != nil {
+ return *x.MntId
+ }
+ return 0
+}
+
+func (x *MntEntry) GetRootDev() uint32 {
+ if x != nil && x.RootDev != nil {
+ return *x.RootDev
+ }
+ return 0
+}
+
+func (x *MntEntry) GetParentMntId() uint32 {
+ if x != nil && x.ParentMntId != nil {
+ return *x.ParentMntId
+ }
+ return 0
+}
+
+func (x *MntEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *MntEntry) GetRoot() string {
+ if x != nil && x.Root != nil {
+ return *x.Root
+ }
+ return ""
+}
+
+func (x *MntEntry) GetMountpoint() string {
+ if x != nil && x.Mountpoint != nil {
+ return *x.Mountpoint
+ }
+ return ""
+}
+
+func (x *MntEntry) GetSource() string {
+ if x != nil && x.Source != nil {
+ return *x.Source
+ }
+ return ""
+}
+
+func (x *MntEntry) GetOptions() string {
+ if x != nil && x.Options != nil {
+ return *x.Options
+ }
+ return ""
+}
+
+func (x *MntEntry) GetSharedId() uint32 {
+ if x != nil && x.SharedId != nil {
+ return *x.SharedId
+ }
+ return 0
+}
+
+func (x *MntEntry) GetMasterId() uint32 {
+ if x != nil && x.MasterId != nil {
+ return *x.MasterId
+ }
+ return 0
+}
+
+func (x *MntEntry) GetWithPlugin() bool {
+ if x != nil && x.WithPlugin != nil {
+ return *x.WithPlugin
+ }
+ return false
+}
+
+func (x *MntEntry) GetExtMount() bool {
+ if x != nil && x.ExtMount != nil {
+ return *x.ExtMount
+ }
+ return false
+}
+
+func (x *MntEntry) GetFsname() string {
+ if x != nil && x.Fsname != nil {
+ return *x.Fsname
+ }
+ return ""
+}
+
+func (x *MntEntry) GetInternalSharing() bool {
+ if x != nil && x.InternalSharing != nil {
+ return *x.InternalSharing
+ }
+ return false
+}
+
+func (x *MntEntry) GetDeleted() bool {
+ if x != nil && x.Deleted != nil {
+ return *x.Deleted
+ }
+ return false
+}
+
+func (x *MntEntry) GetSbFlags() uint32 {
+ if x != nil && x.SbFlags != nil {
+ return *x.SbFlags
+ }
+ return 0
+}
+
+func (x *MntEntry) GetExtKey() string {
+ if x != nil && x.ExtKey != nil {
+ return *x.ExtKey
+ }
+ return ""
+}
+
+var File_mnt_proto protoreflect.FileDescriptor
+
+var file_mnt_proto_rawDesc = []byte{
+ 0x0a, 0x09, 0x6d, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x04, 0x0a, 0x09, 0x6d, 0x6e, 0x74, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x66, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a,
+ 0x06, 0x6d, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6d,
+ 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x08, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x65, 0x76,
+ 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x20, 0x01, 0x52, 0x07, 0x72,
+ 0x6f, 0x6f, 0x74, 0x44, 0x65, 0x76, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x5f, 0x6d, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01,
+ 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18,
+ 0x06, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d,
+ 0x6f, 0x75, 0x6e, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x02, 0x28, 0x09, 0x52,
+ 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09,
+ 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a,
+ 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61,
+ 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6d,
+ 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x5f,
+ 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x77, 0x69,
+ 0x74, 0x68, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x5f,
+ 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x78, 0x74,
+ 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a,
+ 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e,
+ 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x64, 0x12, 0x20, 0x0a, 0x08, 0x73, 0x62, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x11,
+ 0x20, 0x01, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x62, 0x46,
+ 0x6c, 0x61, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18,
+ 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x2a, 0x90, 0x02,
+ 0x0a, 0x06, 0x66, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x55,
+ 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x52, 0x4f,
+ 0x43, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x59, 0x53, 0x46, 0x53, 0x10, 0x02, 0x12, 0x0c,
+ 0x0a, 0x08, 0x44, 0x45, 0x56, 0x54, 0x4d, 0x50, 0x46, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b,
+ 0x42, 0x49, 0x4e, 0x46, 0x4d, 0x54, 0x5f, 0x4d, 0x49, 0x53, 0x43, 0x10, 0x04, 0x12, 0x09, 0x0a,
+ 0x05, 0x54, 0x4d, 0x50, 0x46, 0x53, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x56, 0x50,
+ 0x54, 0x53, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x49, 0x4d, 0x46, 0x53, 0x10, 0x07, 0x12,
+ 0x0a, 0x0a, 0x06, 0x50, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x53,
+ 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x46, 0x53, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x46,
+ 0x55, 0x53, 0x45, 0x43, 0x54, 0x4c, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x42, 0x55,
+ 0x47, 0x46, 0x53, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10,
+ 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x46, 0x53, 0x10, 0x0d, 0x12, 0x0a, 0x0a, 0x06, 0x4d,
+ 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x53, 0x45, 0x10,
+ 0x0f, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x10, 0x12, 0x0d, 0x0a, 0x09, 0x4f,
+ 0x56, 0x45, 0x52, 0x4c, 0x41, 0x59, 0x46, 0x53, 0x10, 0x11, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x55,
+ 0x54, 0x4f, 0x46, 0x53, 0x10, 0x12, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x52, 0x41, 0x43, 0x45, 0x46,
+ 0x53, 0x10, 0x13, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x32, 0x10, 0x17,
+}
+
+var (
+ file_mnt_proto_rawDescOnce sync.Once
+ file_mnt_proto_rawDescData = file_mnt_proto_rawDesc
+)
+
+func file_mnt_proto_rawDescGZIP() []byte {
+ file_mnt_proto_rawDescOnce.Do(func() {
+ file_mnt_proto_rawDescData = protoimpl.X.CompressGZIP(file_mnt_proto_rawDescData)
+ })
+ return file_mnt_proto_rawDescData
+}
+
+var file_mnt_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_mnt_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_mnt_proto_goTypes = []interface{}{
+ (Fstype)(0), // 0: fstype
+ (*MntEntry)(nil), // 1: mnt_entry
+}
+var file_mnt_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_mnt_proto_init() }
+func file_mnt_proto_init() {
+ if File_mnt_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_mnt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MntEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_mnt_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_mnt_proto_goTypes,
+ DependencyIndexes: file_mnt_proto_depIdxs,
+ EnumInfos: file_mnt_proto_enumTypes,
+ MessageInfos: file_mnt_proto_msgTypes,
+ }.Build()
+ File_mnt_proto = out.File
+ file_mnt_proto_rawDesc = nil
+ file_mnt_proto_goTypes = nil
+ file_mnt_proto_depIdxs = nil
+}
diff --git a/crit/images/mnt.proto b/crit/images/mnt.proto
new file mode 100644
index 0000000..4abb7d1
--- /dev/null
+++ b/crit/images/mnt.proto
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+enum fstype {
+ UNSUPPORTED = 0;
+ PROC = 1;
+ SYSFS = 2;
+ DEVTMPFS = 3;
+ BINFMT_MISC = 4;
+ TMPFS = 5;
+ DEVPTS = 6;
+ SIMFS = 7;
+ PSTORE = 8;
+ SECURITYFS = 9;
+ FUSECTL = 10;
+ DEBUGFS = 11;
+ CGROUP = 12;
+ AUFS = 13;
+ MQUEUE = 14;
+ FUSE = 15;
+ AUTO = 16;
+ OVERLAYFS = 17;
+ AUTOFS = 18;
+ TRACEFS = 19;
+
+ /* These three are reserved for NFS support */
+ // RPC_PIPEFS = 20;
+ // NFS = 21;
+ // NFS4 = 22;
+
+ CGROUP2 = 23;
+};
+
+message mnt_entry {
+ required uint32 fstype = 1;
+ required uint32 mnt_id = 2;
+ required uint32 root_dev = 3 [(criu).dev = true];
+ required uint32 parent_mnt_id = 4;
+ required uint32 flags = 5 [(criu).hex = true];
+
+ required string root = 6;
+ required string mountpoint = 7;
+ required string source = 8;
+ required string options = 9;
+
+ optional uint32 shared_id = 10;
+ optional uint32 master_id = 11;
+
+ optional bool with_plugin = 12;
+ optional bool ext_mount = 13;
+
+ optional string fsname = 14;
+ optional bool internal_sharing = 15;
+
+ optional bool deleted = 16;
+ optional uint32 sb_flags = 17 [(criu).hex = true];
+ /* user defined mapping for external mount */
+ optional string ext_key = 18;
+}
diff --git a/crit/images/netdev.pb.go b/crit/images/netdev.pb.go
new file mode 100644
index 0000000..bcceee8
--- /dev/null
+++ b/crit/images/netdev.pb.go
@@ -0,0 +1,616 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: netdev.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type NdType int32
+
+const (
+ NdType_LOOPBACK NdType = 1
+ NdType_VETH NdType = 2
+ NdType_TUN NdType = 3
+ // External link -- for those CRIU only dumps and restores
+ // link parameters such as flags, address, MTU, etc. The
+ // existence of the link on restore should be provided
+ // by the setup-namespaces script.
+ NdType_EXTLINK NdType = 4
+ NdType_VENET NdType = 5 // OpenVZ device
+ NdType_BRIDGE NdType = 6
+ NdType_MACVLAN NdType = 7
+ NdType_SIT NdType = 8
+)
+
+// Enum value maps for NdType.
+var (
+ NdType_name = map[int32]string{
+ 1: "LOOPBACK",
+ 2: "VETH",
+ 3: "TUN",
+ 4: "EXTLINK",
+ 5: "VENET",
+ 6: "BRIDGE",
+ 7: "MACVLAN",
+ 8: "SIT",
+ }
+ NdType_value = map[string]int32{
+ "LOOPBACK": 1,
+ "VETH": 2,
+ "TUN": 3,
+ "EXTLINK": 4,
+ "VENET": 5,
+ "BRIDGE": 6,
+ "MACVLAN": 7,
+ "SIT": 8,
+ }
+)
+
+func (x NdType) Enum() *NdType {
+ p := new(NdType)
+ *p = x
+ return p
+}
+
+func (x NdType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (NdType) Descriptor() protoreflect.EnumDescriptor {
+ return file_netdev_proto_enumTypes[0].Descriptor()
+}
+
+func (NdType) Type() protoreflect.EnumType {
+ return &file_netdev_proto_enumTypes[0]
+}
+
+func (x NdType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *NdType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = NdType(num)
+ return nil
+}
+
+// Deprecated: Use NdType.Descriptor instead.
+func (NdType) EnumDescriptor() ([]byte, []int) {
+ return file_netdev_proto_rawDescGZIP(), []int{0}
+}
+
+type NetDeviceEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Type *NdType `protobuf:"varint,1,req,name=type,enum=NdType" json:"type,omitempty"`
+ Ifindex *uint32 `protobuf:"varint,2,req,name=ifindex" json:"ifindex,omitempty"`
+ Mtu *uint32 `protobuf:"varint,3,req,name=mtu" json:"mtu,omitempty"`
+ Flags *uint32 `protobuf:"varint,4,req,name=flags" json:"flags,omitempty"`
+ Name *string `protobuf:"bytes,5,req,name=name" json:"name,omitempty"`
+ Tun *TunLinkEntry `protobuf:"bytes,6,opt,name=tun" json:"tun,omitempty"`
+ Address []byte `protobuf:"bytes,7,opt,name=address" json:"address,omitempty"`
+ Conf []int32 `protobuf:"varint,8,rep,name=conf" json:"conf,omitempty"`
+ Conf4 []*SysctlEntry `protobuf:"bytes,9,rep,name=conf4" json:"conf4,omitempty"`
+ Conf6 []*SysctlEntry `protobuf:"bytes,10,rep,name=conf6" json:"conf6,omitempty"`
+ Macvlan *MacvlanLinkEntry `protobuf:"bytes,11,opt,name=macvlan" json:"macvlan,omitempty"`
+ PeerIfindex *uint32 `protobuf:"varint,12,opt,name=peer_ifindex,json=peerIfindex" json:"peer_ifindex,omitempty"`
+ PeerNsid *uint32 `protobuf:"varint,13,opt,name=peer_nsid,json=peerNsid" json:"peer_nsid,omitempty"`
+ Master *uint32 `protobuf:"varint,14,opt,name=master" json:"master,omitempty"`
+ Sit *SitEntry `protobuf:"bytes,15,opt,name=sit" json:"sit,omitempty"`
+}
+
+func (x *NetDeviceEntry) Reset() {
+ *x = NetDeviceEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_netdev_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NetDeviceEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NetDeviceEntry) ProtoMessage() {}
+
+func (x *NetDeviceEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_netdev_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NetDeviceEntry.ProtoReflect.Descriptor instead.
+func (*NetDeviceEntry) Descriptor() ([]byte, []int) {
+ return file_netdev_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *NetDeviceEntry) GetType() NdType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return NdType_LOOPBACK
+}
+
+func (x *NetDeviceEntry) GetIfindex() uint32 {
+ if x != nil && x.Ifindex != nil {
+ return *x.Ifindex
+ }
+ return 0
+}
+
+func (x *NetDeviceEntry) GetMtu() uint32 {
+ if x != nil && x.Mtu != nil {
+ return *x.Mtu
+ }
+ return 0
+}
+
+func (x *NetDeviceEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *NetDeviceEntry) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *NetDeviceEntry) GetTun() *TunLinkEntry {
+ if x != nil {
+ return x.Tun
+ }
+ return nil
+}
+
+func (x *NetDeviceEntry) GetAddress() []byte {
+ if x != nil {
+ return x.Address
+ }
+ return nil
+}
+
+func (x *NetDeviceEntry) GetConf() []int32 {
+ if x != nil {
+ return x.Conf
+ }
+ return nil
+}
+
+func (x *NetDeviceEntry) GetConf4() []*SysctlEntry {
+ if x != nil {
+ return x.Conf4
+ }
+ return nil
+}
+
+func (x *NetDeviceEntry) GetConf6() []*SysctlEntry {
+ if x != nil {
+ return x.Conf6
+ }
+ return nil
+}
+
+func (x *NetDeviceEntry) GetMacvlan() *MacvlanLinkEntry {
+ if x != nil {
+ return x.Macvlan
+ }
+ return nil
+}
+
+func (x *NetDeviceEntry) GetPeerIfindex() uint32 {
+ if x != nil && x.PeerIfindex != nil {
+ return *x.PeerIfindex
+ }
+ return 0
+}
+
+func (x *NetDeviceEntry) GetPeerNsid() uint32 {
+ if x != nil && x.PeerNsid != nil {
+ return *x.PeerNsid
+ }
+ return 0
+}
+
+func (x *NetDeviceEntry) GetMaster() uint32 {
+ if x != nil && x.Master != nil {
+ return *x.Master
+ }
+ return 0
+}
+
+func (x *NetDeviceEntry) GetSit() *SitEntry {
+ if x != nil {
+ return x.Sit
+ }
+ return nil
+}
+
+type NetnsId struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // This is CRIU's id which is allocated for each namespace
+ TargetNsId *uint32 `protobuf:"varint,1,req,name=target_ns_id,json=targetNsId" json:"target_ns_id,omitempty"`
+ // This is an id which can be used to address this namespace
+ // from another network namespace. Each network namespace has
+ // one set of id-s for other namespaces.
+ NetnsidValue *int32 `protobuf:"varint,2,req,name=netnsid_value,json=netnsidValue" json:"netnsid_value,omitempty"`
+}
+
+func (x *NetnsId) Reset() {
+ *x = NetnsId{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_netdev_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NetnsId) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NetnsId) ProtoMessage() {}
+
+func (x *NetnsId) ProtoReflect() protoreflect.Message {
+ mi := &file_netdev_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NetnsId.ProtoReflect.Descriptor instead.
+func (*NetnsId) Descriptor() ([]byte, []int) {
+ return file_netdev_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *NetnsId) GetTargetNsId() uint32 {
+ if x != nil && x.TargetNsId != nil {
+ return *x.TargetNsId
+ }
+ return 0
+}
+
+func (x *NetnsId) GetNetnsidValue() int32 {
+ if x != nil && x.NetnsidValue != nil {
+ return *x.NetnsidValue
+ }
+ return 0
+}
+
+type NetnsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DefConf []int32 `protobuf:"varint,1,rep,name=def_conf,json=defConf" json:"def_conf,omitempty"`
+ AllConf []int32 `protobuf:"varint,2,rep,name=all_conf,json=allConf" json:"all_conf,omitempty"`
+ DefConf4 []*SysctlEntry `protobuf:"bytes,3,rep,name=def_conf4,json=defConf4" json:"def_conf4,omitempty"`
+ AllConf4 []*SysctlEntry `protobuf:"bytes,4,rep,name=all_conf4,json=allConf4" json:"all_conf4,omitempty"`
+ DefConf6 []*SysctlEntry `protobuf:"bytes,5,rep,name=def_conf6,json=defConf6" json:"def_conf6,omitempty"`
+ AllConf6 []*SysctlEntry `protobuf:"bytes,6,rep,name=all_conf6,json=allConf6" json:"all_conf6,omitempty"`
+ Nsids []*NetnsId `protobuf:"bytes,7,rep,name=nsids" json:"nsids,omitempty"`
+ ExtKey *string `protobuf:"bytes,8,opt,name=ext_key,json=extKey" json:"ext_key,omitempty"`
+ UnixConf []*SysctlEntry `protobuf:"bytes,9,rep,name=unix_conf,json=unixConf" json:"unix_conf,omitempty"`
+}
+
+func (x *NetnsEntry) Reset() {
+ *x = NetnsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_netdev_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NetnsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NetnsEntry) ProtoMessage() {}
+
+func (x *NetnsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_netdev_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NetnsEntry.ProtoReflect.Descriptor instead.
+func (*NetnsEntry) Descriptor() ([]byte, []int) {
+ return file_netdev_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *NetnsEntry) GetDefConf() []int32 {
+ if x != nil {
+ return x.DefConf
+ }
+ return nil
+}
+
+func (x *NetnsEntry) GetAllConf() []int32 {
+ if x != nil {
+ return x.AllConf
+ }
+ return nil
+}
+
+func (x *NetnsEntry) GetDefConf4() []*SysctlEntry {
+ if x != nil {
+ return x.DefConf4
+ }
+ return nil
+}
+
+func (x *NetnsEntry) GetAllConf4() []*SysctlEntry {
+ if x != nil {
+ return x.AllConf4
+ }
+ return nil
+}
+
+func (x *NetnsEntry) GetDefConf6() []*SysctlEntry {
+ if x != nil {
+ return x.DefConf6
+ }
+ return nil
+}
+
+func (x *NetnsEntry) GetAllConf6() []*SysctlEntry {
+ if x != nil {
+ return x.AllConf6
+ }
+ return nil
+}
+
+func (x *NetnsEntry) GetNsids() []*NetnsId {
+ if x != nil {
+ return x.Nsids
+ }
+ return nil
+}
+
+func (x *NetnsEntry) GetExtKey() string {
+ if x != nil && x.ExtKey != nil {
+ return *x.ExtKey
+ }
+ return ""
+}
+
+func (x *NetnsEntry) GetUnixConf() []*SysctlEntry {
+ if x != nil {
+ return x.UnixConf
+ }
+ return nil
+}
+
+var File_netdev_proto protoreflect.FileDescriptor
+
+var file_netdev_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
+ 0x6d, 0x61, 0x63, 0x76, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f,
+ 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x74, 0x75, 0x6e, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x09, 0x73, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03,
+ 0x0a, 0x10, 0x6e, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e,
+ 0x32, 0x08, 0x2e, 0x6e, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
+ 0x12, 0x18, 0x0a, 0x07, 0x69, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x07, 0x69, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74,
+ 0x75, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1b, 0x0a, 0x05,
+ 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02,
+ 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a,
+ 0x03, 0x74, 0x75, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x75, 0x6e,
+ 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x74, 0x75, 0x6e,
+ 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
+ 0x6e, 0x66, 0x18, 0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x12, 0x23,
+ 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x66, 0x34, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
+ 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, 0x6f,
+ 0x6e, 0x66, 0x34, 0x12, 0x23, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x66, 0x36, 0x18, 0x0a, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x66, 0x36, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x61, 0x63, 0x76,
+ 0x6c, 0x61, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x63, 0x76,
+ 0x6c, 0x61, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07,
+ 0x6d, 0x61, 0x63, 0x76, 0x6c, 0x61, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f,
+ 0x69, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70,
+ 0x65, 0x65, 0x72, 0x49, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65,
+ 0x65, 0x72, 0x5f, 0x6e, 0x73, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70,
+ 0x65, 0x65, 0x72, 0x4e, 0x73, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x73, 0x74, 0x65,
+ 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12,
+ 0x1c, 0x0a, 0x03, 0x73, 0x69, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x73,
+ 0x69, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x73, 0x69, 0x74, 0x22, 0x51, 0x0a,
+ 0x08, 0x6e, 0x65, 0x74, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x61, 0x72,
+ 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x73, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6e,
+ 0x65, 0x74, 0x6e, 0x73, 0x69, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x05, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x6e, 0x73, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0xd9, 0x02, 0x0a, 0x0b, 0x6e, 0x65, 0x74, 0x6e, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x19, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x05, 0x52, 0x07, 0x64, 0x65, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x19, 0x0a, 0x08, 0x61,
+ 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x61,
+ 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x2a, 0x0a, 0x09, 0x64, 0x65, 0x66, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x66, 0x34, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x73, 0x63,
+ 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x64, 0x65, 0x66, 0x43, 0x6f, 0x6e,
+ 0x66, 0x34, 0x12, 0x2a, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x34, 0x18,
+ 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x34, 0x12, 0x2a,
+ 0x0a, 0x09, 0x64, 0x65, 0x66, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x36, 0x18, 0x05, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x08, 0x64, 0x65, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x36, 0x12, 0x2a, 0x0a, 0x09, 0x61, 0x6c,
+ 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x36, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
+ 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x6c,
+ 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x36, 0x12, 0x1f, 0x0a, 0x05, 0x6e, 0x73, 0x69, 0x64, 0x73, 0x18,
+ 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x6e, 0x65, 0x74, 0x6e, 0x73, 0x5f, 0x69, 0x64,
+ 0x52, 0x05, 0x6e, 0x73, 0x69, 0x64, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x5f, 0x6b,
+ 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79,
+ 0x12, 0x2a, 0x0a, 0x09, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x09, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x2a, 0x64, 0x0a, 0x07,
+ 0x6e, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x42,
+ 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x56, 0x45, 0x54, 0x48, 0x10, 0x02, 0x12,
+ 0x07, 0x0a, 0x03, 0x54, 0x55, 0x4e, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x54, 0x4c,
+ 0x49, 0x4e, 0x4b, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x45, 0x4e, 0x45, 0x54, 0x10, 0x05,
+ 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x49, 0x44, 0x47, 0x45, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07,
+ 0x4d, 0x41, 0x43, 0x56, 0x4c, 0x41, 0x4e, 0x10, 0x07, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x49, 0x54,
+ 0x10, 0x08,
+}
+
+var (
+ file_netdev_proto_rawDescOnce sync.Once
+ file_netdev_proto_rawDescData = file_netdev_proto_rawDesc
+)
+
+func file_netdev_proto_rawDescGZIP() []byte {
+ file_netdev_proto_rawDescOnce.Do(func() {
+ file_netdev_proto_rawDescData = protoimpl.X.CompressGZIP(file_netdev_proto_rawDescData)
+ })
+ return file_netdev_proto_rawDescData
+}
+
+var file_netdev_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_netdev_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_netdev_proto_goTypes = []interface{}{
+ (NdType)(0), // 0: nd_type
+ (*NetDeviceEntry)(nil), // 1: net_device_entry
+ (*NetnsId)(nil), // 2: netns_id
+ (*NetnsEntry)(nil), // 3: netns_entry
+ (*TunLinkEntry)(nil), // 4: tun_link_entry
+ (*SysctlEntry)(nil), // 5: sysctl_entry
+ (*MacvlanLinkEntry)(nil), // 6: macvlan_link_entry
+ (*SitEntry)(nil), // 7: sit_entry
+}
+var file_netdev_proto_depIdxs = []int32{
+ 0, // 0: net_device_entry.type:type_name -> nd_type
+ 4, // 1: net_device_entry.tun:type_name -> tun_link_entry
+ 5, // 2: net_device_entry.conf4:type_name -> sysctl_entry
+ 5, // 3: net_device_entry.conf6:type_name -> sysctl_entry
+ 6, // 4: net_device_entry.macvlan:type_name -> macvlan_link_entry
+ 7, // 5: net_device_entry.sit:type_name -> sit_entry
+ 5, // 6: netns_entry.def_conf4:type_name -> sysctl_entry
+ 5, // 7: netns_entry.all_conf4:type_name -> sysctl_entry
+ 5, // 8: netns_entry.def_conf6:type_name -> sysctl_entry
+ 5, // 9: netns_entry.all_conf6:type_name -> sysctl_entry
+ 2, // 10: netns_entry.nsids:type_name -> netns_id
+ 5, // 11: netns_entry.unix_conf:type_name -> sysctl_entry
+ 12, // [12:12] is the sub-list for method output_type
+ 12, // [12:12] is the sub-list for method input_type
+ 12, // [12:12] is the sub-list for extension type_name
+ 12, // [12:12] is the sub-list for extension extendee
+ 0, // [0:12] is the sub-list for field type_name
+}
+
+func init() { file_netdev_proto_init() }
+func file_netdev_proto_init() {
+ if File_netdev_proto != nil {
+ return
+ }
+ file_macvlan_proto_init()
+ file_opts_proto_init()
+ file_tun_proto_init()
+ file_sysctl_proto_init()
+ file_sit_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_netdev_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NetDeviceEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_netdev_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NetnsId); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_netdev_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NetnsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_netdev_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_netdev_proto_goTypes,
+ DependencyIndexes: file_netdev_proto_depIdxs,
+ EnumInfos: file_netdev_proto_enumTypes,
+ MessageInfos: file_netdev_proto_msgTypes,
+ }.Build()
+ File_netdev_proto = out.File
+ file_netdev_proto_rawDesc = nil
+ file_netdev_proto_goTypes = nil
+ file_netdev_proto_depIdxs = nil
+}
diff --git a/crit/images/netdev.proto b/crit/images/netdev.proto
new file mode 100644
index 0000000..748fd02
--- /dev/null
+++ b/crit/images/netdev.proto
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "macvlan.proto";
+import "opts.proto";
+import "tun.proto";
+import "sysctl.proto";
+import "sit.proto";
+
+enum nd_type {
+ LOOPBACK = 1;
+ VETH = 2;
+ TUN = 3;
+ /*
+ * External link -- for those CRIU only dumps and restores
+ * link parameters such as flags, address, MTU, etc. The
+ * existence of the link on restore should be provided
+ * by the setup-namespaces script.
+ */
+ EXTLINK = 4;
+ VENET = 5; /* OpenVZ device */
+ BRIDGE = 6;
+ MACVLAN = 7;
+ SIT = 8;
+}
+
+message net_device_entry {
+ required nd_type type = 1;
+ required uint32 ifindex = 2;
+ required uint32 mtu = 3;
+ required uint32 flags = 4 [(criu).hex = true];
+ required string name = 5;
+
+ optional tun_link_entry tun = 6;
+
+ optional bytes address = 7;
+
+ repeated int32 conf = 8;
+
+ repeated sysctl_entry conf4 = 9;
+
+ repeated sysctl_entry conf6 = 10;
+
+ optional macvlan_link_entry macvlan = 11;
+
+ optional uint32 peer_ifindex = 12;
+ optional uint32 peer_nsid = 13;
+ optional uint32 master = 14;
+ optional sit_entry sit = 15;
+}
+
+message netns_id {
+ /* This is CRIU's id which is allocated for each namespace */
+ required uint32 target_ns_id = 1;
+ /*
+ * This is an id which can be used to address this namespace
+ * from another network namespace. Each network namespace has
+ * one set of id-s for other namespaces.
+ */
+ required int32 netnsid_value = 2;
+}
+
+message netns_entry {
+ repeated int32 def_conf = 1;
+ repeated int32 all_conf = 2;
+
+ repeated sysctl_entry def_conf4 = 3;
+ repeated sysctl_entry all_conf4 = 4;
+
+ repeated sysctl_entry def_conf6 = 5;
+ repeated sysctl_entry all_conf6 = 6;
+
+ repeated netns_id nsids = 7;
+ optional string ext_key = 8;
+ repeated sysctl_entry unix_conf = 9;
+}
diff --git a/crit/images/ns.pb.go b/crit/images/ns.pb.go
new file mode 100644
index 0000000..3613081
--- /dev/null
+++ b/crit/images/ns.pb.go
@@ -0,0 +1,170 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: ns.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type NsFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ NsId *uint32 `protobuf:"varint,2,req,name=ns_id,json=nsId" json:"ns_id,omitempty"`
+ NsCflag *uint32 `protobuf:"varint,3,req,name=ns_cflag,json=nsCflag" json:"ns_cflag,omitempty"`
+ Flags *uint32 `protobuf:"varint,4,req,name=flags" json:"flags,omitempty"`
+}
+
+func (x *NsFileEntry) Reset() {
+ *x = NsFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_ns_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NsFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NsFileEntry) ProtoMessage() {}
+
+func (x *NsFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_ns_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NsFileEntry.ProtoReflect.Descriptor instead.
+func (*NsFileEntry) Descriptor() ([]byte, []int) {
+ return file_ns_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *NsFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *NsFileEntry) GetNsId() uint32 {
+ if x != nil && x.NsId != nil {
+ return *x.NsId
+ }
+ return 0
+}
+
+func (x *NsFileEntry) GetNsCflag() uint32 {
+ if x != nil && x.NsCflag != nil {
+ return *x.NsCflag
+ }
+ return 0
+}
+
+func (x *NsFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+var File_ns_proto protoreflect.FileDescriptor
+
+var file_ns_proto_rawDesc = []byte{
+ 0x0a, 0x08, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x65, 0x0a, 0x0d, 0x6e, 0x73,
+ 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x6e,
+ 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x6e, 0x73, 0x49, 0x64,
+ 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x73, 0x5f, 0x63, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x07, 0x6e, 0x73, 0x43, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x66,
+ 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67,
+ 0x73,
+}
+
+var (
+ file_ns_proto_rawDescOnce sync.Once
+ file_ns_proto_rawDescData = file_ns_proto_rawDesc
+)
+
+func file_ns_proto_rawDescGZIP() []byte {
+ file_ns_proto_rawDescOnce.Do(func() {
+ file_ns_proto_rawDescData = protoimpl.X.CompressGZIP(file_ns_proto_rawDescData)
+ })
+ return file_ns_proto_rawDescData
+}
+
+var file_ns_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_ns_proto_goTypes = []interface{}{
+ (*NsFileEntry)(nil), // 0: ns_file_entry
+}
+var file_ns_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_ns_proto_init() }
+func file_ns_proto_init() {
+ if File_ns_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_ns_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NsFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_ns_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_ns_proto_goTypes,
+ DependencyIndexes: file_ns_proto_depIdxs,
+ MessageInfos: file_ns_proto_msgTypes,
+ }.Build()
+ File_ns_proto = out.File
+ file_ns_proto_rawDesc = nil
+ file_ns_proto_goTypes = nil
+ file_ns_proto_depIdxs = nil
+}
diff --git a/crit/images/ns.proto b/crit/images/ns.proto
new file mode 100644
index 0000000..19ec641
--- /dev/null
+++ b/crit/images/ns.proto
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message ns_file_entry {
+ required uint32 id = 1;
+ required uint32 ns_id = 2;
+ required uint32 ns_cflag = 3;
+ required uint32 flags = 4;
+}
diff --git a/crit/images/opts.pb.go b/crit/images/opts.pb.go
new file mode 100644
index 0000000..6c4d4be
--- /dev/null
+++ b/crit/images/opts.pb.go
@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: opts.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CRIU_Opts struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Hex *bool `protobuf:"varint,1,opt,name=hex" json:"hex,omitempty"` // Indicate that CRIT should treat this field as hex.
+ Ipadd *bool `protobuf:"varint,2,opt,name=ipadd" json:"ipadd,omitempty"` // The field is IPv4/v6 address
+ Flags *string `protobuf:"bytes,3,opt,name=flags" json:"flags,omitempty"`
+ Dev *bool `protobuf:"varint,4,opt,name=dev" json:"dev,omitempty"` // Device major:minor packed
+ Odev *bool `protobuf:"varint,5,opt,name=odev" json:"odev,omitempty"` // ... in old format
+ Dict *string `protobuf:"bytes,6,opt,name=dict" json:"dict,omitempty"`
+ Conv *string `protobuf:"bytes,7,opt,name=conv" json:"conv,omitempty"`
+}
+
+func (x *CRIU_Opts) Reset() {
+ *x = CRIU_Opts{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opts_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CRIU_Opts) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CRIU_Opts) ProtoMessage() {}
+
+func (x *CRIU_Opts) ProtoReflect() protoreflect.Message {
+ mi := &file_opts_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CRIU_Opts.ProtoReflect.Descriptor instead.
+func (*CRIU_Opts) Descriptor() ([]byte, []int) {
+ return file_opts_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CRIU_Opts) GetHex() bool {
+ if x != nil && x.Hex != nil {
+ return *x.Hex
+ }
+ return false
+}
+
+func (x *CRIU_Opts) GetIpadd() bool {
+ if x != nil && x.Ipadd != nil {
+ return *x.Ipadd
+ }
+ return false
+}
+
+func (x *CRIU_Opts) GetFlags() string {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return ""
+}
+
+func (x *CRIU_Opts) GetDev() bool {
+ if x != nil && x.Dev != nil {
+ return *x.Dev
+ }
+ return false
+}
+
+func (x *CRIU_Opts) GetOdev() bool {
+ if x != nil && x.Odev != nil {
+ return *x.Odev
+ }
+ return false
+}
+
+func (x *CRIU_Opts) GetDict() string {
+ if x != nil && x.Dict != nil {
+ return *x.Dict
+ }
+ return ""
+}
+
+func (x *CRIU_Opts) GetConv() string {
+ if x != nil && x.Conv != nil {
+ return *x.Conv
+ }
+ return ""
+}
+
+var file_opts_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*CRIU_Opts)(nil),
+ Field: 1018,
+ Name: "criu",
+ Tag: "bytes,1018,opt,name=criu",
+ Filename: "opts.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // Registered unique number to use for all kinds of custom options.
+ //
+ // optional CRIU_Opts criu = 1018;
+ E_Criu = &file_opts_proto_extTypes[0]
+)
+
+var File_opts_proto protoreflect.FileDescriptor
+
+var file_opts_proto_rawDesc = []byte{
+ 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97,
+ 0x01, 0x0a, 0x09, 0x43, 0x52, 0x49, 0x55, 0x5f, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03,
+ 0x68, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x68, 0x65, 0x78, 0x12, 0x14,
+ 0x0a, 0x05, 0x69, 0x70, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69,
+ 0x70, 0x61, 0x64, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65,
+ 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x65, 0x76, 0x12, 0x12, 0x0a, 0x04,
+ 0x6f, 0x64, 0x65, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6f, 0x64, 0x65, 0x76,
+ 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x64, 0x69, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x76, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x76, 0x3a, 0x3e, 0x0a, 0x04, 0x63, 0x72, 0x69, 0x75,
+ 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0xfa, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x52, 0x49, 0x55, 0x5f, 0x4f, 0x70,
+ 0x74, 0x73, 0x52, 0x04, 0x63, 0x72, 0x69, 0x75,
+}
+
+var (
+ file_opts_proto_rawDescOnce sync.Once
+ file_opts_proto_rawDescData = file_opts_proto_rawDesc
+)
+
+func file_opts_proto_rawDescGZIP() []byte {
+ file_opts_proto_rawDescOnce.Do(func() {
+ file_opts_proto_rawDescData = protoimpl.X.CompressGZIP(file_opts_proto_rawDescData)
+ })
+ return file_opts_proto_rawDescData
+}
+
+var file_opts_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_opts_proto_goTypes = []interface{}{
+ (*CRIU_Opts)(nil), // 0: CRIU_Opts
+ (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
+}
+var file_opts_proto_depIdxs = []int32{
+ 1, // 0: criu:extendee -> google.protobuf.FieldOptions
+ 0, // 1: criu:type_name -> CRIU_Opts
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 1, // [1:2] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_opts_proto_init() }
+func file_opts_proto_init() {
+ if File_opts_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CRIU_Opts); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opts_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_opts_proto_goTypes,
+ DependencyIndexes: file_opts_proto_depIdxs,
+ MessageInfos: file_opts_proto_msgTypes,
+ ExtensionInfos: file_opts_proto_extTypes,
+ }.Build()
+ File_opts_proto = out.File
+ file_opts_proto_rawDesc = nil
+ file_opts_proto_goTypes = nil
+ file_opts_proto_depIdxs = nil
+}
diff --git a/crit/images/opts.proto b/crit/images/opts.proto
new file mode 100644
index 0000000..d730673
--- /dev/null
+++ b/crit/images/opts.proto
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "google/protobuf/descriptor.proto";
+
+message CRIU_Opts {
+ optional bool hex = 1; // Indicate that CRIT should treat this field as hex.
+ optional bool ipadd = 2; // The field is IPv4/v6 address
+ optional string flags = 3;
+ optional bool dev = 4; // Device major:minor packed
+ optional bool odev = 5; // ... in old format
+ optional string dict = 6;
+ optional string conv = 7;
+}
+
+extend google.protobuf.FieldOptions {
+ // Registered unique number to use for all kinds of custom options.
+ optional CRIU_Opts criu = 1018;
+}
diff --git a/crit/images/packet-sock.pb.go b/crit/images/packet-sock.pb.go
new file mode 100644
index 0000000..c4b9d74
--- /dev/null
+++ b/crit/images/packet-sock.pb.go
@@ -0,0 +1,550 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: packet-sock.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PacketMclist struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index *uint32 `protobuf:"varint,1,req,name=index" json:"index,omitempty"`
+ Type *uint32 `protobuf:"varint,2,req,name=type" json:"type,omitempty"`
+ Addr []byte `protobuf:"bytes,3,req,name=addr" json:"addr,omitempty"`
+}
+
+func (x *PacketMclist) Reset() {
+ *x = PacketMclist{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_packet_sock_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PacketMclist) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PacketMclist) ProtoMessage() {}
+
+func (x *PacketMclist) ProtoReflect() protoreflect.Message {
+ mi := &file_packet_sock_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PacketMclist.ProtoReflect.Descriptor instead.
+func (*PacketMclist) Descriptor() ([]byte, []int) {
+ return file_packet_sock_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PacketMclist) GetIndex() uint32 {
+ if x != nil && x.Index != nil {
+ return *x.Index
+ }
+ return 0
+}
+
+func (x *PacketMclist) GetType() uint32 {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return 0
+}
+
+func (x *PacketMclist) GetAddr() []byte {
+ if x != nil {
+ return x.Addr
+ }
+ return nil
+}
+
+type PacketRing struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ BlockSize *uint32 `protobuf:"varint,1,req,name=block_size,json=blockSize" json:"block_size,omitempty"`
+ BlockNr *uint32 `protobuf:"varint,2,req,name=block_nr,json=blockNr" json:"block_nr,omitempty"`
+ FrameSize *uint32 `protobuf:"varint,3,req,name=frame_size,json=frameSize" json:"frame_size,omitempty"`
+ FrameNr *uint32 `protobuf:"varint,4,req,name=frame_nr,json=frameNr" json:"frame_nr,omitempty"`
+ RetireTmo *uint32 `protobuf:"varint,5,req,name=retire_tmo,json=retireTmo" json:"retire_tmo,omitempty"`
+ SizeofPriv *uint32 `protobuf:"varint,6,req,name=sizeof_priv,json=sizeofPriv" json:"sizeof_priv,omitempty"`
+ Features *uint32 `protobuf:"varint,7,req,name=features" json:"features,omitempty"`
+}
+
+func (x *PacketRing) Reset() {
+ *x = PacketRing{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_packet_sock_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PacketRing) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PacketRing) ProtoMessage() {}
+
+func (x *PacketRing) ProtoReflect() protoreflect.Message {
+ mi := &file_packet_sock_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PacketRing.ProtoReflect.Descriptor instead.
+func (*PacketRing) Descriptor() ([]byte, []int) {
+ return file_packet_sock_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PacketRing) GetBlockSize() uint32 {
+ if x != nil && x.BlockSize != nil {
+ return *x.BlockSize
+ }
+ return 0
+}
+
+func (x *PacketRing) GetBlockNr() uint32 {
+ if x != nil && x.BlockNr != nil {
+ return *x.BlockNr
+ }
+ return 0
+}
+
+func (x *PacketRing) GetFrameSize() uint32 {
+ if x != nil && x.FrameSize != nil {
+ return *x.FrameSize
+ }
+ return 0
+}
+
+func (x *PacketRing) GetFrameNr() uint32 {
+ if x != nil && x.FrameNr != nil {
+ return *x.FrameNr
+ }
+ return 0
+}
+
+func (x *PacketRing) GetRetireTmo() uint32 {
+ if x != nil && x.RetireTmo != nil {
+ return *x.RetireTmo
+ }
+ return 0
+}
+
+func (x *PacketRing) GetSizeofPriv() uint32 {
+ if x != nil && x.SizeofPriv != nil {
+ return *x.SizeofPriv
+ }
+ return 0
+}
+
+func (x *PacketRing) GetFeatures() uint32 {
+ if x != nil && x.Features != nil {
+ return *x.Features
+ }
+ return 0
+}
+
+type PacketSockEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Type *uint32 `protobuf:"varint,2,req,name=type" json:"type,omitempty"`
+ Protocol *uint32 `protobuf:"varint,3,req,name=protocol" json:"protocol,omitempty"`
+ Flags *uint32 `protobuf:"varint,4,req,name=flags" json:"flags,omitempty"`
+ Ifindex *uint32 `protobuf:"varint,5,req,name=ifindex" json:"ifindex,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,6,req,name=fown" json:"fown,omitempty"`
+ Opts *SkOptsEntry `protobuf:"bytes,7,req,name=opts" json:"opts,omitempty"`
+ Version *uint32 `protobuf:"varint,8,req,name=version" json:"version,omitempty"`
+ Reserve *uint32 `protobuf:"varint,9,req,name=reserve" json:"reserve,omitempty"`
+ AuxData *bool `protobuf:"varint,10,req,name=aux_data,json=auxData" json:"aux_data,omitempty"`
+ OrigDev *bool `protobuf:"varint,11,req,name=orig_dev,json=origDev" json:"orig_dev,omitempty"`
+ VnetHdr *bool `protobuf:"varint,12,req,name=vnet_hdr,json=vnetHdr" json:"vnet_hdr,omitempty"`
+ Loss *bool `protobuf:"varint,13,req,name=loss" json:"loss,omitempty"`
+ Timestamp *uint32 `protobuf:"varint,14,req,name=timestamp" json:"timestamp,omitempty"`
+ CopyThresh *uint32 `protobuf:"varint,15,req,name=copy_thresh,json=copyThresh" json:"copy_thresh,omitempty"`
+ Mclist []*PacketMclist `protobuf:"bytes,16,rep,name=mclist" json:"mclist,omitempty"`
+ Fanout *uint32 `protobuf:"varint,17,opt,name=fanout,def=4294967295" json:"fanout,omitempty"`
+ RxRing *PacketRing `protobuf:"bytes,18,opt,name=rx_ring,json=rxRing" json:"rx_ring,omitempty"`
+ TxRing *PacketRing `protobuf:"bytes,19,opt,name=tx_ring,json=txRing" json:"tx_ring,omitempty"`
+ NsId *uint32 `protobuf:"varint,20,opt,name=ns_id,json=nsId" json:"ns_id,omitempty"`
+}
+
+// Default values for PacketSockEntry fields.
+const (
+ Default_PacketSockEntry_Fanout = uint32(4294967295)
+)
+
+func (x *PacketSockEntry) Reset() {
+ *x = PacketSockEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_packet_sock_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PacketSockEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PacketSockEntry) ProtoMessage() {}
+
+func (x *PacketSockEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_packet_sock_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PacketSockEntry.ProtoReflect.Descriptor instead.
+func (*PacketSockEntry) Descriptor() ([]byte, []int) {
+ return file_packet_sock_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *PacketSockEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetType() uint32 {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetProtocol() uint32 {
+ if x != nil && x.Protocol != nil {
+ return *x.Protocol
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetIfindex() uint32 {
+ if x != nil && x.Ifindex != nil {
+ return *x.Ifindex
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *PacketSockEntry) GetOpts() *SkOptsEntry {
+ if x != nil {
+ return x.Opts
+ }
+ return nil
+}
+
+func (x *PacketSockEntry) GetVersion() uint32 {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetReserve() uint32 {
+ if x != nil && x.Reserve != nil {
+ return *x.Reserve
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetAuxData() bool {
+ if x != nil && x.AuxData != nil {
+ return *x.AuxData
+ }
+ return false
+}
+
+func (x *PacketSockEntry) GetOrigDev() bool {
+ if x != nil && x.OrigDev != nil {
+ return *x.OrigDev
+ }
+ return false
+}
+
+func (x *PacketSockEntry) GetVnetHdr() bool {
+ if x != nil && x.VnetHdr != nil {
+ return *x.VnetHdr
+ }
+ return false
+}
+
+func (x *PacketSockEntry) GetLoss() bool {
+ if x != nil && x.Loss != nil {
+ return *x.Loss
+ }
+ return false
+}
+
+func (x *PacketSockEntry) GetTimestamp() uint32 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetCopyThresh() uint32 {
+ if x != nil && x.CopyThresh != nil {
+ return *x.CopyThresh
+ }
+ return 0
+}
+
+func (x *PacketSockEntry) GetMclist() []*PacketMclist {
+ if x != nil {
+ return x.Mclist
+ }
+ return nil
+}
+
+func (x *PacketSockEntry) GetFanout() uint32 {
+ if x != nil && x.Fanout != nil {
+ return *x.Fanout
+ }
+ return Default_PacketSockEntry_Fanout
+}
+
+func (x *PacketSockEntry) GetRxRing() *PacketRing {
+ if x != nil {
+ return x.RxRing
+ }
+ return nil
+}
+
+func (x *PacketSockEntry) GetTxRing() *PacketRing {
+ if x != nil {
+ return x.TxRing
+ }
+ return nil
+}
+
+func (x *PacketSockEntry) GetNsId() uint32 {
+ if x != nil && x.NsId != nil {
+ return *x.NsId
+ }
+ return 0
+}
+
+var File_packet_sock_proto protoreflect.FileDescriptor
+
+var file_packet_sock_proto_rawDesc = []byte{
+ 0x0a, 0x11, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x73, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x6b, 0x2d,
+ 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4d, 0x0a, 0x0d, 0x70, 0x61,
+ 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x63, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69,
+ 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
+ 0x78, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20,
+ 0x02, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x22, 0xdd, 0x01, 0x0a, 0x0b, 0x70, 0x61,
+ 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x62,
+ 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x5f, 0x6e, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x4e, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x7a,
+ 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x69,
+ 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x6e, 0x72, 0x18, 0x04,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x4e, 0x72, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x6d, 0x6f, 0x18, 0x05, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x09, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, 0x54, 0x6d, 0x6f, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x73, 0x69, 0x7a, 0x65, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x18, 0x06, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x6f, 0x66, 0x50, 0x72, 0x69, 0x76, 0x12, 0x1a, 0x0a,
+ 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xd6, 0x04, 0x0a, 0x11, 0x70, 0x61,
+ 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12,
+ 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18,
+ 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12,
+ 0x1b, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05,
+ 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07,
+ 0x69, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x69,
+ 0x66, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x06,
+ 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x22, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18,
+ 0x07, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6b, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65,
+ 0x18, 0x09, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12,
+ 0x19, 0x0a, 0x08, 0x61, 0x75, 0x78, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x02, 0x28,
+ 0x08, 0x52, 0x07, 0x61, 0x75, 0x78, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72,
+ 0x69, 0x67, 0x5f, 0x64, 0x65, 0x76, 0x18, 0x0b, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x6f, 0x72,
+ 0x69, 0x67, 0x44, 0x65, 0x76, 0x12, 0x19, 0x0a, 0x08, 0x76, 0x6e, 0x65, 0x74, 0x5f, 0x68, 0x64,
+ 0x72, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x76, 0x6e, 0x65, 0x74, 0x48, 0x64, 0x72,
+ 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x02, 0x28, 0x08, 0x52, 0x04,
+ 0x6c, 0x6f, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+ 0x70, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73,
+ 0x68, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x6f, 0x70, 0x79, 0x54, 0x68, 0x72,
+ 0x65, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x06, 0x6d, 0x63, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x10, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x63, 0x6c,
+ 0x69, 0x73, 0x74, 0x52, 0x06, 0x6d, 0x63, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x66,
+ 0x61, 0x6e, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x0a, 0x34, 0x32, 0x39,
+ 0x34, 0x39, 0x36, 0x37, 0x32, 0x39, 0x35, 0x52, 0x06, 0x66, 0x61, 0x6e, 0x6f, 0x75, 0x74, 0x12,
+ 0x25, 0x0a, 0x07, 0x72, 0x78, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x0c, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06,
+ 0x72, 0x78, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x72, 0x69, 0x6e,
+ 0x67, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74,
+ 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x78, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x13, 0x0a,
+ 0x05, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6e, 0x73,
+ 0x49, 0x64,
+}
+
+var (
+ file_packet_sock_proto_rawDescOnce sync.Once
+ file_packet_sock_proto_rawDescData = file_packet_sock_proto_rawDesc
+)
+
+func file_packet_sock_proto_rawDescGZIP() []byte {
+ file_packet_sock_proto_rawDescOnce.Do(func() {
+ file_packet_sock_proto_rawDescData = protoimpl.X.CompressGZIP(file_packet_sock_proto_rawDescData)
+ })
+ return file_packet_sock_proto_rawDescData
+}
+
+var file_packet_sock_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_packet_sock_proto_goTypes = []interface{}{
+ (*PacketMclist)(nil), // 0: packet_mclist
+ (*PacketRing)(nil), // 1: packet_ring
+ (*PacketSockEntry)(nil), // 2: packet_sock_entry
+ (*FownEntry)(nil), // 3: fown_entry
+ (*SkOptsEntry)(nil), // 4: sk_opts_entry
+}
+var file_packet_sock_proto_depIdxs = []int32{
+ 3, // 0: packet_sock_entry.fown:type_name -> fown_entry
+ 4, // 1: packet_sock_entry.opts:type_name -> sk_opts_entry
+ 0, // 2: packet_sock_entry.mclist:type_name -> packet_mclist
+ 1, // 3: packet_sock_entry.rx_ring:type_name -> packet_ring
+ 1, // 4: packet_sock_entry.tx_ring:type_name -> packet_ring
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_packet_sock_proto_init() }
+func file_packet_sock_proto_init() {
+ if File_packet_sock_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ file_sk_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_packet_sock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PacketMclist); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_packet_sock_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PacketRing); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_packet_sock_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PacketSockEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_packet_sock_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_packet_sock_proto_goTypes,
+ DependencyIndexes: file_packet_sock_proto_depIdxs,
+ MessageInfos: file_packet_sock_proto_msgTypes,
+ }.Build()
+ File_packet_sock_proto = out.File
+ file_packet_sock_proto_rawDesc = nil
+ file_packet_sock_proto_goTypes = nil
+ file_packet_sock_proto_depIdxs = nil
+}
diff --git a/crit/images/packet-sock.proto b/crit/images/packet-sock.proto
new file mode 100644
index 0000000..d4b38cf
--- /dev/null
+++ b/crit/images/packet-sock.proto
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+import "sk-opts.proto";
+
+message packet_mclist {
+ required uint32 index = 1;
+ required uint32 type = 2;
+ required bytes addr = 3;
+}
+
+message packet_ring {
+ required uint32 block_size = 1;
+ required uint32 block_nr = 2;
+ required uint32 frame_size = 3;
+ required uint32 frame_nr = 4;
+
+ required uint32 retire_tmo = 5;
+ required uint32 sizeof_priv = 6;
+ required uint32 features = 7;
+}
+
+message packet_sock_entry {
+ required uint32 id = 1;
+ required uint32 type = 2;
+ required uint32 protocol = 3;
+ required uint32 flags = 4 [(criu).hex = true];
+ required uint32 ifindex = 5;
+
+ required fown_entry fown = 6;
+ required sk_opts_entry opts = 7;
+
+ required uint32 version = 8;
+ required uint32 reserve = 9;
+ required bool aux_data = 10;
+ required bool orig_dev = 11;
+ required bool vnet_hdr = 12;
+ required bool loss = 13;
+ required uint32 timestamp = 14;
+ required uint32 copy_thresh = 15;
+ repeated packet_mclist mclist = 16;
+ optional uint32 fanout = 17 [ default = 0xffffffff ];
+ optional packet_ring rx_ring = 18;
+ optional packet_ring tx_ring = 19;
+ optional uint32 ns_id = 20;
+}
diff --git a/crit/images/pagemap.pb.go b/crit/images/pagemap.pb.go
new file mode 100644
index 0000000..7251355
--- /dev/null
+++ b/crit/images/pagemap.pb.go
@@ -0,0 +1,237 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: pagemap.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PagemapHead struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PagesId *uint32 `protobuf:"varint,1,req,name=pages_id,json=pagesId" json:"pages_id,omitempty"`
+}
+
+func (x *PagemapHead) Reset() {
+ *x = PagemapHead{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_pagemap_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PagemapHead) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PagemapHead) ProtoMessage() {}
+
+func (x *PagemapHead) ProtoReflect() protoreflect.Message {
+ mi := &file_pagemap_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PagemapHead.ProtoReflect.Descriptor instead.
+func (*PagemapHead) Descriptor() ([]byte, []int) {
+ return file_pagemap_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PagemapHead) GetPagesId() uint32 {
+ if x != nil && x.PagesId != nil {
+ return *x.PagesId
+ }
+ return 0
+}
+
+type PagemapEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Vaddr *uint64 `protobuf:"varint,1,req,name=vaddr" json:"vaddr,omitempty"`
+ NrPages *uint32 `protobuf:"varint,2,req,name=nr_pages,json=nrPages" json:"nr_pages,omitempty"`
+ InParent *bool `protobuf:"varint,3,opt,name=in_parent,json=inParent" json:"in_parent,omitempty"`
+ Flags *uint32 `protobuf:"varint,4,opt,name=flags" json:"flags,omitempty"`
+}
+
+func (x *PagemapEntry) Reset() {
+ *x = PagemapEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_pagemap_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PagemapEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PagemapEntry) ProtoMessage() {}
+
+func (x *PagemapEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_pagemap_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PagemapEntry.ProtoReflect.Descriptor instead.
+func (*PagemapEntry) Descriptor() ([]byte, []int) {
+ return file_pagemap_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PagemapEntry) GetVaddr() uint64 {
+ if x != nil && x.Vaddr != nil {
+ return *x.Vaddr
+ }
+ return 0
+}
+
+func (x *PagemapEntry) GetNrPages() uint32 {
+ if x != nil && x.NrPages != nil {
+ return *x.NrPages
+ }
+ return 0
+}
+
+func (x *PagemapEntry) GetInParent() bool {
+ if x != nil && x.InParent != nil {
+ return *x.InParent
+ }
+ return false
+}
+
+func (x *PagemapEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+var File_pagemap_proto protoreflect.FileDescriptor
+
+var file_pagemap_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x0c, 0x70,
+ 0x61, 0x67, 0x65, 0x6d, 0x61, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x49, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x6d,
+ 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x05, 0x76, 0x61, 0x64, 0x64,
+ 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05,
+ 0x76, 0x61, 0x64, 0x64, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x72, 0x5f, 0x70, 0x61, 0x67, 0x65,
+ 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x6e, 0x72, 0x50, 0x61, 0x67, 0x65, 0x73,
+ 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a,
+ 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0f, 0xd2, 0x3f,
+ 0x0c, 0x1a, 0x0a, 0x70, 0x6d, 0x61, 0x70, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66,
+ 0x6c, 0x61, 0x67, 0x73,
+}
+
+var (
+ file_pagemap_proto_rawDescOnce sync.Once
+ file_pagemap_proto_rawDescData = file_pagemap_proto_rawDesc
+)
+
+func file_pagemap_proto_rawDescGZIP() []byte {
+ file_pagemap_proto_rawDescOnce.Do(func() {
+ file_pagemap_proto_rawDescData = protoimpl.X.CompressGZIP(file_pagemap_proto_rawDescData)
+ })
+ return file_pagemap_proto_rawDescData
+}
+
+var file_pagemap_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_pagemap_proto_goTypes = []interface{}{
+ (*PagemapHead)(nil), // 0: pagemap_head
+ (*PagemapEntry)(nil), // 1: pagemap_entry
+}
+var file_pagemap_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_pagemap_proto_init() }
+func file_pagemap_proto_init() {
+ if File_pagemap_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_pagemap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PagemapHead); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_pagemap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PagemapEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_pagemap_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_pagemap_proto_goTypes,
+ DependencyIndexes: file_pagemap_proto_depIdxs,
+ MessageInfos: file_pagemap_proto_msgTypes,
+ }.Build()
+ File_pagemap_proto = out.File
+ file_pagemap_proto_rawDesc = nil
+ file_pagemap_proto_goTypes = nil
+ file_pagemap_proto_depIdxs = nil
+}
diff --git a/crit/images/pagemap.proto b/crit/images/pagemap.proto
new file mode 100644
index 0000000..e6d341b
--- /dev/null
+++ b/crit/images/pagemap.proto
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message pagemap_head {
+ required uint32 pages_id = 1;
+}
+
+message pagemap_entry {
+ required uint64 vaddr = 1 [(criu).hex = true];
+ required uint32 nr_pages = 2;
+ optional bool in_parent = 3;
+ optional uint32 flags = 4 [(criu).flags = "pmap.flags" ];
+}
diff --git a/crit/images/pidns.pb.go b/crit/images/pidns.pb.go
new file mode 100644
index 0000000..f6db5b1
--- /dev/null
+++ b/crit/images/pidns.pb.go
@@ -0,0 +1,142 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: pidns.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PidnsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExtKey *string `protobuf:"bytes,1,opt,name=ext_key,json=extKey" json:"ext_key,omitempty"`
+}
+
+func (x *PidnsEntry) Reset() {
+ *x = PidnsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_pidns_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PidnsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PidnsEntry) ProtoMessage() {}
+
+func (x *PidnsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_pidns_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PidnsEntry.ProtoReflect.Descriptor instead.
+func (*PidnsEntry) Descriptor() ([]byte, []int) {
+ return file_pidns_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PidnsEntry) GetExtKey() string {
+ if x != nil && x.ExtKey != nil {
+ return *x.ExtKey
+ }
+ return ""
+}
+
+var File_pidns_proto protoreflect.FileDescriptor
+
+var file_pidns_proto_rawDesc = []byte{
+ 0x0a, 0x0b, 0x70, 0x69, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, 0x0a,
+ 0x0b, 0x70, 0x69, 0x64, 0x6e, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07,
+ 0x65, 0x78, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65,
+ 0x78, 0x74, 0x4b, 0x65, 0x79,
+}
+
+var (
+ file_pidns_proto_rawDescOnce sync.Once
+ file_pidns_proto_rawDescData = file_pidns_proto_rawDesc
+)
+
+func file_pidns_proto_rawDescGZIP() []byte {
+ file_pidns_proto_rawDescOnce.Do(func() {
+ file_pidns_proto_rawDescData = protoimpl.X.CompressGZIP(file_pidns_proto_rawDescData)
+ })
+ return file_pidns_proto_rawDescData
+}
+
+var file_pidns_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_pidns_proto_goTypes = []interface{}{
+ (*PidnsEntry)(nil), // 0: pidns_entry
+}
+var file_pidns_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_pidns_proto_init() }
+func file_pidns_proto_init() {
+ if File_pidns_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_pidns_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PidnsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_pidns_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_pidns_proto_goTypes,
+ DependencyIndexes: file_pidns_proto_depIdxs,
+ MessageInfos: file_pidns_proto_msgTypes,
+ }.Build()
+ File_pidns_proto = out.File
+ file_pidns_proto_rawDesc = nil
+ file_pidns_proto_goTypes = nil
+ file_pidns_proto_depIdxs = nil
+}
diff --git a/crit/images/pidns.proto b/crit/images/pidns.proto
new file mode 100644
index 0000000..f7e92e3
--- /dev/null
+++ b/crit/images/pidns.proto
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message pidns_entry {
+ optional string ext_key = 1;
+}
diff --git a/crit/images/pipe-data.pb.go b/crit/images/pipe-data.pb.go
new file mode 100644
index 0000000..a0eef6c
--- /dev/null
+++ b/crit/images/pipe-data.pb.go
@@ -0,0 +1,161 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: pipe-data.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PipeDataEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PipeId *uint32 `protobuf:"varint,1,req,name=pipe_id,json=pipeId" json:"pipe_id,omitempty"`
+ Bytes *uint32 `protobuf:"varint,2,req,name=bytes" json:"bytes,omitempty"`
+ Size *uint32 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"`
+}
+
+func (x *PipeDataEntry) Reset() {
+ *x = PipeDataEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_pipe_data_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PipeDataEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PipeDataEntry) ProtoMessage() {}
+
+func (x *PipeDataEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_pipe_data_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PipeDataEntry.ProtoReflect.Descriptor instead.
+func (*PipeDataEntry) Descriptor() ([]byte, []int) {
+ return file_pipe_data_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PipeDataEntry) GetPipeId() uint32 {
+ if x != nil && x.PipeId != nil {
+ return *x.PipeId
+ }
+ return 0
+}
+
+func (x *PipeDataEntry) GetBytes() uint32 {
+ if x != nil && x.Bytes != nil {
+ return *x.Bytes
+ }
+ return 0
+}
+
+func (x *PipeDataEntry) GetSize() uint32 {
+ if x != nil && x.Size != nil {
+ return *x.Size
+ }
+ return 0
+}
+
+var File_pipe_data_proto protoreflect.FileDescriptor
+
+var file_pipe_data_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x54, 0x0a, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x69, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x69, 0x70, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a,
+ 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x79,
+ 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65,
+}
+
+var (
+ file_pipe_data_proto_rawDescOnce sync.Once
+ file_pipe_data_proto_rawDescData = file_pipe_data_proto_rawDesc
+)
+
+func file_pipe_data_proto_rawDescGZIP() []byte {
+ file_pipe_data_proto_rawDescOnce.Do(func() {
+ file_pipe_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_pipe_data_proto_rawDescData)
+ })
+ return file_pipe_data_proto_rawDescData
+}
+
+var file_pipe_data_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_pipe_data_proto_goTypes = []interface{}{
+ (*PipeDataEntry)(nil), // 0: pipe_data_entry
+}
+var file_pipe_data_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_pipe_data_proto_init() }
+func file_pipe_data_proto_init() {
+ if File_pipe_data_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_pipe_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PipeDataEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_pipe_data_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_pipe_data_proto_goTypes,
+ DependencyIndexes: file_pipe_data_proto_depIdxs,
+ MessageInfos: file_pipe_data_proto_msgTypes,
+ }.Build()
+ File_pipe_data_proto = out.File
+ file_pipe_data_proto_rawDesc = nil
+ file_pipe_data_proto_goTypes = nil
+ file_pipe_data_proto_depIdxs = nil
+}
diff --git a/crit/images/pipe-data.proto b/crit/images/pipe-data.proto
new file mode 100644
index 0000000..040479e
--- /dev/null
+++ b/crit/images/pipe-data.proto
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message pipe_data_entry {
+ required uint32 pipe_id = 1;
+ required uint32 bytes = 2;
+ optional uint32 size = 3;
+}
diff --git a/crit/images/pipe.pb.go b/crit/images/pipe.pb.go
new file mode 100644
index 0000000..d406ca5
--- /dev/null
+++ b/crit/images/pipe.pb.go
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: pipe.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PipeEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ PipeId *uint32 `protobuf:"varint,2,req,name=pipe_id,json=pipeId" json:"pipe_id,omitempty"`
+ Flags *uint32 `protobuf:"varint,3,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,4,req,name=fown" json:"fown,omitempty"`
+}
+
+func (x *PipeEntry) Reset() {
+ *x = PipeEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_pipe_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PipeEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PipeEntry) ProtoMessage() {}
+
+func (x *PipeEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_pipe_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PipeEntry.ProtoReflect.Descriptor instead.
+func (*PipeEntry) Descriptor() ([]byte, []int) {
+ return file_pipe_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PipeEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *PipeEntry) GetPipeId() uint32 {
+ if x != nil && x.PipeId != nil {
+ return *x.PipeId
+ }
+ return 0
+}
+
+func (x *PipeEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *PipeEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+var File_pipe_proto protoreflect.FileDescriptor
+
+var file_pipe_proto_rawDesc = []byte{
+ 0x0a, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70,
+ 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02,
+ 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x69, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x69, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66,
+ 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08,
+ 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e,
+ 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e,
+}
+
+var (
+ file_pipe_proto_rawDescOnce sync.Once
+ file_pipe_proto_rawDescData = file_pipe_proto_rawDesc
+)
+
+func file_pipe_proto_rawDescGZIP() []byte {
+ file_pipe_proto_rawDescOnce.Do(func() {
+ file_pipe_proto_rawDescData = protoimpl.X.CompressGZIP(file_pipe_proto_rawDescData)
+ })
+ return file_pipe_proto_rawDescData
+}
+
+var file_pipe_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_pipe_proto_goTypes = []interface{}{
+ (*PipeEntry)(nil), // 0: pipe_entry
+ (*FownEntry)(nil), // 1: fown_entry
+}
+var file_pipe_proto_depIdxs = []int32{
+ 1, // 0: pipe_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_pipe_proto_init() }
+func file_pipe_proto_init() {
+ if File_pipe_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_pipe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PipeEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_pipe_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_pipe_proto_goTypes,
+ DependencyIndexes: file_pipe_proto_depIdxs,
+ MessageInfos: file_pipe_proto_msgTypes,
+ }.Build()
+ File_pipe_proto = out.File
+ file_pipe_proto_rawDesc = nil
+ file_pipe_proto_goTypes = nil
+ file_pipe_proto_depIdxs = nil
+}
diff --git a/crit/images/pipe.proto b/crit/images/pipe.proto
new file mode 100644
index 0000000..2c0360e
--- /dev/null
+++ b/crit/images/pipe.proto
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+
+message pipe_entry {
+ required uint32 id = 1;
+ required uint32 pipe_id = 2;
+ required uint32 flags = 3 [(criu).hex = true];
+ required fown_entry fown = 4;
+}
diff --git a/crit/images/pstree.pb.go b/crit/images/pstree.pb.go
new file mode 100644
index 0000000..f8d1b01
--- /dev/null
+++ b/crit/images/pstree.pb.go
@@ -0,0 +1,179 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: pstree.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PstreeEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Pid *uint32 `protobuf:"varint,1,req,name=pid" json:"pid,omitempty"`
+ Ppid *uint32 `protobuf:"varint,2,req,name=ppid" json:"ppid,omitempty"`
+ Pgid *uint32 `protobuf:"varint,3,req,name=pgid" json:"pgid,omitempty"`
+ Sid *uint32 `protobuf:"varint,4,req,name=sid" json:"sid,omitempty"`
+ Threads []uint32 `protobuf:"varint,5,rep,name=threads" json:"threads,omitempty"`
+}
+
+func (x *PstreeEntry) Reset() {
+ *x = PstreeEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_pstree_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PstreeEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PstreeEntry) ProtoMessage() {}
+
+func (x *PstreeEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_pstree_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PstreeEntry.ProtoReflect.Descriptor instead.
+func (*PstreeEntry) Descriptor() ([]byte, []int) {
+ return file_pstree_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PstreeEntry) GetPid() uint32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+func (x *PstreeEntry) GetPpid() uint32 {
+ if x != nil && x.Ppid != nil {
+ return *x.Ppid
+ }
+ return 0
+}
+
+func (x *PstreeEntry) GetPgid() uint32 {
+ if x != nil && x.Pgid != nil {
+ return *x.Pgid
+ }
+ return 0
+}
+
+func (x *PstreeEntry) GetSid() uint32 {
+ if x != nil && x.Sid != nil {
+ return *x.Sid
+ }
+ return 0
+}
+
+func (x *PstreeEntry) GetThreads() []uint32 {
+ if x != nil {
+ return x.Threads
+ }
+ return nil
+}
+
+var File_pstree_proto protoreflect.FileDescriptor
+
+var file_pstree_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x70, 0x73, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74,
+ 0x0a, 0x0c, 0x70, 0x73, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
+ 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x70, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04,
+ 0x70, 0x70, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x67, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x04, 0x70, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18,
+ 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x68,
+ 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x68, 0x72,
+ 0x65, 0x61, 0x64, 0x73,
+}
+
+var (
+ file_pstree_proto_rawDescOnce sync.Once
+ file_pstree_proto_rawDescData = file_pstree_proto_rawDesc
+)
+
+func file_pstree_proto_rawDescGZIP() []byte {
+ file_pstree_proto_rawDescOnce.Do(func() {
+ file_pstree_proto_rawDescData = protoimpl.X.CompressGZIP(file_pstree_proto_rawDescData)
+ })
+ return file_pstree_proto_rawDescData
+}
+
+var file_pstree_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_pstree_proto_goTypes = []interface{}{
+ (*PstreeEntry)(nil), // 0: pstree_entry
+}
+var file_pstree_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_pstree_proto_init() }
+func file_pstree_proto_init() {
+ if File_pstree_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_pstree_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PstreeEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_pstree_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_pstree_proto_goTypes,
+ DependencyIndexes: file_pstree_proto_depIdxs,
+ MessageInfos: file_pstree_proto_msgTypes,
+ }.Build()
+ File_pstree_proto = out.File
+ file_pstree_proto_rawDesc = nil
+ file_pstree_proto_goTypes = nil
+ file_pstree_proto_depIdxs = nil
+}
diff --git a/crit/images/pstree.proto b/crit/images/pstree.proto
new file mode 100644
index 0000000..fca284c
--- /dev/null
+++ b/crit/images/pstree.proto
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message pstree_entry {
+ required uint32 pid = 1;
+ required uint32 ppid = 2;
+ required uint32 pgid = 3;
+ required uint32 sid = 4;
+ repeated uint32 threads = 5;
+}
diff --git a/crit/images/regfile.pb.go b/crit/images/regfile.pb.go
new file mode 100644
index 0000000..7ce2158
--- /dev/null
+++ b/crit/images/regfile.pb.go
@@ -0,0 +1,275 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: regfile.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RegFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Pos *uint64 `protobuf:"varint,3,req,name=pos" json:"pos,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,5,req,name=fown" json:"fown,omitempty"`
+ Name *string `protobuf:"bytes,6,req,name=name" json:"name,omitempty"`
+ MntId *int32 `protobuf:"zigzag32,7,opt,name=mnt_id,json=mntId,def=-1" json:"mnt_id,omitempty"`
+ Size *uint64 `protobuf:"varint,8,opt,name=size" json:"size,omitempty"`
+ Ext *bool `protobuf:"varint,9,opt,name=ext" json:"ext,omitempty"`
+ Mode *uint32 `protobuf:"varint,10,opt,name=mode" json:"mode,omitempty"`
+ // This field stores the build-ID of the file if it could be obtained.
+ BuildId []uint32 `protobuf:"varint,11,rep,name=build_id,json=buildId" json:"build_id,omitempty"`
+ // This field stores the CRC32C checksum of the file if it could be obtained.
+ Checksum *uint32 `protobuf:"varint,12,opt,name=checksum" json:"checksum,omitempty"`
+ // This field stores the configuration of bytes which were used in the
+ // calculation of the checksum, if it could be obtained.
+ ChecksumConfig *uint32 `protobuf:"varint,13,opt,name=checksum_config,json=checksumConfig" json:"checksum_config,omitempty"`
+ // This field stores the checksum parameter if it was used in the calculation
+ // of the checksum, if it could be obtained.
+ ChecksumParameter *uint32 `protobuf:"varint,14,opt,name=checksum_parameter,json=checksumParameter" json:"checksum_parameter,omitempty"`
+}
+
+// Default values for RegFileEntry fields.
+const (
+ Default_RegFileEntry_MntId = int32(-1)
+)
+
+func (x *RegFileEntry) Reset() {
+ *x = RegFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_regfile_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegFileEntry) ProtoMessage() {}
+
+func (x *RegFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_regfile_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegFileEntry.ProtoReflect.Descriptor instead.
+func (*RegFileEntry) Descriptor() ([]byte, []int) {
+ return file_regfile_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RegFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *RegFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *RegFileEntry) GetPos() uint64 {
+ if x != nil && x.Pos != nil {
+ return *x.Pos
+ }
+ return 0
+}
+
+func (x *RegFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *RegFileEntry) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *RegFileEntry) GetMntId() int32 {
+ if x != nil && x.MntId != nil {
+ return *x.MntId
+ }
+ return Default_RegFileEntry_MntId
+}
+
+func (x *RegFileEntry) GetSize() uint64 {
+ if x != nil && x.Size != nil {
+ return *x.Size
+ }
+ return 0
+}
+
+func (x *RegFileEntry) GetExt() bool {
+ if x != nil && x.Ext != nil {
+ return *x.Ext
+ }
+ return false
+}
+
+func (x *RegFileEntry) GetMode() uint32 {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return 0
+}
+
+func (x *RegFileEntry) GetBuildId() []uint32 {
+ if x != nil {
+ return x.BuildId
+ }
+ return nil
+}
+
+func (x *RegFileEntry) GetChecksum() uint32 {
+ if x != nil && x.Checksum != nil {
+ return *x.Checksum
+ }
+ return 0
+}
+
+func (x *RegFileEntry) GetChecksumConfig() uint32 {
+ if x != nil && x.ChecksumConfig != nil {
+ return *x.ChecksumConfig
+ }
+ return 0
+}
+
+func (x *RegFileEntry) GetChecksumParameter() uint32 {
+ if x != nil && x.ChecksumParameter != nil {
+ return *x.ChecksumParameter
+ }
+ return 0
+}
+
+var File_regfile_proto protoreflect.FileDescriptor
+
+var file_regfile_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77,
+ 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf3, 0x02, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x5f,
+ 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x10, 0xd2, 0x3f, 0x0d, 0x1a, 0x0b,
+ 0x72, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x03, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x02,
+ 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20,
+ 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x06, 0x6d, 0x6e, 0x74,
+ 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x3a, 0x02, 0x2d, 0x31, 0x52, 0x05, 0x6d,
+ 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18,
+ 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f,
+ 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x19,
+ 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d,
+ 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
+ 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e,
+ 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2d,
+ 0x0a, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d,
+ 0x65, 0x74, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x63, 0x68, 0x65, 0x63,
+ 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
+}
+
+var (
+ file_regfile_proto_rawDescOnce sync.Once
+ file_regfile_proto_rawDescData = file_regfile_proto_rawDesc
+)
+
+func file_regfile_proto_rawDescGZIP() []byte {
+ file_regfile_proto_rawDescOnce.Do(func() {
+ file_regfile_proto_rawDescData = protoimpl.X.CompressGZIP(file_regfile_proto_rawDescData)
+ })
+ return file_regfile_proto_rawDescData
+}
+
+var file_regfile_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_regfile_proto_goTypes = []interface{}{
+ (*RegFileEntry)(nil), // 0: reg_file_entry
+ (*FownEntry)(nil), // 1: fown_entry
+}
+var file_regfile_proto_depIdxs = []int32{
+ 1, // 0: reg_file_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_regfile_proto_init() }
+func file_regfile_proto_init() {
+ if File_regfile_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_regfile_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_regfile_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_regfile_proto_goTypes,
+ DependencyIndexes: file_regfile_proto_depIdxs,
+ MessageInfos: file_regfile_proto_msgTypes,
+ }.Build()
+ File_regfile_proto = out.File
+ file_regfile_proto_rawDesc = nil
+ file_regfile_proto_goTypes = nil
+ file_regfile_proto_depIdxs = nil
+}
diff --git a/crit/images/regfile.proto b/crit/images/regfile.proto
new file mode 100644
index 0000000..bf22d20
--- /dev/null
+++ b/crit/images/regfile.proto
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+
+message reg_file_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2 [(criu).flags = "rfile.flags"];
+ required uint64 pos = 3;
+ required fown_entry fown = 5;
+ required string name = 6;
+ optional sint32 mnt_id = 7 [default = -1];
+ optional uint64 size = 8;
+ optional bool ext = 9;
+ optional uint32 mode = 10;
+
+ /* This field stores the build-ID of the file if it could be obtained. */
+ repeated uint32 build_id = 11;
+
+ /* This field stores the CRC32C checksum of the file if it could be obtained. */
+ optional uint32 checksum = 12;
+
+ /*
+ * This field stores the configuration of bytes which were used in the
+ * calculation of the checksum, if it could be obtained.
+ */
+ optional uint32 checksum_config = 13;
+
+ /*
+ * This field stores the checksum parameter if it was used in the calculation
+ * of the checksum, if it could be obtained.
+ */
+ optional uint32 checksum_parameter = 14;
+} \ No newline at end of file
diff --git a/crit/images/remap-file-path.pb.go b/crit/images/remap-file-path.pb.go
new file mode 100644
index 0000000..0793321
--- /dev/null
+++ b/crit/images/remap-file-path.pb.go
@@ -0,0 +1,230 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: remap-file-path.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RemapType int32
+
+const (
+ RemapType_LINKED RemapType = 0
+ RemapType_GHOST RemapType = 1
+ RemapType_PROCFS RemapType = 2
+)
+
+// Enum value maps for RemapType.
+var (
+ RemapType_name = map[int32]string{
+ 0: "LINKED",
+ 1: "GHOST",
+ 2: "PROCFS",
+ }
+ RemapType_value = map[string]int32{
+ "LINKED": 0,
+ "GHOST": 1,
+ "PROCFS": 2,
+ }
+)
+
+func (x RemapType) Enum() *RemapType {
+ p := new(RemapType)
+ *p = x
+ return p
+}
+
+func (x RemapType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (RemapType) Descriptor() protoreflect.EnumDescriptor {
+ return file_remap_file_path_proto_enumTypes[0].Descriptor()
+}
+
+func (RemapType) Type() protoreflect.EnumType {
+ return &file_remap_file_path_proto_enumTypes[0]
+}
+
+func (x RemapType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *RemapType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = RemapType(num)
+ return nil
+}
+
+// Deprecated: Use RemapType.Descriptor instead.
+func (RemapType) EnumDescriptor() ([]byte, []int) {
+ return file_remap_file_path_proto_rawDescGZIP(), []int{0}
+}
+
+type RemapFilePathEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OrigId *uint32 `protobuf:"varint,1,req,name=orig_id,json=origId" json:"orig_id,omitempty"`
+ RemapId *uint32 `protobuf:"varint,2,req,name=remap_id,json=remapId" json:"remap_id,omitempty"`
+ RemapType *RemapType `protobuf:"varint,3,opt,name=remap_type,json=remapType,enum=RemapType" json:"remap_type,omitempty"`
+}
+
+func (x *RemapFilePathEntry) Reset() {
+ *x = RemapFilePathEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_remap_file_path_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemapFilePathEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemapFilePathEntry) ProtoMessage() {}
+
+func (x *RemapFilePathEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_remap_file_path_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemapFilePathEntry.ProtoReflect.Descriptor instead.
+func (*RemapFilePathEntry) Descriptor() ([]byte, []int) {
+ return file_remap_file_path_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RemapFilePathEntry) GetOrigId() uint32 {
+ if x != nil && x.OrigId != nil {
+ return *x.OrigId
+ }
+ return 0
+}
+
+func (x *RemapFilePathEntry) GetRemapId() uint32 {
+ if x != nil && x.RemapId != nil {
+ return *x.RemapId
+ }
+ return 0
+}
+
+func (x *RemapFilePathEntry) GetRemapType() RemapType {
+ if x != nil && x.RemapType != nil {
+ return *x.RemapType
+ }
+ return RemapType_LINKED
+}
+
+var File_remap_file_path_proto protoreflect.FileDescriptor
+
+var file_remap_file_path_proto_rawDesc = []byte{
+ 0x0a, 0x15, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x70, 0x61, 0x74,
+ 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x15, 0x72, 0x65, 0x6d, 0x61, 0x70,
+ 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x72, 0x69, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x6d,
+ 0x61, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x6d,
+ 0x61, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x5f, 0x74, 0x79,
+ 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x72, 0x65, 0x6d, 0x61, 0x70,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
+ 0x2a, 0x2f, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0a,
+ 0x0a, 0x06, 0x4c, 0x49, 0x4e, 0x4b, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x48,
+ 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x52, 0x4f, 0x43, 0x46, 0x53, 0x10,
+ 0x02,
+}
+
+var (
+ file_remap_file_path_proto_rawDescOnce sync.Once
+ file_remap_file_path_proto_rawDescData = file_remap_file_path_proto_rawDesc
+)
+
+func file_remap_file_path_proto_rawDescGZIP() []byte {
+ file_remap_file_path_proto_rawDescOnce.Do(func() {
+ file_remap_file_path_proto_rawDescData = protoimpl.X.CompressGZIP(file_remap_file_path_proto_rawDescData)
+ })
+ return file_remap_file_path_proto_rawDescData
+}
+
+var file_remap_file_path_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_remap_file_path_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_remap_file_path_proto_goTypes = []interface{}{
+ (RemapType)(0), // 0: remap_type
+ (*RemapFilePathEntry)(nil), // 1: remap_file_path_entry
+}
+var file_remap_file_path_proto_depIdxs = []int32{
+ 0, // 0: remap_file_path_entry.remap_type:type_name -> remap_type
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_remap_file_path_proto_init() }
+func file_remap_file_path_proto_init() {
+ if File_remap_file_path_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_remap_file_path_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemapFilePathEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_remap_file_path_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_remap_file_path_proto_goTypes,
+ DependencyIndexes: file_remap_file_path_proto_depIdxs,
+ EnumInfos: file_remap_file_path_proto_enumTypes,
+ MessageInfos: file_remap_file_path_proto_msgTypes,
+ }.Build()
+ File_remap_file_path_proto = out.File
+ file_remap_file_path_proto_rawDesc = nil
+ file_remap_file_path_proto_goTypes = nil
+ file_remap_file_path_proto_depIdxs = nil
+}
diff --git a/crit/images/remap-file-path.proto b/crit/images/remap-file-path.proto
new file mode 100644
index 0000000..8635370
--- /dev/null
+++ b/crit/images/remap-file-path.proto
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+enum remap_type {
+ LINKED = 0;
+ GHOST = 1;
+ PROCFS = 2;
+ // Reserved for spfs manager
+ // SPFS = 3;
+ // SPFS_LINKED = 4;
+};
+
+message remap_file_path_entry {
+ required uint32 orig_id = 1;
+ required uint32 remap_id = 2;
+ optional remap_type remap_type = 3;
+}
diff --git a/crit/images/rlimit.pb.go b/crit/images/rlimit.pb.go
new file mode 100644
index 0000000..eb608f8
--- /dev/null
+++ b/crit/images/rlimit.pb.go
@@ -0,0 +1,151 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: rlimit.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RlimitEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Cur *uint64 `protobuf:"varint,1,req,name=cur" json:"cur,omitempty"`
+ Max *uint64 `protobuf:"varint,2,req,name=max" json:"max,omitempty"`
+}
+
+func (x *RlimitEntry) Reset() {
+ *x = RlimitEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rlimit_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RlimitEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RlimitEntry) ProtoMessage() {}
+
+func (x *RlimitEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_rlimit_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RlimitEntry.ProtoReflect.Descriptor instead.
+func (*RlimitEntry) Descriptor() ([]byte, []int) {
+ return file_rlimit_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RlimitEntry) GetCur() uint64 {
+ if x != nil && x.Cur != nil {
+ return *x.Cur
+ }
+ return 0
+}
+
+func (x *RlimitEntry) GetMax() uint64 {
+ if x != nil && x.Max != nil {
+ return *x.Max
+ }
+ return 0
+}
+
+var File_rlimit_proto protoreflect.FileDescriptor
+
+var file_rlimit_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32,
+ 0x0a, 0x0c, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
+ 0x0a, 0x03, 0x63, 0x75, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x63, 0x75, 0x72,
+ 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x03, 0x6d,
+ 0x61, 0x78,
+}
+
+var (
+ file_rlimit_proto_rawDescOnce sync.Once
+ file_rlimit_proto_rawDescData = file_rlimit_proto_rawDesc
+)
+
+func file_rlimit_proto_rawDescGZIP() []byte {
+ file_rlimit_proto_rawDescOnce.Do(func() {
+ file_rlimit_proto_rawDescData = protoimpl.X.CompressGZIP(file_rlimit_proto_rawDescData)
+ })
+ return file_rlimit_proto_rawDescData
+}
+
+var file_rlimit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_rlimit_proto_goTypes = []interface{}{
+ (*RlimitEntry)(nil), // 0: rlimit_entry
+}
+var file_rlimit_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_rlimit_proto_init() }
+func file_rlimit_proto_init() {
+ if File_rlimit_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_rlimit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RlimitEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_rlimit_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_rlimit_proto_goTypes,
+ DependencyIndexes: file_rlimit_proto_depIdxs,
+ MessageInfos: file_rlimit_proto_msgTypes,
+ }.Build()
+ File_rlimit_proto = out.File
+ file_rlimit_proto_rawDesc = nil
+ file_rlimit_proto_goTypes = nil
+ file_rlimit_proto_depIdxs = nil
+}
diff --git a/crit/images/rlimit.proto b/crit/images/rlimit.proto
new file mode 100644
index 0000000..3a3aeda
--- /dev/null
+++ b/crit/images/rlimit.proto
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message rlimit_entry {
+ required uint64 cur = 1;
+ required uint64 max = 2;
+}
diff --git a/crit/images/rseq.pb.go b/crit/images/rseq.pb.go
new file mode 100644
index 0000000..53d961e
--- /dev/null
+++ b/crit/images/rseq.pb.go
@@ -0,0 +1,173 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: rseq.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RseqEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RseqAbiPointer *uint64 `protobuf:"varint,1,req,name=rseq_abi_pointer,json=rseqAbiPointer" json:"rseq_abi_pointer,omitempty"`
+ RseqAbiSize *uint32 `protobuf:"varint,2,req,name=rseq_abi_size,json=rseqAbiSize" json:"rseq_abi_size,omitempty"`
+ Signature *uint32 `protobuf:"varint,3,req,name=signature" json:"signature,omitempty"`
+ RseqCsPointer *uint64 `protobuf:"varint,4,opt,name=rseq_cs_pointer,json=rseqCsPointer" json:"rseq_cs_pointer,omitempty"`
+}
+
+func (x *RseqEntry) Reset() {
+ *x = RseqEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rseq_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RseqEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RseqEntry) ProtoMessage() {}
+
+func (x *RseqEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_rseq_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RseqEntry.ProtoReflect.Descriptor instead.
+func (*RseqEntry) Descriptor() ([]byte, []int) {
+ return file_rseq_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RseqEntry) GetRseqAbiPointer() uint64 {
+ if x != nil && x.RseqAbiPointer != nil {
+ return *x.RseqAbiPointer
+ }
+ return 0
+}
+
+func (x *RseqEntry) GetRseqAbiSize() uint32 {
+ if x != nil && x.RseqAbiSize != nil {
+ return *x.RseqAbiSize
+ }
+ return 0
+}
+
+func (x *RseqEntry) GetSignature() uint32 {
+ if x != nil && x.Signature != nil {
+ return *x.Signature
+ }
+ return 0
+}
+
+func (x *RseqEntry) GetRseqCsPointer() uint64 {
+ if x != nil && x.RseqCsPointer != nil {
+ return *x.RseqCsPointer
+ }
+ return 0
+}
+
+var File_rseq_proto protoreflect.FileDescriptor
+
+var file_rseq_proto_rawDesc = []byte{
+ 0x0a, 0x0a, 0x72, 0x73, 0x65, 0x71, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x01, 0x0a,
+ 0x0a, 0x72, 0x73, 0x65, 0x71, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x72,
+ 0x73, 0x65, 0x71, 0x5f, 0x61, 0x62, 0x69, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, 0x72, 0x73, 0x65, 0x71, 0x41, 0x62, 0x69, 0x50, 0x6f,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x73, 0x65, 0x71, 0x5f, 0x61, 0x62,
+ 0x69, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x73,
+ 0x65, 0x71, 0x41, 0x62, 0x69, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67,
+ 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x69,
+ 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x73, 0x65, 0x71, 0x5f,
+ 0x63, 0x73, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x0d, 0x72, 0x73, 0x65, 0x71, 0x43, 0x73, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72,
+}
+
+var (
+ file_rseq_proto_rawDescOnce sync.Once
+ file_rseq_proto_rawDescData = file_rseq_proto_rawDesc
+)
+
+func file_rseq_proto_rawDescGZIP() []byte {
+ file_rseq_proto_rawDescOnce.Do(func() {
+ file_rseq_proto_rawDescData = protoimpl.X.CompressGZIP(file_rseq_proto_rawDescData)
+ })
+ return file_rseq_proto_rawDescData
+}
+
+var file_rseq_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_rseq_proto_goTypes = []interface{}{
+ (*RseqEntry)(nil), // 0: rseq_entry
+}
+var file_rseq_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_rseq_proto_init() }
+func file_rseq_proto_init() {
+ if File_rseq_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_rseq_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RseqEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_rseq_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_rseq_proto_goTypes,
+ DependencyIndexes: file_rseq_proto_depIdxs,
+ MessageInfos: file_rseq_proto_msgTypes,
+ }.Build()
+ File_rseq_proto = out.File
+ file_rseq_proto_rawDesc = nil
+ file_rseq_proto_goTypes = nil
+ file_rseq_proto_depIdxs = nil
+}
diff --git a/crit/images/rseq.proto b/crit/images/rseq.proto
new file mode 100644
index 0000000..45cb847
--- /dev/null
+++ b/crit/images/rseq.proto
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message rseq_entry {
+ required uint64 rseq_abi_pointer = 1;
+ required uint32 rseq_abi_size = 2;
+ required uint32 signature = 3;
+ optional uint64 rseq_cs_pointer = 4;
+}
diff --git a/crit/images/seccomp.pb.go b/crit/images/seccomp.pb.go
new file mode 100644
index 0000000..124a6cc
--- /dev/null
+++ b/crit/images/seccomp.pb.go
@@ -0,0 +1,226 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: seccomp.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SeccompFilter struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Filter []byte `protobuf:"bytes,1,req,name=filter" json:"filter,omitempty"`
+ Prev *uint32 `protobuf:"varint,2,opt,name=prev" json:"prev,omitempty"`
+ Flags *uint32 `protobuf:"varint,3,opt,name=flags" json:"flags,omitempty"`
+}
+
+func (x *SeccompFilter) Reset() {
+ *x = SeccompFilter{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_seccomp_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SeccompFilter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SeccompFilter) ProtoMessage() {}
+
+func (x *SeccompFilter) ProtoReflect() protoreflect.Message {
+ mi := &file_seccomp_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SeccompFilter.ProtoReflect.Descriptor instead.
+func (*SeccompFilter) Descriptor() ([]byte, []int) {
+ return file_seccomp_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SeccompFilter) GetFilter() []byte {
+ if x != nil {
+ return x.Filter
+ }
+ return nil
+}
+
+func (x *SeccompFilter) GetPrev() uint32 {
+ if x != nil && x.Prev != nil {
+ return *x.Prev
+ }
+ return 0
+}
+
+func (x *SeccompFilter) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+type SeccompEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SeccompFilters []*SeccompFilter `protobuf:"bytes,1,rep,name=seccomp_filters,json=seccompFilters" json:"seccomp_filters,omitempty"`
+}
+
+func (x *SeccompEntry) Reset() {
+ *x = SeccompEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_seccomp_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SeccompEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SeccompEntry) ProtoMessage() {}
+
+func (x *SeccompEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_seccomp_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SeccompEntry.ProtoReflect.Descriptor instead.
+func (*SeccompEntry) Descriptor() ([]byte, []int) {
+ return file_seccomp_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *SeccompEntry) GetSeccompFilters() []*SeccompFilter {
+ if x != nil {
+ return x.SeccompFilters
+ }
+ return nil
+}
+
+var File_seccomp_proto protoreflect.FileDescriptor
+
+var file_seccomp_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x52, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65,
+ 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x0c, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x72, 0x65,
+ 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x72, 0x65, 0x76, 0x12, 0x14, 0x0a,
+ 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x22, 0x49, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x38, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
+ 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0e,
+ 0x73, 0x65, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73,
+}
+
+var (
+ file_seccomp_proto_rawDescOnce sync.Once
+ file_seccomp_proto_rawDescData = file_seccomp_proto_rawDesc
+)
+
+func file_seccomp_proto_rawDescGZIP() []byte {
+ file_seccomp_proto_rawDescOnce.Do(func() {
+ file_seccomp_proto_rawDescData = protoimpl.X.CompressGZIP(file_seccomp_proto_rawDescData)
+ })
+ return file_seccomp_proto_rawDescData
+}
+
+var file_seccomp_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_seccomp_proto_goTypes = []interface{}{
+ (*SeccompFilter)(nil), // 0: seccomp_filter
+ (*SeccompEntry)(nil), // 1: seccomp_entry
+}
+var file_seccomp_proto_depIdxs = []int32{
+ 0, // 0: seccomp_entry.seccomp_filters:type_name -> seccomp_filter
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_seccomp_proto_init() }
+func file_seccomp_proto_init() {
+ if File_seccomp_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_seccomp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SeccompFilter); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_seccomp_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SeccompEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_seccomp_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_seccomp_proto_goTypes,
+ DependencyIndexes: file_seccomp_proto_depIdxs,
+ MessageInfos: file_seccomp_proto_msgTypes,
+ }.Build()
+ File_seccomp_proto = out.File
+ file_seccomp_proto_rawDesc = nil
+ file_seccomp_proto_goTypes = nil
+ file_seccomp_proto_depIdxs = nil
+}
diff --git a/crit/images/seccomp.proto b/crit/images/seccomp.proto
new file mode 100644
index 0000000..e56cea3
--- /dev/null
+++ b/crit/images/seccomp.proto
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message seccomp_filter {
+ required bytes filter = 1;
+ optional uint32 prev = 2;
+ optional uint32 flags = 3;
+}
+
+message seccomp_entry {
+ repeated seccomp_filter seccomp_filters = 1;
+}
diff --git a/crit/images/siginfo.pb.go b/crit/images/siginfo.pb.go
new file mode 100644
index 0000000..97db339
--- /dev/null
+++ b/crit/images/siginfo.pb.go
@@ -0,0 +1,207 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: siginfo.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SiginfoEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Siginfo []byte `protobuf:"bytes,1,req,name=siginfo" json:"siginfo,omitempty"`
+}
+
+func (x *SiginfoEntry) Reset() {
+ *x = SiginfoEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_siginfo_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SiginfoEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SiginfoEntry) ProtoMessage() {}
+
+func (x *SiginfoEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_siginfo_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SiginfoEntry.ProtoReflect.Descriptor instead.
+func (*SiginfoEntry) Descriptor() ([]byte, []int) {
+ return file_siginfo_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SiginfoEntry) GetSiginfo() []byte {
+ if x != nil {
+ return x.Siginfo
+ }
+ return nil
+}
+
+type SignalQueueEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Signals []*SiginfoEntry `protobuf:"bytes,1,rep,name=signals" json:"signals,omitempty"`
+}
+
+func (x *SignalQueueEntry) Reset() {
+ *x = SignalQueueEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_siginfo_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SignalQueueEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SignalQueueEntry) ProtoMessage() {}
+
+func (x *SignalQueueEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_siginfo_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SignalQueueEntry.ProtoReflect.Descriptor instead.
+func (*SignalQueueEntry) Descriptor() ([]byte, []int) {
+ return file_siginfo_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *SignalQueueEntry) GetSignals() []*SiginfoEntry {
+ if x != nil {
+ return x.Signals
+ }
+ return nil
+}
+
+var File_siginfo_proto protoreflect.FileDescriptor
+
+var file_siginfo_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x29, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x02, 0x28,
+ 0x0c, 0x52, 0x07, 0x73, 0x69, 0x67, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3e, 0x0a, 0x12, 0x73, 0x69,
+ 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x28, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x69, 0x67, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73,
+}
+
+var (
+ file_siginfo_proto_rawDescOnce sync.Once
+ file_siginfo_proto_rawDescData = file_siginfo_proto_rawDesc
+)
+
+func file_siginfo_proto_rawDescGZIP() []byte {
+ file_siginfo_proto_rawDescOnce.Do(func() {
+ file_siginfo_proto_rawDescData = protoimpl.X.CompressGZIP(file_siginfo_proto_rawDescData)
+ })
+ return file_siginfo_proto_rawDescData
+}
+
+var file_siginfo_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_siginfo_proto_goTypes = []interface{}{
+ (*SiginfoEntry)(nil), // 0: siginfo_entry
+ (*SignalQueueEntry)(nil), // 1: signal_queue_entry
+}
+var file_siginfo_proto_depIdxs = []int32{
+ 0, // 0: signal_queue_entry.signals:type_name -> siginfo_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_siginfo_proto_init() }
+func file_siginfo_proto_init() {
+ if File_siginfo_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_siginfo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SiginfoEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_siginfo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SignalQueueEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_siginfo_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_siginfo_proto_goTypes,
+ DependencyIndexes: file_siginfo_proto_depIdxs,
+ MessageInfos: file_siginfo_proto_msgTypes,
+ }.Build()
+ File_siginfo_proto = out.File
+ file_siginfo_proto_rawDesc = nil
+ file_siginfo_proto_goTypes = nil
+ file_siginfo_proto_depIdxs = nil
+}
diff --git a/crit/images/siginfo.proto b/crit/images/siginfo.proto
new file mode 100644
index 0000000..6e696c7
--- /dev/null
+++ b/crit/images/siginfo.proto
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message siginfo_entry {
+ required bytes siginfo = 1;
+}
+
+message signal_queue_entry {
+ repeated siginfo_entry signals = 1;
+}
diff --git a/crit/images/signalfd.pb.go b/crit/images/signalfd.pb.go
new file mode 100644
index 0000000..02a80b1
--- /dev/null
+++ b/crit/images/signalfd.pb.go
@@ -0,0 +1,177 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: signalfd.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SignalfdEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,3,req,name=fown" json:"fown,omitempty"`
+ Sigmask *uint64 `protobuf:"varint,4,req,name=sigmask" json:"sigmask,omitempty"`
+}
+
+func (x *SignalfdEntry) Reset() {
+ *x = SignalfdEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_signalfd_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SignalfdEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SignalfdEntry) ProtoMessage() {}
+
+func (x *SignalfdEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_signalfd_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SignalfdEntry.ProtoReflect.Descriptor instead.
+func (*SignalfdEntry) Descriptor() ([]byte, []int) {
+ return file_signalfd_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SignalfdEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *SignalfdEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *SignalfdEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *SignalfdEntry) GetSigmask() uint64 {
+ if x != nil && x.Sigmask != nil {
+ return *x.Sigmask
+ }
+ return 0
+}
+
+var File_signalfd_proto protoreflect.FileDescriptor
+
+var file_signalfd_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x66, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f,
+ 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e,
+ 0x61, 0x6c, 0x66, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01,
+ 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18,
+ 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x1f, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6d,
+ 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01,
+ 0x52, 0x07, 0x73, 0x69, 0x67, 0x6d, 0x61, 0x73, 0x6b,
+}
+
+var (
+ file_signalfd_proto_rawDescOnce sync.Once
+ file_signalfd_proto_rawDescData = file_signalfd_proto_rawDesc
+)
+
+func file_signalfd_proto_rawDescGZIP() []byte {
+ file_signalfd_proto_rawDescOnce.Do(func() {
+ file_signalfd_proto_rawDescData = protoimpl.X.CompressGZIP(file_signalfd_proto_rawDescData)
+ })
+ return file_signalfd_proto_rawDescData
+}
+
+var file_signalfd_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_signalfd_proto_goTypes = []interface{}{
+ (*SignalfdEntry)(nil), // 0: signalfd_entry
+ (*FownEntry)(nil), // 1: fown_entry
+}
+var file_signalfd_proto_depIdxs = []int32{
+ 1, // 0: signalfd_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_signalfd_proto_init() }
+func file_signalfd_proto_init() {
+ if File_signalfd_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_signalfd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SignalfdEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_signalfd_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_signalfd_proto_goTypes,
+ DependencyIndexes: file_signalfd_proto_depIdxs,
+ MessageInfos: file_signalfd_proto_msgTypes,
+ }.Build()
+ File_signalfd_proto = out.File
+ file_signalfd_proto_rawDesc = nil
+ file_signalfd_proto_goTypes = nil
+ file_signalfd_proto_depIdxs = nil
+}
diff --git a/crit/images/signalfd.proto b/crit/images/signalfd.proto
new file mode 100644
index 0000000..83546ae
--- /dev/null
+++ b/crit/images/signalfd.proto
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+
+message signalfd_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2 [(criu).hex = true];
+ required fown_entry fown = 3;
+ required uint64 sigmask = 4 [(criu).hex = true];
+};
diff --git a/crit/images/sit.pb.go b/crit/images/sit.pb.go
new file mode 100644
index 0000000..3572130
--- /dev/null
+++ b/crit/images/sit.pb.go
@@ -0,0 +1,291 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: sit.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SitEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Link *uint32 `protobuf:"varint,1,opt,name=link" json:"link,omitempty"`
+ Local []uint32 `protobuf:"varint,2,rep,name=local" json:"local,omitempty"`
+ Remote []uint32 `protobuf:"varint,3,rep,name=remote" json:"remote,omitempty"`
+ Ttl *uint32 `protobuf:"varint,4,opt,name=ttl" json:"ttl,omitempty"`
+ Tos *uint32 `protobuf:"varint,5,opt,name=tos" json:"tos,omitempty"`
+ Pmtudisc *bool `protobuf:"varint,6,opt,name=pmtudisc" json:"pmtudisc,omitempty"`
+ Proto *uint32 `protobuf:"varint,7,opt,name=proto" json:"proto,omitempty"`
+ Flags *uint32 `protobuf:"varint,8,opt,name=flags" json:"flags,omitempty"`
+ EncapType *uint32 `protobuf:"varint,9,opt,name=encap_type,json=encapType" json:"encap_type,omitempty"`
+ EncapFlags *uint32 `protobuf:"varint,10,opt,name=encap_flags,json=encapFlags" json:"encap_flags,omitempty"`
+ EncapSport *uint32 `protobuf:"varint,11,opt,name=encap_sport,json=encapSport" json:"encap_sport,omitempty"`
+ EncapDport *uint32 `protobuf:"varint,12,opt,name=encap_dport,json=encapDport" json:"encap_dport,omitempty"`
+ RdPrefixlen *uint32 `protobuf:"varint,13,opt,name=rd_prefixlen,json=rdPrefixlen" json:"rd_prefixlen,omitempty"`
+ RdPrefix []uint32 `protobuf:"varint,14,rep,name=rd_prefix,json=rdPrefix" json:"rd_prefix,omitempty"`
+ RelayPrefixlen *uint32 `protobuf:"varint,15,opt,name=relay_prefixlen,json=relayPrefixlen" json:"relay_prefixlen,omitempty"`
+ RelayPrefix []uint32 `protobuf:"varint,16,rep,name=relay_prefix,json=relayPrefix" json:"relay_prefix,omitempty"`
+}
+
+func (x *SitEntry) Reset() {
+ *x = SitEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sit_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SitEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SitEntry) ProtoMessage() {}
+
+func (x *SitEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sit_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SitEntry.ProtoReflect.Descriptor instead.
+func (*SitEntry) Descriptor() ([]byte, []int) {
+ return file_sit_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SitEntry) GetLink() uint32 {
+ if x != nil && x.Link != nil {
+ return *x.Link
+ }
+ return 0
+}
+
+func (x *SitEntry) GetLocal() []uint32 {
+ if x != nil {
+ return x.Local
+ }
+ return nil
+}
+
+func (x *SitEntry) GetRemote() []uint32 {
+ if x != nil {
+ return x.Remote
+ }
+ return nil
+}
+
+func (x *SitEntry) GetTtl() uint32 {
+ if x != nil && x.Ttl != nil {
+ return *x.Ttl
+ }
+ return 0
+}
+
+func (x *SitEntry) GetTos() uint32 {
+ if x != nil && x.Tos != nil {
+ return *x.Tos
+ }
+ return 0
+}
+
+func (x *SitEntry) GetPmtudisc() bool {
+ if x != nil && x.Pmtudisc != nil {
+ return *x.Pmtudisc
+ }
+ return false
+}
+
+func (x *SitEntry) GetProto() uint32 {
+ if x != nil && x.Proto != nil {
+ return *x.Proto
+ }
+ return 0
+}
+
+func (x *SitEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *SitEntry) GetEncapType() uint32 {
+ if x != nil && x.EncapType != nil {
+ return *x.EncapType
+ }
+ return 0
+}
+
+func (x *SitEntry) GetEncapFlags() uint32 {
+ if x != nil && x.EncapFlags != nil {
+ return *x.EncapFlags
+ }
+ return 0
+}
+
+func (x *SitEntry) GetEncapSport() uint32 {
+ if x != nil && x.EncapSport != nil {
+ return *x.EncapSport
+ }
+ return 0
+}
+
+func (x *SitEntry) GetEncapDport() uint32 {
+ if x != nil && x.EncapDport != nil {
+ return *x.EncapDport
+ }
+ return 0
+}
+
+func (x *SitEntry) GetRdPrefixlen() uint32 {
+ if x != nil && x.RdPrefixlen != nil {
+ return *x.RdPrefixlen
+ }
+ return 0
+}
+
+func (x *SitEntry) GetRdPrefix() []uint32 {
+ if x != nil {
+ return x.RdPrefix
+ }
+ return nil
+}
+
+func (x *SitEntry) GetRelayPrefixlen() uint32 {
+ if x != nil && x.RelayPrefixlen != nil {
+ return *x.RelayPrefixlen
+ }
+ return 0
+}
+
+func (x *SitEntry) GetRelayPrefix() []uint32 {
+ if x != nil {
+ return x.RelayPrefix
+ }
+ return nil
+}
+
+var File_sit_proto protoreflect.FileDescriptor
+
+var file_sit_proto_rawDesc = []byte{
+ 0x0a, 0x09, 0x73, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x03, 0x0a, 0x09, 0x73, 0x69, 0x74, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1b, 0x0a, 0x05, 0x6c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x10, 0x01, 0x52,
+ 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0d, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6f, 0x73, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x6f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6d, 0x74,
+ 0x75, 0x64, 0x69, 0x73, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x6d, 0x74,
+ 0x75, 0x64, 0x69, 0x73, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x66,
+ 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67,
+ 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
+ 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18,
+ 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x46, 0x6c, 0x61, 0x67,
+ 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x6f, 0x72, 0x74,
+ 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x53, 0x70, 0x6f,
+ 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x5f, 0x64, 0x70, 0x6f, 0x72,
+ 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x44, 0x70,
+ 0x6f, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
+ 0x6c, 0x65, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x64, 0x50, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x12, 0x22, 0x0a, 0x09, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x10, 0x01,
+ 0x52, 0x08, 0x72, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65,
+ 0x6c, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x18, 0x0f, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78,
+ 0x6c, 0x65, 0x6e, 0x12, 0x28, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x10, 0x01,
+ 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78,
+}
+
+var (
+ file_sit_proto_rawDescOnce sync.Once
+ file_sit_proto_rawDescData = file_sit_proto_rawDesc
+)
+
+func file_sit_proto_rawDescGZIP() []byte {
+ file_sit_proto_rawDescOnce.Do(func() {
+ file_sit_proto_rawDescData = protoimpl.X.CompressGZIP(file_sit_proto_rawDescData)
+ })
+ return file_sit_proto_rawDescData
+}
+
+var file_sit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_sit_proto_goTypes = []interface{}{
+ (*SitEntry)(nil), // 0: sit_entry
+}
+var file_sit_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_sit_proto_init() }
+func file_sit_proto_init() {
+ if File_sit_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_sit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SitEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_sit_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_sit_proto_goTypes,
+ DependencyIndexes: file_sit_proto_depIdxs,
+ MessageInfos: file_sit_proto_msgTypes,
+ }.Build()
+ File_sit_proto = out.File
+ file_sit_proto_rawDesc = nil
+ file_sit_proto_goTypes = nil
+ file_sit_proto_depIdxs = nil
+}
diff --git a/crit/images/sit.proto b/crit/images/sit.proto
new file mode 100644
index 0000000..5396458
--- /dev/null
+++ b/crit/images/sit.proto
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message sit_entry {
+ optional uint32 link = 1;
+ repeated uint32 local = 2 [(criu).ipadd = true];
+ repeated uint32 remote = 3 [(criu).ipadd = true];
+ optional uint32 ttl = 4;
+ optional uint32 tos = 5;
+ optional bool pmtudisc = 6;
+ optional uint32 proto = 7;
+ optional uint32 flags = 8;
+ optional uint32 encap_type = 9;
+ optional uint32 encap_flags = 10;
+ optional uint32 encap_sport = 11;
+ optional uint32 encap_dport = 12;
+ optional uint32 rd_prefixlen = 13;
+ repeated uint32 rd_prefix = 14 [(criu).ipadd = true];
+ optional uint32 relay_prefixlen = 15;
+ repeated uint32 relay_prefix = 16 [(criu).ipadd = true];
+};
diff --git a/crit/images/sk-inet.pb.go b/crit/images/sk-inet.pb.go
new file mode 100644
index 0000000..03801fb
--- /dev/null
+++ b/crit/images/sk-inet.pb.go
@@ -0,0 +1,508 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: sk-inet.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type IpOptsRawEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Hdrincl *bool `protobuf:"varint,1,opt,name=hdrincl" json:"hdrincl,omitempty"`
+ Nodefrag *bool `protobuf:"varint,2,opt,name=nodefrag" json:"nodefrag,omitempty"`
+ Checksum *bool `protobuf:"varint,3,opt,name=checksum" json:"checksum,omitempty"`
+ IcmpvFilter []uint32 `protobuf:"varint,4,rep,name=icmpv_filter,json=icmpvFilter" json:"icmpv_filter,omitempty"`
+}
+
+func (x *IpOptsRawEntry) Reset() {
+ *x = IpOptsRawEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_inet_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpOptsRawEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpOptsRawEntry) ProtoMessage() {}
+
+func (x *IpOptsRawEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_inet_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpOptsRawEntry.ProtoReflect.Descriptor instead.
+func (*IpOptsRawEntry) Descriptor() ([]byte, []int) {
+ return file_sk_inet_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *IpOptsRawEntry) GetHdrincl() bool {
+ if x != nil && x.Hdrincl != nil {
+ return *x.Hdrincl
+ }
+ return false
+}
+
+func (x *IpOptsRawEntry) GetNodefrag() bool {
+ if x != nil && x.Nodefrag != nil {
+ return *x.Nodefrag
+ }
+ return false
+}
+
+func (x *IpOptsRawEntry) GetChecksum() bool {
+ if x != nil && x.Checksum != nil {
+ return *x.Checksum
+ }
+ return false
+}
+
+func (x *IpOptsRawEntry) GetIcmpvFilter() []uint32 {
+ if x != nil {
+ return x.IcmpvFilter
+ }
+ return nil
+}
+
+type IpOptsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Freebind *bool `protobuf:"varint,1,opt,name=freebind" json:"freebind,omitempty"`
+ // Fields 2 and 3 are reserved for vz7 use
+ Raw *IpOptsRawEntry `protobuf:"bytes,4,opt,name=raw" json:"raw,omitempty"`
+}
+
+func (x *IpOptsEntry) Reset() {
+ *x = IpOptsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_inet_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IpOptsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IpOptsEntry) ProtoMessage() {}
+
+func (x *IpOptsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_inet_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IpOptsEntry.ProtoReflect.Descriptor instead.
+func (*IpOptsEntry) Descriptor() ([]byte, []int) {
+ return file_sk_inet_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *IpOptsEntry) GetFreebind() bool {
+ if x != nil && x.Freebind != nil {
+ return *x.Freebind
+ }
+ return false
+}
+
+func (x *IpOptsEntry) GetRaw() *IpOptsRawEntry {
+ if x != nil {
+ return x.Raw
+ }
+ return nil
+}
+
+type InetSkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // We have two IDs here -- id and ino. The first one
+ // is used when restoring socket behind a file descriprot.
+ // The fdinfo image's id is it. The second one is used
+ // in sk-inet.c internally, in particular we identify
+ // a TCP stream to restore into this socket using the
+ // ino value.
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Ino *uint32 `protobuf:"varint,2,req,name=ino" json:"ino,omitempty"`
+ Family *uint32 `protobuf:"varint,3,req,name=family" json:"family,omitempty"`
+ Type *uint32 `protobuf:"varint,4,req,name=type" json:"type,omitempty"`
+ Proto *uint32 `protobuf:"varint,5,req,name=proto" json:"proto,omitempty"`
+ State *uint32 `protobuf:"varint,6,req,name=state" json:"state,omitempty"`
+ SrcPort *uint32 `protobuf:"varint,7,req,name=src_port,json=srcPort" json:"src_port,omitempty"`
+ DstPort *uint32 `protobuf:"varint,8,req,name=dst_port,json=dstPort" json:"dst_port,omitempty"`
+ Flags *uint32 `protobuf:"varint,9,req,name=flags" json:"flags,omitempty"`
+ Backlog *uint32 `protobuf:"varint,10,req,name=backlog" json:"backlog,omitempty"`
+ SrcAddr []uint32 `protobuf:"varint,11,rep,name=src_addr,json=srcAddr" json:"src_addr,omitempty"`
+ DstAddr []uint32 `protobuf:"varint,12,rep,name=dst_addr,json=dstAddr" json:"dst_addr,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,13,req,name=fown" json:"fown,omitempty"`
+ Opts *SkOptsEntry `protobuf:"bytes,14,req,name=opts" json:"opts,omitempty"`
+ V6Only *bool `protobuf:"varint,15,opt,name=v6only" json:"v6only,omitempty"`
+ IpOpts *IpOptsEntry `protobuf:"bytes,16,opt,name=ip_opts,json=ipOpts" json:"ip_opts,omitempty"`
+ // for ipv6, we need to send the ifindex to bind(); we keep the ifname
+ // here and convert it on restore
+ Ifname *string `protobuf:"bytes,17,opt,name=ifname" json:"ifname,omitempty"`
+ NsId *uint32 `protobuf:"varint,18,opt,name=ns_id,json=nsId" json:"ns_id,omitempty"`
+ Shutdown *SkShutdown `protobuf:"varint,19,opt,name=shutdown,enum=SkShutdown" json:"shutdown,omitempty"`
+}
+
+func (x *InetSkEntry) Reset() {
+ *x = InetSkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_inet_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InetSkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InetSkEntry) ProtoMessage() {}
+
+func (x *InetSkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_inet_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InetSkEntry.ProtoReflect.Descriptor instead.
+func (*InetSkEntry) Descriptor() ([]byte, []int) {
+ return file_sk_inet_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *InetSkEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetIno() uint32 {
+ if x != nil && x.Ino != nil {
+ return *x.Ino
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetFamily() uint32 {
+ if x != nil && x.Family != nil {
+ return *x.Family
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetType() uint32 {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetProto() uint32 {
+ if x != nil && x.Proto != nil {
+ return *x.Proto
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetState() uint32 {
+ if x != nil && x.State != nil {
+ return *x.State
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetSrcPort() uint32 {
+ if x != nil && x.SrcPort != nil {
+ return *x.SrcPort
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetDstPort() uint32 {
+ if x != nil && x.DstPort != nil {
+ return *x.DstPort
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetBacklog() uint32 {
+ if x != nil && x.Backlog != nil {
+ return *x.Backlog
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetSrcAddr() []uint32 {
+ if x != nil {
+ return x.SrcAddr
+ }
+ return nil
+}
+
+func (x *InetSkEntry) GetDstAddr() []uint32 {
+ if x != nil {
+ return x.DstAddr
+ }
+ return nil
+}
+
+func (x *InetSkEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *InetSkEntry) GetOpts() *SkOptsEntry {
+ if x != nil {
+ return x.Opts
+ }
+ return nil
+}
+
+func (x *InetSkEntry) GetV6Only() bool {
+ if x != nil && x.V6Only != nil {
+ return *x.V6Only
+ }
+ return false
+}
+
+func (x *InetSkEntry) GetIpOpts() *IpOptsEntry {
+ if x != nil {
+ return x.IpOpts
+ }
+ return nil
+}
+
+func (x *InetSkEntry) GetIfname() string {
+ if x != nil && x.Ifname != nil {
+ return *x.Ifname
+ }
+ return ""
+}
+
+func (x *InetSkEntry) GetNsId() uint32 {
+ if x != nil && x.NsId != nil {
+ return *x.NsId
+ }
+ return 0
+}
+
+func (x *InetSkEntry) GetShutdown() SkShutdown {
+ if x != nil && x.Shutdown != nil {
+ return *x.Shutdown
+ }
+ return SkShutdown_NONE
+}
+
+var File_sk_inet_proto protoreflect.FileDescriptor
+
+var file_sk_inet_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x73, 0x6b, 0x2d, 0x69, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77,
+ 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x6b, 0x2d, 0x6f, 0x70, 0x74, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x11, 0x69, 0x70, 0x5f, 0x6f, 0x70,
+ 0x74, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07,
+ 0x68, 0x64, 0x72, 0x69, 0x6e, 0x63, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68,
+ 0x64, 0x72, 0x69, 0x6e, 0x63, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x66, 0x72,
+ 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x66, 0x72,
+ 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x21,
+ 0x0a, 0x0c, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04,
+ 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0b, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x46, 0x69, 0x6c, 0x74, 0x65,
+ 0x72, 0x22, 0x51, 0x0a, 0x0d, 0x69, 0x70, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x24,
+ 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x70,
+ 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x03, 0x72, 0x61, 0x77, 0x22, 0xbb, 0x04, 0x0a, 0x0d, 0x69, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x6b,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x6e, 0x6f, 0x18, 0x02, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x03, 0x69, 0x6e, 0x6f, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69,
+ 0x6c, 0x79, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x07, 0xd2, 0x3f, 0x04, 0x32, 0x02, 0x73,
+ 0x6b, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x07, 0xd2, 0x3f, 0x04, 0x32, 0x02, 0x73, 0x6b,
+ 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18,
+ 0x05, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x07, 0xd2, 0x3f, 0x04, 0x32, 0x02, 0x73, 0x6b, 0x52, 0x05,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06,
+ 0x20, 0x02, 0x28, 0x0d, 0x42, 0x07, 0xd2, 0x3f, 0x04, 0x32, 0x02, 0x73, 0x6b, 0x52, 0x05, 0x73,
+ 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74,
+ 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12,
+ 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x18, 0x09, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01,
+ 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x6c,
+ 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f,
+ 0x67, 0x12, 0x20, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x0b, 0x20,
+ 0x03, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x72, 0x63, 0x41,
+ 0x64, 0x64, 0x72, 0x12, 0x20, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18,
+ 0x0c, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x10, 0x01, 0x52, 0x07, 0x64, 0x73,
+ 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x0d, 0x20,
+ 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x22, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x0e,
+ 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6b, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x36,
+ 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x36, 0x6f, 0x6e,
+ 0x6c, 0x79, 0x12, 0x27, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x10, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x69, 0x70, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, 0x70, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69,
+ 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x66, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01,
+ 0x28, 0x0d, 0x52, 0x04, 0x6e, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x73, 0x68, 0x75, 0x74,
+ 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x6b, 0x5f,
+ 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x08, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f,
+ 0x77, 0x6e,
+}
+
+var (
+ file_sk_inet_proto_rawDescOnce sync.Once
+ file_sk_inet_proto_rawDescData = file_sk_inet_proto_rawDesc
+)
+
+func file_sk_inet_proto_rawDescGZIP() []byte {
+ file_sk_inet_proto_rawDescOnce.Do(func() {
+ file_sk_inet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sk_inet_proto_rawDescData)
+ })
+ return file_sk_inet_proto_rawDescData
+}
+
+var file_sk_inet_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_sk_inet_proto_goTypes = []interface{}{
+ (*IpOptsRawEntry)(nil), // 0: ip_opts_raw_entry
+ (*IpOptsEntry)(nil), // 1: ip_opts_entry
+ (*InetSkEntry)(nil), // 2: inet_sk_entry
+ (*FownEntry)(nil), // 3: fown_entry
+ (*SkOptsEntry)(nil), // 4: sk_opts_entry
+ (SkShutdown)(0), // 5: sk_shutdown
+}
+var file_sk_inet_proto_depIdxs = []int32{
+ 0, // 0: ip_opts_entry.raw:type_name -> ip_opts_raw_entry
+ 3, // 1: inet_sk_entry.fown:type_name -> fown_entry
+ 4, // 2: inet_sk_entry.opts:type_name -> sk_opts_entry
+ 1, // 3: inet_sk_entry.ip_opts:type_name -> ip_opts_entry
+ 5, // 4: inet_sk_entry.shutdown:type_name -> sk_shutdown
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_sk_inet_proto_init() }
+func file_sk_inet_proto_init() {
+ if File_sk_inet_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ file_sk_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_sk_inet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpOptsRawEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sk_inet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IpOptsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sk_inet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InetSkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_sk_inet_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_sk_inet_proto_goTypes,
+ DependencyIndexes: file_sk_inet_proto_depIdxs,
+ MessageInfos: file_sk_inet_proto_msgTypes,
+ }.Build()
+ File_sk_inet_proto = out.File
+ file_sk_inet_proto_rawDesc = nil
+ file_sk_inet_proto_goTypes = nil
+ file_sk_inet_proto_depIdxs = nil
+}
diff --git a/crit/images/sk-inet.proto b/crit/images/sk-inet.proto
new file mode 100644
index 0000000..594e29c
--- /dev/null
+++ b/crit/images/sk-inet.proto
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+import "sk-opts.proto";
+
+message ip_opts_raw_entry {
+ optional bool hdrincl = 1;
+ optional bool nodefrag = 2;
+ optional bool checksum = 3;
+ repeated uint32 icmpv_filter = 4;
+}
+
+message ip_opts_entry {
+ optional bool freebind = 1;
+ // Fields 2 and 3 are reserved for vz7 use
+ optional ip_opts_raw_entry raw = 4;
+}
+
+message inet_sk_entry {
+ /*
+ * We have two IDs here -- id and ino. The first one
+ * is used when restoring socket behind a file descriprot.
+ * The fdinfo image's id is it. The second one is used
+ * in sk-inet.c internally, in particular we identify
+ * a TCP stream to restore into this socket using the
+ * ino value.
+ */
+ required uint32 id = 1;
+ required uint32 ino = 2;
+ required uint32 family = 3 [(criu).dict = "sk"];
+ required uint32 type = 4 [(criu).dict = "sk"];
+ required uint32 proto = 5 [(criu).dict = "sk"];
+ required uint32 state = 6 [(criu).dict = "sk"];
+ required uint32 src_port = 7;
+ required uint32 dst_port = 8;
+ required uint32 flags = 9 [(criu).hex = true];
+ required uint32 backlog = 10;
+
+ repeated uint32 src_addr = 11 [(criu).ipadd = true];
+ repeated uint32 dst_addr = 12 [(criu).ipadd = true];
+
+ required fown_entry fown = 13;
+ required sk_opts_entry opts = 14;
+ optional bool v6only = 15;
+ optional ip_opts_entry ip_opts = 16;
+
+ /* for ipv6, we need to send the ifindex to bind(); we keep the ifname
+ * here and convert it on restore */
+ optional string ifname = 17;
+ optional uint32 ns_id = 18;
+ optional sk_shutdown shutdown = 19;
+}
diff --git a/crit/images/sk-netlink.pb.go b/crit/images/sk-netlink.pb.go
new file mode 100644
index 0000000..75bac2e
--- /dev/null
+++ b/crit/images/sk-netlink.pb.go
@@ -0,0 +1,258 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: sk-netlink.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type NetlinkSkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Ino *uint32 `protobuf:"varint,2,req,name=ino" json:"ino,omitempty"`
+ Protocol *uint32 `protobuf:"varint,3,req,name=protocol" json:"protocol,omitempty"`
+ State *uint32 `protobuf:"varint,4,req,name=state" json:"state,omitempty"`
+ Flags *uint32 `protobuf:"varint,6,req,name=flags" json:"flags,omitempty"`
+ Portid *uint32 `protobuf:"varint,7,req,name=portid" json:"portid,omitempty"`
+ Groups []uint32 `protobuf:"varint,8,rep,name=groups" json:"groups,omitempty"`
+ DstPortid *uint32 `protobuf:"varint,9,req,name=dst_portid,json=dstPortid" json:"dst_portid,omitempty"`
+ DstGroup *uint32 `protobuf:"varint,10,req,name=dst_group,json=dstGroup" json:"dst_group,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,11,req,name=fown" json:"fown,omitempty"`
+ Opts *SkOptsEntry `protobuf:"bytes,12,req,name=opts" json:"opts,omitempty"`
+ NsId *uint32 `protobuf:"varint,13,opt,name=ns_id,json=nsId" json:"ns_id,omitempty"`
+}
+
+func (x *NetlinkSkEntry) Reset() {
+ *x = NetlinkSkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_netlink_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NetlinkSkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NetlinkSkEntry) ProtoMessage() {}
+
+func (x *NetlinkSkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_netlink_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NetlinkSkEntry.ProtoReflect.Descriptor instead.
+func (*NetlinkSkEntry) Descriptor() ([]byte, []int) {
+ return file_sk_netlink_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *NetlinkSkEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetIno() uint32 {
+ if x != nil && x.Ino != nil {
+ return *x.Ino
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetProtocol() uint32 {
+ if x != nil && x.Protocol != nil {
+ return *x.Protocol
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetState() uint32 {
+ if x != nil && x.State != nil {
+ return *x.State
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetPortid() uint32 {
+ if x != nil && x.Portid != nil {
+ return *x.Portid
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetGroups() []uint32 {
+ if x != nil {
+ return x.Groups
+ }
+ return nil
+}
+
+func (x *NetlinkSkEntry) GetDstPortid() uint32 {
+ if x != nil && x.DstPortid != nil {
+ return *x.DstPortid
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetDstGroup() uint32 {
+ if x != nil && x.DstGroup != nil {
+ return *x.DstGroup
+ }
+ return 0
+}
+
+func (x *NetlinkSkEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *NetlinkSkEntry) GetOpts() *SkOptsEntry {
+ if x != nil {
+ return x.Opts
+ }
+ return nil
+}
+
+func (x *NetlinkSkEntry) GetNsId() uint32 {
+ if x != nil && x.NsId != nil {
+ return *x.NsId
+ }
+ return 0
+}
+
+var File_sk_netlink_proto protoreflect.FileDescriptor
+
+var file_sk_netlink_proto_rawDesc = []byte{
+ 0x0a, 0x10, 0x73, 0x6b, 0x2d, 0x6e, 0x65, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a,
+ 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x6b, 0x2d, 0x6f,
+ 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x02, 0x0a, 0x10, 0x6e, 0x65,
+ 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
+ 0x0a, 0x03, 0x69, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x69, 0x6e, 0x6f,
+ 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05,
+ 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x61,
+ 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28,
+ 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12,
+ 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x64, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x06, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12,
+ 0x1d, 0x0a, 0x0a, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x64, 0x18, 0x09, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x69, 0x64, 0x12, 0x1b,
+ 0x0a, 0x09, 0x64, 0x73, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x0a, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x08, 0x64, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x66,
+ 0x6f, 0x77, 0x6e, 0x18, 0x0b, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x22, 0x0a, 0x04,
+ 0x6f, 0x70, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6b, 0x5f,
+ 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73,
+ 0x12, 0x13, 0x0a, 0x05, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x04, 0x6e, 0x73, 0x49, 0x64,
+}
+
+var (
+ file_sk_netlink_proto_rawDescOnce sync.Once
+ file_sk_netlink_proto_rawDescData = file_sk_netlink_proto_rawDesc
+)
+
+func file_sk_netlink_proto_rawDescGZIP() []byte {
+ file_sk_netlink_proto_rawDescOnce.Do(func() {
+ file_sk_netlink_proto_rawDescData = protoimpl.X.CompressGZIP(file_sk_netlink_proto_rawDescData)
+ })
+ return file_sk_netlink_proto_rawDescData
+}
+
+var file_sk_netlink_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_sk_netlink_proto_goTypes = []interface{}{
+ (*NetlinkSkEntry)(nil), // 0: netlink_sk_entry
+ (*FownEntry)(nil), // 1: fown_entry
+ (*SkOptsEntry)(nil), // 2: sk_opts_entry
+}
+var file_sk_netlink_proto_depIdxs = []int32{
+ 1, // 0: netlink_sk_entry.fown:type_name -> fown_entry
+ 2, // 1: netlink_sk_entry.opts:type_name -> sk_opts_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_sk_netlink_proto_init() }
+func file_sk_netlink_proto_init() {
+ if File_sk_netlink_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ file_sk_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_sk_netlink_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NetlinkSkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_sk_netlink_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_sk_netlink_proto_goTypes,
+ DependencyIndexes: file_sk_netlink_proto_depIdxs,
+ MessageInfos: file_sk_netlink_proto_msgTypes,
+ }.Build()
+ File_sk_netlink_proto = out.File
+ file_sk_netlink_proto_rawDesc = nil
+ file_sk_netlink_proto_goTypes = nil
+ file_sk_netlink_proto_depIdxs = nil
+}
diff --git a/crit/images/sk-netlink.proto b/crit/images/sk-netlink.proto
new file mode 100644
index 0000000..cfcc88d
--- /dev/null
+++ b/crit/images/sk-netlink.proto
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+import "sk-opts.proto";
+
+message netlink_sk_entry {
+ required uint32 id = 1;
+ required uint32 ino = 2;
+ required uint32 protocol = 3;
+ required uint32 state = 4;
+ required uint32 flags = 6 [(criu).hex = true];
+ required uint32 portid = 7;
+ repeated uint32 groups = 8;
+ required uint32 dst_portid = 9;
+ required uint32 dst_group = 10;
+ required fown_entry fown = 11;
+ required sk_opts_entry opts = 12;
+ optional uint32 ns_id = 13;
+ // For netlink queued messages
+ // optional nl_sk_opts_entry nl_opts = 14;
+}
diff --git a/crit/images/sk-opts.pb.go b/crit/images/sk-opts.pb.go
new file mode 100644
index 0000000..1376034
--- /dev/null
+++ b/crit/images/sk-opts.pb.go
@@ -0,0 +1,453 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: sk-opts.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SkShutdown int32
+
+const (
+ SkShutdown_NONE SkShutdown = 0
+ SkShutdown_READ SkShutdown = 1
+ SkShutdown_WRITE SkShutdown = 2
+ SkShutdown_BOTH SkShutdown = 3
+)
+
+// Enum value maps for SkShutdown.
+var (
+ SkShutdown_name = map[int32]string{
+ 0: "NONE",
+ 1: "READ",
+ 2: "WRITE",
+ 3: "BOTH",
+ }
+ SkShutdown_value = map[string]int32{
+ "NONE": 0,
+ "READ": 1,
+ "WRITE": 2,
+ "BOTH": 3,
+ }
+)
+
+func (x SkShutdown) Enum() *SkShutdown {
+ p := new(SkShutdown)
+ *p = x
+ return p
+}
+
+func (x SkShutdown) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SkShutdown) Descriptor() protoreflect.EnumDescriptor {
+ return file_sk_opts_proto_enumTypes[0].Descriptor()
+}
+
+func (SkShutdown) Type() protoreflect.EnumType {
+ return &file_sk_opts_proto_enumTypes[0]
+}
+
+func (x SkShutdown) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SkShutdown) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = SkShutdown(num)
+ return nil
+}
+
+// Deprecated: Use SkShutdown.Descriptor instead.
+func (SkShutdown) EnumDescriptor() ([]byte, []int) {
+ return file_sk_opts_proto_rawDescGZIP(), []int{0}
+}
+
+type SkOptsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SoSndbuf *uint32 `protobuf:"varint,1,req,name=so_sndbuf,json=soSndbuf" json:"so_sndbuf,omitempty"`
+ SoRcvbuf *uint32 `protobuf:"varint,2,req,name=so_rcvbuf,json=soRcvbuf" json:"so_rcvbuf,omitempty"`
+ SoSndTmoSec *uint64 `protobuf:"varint,3,req,name=so_snd_tmo_sec,json=soSndTmoSec" json:"so_snd_tmo_sec,omitempty"`
+ SoSndTmoUsec *uint64 `protobuf:"varint,4,req,name=so_snd_tmo_usec,json=soSndTmoUsec" json:"so_snd_tmo_usec,omitempty"`
+ SoRcvTmoSec *uint64 `protobuf:"varint,5,req,name=so_rcv_tmo_sec,json=soRcvTmoSec" json:"so_rcv_tmo_sec,omitempty"`
+ SoRcvTmoUsec *uint64 `protobuf:"varint,6,req,name=so_rcv_tmo_usec,json=soRcvTmoUsec" json:"so_rcv_tmo_usec,omitempty"`
+ Reuseaddr *bool `protobuf:"varint,7,opt,name=reuseaddr" json:"reuseaddr,omitempty"`
+ SoPriority *uint32 `protobuf:"varint,8,opt,name=so_priority,json=soPriority" json:"so_priority,omitempty"`
+ SoRcvlowat *uint32 `protobuf:"varint,9,opt,name=so_rcvlowat,json=soRcvlowat" json:"so_rcvlowat,omitempty"`
+ SoMark *uint32 `protobuf:"varint,10,opt,name=so_mark,json=soMark" json:"so_mark,omitempty"`
+ SoPasscred *bool `protobuf:"varint,11,opt,name=so_passcred,json=soPasscred" json:"so_passcred,omitempty"`
+ SoPasssec *bool `protobuf:"varint,12,opt,name=so_passsec,json=soPasssec" json:"so_passsec,omitempty"`
+ SoDontroute *bool `protobuf:"varint,13,opt,name=so_dontroute,json=soDontroute" json:"so_dontroute,omitempty"`
+ SoNoCheck *bool `protobuf:"varint,14,opt,name=so_no_check,json=soNoCheck" json:"so_no_check,omitempty"`
+ SoBoundDev *string `protobuf:"bytes,15,opt,name=so_bound_dev,json=soBoundDev" json:"so_bound_dev,omitempty"`
+ SoFilter []uint64 `protobuf:"fixed64,16,rep,name=so_filter,json=soFilter" json:"so_filter,omitempty"`
+ SoReuseport *bool `protobuf:"varint,17,opt,name=so_reuseport,json=soReuseport" json:"so_reuseport,omitempty"`
+ SoBroadcast *bool `protobuf:"varint,18,opt,name=so_broadcast,json=soBroadcast" json:"so_broadcast,omitempty"`
+ SoKeepalive *bool `protobuf:"varint,19,opt,name=so_keepalive,json=soKeepalive" json:"so_keepalive,omitempty"`
+ TcpKeepcnt *uint32 `protobuf:"varint,20,opt,name=tcp_keepcnt,json=tcpKeepcnt" json:"tcp_keepcnt,omitempty"`
+ TcpKeepidle *uint32 `protobuf:"varint,21,opt,name=tcp_keepidle,json=tcpKeepidle" json:"tcp_keepidle,omitempty"`
+ TcpKeepintvl *uint32 `protobuf:"varint,22,opt,name=tcp_keepintvl,json=tcpKeepintvl" json:"tcp_keepintvl,omitempty"`
+ SoOobinline *uint32 `protobuf:"varint,23,opt,name=so_oobinline,json=soOobinline" json:"so_oobinline,omitempty"`
+ SoLinger *uint32 `protobuf:"varint,24,opt,name=so_linger,json=soLinger" json:"so_linger,omitempty"`
+ SoBufLock *uint32 `protobuf:"varint,25,opt,name=so_buf_lock,json=soBufLock" json:"so_buf_lock,omitempty"`
+}
+
+func (x *SkOptsEntry) Reset() {
+ *x = SkOptsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_opts_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SkOptsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SkOptsEntry) ProtoMessage() {}
+
+func (x *SkOptsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_opts_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SkOptsEntry.ProtoReflect.Descriptor instead.
+func (*SkOptsEntry) Descriptor() ([]byte, []int) {
+ return file_sk_opts_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SkOptsEntry) GetSoSndbuf() uint32 {
+ if x != nil && x.SoSndbuf != nil {
+ return *x.SoSndbuf
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoRcvbuf() uint32 {
+ if x != nil && x.SoRcvbuf != nil {
+ return *x.SoRcvbuf
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoSndTmoSec() uint64 {
+ if x != nil && x.SoSndTmoSec != nil {
+ return *x.SoSndTmoSec
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoSndTmoUsec() uint64 {
+ if x != nil && x.SoSndTmoUsec != nil {
+ return *x.SoSndTmoUsec
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoRcvTmoSec() uint64 {
+ if x != nil && x.SoRcvTmoSec != nil {
+ return *x.SoRcvTmoSec
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoRcvTmoUsec() uint64 {
+ if x != nil && x.SoRcvTmoUsec != nil {
+ return *x.SoRcvTmoUsec
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetReuseaddr() bool {
+ if x != nil && x.Reuseaddr != nil {
+ return *x.Reuseaddr
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetSoPriority() uint32 {
+ if x != nil && x.SoPriority != nil {
+ return *x.SoPriority
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoRcvlowat() uint32 {
+ if x != nil && x.SoRcvlowat != nil {
+ return *x.SoRcvlowat
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoMark() uint32 {
+ if x != nil && x.SoMark != nil {
+ return *x.SoMark
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoPasscred() bool {
+ if x != nil && x.SoPasscred != nil {
+ return *x.SoPasscred
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetSoPasssec() bool {
+ if x != nil && x.SoPasssec != nil {
+ return *x.SoPasssec
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetSoDontroute() bool {
+ if x != nil && x.SoDontroute != nil {
+ return *x.SoDontroute
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetSoNoCheck() bool {
+ if x != nil && x.SoNoCheck != nil {
+ return *x.SoNoCheck
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetSoBoundDev() string {
+ if x != nil && x.SoBoundDev != nil {
+ return *x.SoBoundDev
+ }
+ return ""
+}
+
+func (x *SkOptsEntry) GetSoFilter() []uint64 {
+ if x != nil {
+ return x.SoFilter
+ }
+ return nil
+}
+
+func (x *SkOptsEntry) GetSoReuseport() bool {
+ if x != nil && x.SoReuseport != nil {
+ return *x.SoReuseport
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetSoBroadcast() bool {
+ if x != nil && x.SoBroadcast != nil {
+ return *x.SoBroadcast
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetSoKeepalive() bool {
+ if x != nil && x.SoKeepalive != nil {
+ return *x.SoKeepalive
+ }
+ return false
+}
+
+func (x *SkOptsEntry) GetTcpKeepcnt() uint32 {
+ if x != nil && x.TcpKeepcnt != nil {
+ return *x.TcpKeepcnt
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetTcpKeepidle() uint32 {
+ if x != nil && x.TcpKeepidle != nil {
+ return *x.TcpKeepidle
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetTcpKeepintvl() uint32 {
+ if x != nil && x.TcpKeepintvl != nil {
+ return *x.TcpKeepintvl
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoOobinline() uint32 {
+ if x != nil && x.SoOobinline != nil {
+ return *x.SoOobinline
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoLinger() uint32 {
+ if x != nil && x.SoLinger != nil {
+ return *x.SoLinger
+ }
+ return 0
+}
+
+func (x *SkOptsEntry) GetSoBufLock() uint32 {
+ if x != nil && x.SoBufLock != nil {
+ return *x.SoBufLock
+ }
+ return 0
+}
+
+var File_sk_opts_proto protoreflect.FileDescriptor
+
+var file_sk_opts_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x73, 0x6b, 0x2d, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0xce, 0x06, 0x0a, 0x0d, 0x73, 0x6b, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x5f, 0x73, 0x6e, 0x64, 0x62, 0x75, 0x66, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x6f, 0x53, 0x6e, 0x64, 0x62, 0x75, 0x66, 0x12, 0x1b,
+ 0x0a, 0x09, 0x73, 0x6f, 0x5f, 0x72, 0x63, 0x76, 0x62, 0x75, 0x66, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x08, 0x73, 0x6f, 0x52, 0x63, 0x76, 0x62, 0x75, 0x66, 0x12, 0x23, 0x0a, 0x0e, 0x73,
+ 0x6f, 0x5f, 0x73, 0x6e, 0x64, 0x5f, 0x74, 0x6d, 0x6f, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x6f, 0x53, 0x6e, 0x64, 0x54, 0x6d, 0x6f, 0x53, 0x65, 0x63,
+ 0x12, 0x25, 0x0a, 0x0f, 0x73, 0x6f, 0x5f, 0x73, 0x6e, 0x64, 0x5f, 0x74, 0x6d, 0x6f, 0x5f, 0x75,
+ 0x73, 0x65, 0x63, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x6f, 0x53, 0x6e, 0x64,
+ 0x54, 0x6d, 0x6f, 0x55, 0x73, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0e, 0x73, 0x6f, 0x5f, 0x72, 0x63,
+ 0x76, 0x5f, 0x74, 0x6d, 0x6f, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x0b, 0x73, 0x6f, 0x52, 0x63, 0x76, 0x54, 0x6d, 0x6f, 0x53, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0f,
+ 0x73, 0x6f, 0x5f, 0x72, 0x63, 0x76, 0x5f, 0x74, 0x6d, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18,
+ 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x6f, 0x52, 0x63, 0x76, 0x54, 0x6d, 0x6f, 0x55,
+ 0x73, 0x65, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x75, 0x73, 0x65, 0x61, 0x64, 0x64, 0x72,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x75, 0x73, 0x65, 0x61, 0x64, 0x64,
+ 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69,
+ 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x5f, 0x72, 0x63, 0x76, 0x6c, 0x6f, 0x77, 0x61,
+ 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x52, 0x63, 0x76, 0x6c, 0x6f,
+ 0x77, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x73, 0x6f, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x63, 0x72, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0a, 0x73, 0x6f, 0x50, 0x61, 0x73, 0x73, 0x63, 0x72, 0x65, 0x64, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x73, 0x6f, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x73, 0x65, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x09, 0x73, 0x6f, 0x50, 0x61, 0x73, 0x73, 0x73, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c,
+ 0x73, 0x6f, 0x5f, 0x64, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x44, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12,
+ 0x1e, 0x0a, 0x0b, 0x73, 0x6f, 0x5f, 0x6e, 0x6f, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0e,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x6f, 0x4e, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12,
+ 0x20, 0x0a, 0x0c, 0x73, 0x6f, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x18,
+ 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65,
+ 0x76, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x10,
+ 0x20, 0x03, 0x28, 0x06, 0x52, 0x08, 0x73, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x21,
+ 0x0a, 0x0c, 0x73, 0x6f, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x11,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x52, 0x65, 0x75, 0x73, 0x65, 0x70, 0x6f, 0x72,
+ 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73,
+ 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x42, 0x72, 0x6f, 0x61, 0x64,
+ 0x63, 0x61, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61,
+ 0x6c, 0x69, 0x76, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6f, 0x4b, 0x65,
+ 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x63, 0x70, 0x5f, 0x6b,
+ 0x65, 0x65, 0x70, 0x63, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x63,
+ 0x70, 0x4b, 0x65, 0x65, 0x70, 0x63, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x63, 0x70, 0x5f,
+ 0x6b, 0x65, 0x65, 0x70, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b,
+ 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x69, 0x64, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74,
+ 0x63, 0x70, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x69, 0x6e, 0x74, 0x76, 0x6c, 0x18, 0x16, 0x20, 0x01,
+ 0x28, 0x0d, 0x52, 0x0c, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x69, 0x6e, 0x74, 0x76, 0x6c,
+ 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x5f, 0x6f, 0x6f, 0x62, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
+ 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x73, 0x6f, 0x4f, 0x6f, 0x62, 0x69, 0x6e, 0x6c,
+ 0x69, 0x6e, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x67, 0x65, 0x72,
+ 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x6f, 0x4c, 0x69, 0x6e, 0x67, 0x65, 0x72,
+ 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x6f, 0x5f, 0x62, 0x75, 0x66, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x18,
+ 0x19, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x6f, 0x42, 0x75, 0x66, 0x4c, 0x6f, 0x63, 0x6b,
+ 0x2a, 0x36, 0x0a, 0x0b, 0x73, 0x6b, 0x5f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12,
+ 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x41,
+ 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08,
+ 0x0a, 0x04, 0x42, 0x4f, 0x54, 0x48, 0x10, 0x03,
+}
+
+var (
+ file_sk_opts_proto_rawDescOnce sync.Once
+ file_sk_opts_proto_rawDescData = file_sk_opts_proto_rawDesc
+)
+
+func file_sk_opts_proto_rawDescGZIP() []byte {
+ file_sk_opts_proto_rawDescOnce.Do(func() {
+ file_sk_opts_proto_rawDescData = protoimpl.X.CompressGZIP(file_sk_opts_proto_rawDescData)
+ })
+ return file_sk_opts_proto_rawDescData
+}
+
+var file_sk_opts_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_sk_opts_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_sk_opts_proto_goTypes = []interface{}{
+ (SkShutdown)(0), // 0: sk_shutdown
+ (*SkOptsEntry)(nil), // 1: sk_opts_entry
+}
+var file_sk_opts_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_sk_opts_proto_init() }
+func file_sk_opts_proto_init() {
+ if File_sk_opts_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_sk_opts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SkOptsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_sk_opts_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_sk_opts_proto_goTypes,
+ DependencyIndexes: file_sk_opts_proto_depIdxs,
+ EnumInfos: file_sk_opts_proto_enumTypes,
+ MessageInfos: file_sk_opts_proto_msgTypes,
+ }.Build()
+ File_sk_opts_proto = out.File
+ file_sk_opts_proto_rawDesc = nil
+ file_sk_opts_proto_goTypes = nil
+ file_sk_opts_proto_depIdxs = nil
+}
diff --git a/crit/images/sk-opts.proto b/crit/images/sk-opts.proto
new file mode 100644
index 0000000..1d24d47
--- /dev/null
+++ b/crit/images/sk-opts.proto
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message sk_opts_entry {
+ required uint32 so_sndbuf = 1;
+ required uint32 so_rcvbuf = 2;
+
+ required uint64 so_snd_tmo_sec = 3;
+ required uint64 so_snd_tmo_usec = 4;
+ required uint64 so_rcv_tmo_sec = 5;
+ required uint64 so_rcv_tmo_usec = 6;
+ optional bool reuseaddr = 7;
+
+ optional uint32 so_priority = 8;
+ optional uint32 so_rcvlowat = 9;
+ optional uint32 so_mark = 10;
+ optional bool so_passcred = 11;
+ optional bool so_passsec = 12;
+ optional bool so_dontroute = 13;
+ optional bool so_no_check = 14;
+
+ optional string so_bound_dev = 15;
+
+ repeated fixed64 so_filter = 16;
+ optional bool so_reuseport = 17;
+ optional bool so_broadcast = 18;
+ optional bool so_keepalive = 19;
+ optional uint32 tcp_keepcnt = 20;
+ optional uint32 tcp_keepidle = 21;
+ optional uint32 tcp_keepintvl = 22;
+ optional uint32 so_oobinline = 23;
+ optional uint32 so_linger = 24;
+
+ optional uint32 so_buf_lock = 25;
+}
+
+enum sk_shutdown {
+ NONE = 0;
+ READ = 1;
+ WRITE = 2;
+ BOTH = 3;
+}
diff --git a/crit/images/sk-packet.pb.go b/crit/images/sk-packet.pb.go
new file mode 100644
index 0000000..9dd7176
--- /dev/null
+++ b/crit/images/sk-packet.pb.go
@@ -0,0 +1,236 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: sk-packet.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ScmEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Type *uint32 `protobuf:"varint,1,req,name=type" json:"type,omitempty"`
+ Rights []uint32 `protobuf:"varint,2,rep,name=rights" json:"rights,omitempty"`
+}
+
+func (x *ScmEntry) Reset() {
+ *x = ScmEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_packet_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ScmEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ScmEntry) ProtoMessage() {}
+
+func (x *ScmEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_packet_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ScmEntry.ProtoReflect.Descriptor instead.
+func (*ScmEntry) Descriptor() ([]byte, []int) {
+ return file_sk_packet_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ScmEntry) GetType() uint32 {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return 0
+}
+
+func (x *ScmEntry) GetRights() []uint32 {
+ if x != nil {
+ return x.Rights
+ }
+ return nil
+}
+
+type SkPacketEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ IdFor *uint32 `protobuf:"varint,1,req,name=id_for,json=idFor" json:"id_for,omitempty"`
+ Length *uint32 `protobuf:"varint,2,req,name=length" json:"length,omitempty"`
+ // Reserved for message address
+ // optional bytes addr = 3;
+ Scm []*ScmEntry `protobuf:"bytes,4,rep,name=scm" json:"scm,omitempty"`
+}
+
+func (x *SkPacketEntry) Reset() {
+ *x = SkPacketEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_packet_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SkPacketEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SkPacketEntry) ProtoMessage() {}
+
+func (x *SkPacketEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_packet_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SkPacketEntry.ProtoReflect.Descriptor instead.
+func (*SkPacketEntry) Descriptor() ([]byte, []int) {
+ return file_sk_packet_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *SkPacketEntry) GetIdFor() uint32 {
+ if x != nil && x.IdFor != nil {
+ return *x.IdFor
+ }
+ return 0
+}
+
+func (x *SkPacketEntry) GetLength() uint32 {
+ if x != nil && x.Length != nil {
+ return *x.Length
+ }
+ return 0
+}
+
+func (x *SkPacketEntry) GetScm() []*ScmEntry {
+ if x != nil {
+ return x.Scm
+ }
+ return nil
+}
+
+var File_sk_packet_proto protoreflect.FileDescriptor
+
+var file_sk_packet_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x73, 0x6b, 0x2d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x37, 0x0a, 0x09, 0x73, 0x63, 0x6d, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12,
+ 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79,
+ 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0d, 0x52, 0x06, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x22, 0x5e, 0x0a, 0x0f, 0x73, 0x6b,
+ 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x15, 0x0a,
+ 0x06, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x69,
+ 0x64, 0x46, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x03,
+ 0x73, 0x63, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x73, 0x63, 0x6d, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x73, 0x63, 0x6d,
+}
+
+var (
+ file_sk_packet_proto_rawDescOnce sync.Once
+ file_sk_packet_proto_rawDescData = file_sk_packet_proto_rawDesc
+)
+
+func file_sk_packet_proto_rawDescGZIP() []byte {
+ file_sk_packet_proto_rawDescOnce.Do(func() {
+ file_sk_packet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sk_packet_proto_rawDescData)
+ })
+ return file_sk_packet_proto_rawDescData
+}
+
+var file_sk_packet_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_sk_packet_proto_goTypes = []interface{}{
+ (*ScmEntry)(nil), // 0: scm_entry
+ (*SkPacketEntry)(nil), // 1: sk_packet_entry
+}
+var file_sk_packet_proto_depIdxs = []int32{
+ 0, // 0: sk_packet_entry.scm:type_name -> scm_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_sk_packet_proto_init() }
+func file_sk_packet_proto_init() {
+ if File_sk_packet_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_sk_packet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScmEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sk_packet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SkPacketEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_sk_packet_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_sk_packet_proto_goTypes,
+ DependencyIndexes: file_sk_packet_proto_depIdxs,
+ MessageInfos: file_sk_packet_proto_msgTypes,
+ }.Build()
+ File_sk_packet_proto = out.File
+ file_sk_packet_proto_rawDesc = nil
+ file_sk_packet_proto_goTypes = nil
+ file_sk_packet_proto_depIdxs = nil
+}
diff --git a/crit/images/sk-packet.proto b/crit/images/sk-packet.proto
new file mode 100644
index 0000000..b60a887
--- /dev/null
+++ b/crit/images/sk-packet.proto
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message scm_entry {
+ required uint32 type = 1;
+ repeated uint32 rights = 2;
+}
+
+message sk_packet_entry {
+ required uint32 id_for = 1;
+ required uint32 length = 2;
+ // Reserved for message address
+ // optional bytes addr = 3;
+ repeated scm_entry scm = 4;
+ // Reserved for ucred restore
+ // optional sk_ucred_entry ucred = 128;
+}
diff --git a/crit/images/sk-unix.pb.go b/crit/images/sk-unix.pb.go
new file mode 100644
index 0000000..068b764
--- /dev/null
+++ b/crit/images/sk-unix.pb.go
@@ -0,0 +1,410 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: sk-unix.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FilePermsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Mode *uint32 `protobuf:"varint,1,req,name=mode" json:"mode,omitempty"`
+ Uid *uint32 `protobuf:"varint,2,req,name=uid" json:"uid,omitempty"`
+ Gid *uint32 `protobuf:"varint,3,req,name=gid" json:"gid,omitempty"`
+}
+
+func (x *FilePermsEntry) Reset() {
+ *x = FilePermsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_unix_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FilePermsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FilePermsEntry) ProtoMessage() {}
+
+func (x *FilePermsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_unix_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FilePermsEntry.ProtoReflect.Descriptor instead.
+func (*FilePermsEntry) Descriptor() ([]byte, []int) {
+ return file_sk_unix_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FilePermsEntry) GetMode() uint32 {
+ if x != nil && x.Mode != nil {
+ return *x.Mode
+ }
+ return 0
+}
+
+func (x *FilePermsEntry) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *FilePermsEntry) GetGid() uint32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+type UnixSkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Few words about why we need both -- id and ino.
+ //
+ // The former one is used to link file descriptor from
+ // fdinfo image with the unix_sk_entry that should be
+ // opened under it.
+ //
+ // The latter one ties together unix peers -- the peer
+ // member on this structure is the ino one of its peer
+ // and simetimes vise-versa.
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Ino *uint32 `protobuf:"varint,2,req,name=ino" json:"ino,omitempty"`
+ Type *uint32 `protobuf:"varint,3,req,name=type" json:"type,omitempty"`
+ State *uint32 `protobuf:"varint,4,req,name=state" json:"state,omitempty"`
+ Flags *uint32 `protobuf:"varint,5,req,name=flags" json:"flags,omitempty"`
+ Uflags *uint32 `protobuf:"varint,6,req,name=uflags" json:"uflags,omitempty"`
+ Backlog *uint32 `protobuf:"varint,7,req,name=backlog" json:"backlog,omitempty"`
+ Peer *uint32 `protobuf:"varint,8,req,name=peer" json:"peer,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,9,req,name=fown" json:"fown,omitempty"`
+ Opts *SkOptsEntry `protobuf:"bytes,10,req,name=opts" json:"opts,omitempty"`
+ // Abstract name may contain \0 at any point,
+ // so we need to carry it as byte sequence...
+ Name []byte `protobuf:"bytes,11,req,name=name" json:"name,omitempty"`
+ Shutdown *SkShutdown `protobuf:"varint,12,opt,name=shutdown,enum=SkShutdown" json:"shutdown,omitempty"`
+ FilePerms *FilePermsEntry `protobuf:"bytes,13,opt,name=file_perms,json=filePerms" json:"file_perms,omitempty"`
+ // Relative socket name may have prefix.
+ NameDir *string `protobuf:"bytes,14,opt,name=name_dir,json=nameDir" json:"name_dir,omitempty"`
+ Deleted *bool `protobuf:"varint,15,opt,name=deleted" json:"deleted,omitempty"`
+ NsId *uint32 `protobuf:"varint,16,opt,name=ns_id,json=nsId" json:"ns_id,omitempty"`
+ MntId *int32 `protobuf:"zigzag32,17,opt,name=mnt_id,json=mntId,def=-1" json:"mnt_id,omitempty"` // Please, don't use field with number 18.
+}
+
+// Default values for UnixSkEntry fields.
+const (
+ Default_UnixSkEntry_MntId = int32(-1)
+)
+
+func (x *UnixSkEntry) Reset() {
+ *x = UnixSkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sk_unix_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UnixSkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UnixSkEntry) ProtoMessage() {}
+
+func (x *UnixSkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sk_unix_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UnixSkEntry.ProtoReflect.Descriptor instead.
+func (*UnixSkEntry) Descriptor() ([]byte, []int) {
+ return file_sk_unix_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UnixSkEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetIno() uint32 {
+ if x != nil && x.Ino != nil {
+ return *x.Ino
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetType() uint32 {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetState() uint32 {
+ if x != nil && x.State != nil {
+ return *x.State
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetUflags() uint32 {
+ if x != nil && x.Uflags != nil {
+ return *x.Uflags
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetBacklog() uint32 {
+ if x != nil && x.Backlog != nil {
+ return *x.Backlog
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetPeer() uint32 {
+ if x != nil && x.Peer != nil {
+ return *x.Peer
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *UnixSkEntry) GetOpts() *SkOptsEntry {
+ if x != nil {
+ return x.Opts
+ }
+ return nil
+}
+
+func (x *UnixSkEntry) GetName() []byte {
+ if x != nil {
+ return x.Name
+ }
+ return nil
+}
+
+func (x *UnixSkEntry) GetShutdown() SkShutdown {
+ if x != nil && x.Shutdown != nil {
+ return *x.Shutdown
+ }
+ return SkShutdown_NONE
+}
+
+func (x *UnixSkEntry) GetFilePerms() *FilePermsEntry {
+ if x != nil {
+ return x.FilePerms
+ }
+ return nil
+}
+
+func (x *UnixSkEntry) GetNameDir() string {
+ if x != nil && x.NameDir != nil {
+ return *x.NameDir
+ }
+ return ""
+}
+
+func (x *UnixSkEntry) GetDeleted() bool {
+ if x != nil && x.Deleted != nil {
+ return *x.Deleted
+ }
+ return false
+}
+
+func (x *UnixSkEntry) GetNsId() uint32 {
+ if x != nil && x.NsId != nil {
+ return *x.NsId
+ }
+ return 0
+}
+
+func (x *UnixSkEntry) GetMntId() int32 {
+ if x != nil && x.MntId != nil {
+ return *x.MntId
+ }
+ return Default_UnixSkEntry_MntId
+}
+
+var File_sk_unix_proto protoreflect.FileDescriptor
+
+var file_sk_unix_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x73, 0x6b, 0x2d, 0x75, 0x6e, 0x69, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77,
+ 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x6b, 0x2d, 0x6f, 0x70, 0x74, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70,
+ 0x65, 0x72, 0x6d, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f,
+ 0x64, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10,
+ 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64,
+ 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x67,
+ 0x69, 0x64, 0x22, 0x81, 0x04, 0x0a, 0x0d, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6b, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d,
+ 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x03, 0x69, 0x6e, 0x6f, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,
+ 0x20, 0x02, 0x28, 0x0d, 0x42, 0x07, 0xd2, 0x3f, 0x04, 0x32, 0x02, 0x73, 0x6b, 0x52, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x0d, 0x42, 0x07, 0xd2, 0x3f, 0x04, 0x32, 0x02, 0x73, 0x6b, 0x52, 0x05, 0x73, 0x74, 0x61,
+ 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28,
+ 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12,
+ 0x1d, 0x0a, 0x06, 0x75, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x42,
+ 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x75, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x18,
+ 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x07, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72,
+ 0x18, 0x08, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x04,
+ 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x09, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77,
+ 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x22, 0x0a,
+ 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6b,
+ 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6f, 0x70, 0x74,
+ 0x73, 0x12, 0x22, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x02, 0x28, 0x0c, 0x42,
+ 0x0e, 0xd2, 0x3f, 0x0b, 0x3a, 0x09, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77,
+ 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x73, 0x6b, 0x5f, 0x73, 0x68, 0x75,
+ 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x08, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12,
+ 0x30, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x0d, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x73,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d,
+ 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x0e, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x61, 0x6d, 0x65, 0x44, 0x69, 0x72, 0x12, 0x18, 0x0a, 0x07,
+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18,
+ 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6e, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x06, 0x6d,
+ 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x11, 0x3a, 0x02, 0x2d, 0x31, 0x52,
+ 0x05, 0x6d, 0x6e, 0x74, 0x49, 0x64,
+}
+
+var (
+ file_sk_unix_proto_rawDescOnce sync.Once
+ file_sk_unix_proto_rawDescData = file_sk_unix_proto_rawDesc
+)
+
+func file_sk_unix_proto_rawDescGZIP() []byte {
+ file_sk_unix_proto_rawDescOnce.Do(func() {
+ file_sk_unix_proto_rawDescData = protoimpl.X.CompressGZIP(file_sk_unix_proto_rawDescData)
+ })
+ return file_sk_unix_proto_rawDescData
+}
+
+var file_sk_unix_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_sk_unix_proto_goTypes = []interface{}{
+ (*FilePermsEntry)(nil), // 0: file_perms_entry
+ (*UnixSkEntry)(nil), // 1: unix_sk_entry
+ (*FownEntry)(nil), // 2: fown_entry
+ (*SkOptsEntry)(nil), // 3: sk_opts_entry
+ (SkShutdown)(0), // 4: sk_shutdown
+}
+var file_sk_unix_proto_depIdxs = []int32{
+ 2, // 0: unix_sk_entry.fown:type_name -> fown_entry
+ 3, // 1: unix_sk_entry.opts:type_name -> sk_opts_entry
+ 4, // 2: unix_sk_entry.shutdown:type_name -> sk_shutdown
+ 0, // 3: unix_sk_entry.file_perms:type_name -> file_perms_entry
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_sk_unix_proto_init() }
+func file_sk_unix_proto_init() {
+ if File_sk_unix_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ file_sk_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_sk_unix_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FilePermsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sk_unix_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UnixSkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_sk_unix_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_sk_unix_proto_goTypes,
+ DependencyIndexes: file_sk_unix_proto_depIdxs,
+ MessageInfos: file_sk_unix_proto_msgTypes,
+ }.Build()
+ File_sk_unix_proto = out.File
+ file_sk_unix_proto_rawDesc = nil
+ file_sk_unix_proto_goTypes = nil
+ file_sk_unix_proto_depIdxs = nil
+}
diff --git a/crit/images/sk-unix.proto b/crit/images/sk-unix.proto
new file mode 100644
index 0000000..8ddbccd
--- /dev/null
+++ b/crit/images/sk-unix.proto
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+import "sk-opts.proto";
+
+message file_perms_entry {
+ required uint32 mode = 1;
+ required uint32 uid = 2;
+ required uint32 gid = 3;
+}
+
+message unix_sk_entry {
+ /*
+ * Few words about why we need both -- id and ino.
+ *
+ * The former one is used to link file descriptor from
+ * fdinfo image with the unix_sk_entry that should be
+ * opened under it.
+ *
+ * The latter one ties together unix peers -- the peer
+ * member on this structure is the ino one of its peer
+ * and simetimes vise-versa.
+ */
+ required uint32 id = 1;
+ required uint32 ino = 2;
+ required uint32 type = 3 [(criu).dict = "sk"];
+ required uint32 state = 4 [(criu).dict = "sk"];
+ required uint32 flags = 5 [(criu).hex = true];
+ required uint32 uflags = 6 [(criu).hex = true];
+ required uint32 backlog = 7;
+ required uint32 peer = 8;
+ required fown_entry fown = 9;
+ required sk_opts_entry opts = 10;
+
+ /*
+ * Abstract name may contain \0 at any point,
+ * so we need to carry it as byte sequence...
+ */
+ required bytes name = 11 [(criu).conv = "unix_name"];
+
+ optional sk_shutdown shutdown = 12;
+
+ optional file_perms_entry file_perms = 13;
+
+ /*
+ * Relative socket name may have prefix.
+ */
+ optional string name_dir = 14;
+ optional bool deleted = 15;
+
+ optional uint32 ns_id = 16;
+ optional sint32 mnt_id = 17 [default = -1];
+ /* Please, don't use field with number 18. */
+}
diff --git a/crit/images/stats.pb.go b/crit/images/stats.pb.go
new file mode 100644
index 0000000..c5a9c9d
--- /dev/null
+++ b/crit/images/stats.pb.go
@@ -0,0 +1,461 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: stats.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// This one contains statistics about dump/restore process
+type DumpStatsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ FreezingTime *uint32 `protobuf:"varint,1,req,name=freezing_time,json=freezingTime" json:"freezing_time,omitempty"`
+ FrozenTime *uint32 `protobuf:"varint,2,req,name=frozen_time,json=frozenTime" json:"frozen_time,omitempty"`
+ MemdumpTime *uint32 `protobuf:"varint,3,req,name=memdump_time,json=memdumpTime" json:"memdump_time,omitempty"`
+ MemwriteTime *uint32 `protobuf:"varint,4,req,name=memwrite_time,json=memwriteTime" json:"memwrite_time,omitempty"`
+ PagesScanned *uint64 `protobuf:"varint,5,req,name=pages_scanned,json=pagesScanned" json:"pages_scanned,omitempty"`
+ PagesSkippedParent *uint64 `protobuf:"varint,6,req,name=pages_skipped_parent,json=pagesSkippedParent" json:"pages_skipped_parent,omitempty"`
+ PagesWritten *uint64 `protobuf:"varint,7,req,name=pages_written,json=pagesWritten" json:"pages_written,omitempty"`
+ IrmapResolve *uint32 `protobuf:"varint,8,opt,name=irmap_resolve,json=irmapResolve" json:"irmap_resolve,omitempty"`
+ PagesLazy *uint64 `protobuf:"varint,9,req,name=pages_lazy,json=pagesLazy" json:"pages_lazy,omitempty"`
+ PagePipes *uint64 `protobuf:"varint,10,opt,name=page_pipes,json=pagePipes" json:"page_pipes,omitempty"`
+ PagePipeBufs *uint64 `protobuf:"varint,11,opt,name=page_pipe_bufs,json=pagePipeBufs" json:"page_pipe_bufs,omitempty"`
+ ShpagesScanned *uint64 `protobuf:"varint,12,opt,name=shpages_scanned,json=shpagesScanned" json:"shpages_scanned,omitempty"`
+ ShpagesSkippedParent *uint64 `protobuf:"varint,13,opt,name=shpages_skipped_parent,json=shpagesSkippedParent" json:"shpages_skipped_parent,omitempty"`
+ ShpagesWritten *uint64 `protobuf:"varint,14,opt,name=shpages_written,json=shpagesWritten" json:"shpages_written,omitempty"`
+}
+
+func (x *DumpStatsEntry) Reset() {
+ *x = DumpStatsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_stats_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DumpStatsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DumpStatsEntry) ProtoMessage() {}
+
+func (x *DumpStatsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_stats_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DumpStatsEntry.ProtoReflect.Descriptor instead.
+func (*DumpStatsEntry) Descriptor() ([]byte, []int) {
+ return file_stats_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *DumpStatsEntry) GetFreezingTime() uint32 {
+ if x != nil && x.FreezingTime != nil {
+ return *x.FreezingTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetFrozenTime() uint32 {
+ if x != nil && x.FrozenTime != nil {
+ return *x.FrozenTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetMemdumpTime() uint32 {
+ if x != nil && x.MemdumpTime != nil {
+ return *x.MemdumpTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetMemwriteTime() uint32 {
+ if x != nil && x.MemwriteTime != nil {
+ return *x.MemwriteTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesScanned() uint64 {
+ if x != nil && x.PagesScanned != nil {
+ return *x.PagesScanned
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesSkippedParent() uint64 {
+ if x != nil && x.PagesSkippedParent != nil {
+ return *x.PagesSkippedParent
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesWritten() uint64 {
+ if x != nil && x.PagesWritten != nil {
+ return *x.PagesWritten
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetIrmapResolve() uint32 {
+ if x != nil && x.IrmapResolve != nil {
+ return *x.IrmapResolve
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesLazy() uint64 {
+ if x != nil && x.PagesLazy != nil {
+ return *x.PagesLazy
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagePipes() uint64 {
+ if x != nil && x.PagePipes != nil {
+ return *x.PagePipes
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagePipeBufs() uint64 {
+ if x != nil && x.PagePipeBufs != nil {
+ return *x.PagePipeBufs
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetShpagesScanned() uint64 {
+ if x != nil && x.ShpagesScanned != nil {
+ return *x.ShpagesScanned
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetShpagesSkippedParent() uint64 {
+ if x != nil && x.ShpagesSkippedParent != nil {
+ return *x.ShpagesSkippedParent
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetShpagesWritten() uint64 {
+ if x != nil && x.ShpagesWritten != nil {
+ return *x.ShpagesWritten
+ }
+ return 0
+}
+
+type RestoreStatsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PagesCompared *uint64 `protobuf:"varint,1,req,name=pages_compared,json=pagesCompared" json:"pages_compared,omitempty"`
+ PagesSkippedCow *uint64 `protobuf:"varint,2,req,name=pages_skipped_cow,json=pagesSkippedCow" json:"pages_skipped_cow,omitempty"`
+ ForkingTime *uint32 `protobuf:"varint,3,req,name=forking_time,json=forkingTime" json:"forking_time,omitempty"`
+ RestoreTime *uint32 `protobuf:"varint,4,req,name=restore_time,json=restoreTime" json:"restore_time,omitempty"`
+ PagesRestored *uint64 `protobuf:"varint,5,opt,name=pages_restored,json=pagesRestored" json:"pages_restored,omitempty"`
+}
+
+func (x *RestoreStatsEntry) Reset() {
+ *x = RestoreStatsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_stats_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RestoreStatsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RestoreStatsEntry) ProtoMessage() {}
+
+func (x *RestoreStatsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_stats_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RestoreStatsEntry.ProtoReflect.Descriptor instead.
+func (*RestoreStatsEntry) Descriptor() ([]byte, []int) {
+ return file_stats_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RestoreStatsEntry) GetPagesCompared() uint64 {
+ if x != nil && x.PagesCompared != nil {
+ return *x.PagesCompared
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetPagesSkippedCow() uint64 {
+ if x != nil && x.PagesSkippedCow != nil {
+ return *x.PagesSkippedCow
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetForkingTime() uint32 {
+ if x != nil && x.ForkingTime != nil {
+ return *x.ForkingTime
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetRestoreTime() uint32 {
+ if x != nil && x.RestoreTime != nil {
+ return *x.RestoreTime
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetPagesRestored() uint64 {
+ if x != nil && x.PagesRestored != nil {
+ return *x.PagesRestored
+ }
+ return 0
+}
+
+type StatsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Dump *DumpStatsEntry `protobuf:"bytes,1,opt,name=dump" json:"dump,omitempty"`
+ Restore *RestoreStatsEntry `protobuf:"bytes,2,opt,name=restore" json:"restore,omitempty"`
+}
+
+func (x *StatsEntry) Reset() {
+ *x = StatsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_stats_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StatsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StatsEntry) ProtoMessage() {}
+
+func (x *StatsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_stats_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StatsEntry.ProtoReflect.Descriptor instead.
+func (*StatsEntry) Descriptor() ([]byte, []int) {
+ return file_stats_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *StatsEntry) GetDump() *DumpStatsEntry {
+ if x != nil {
+ return x.Dump
+ }
+ return nil
+}
+
+func (x *StatsEntry) GetRestore() *RestoreStatsEntry {
+ if x != nil {
+ return x.Restore
+ }
+ return nil
+}
+
+var File_stats_proto protoreflect.FileDescriptor
+
+var file_stats_proto_rawDesc = []byte{
+ 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04,
+ 0x0a, 0x10, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x65, 0x65, 0x7a, 0x69, 0x6e, 0x67, 0x5f, 0x74,
+ 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x7a,
+ 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x7a, 0x65,
+ 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x66, 0x72,
+ 0x6f, 0x7a, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x64,
+ 0x75, 0x6d, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b,
+ 0x6d, 0x65, 0x6d, 0x64, 0x75, 0x6d, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d,
+ 0x65, 0x6d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
+ 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65,
+ 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x63,
+ 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73,
+ 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x12, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x70, 0x65,
+ 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73,
+ 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c,
+ 0x70, 0x61, 0x67, 0x65, 0x73, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d,
+ 0x69, 0x72, 0x6d, 0x61, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x69, 0x72, 0x6d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76,
+ 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18,
+ 0x09, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x73, 0x4c, 0x61, 0x7a, 0x79,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x73, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x50, 0x69, 0x70, 0x65, 0x73, 0x12,
+ 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x5f, 0x62, 0x75, 0x66,
+ 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x65, 0x50, 0x69, 0x70,
+ 0x65, 0x42, 0x75, 0x66, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73,
+ 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e,
+ 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x34,
+ 0x0a, 0x16, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65,
+ 0x64, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14,
+ 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x50, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f,
+ 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73,
+ 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x22, 0xd5, 0x01,
+ 0x0a, 0x13, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x63,
+ 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11,
+ 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f,
+ 0x77, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x6b,
+ 0x69, 0x70, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x6b,
+ 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b,
+ 0x66, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72,
+ 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25,
+ 0x0a, 0x0e, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x64, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x75, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x75, 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x72,
+ 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72,
+ 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
+}
+
+var (
+ file_stats_proto_rawDescOnce sync.Once
+ file_stats_proto_rawDescData = file_stats_proto_rawDesc
+)
+
+func file_stats_proto_rawDescGZIP() []byte {
+ file_stats_proto_rawDescOnce.Do(func() {
+ file_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_stats_proto_rawDescData)
+ })
+ return file_stats_proto_rawDescData
+}
+
+var file_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_stats_proto_goTypes = []interface{}{
+ (*DumpStatsEntry)(nil), // 0: dump_stats_entry
+ (*RestoreStatsEntry)(nil), // 1: restore_stats_entry
+ (*StatsEntry)(nil), // 2: stats_entry
+}
+var file_stats_proto_depIdxs = []int32{
+ 0, // 0: stats_entry.dump:type_name -> dump_stats_entry
+ 1, // 1: stats_entry.restore:type_name -> restore_stats_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_stats_proto_init() }
+func file_stats_proto_init() {
+ if File_stats_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DumpStatsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_stats_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RestoreStatsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_stats_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StatsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_stats_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_stats_proto_goTypes,
+ DependencyIndexes: file_stats_proto_depIdxs,
+ MessageInfos: file_stats_proto_msgTypes,
+ }.Build()
+ File_stats_proto = out.File
+ file_stats_proto_rawDesc = nil
+ file_stats_proto_goTypes = nil
+ file_stats_proto_depIdxs = nil
+}
diff --git a/crit/images/stats.proto b/crit/images/stats.proto
new file mode 100644
index 0000000..64e4618
--- /dev/null
+++ b/crit/images/stats.proto
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+// This one contains statistics about dump/restore process
+message dump_stats_entry {
+ required uint32 freezing_time = 1;
+ required uint32 frozen_time = 2;
+ required uint32 memdump_time = 3;
+ required uint32 memwrite_time = 4;
+
+ required uint64 pages_scanned = 5;
+ required uint64 pages_skipped_parent = 6;
+ required uint64 pages_written = 7;
+
+ optional uint32 irmap_resolve = 8;
+
+ required uint64 pages_lazy = 9;
+ optional uint64 page_pipes = 10;
+ optional uint64 page_pipe_bufs = 11;
+
+ optional uint64 shpages_scanned = 12;
+ optional uint64 shpages_skipped_parent = 13;
+ optional uint64 shpages_written = 14;
+}
+
+message restore_stats_entry {
+ required uint64 pages_compared = 1;
+ required uint64 pages_skipped_cow = 2;
+
+ required uint32 forking_time = 3;
+ required uint32 restore_time = 4;
+
+ optional uint64 pages_restored = 5;
+}
+
+message stats_entry {
+ optional dump_stats_entry dump = 1;
+ optional restore_stats_entry restore = 2;
+}
diff --git a/crit/images/sysctl.pb.go b/crit/images/sysctl.pb.go
new file mode 100644
index 0000000..ec4819c
--- /dev/null
+++ b/crit/images/sysctl.pb.go
@@ -0,0 +1,223 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: sysctl.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SysctlType int32
+
+const (
+ SysctlType_CTL_STR SysctlType = 5
+ SysctlType_CTL_32 SysctlType = 6
+)
+
+// Enum value maps for SysctlType.
+var (
+ SysctlType_name = map[int32]string{
+ 5: "CTL_STR",
+ 6: "CTL_32",
+ }
+ SysctlType_value = map[string]int32{
+ "CTL_STR": 5,
+ "CTL_32": 6,
+ }
+)
+
+func (x SysctlType) Enum() *SysctlType {
+ p := new(SysctlType)
+ *p = x
+ return p
+}
+
+func (x SysctlType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SysctlType) Descriptor() protoreflect.EnumDescriptor {
+ return file_sysctl_proto_enumTypes[0].Descriptor()
+}
+
+func (SysctlType) Type() protoreflect.EnumType {
+ return &file_sysctl_proto_enumTypes[0]
+}
+
+func (x SysctlType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SysctlType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = SysctlType(num)
+ return nil
+}
+
+// Deprecated: Use SysctlType.Descriptor instead.
+func (SysctlType) EnumDescriptor() ([]byte, []int) {
+ return file_sysctl_proto_rawDescGZIP(), []int{0}
+}
+
+type SysctlEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Type *SysctlType `protobuf:"varint,1,req,name=type,enum=SysctlType" json:"type,omitempty"`
+ Iarg *int32 `protobuf:"varint,2,opt,name=iarg" json:"iarg,omitempty"`
+ Sarg *string `protobuf:"bytes,3,opt,name=sarg" json:"sarg,omitempty"`
+}
+
+func (x *SysctlEntry) Reset() {
+ *x = SysctlEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sysctl_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SysctlEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SysctlEntry) ProtoMessage() {}
+
+func (x *SysctlEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_sysctl_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SysctlEntry.ProtoReflect.Descriptor instead.
+func (*SysctlEntry) Descriptor() ([]byte, []int) {
+ return file_sysctl_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SysctlEntry) GetType() SysctlType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return SysctlType_CTL_STR
+}
+
+func (x *SysctlEntry) GetIarg() int32 {
+ if x != nil && x.Iarg != nil {
+ return *x.Iarg
+ }
+ return 0
+}
+
+func (x *SysctlEntry) GetSarg() string {
+ if x != nil && x.Sarg != nil {
+ return *x.Sarg
+ }
+ return ""
+}
+
+var File_sysctl_proto protoreflect.FileDescriptor
+
+var file_sysctl_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57,
+ 0x0a, 0x0c, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f,
+ 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53,
+ 0x79, 0x73, 0x63, 0x74, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
+ 0x12, 0x0a, 0x04, 0x69, 0x61, 0x72, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x69,
+ 0x61, 0x72, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x73, 0x61, 0x72, 0x67, 0x2a, 0x25, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x63, 0x74,
+ 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x54, 0x4c, 0x5f, 0x53, 0x54, 0x52,
+ 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x54, 0x4c, 0x5f, 0x33, 0x32, 0x10, 0x06,
+}
+
+var (
+ file_sysctl_proto_rawDescOnce sync.Once
+ file_sysctl_proto_rawDescData = file_sysctl_proto_rawDesc
+)
+
+func file_sysctl_proto_rawDescGZIP() []byte {
+ file_sysctl_proto_rawDescOnce.Do(func() {
+ file_sysctl_proto_rawDescData = protoimpl.X.CompressGZIP(file_sysctl_proto_rawDescData)
+ })
+ return file_sysctl_proto_rawDescData
+}
+
+var file_sysctl_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_sysctl_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_sysctl_proto_goTypes = []interface{}{
+ (SysctlType)(0), // 0: SysctlType
+ (*SysctlEntry)(nil), // 1: sysctl_entry
+}
+var file_sysctl_proto_depIdxs = []int32{
+ 0, // 0: sysctl_entry.type:type_name -> SysctlType
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_sysctl_proto_init() }
+func file_sysctl_proto_init() {
+ if File_sysctl_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_sysctl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SysctlEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_sysctl_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_sysctl_proto_goTypes,
+ DependencyIndexes: file_sysctl_proto_depIdxs,
+ EnumInfos: file_sysctl_proto_enumTypes,
+ MessageInfos: file_sysctl_proto_msgTypes,
+ }.Build()
+ File_sysctl_proto = out.File
+ file_sysctl_proto_rawDesc = nil
+ file_sysctl_proto_goTypes = nil
+ file_sysctl_proto_depIdxs = nil
+}
diff --git a/crit/images/sysctl.proto b/crit/images/sysctl.proto
new file mode 100644
index 0000000..0922b87
--- /dev/null
+++ b/crit/images/sysctl.proto
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+enum SysctlType {
+ CTL_STR = 5;
+ CTL_32 = 6;
+}
+
+message sysctl_entry {
+ required SysctlType type = 1;
+
+ optional int32 iarg = 2;
+ optional string sarg = 3;
+}
diff --git a/crit/images/tcp-stream.pb.go b/crit/images/tcp-stream.pb.go
new file mode 100644
index 0000000..3e173d1
--- /dev/null
+++ b/crit/images/tcp-stream.pb.go
@@ -0,0 +1,300 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: tcp-stream.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TcpStreamEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ InqLen *uint32 `protobuf:"varint,1,req,name=inq_len,json=inqLen" json:"inq_len,omitempty"`
+ InqSeq *uint32 `protobuf:"varint,2,req,name=inq_seq,json=inqSeq" json:"inq_seq,omitempty"`
+ OutqLen *uint32 `protobuf:"varint,3,req,name=outq_len,json=outqLen" json:"outq_len,omitempty"` // unsent and sent data in the send queue
+ OutqSeq *uint32 `protobuf:"varint,4,req,name=outq_seq,json=outqSeq" json:"outq_seq,omitempty"`
+ OptMask *uint32 `protobuf:"varint,5,req,name=opt_mask,json=optMask" json:"opt_mask,omitempty"` // TCPI_OPT_ bits
+ SndWscale *uint32 `protobuf:"varint,6,req,name=snd_wscale,json=sndWscale" json:"snd_wscale,omitempty"`
+ MssClamp *uint32 `protobuf:"varint,7,req,name=mss_clamp,json=mssClamp" json:"mss_clamp,omitempty"`
+ RcvWscale *uint32 `protobuf:"varint,8,opt,name=rcv_wscale,json=rcvWscale" json:"rcv_wscale,omitempty"`
+ Timestamp *uint32 `protobuf:"varint,9,opt,name=timestamp" json:"timestamp,omitempty"`
+ Cork *bool `protobuf:"varint,10,opt,name=cork" json:"cork,omitempty"`
+ Nodelay *bool `protobuf:"varint,11,opt,name=nodelay" json:"nodelay,omitempty"`
+ UnsqLen *uint32 `protobuf:"varint,12,opt,name=unsq_len,json=unsqLen" json:"unsq_len,omitempty"` // unsent data in the send queue
+ SndWl1 *uint32 `protobuf:"varint,13,opt,name=snd_wl1,json=sndWl1" json:"snd_wl1,omitempty"`
+ SndWnd *uint32 `protobuf:"varint,14,opt,name=snd_wnd,json=sndWnd" json:"snd_wnd,omitempty"`
+ MaxWindow *uint32 `protobuf:"varint,15,opt,name=max_window,json=maxWindow" json:"max_window,omitempty"`
+ RcvWnd *uint32 `protobuf:"varint,16,opt,name=rcv_wnd,json=rcvWnd" json:"rcv_wnd,omitempty"`
+ RcvWup *uint32 `protobuf:"varint,17,opt,name=rcv_wup,json=rcvWup" json:"rcv_wup,omitempty"`
+}
+
+func (x *TcpStreamEntry) Reset() {
+ *x = TcpStreamEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tcp_stream_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TcpStreamEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TcpStreamEntry) ProtoMessage() {}
+
+func (x *TcpStreamEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tcp_stream_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TcpStreamEntry.ProtoReflect.Descriptor instead.
+func (*TcpStreamEntry) Descriptor() ([]byte, []int) {
+ return file_tcp_stream_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TcpStreamEntry) GetInqLen() uint32 {
+ if x != nil && x.InqLen != nil {
+ return *x.InqLen
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetInqSeq() uint32 {
+ if x != nil && x.InqSeq != nil {
+ return *x.InqSeq
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetOutqLen() uint32 {
+ if x != nil && x.OutqLen != nil {
+ return *x.OutqLen
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetOutqSeq() uint32 {
+ if x != nil && x.OutqSeq != nil {
+ return *x.OutqSeq
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetOptMask() uint32 {
+ if x != nil && x.OptMask != nil {
+ return *x.OptMask
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetSndWscale() uint32 {
+ if x != nil && x.SndWscale != nil {
+ return *x.SndWscale
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetMssClamp() uint32 {
+ if x != nil && x.MssClamp != nil {
+ return *x.MssClamp
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetRcvWscale() uint32 {
+ if x != nil && x.RcvWscale != nil {
+ return *x.RcvWscale
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetTimestamp() uint32 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetCork() bool {
+ if x != nil && x.Cork != nil {
+ return *x.Cork
+ }
+ return false
+}
+
+func (x *TcpStreamEntry) GetNodelay() bool {
+ if x != nil && x.Nodelay != nil {
+ return *x.Nodelay
+ }
+ return false
+}
+
+func (x *TcpStreamEntry) GetUnsqLen() uint32 {
+ if x != nil && x.UnsqLen != nil {
+ return *x.UnsqLen
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetSndWl1() uint32 {
+ if x != nil && x.SndWl1 != nil {
+ return *x.SndWl1
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetSndWnd() uint32 {
+ if x != nil && x.SndWnd != nil {
+ return *x.SndWnd
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetMaxWindow() uint32 {
+ if x != nil && x.MaxWindow != nil {
+ return *x.MaxWindow
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetRcvWnd() uint32 {
+ if x != nil && x.RcvWnd != nil {
+ return *x.RcvWnd
+ }
+ return 0
+}
+
+func (x *TcpStreamEntry) GetRcvWup() uint32 {
+ if x != nil && x.RcvWup != nil {
+ return *x.RcvWup
+ }
+ return 0
+}
+
+var File_tcp_stream_proto protoreflect.FileDescriptor
+
+var file_tcp_stream_proto_rawDesc = []byte{
+ 0x0a, 0x10, 0x74, 0x63, 0x70, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1,
+ 0x03, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x6e, 0x71, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x69, 0x6e, 0x71, 0x4c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07,
+ 0x69, 0x6e, 0x71, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x69,
+ 0x6e, 0x71, 0x53, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x71, 0x5f, 0x6c, 0x65,
+ 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x71, 0x4c, 0x65, 0x6e,
+ 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x71, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x71, 0x53, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x08, 0x6f,
+ 0x70, 0x74, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2,
+ 0x3f, 0x02, 0x08, 0x01, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x73, 0x6e, 0x64, 0x5f, 0x77, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x09, 0x73, 0x6e, 0x64, 0x57, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09,
+ 0x6d, 0x73, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x08, 0x6d, 0x73, 0x73, 0x43, 0x6c, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x63, 0x76,
+ 0x5f, 0x77, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72,
+ 0x63, 0x76, 0x57, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x6b, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f,
+ 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x64,
+ 0x65, 0x6c, 0x61, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x71, 0x5f, 0x6c, 0x65, 0x6e,
+ 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x75, 0x6e, 0x73, 0x71, 0x4c, 0x65, 0x6e, 0x12,
+ 0x17, 0x0a, 0x07, 0x73, 0x6e, 0x64, 0x5f, 0x77, 0x6c, 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x06, 0x73, 0x6e, 0x64, 0x57, 0x6c, 0x31, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6e, 0x64, 0x5f,
+ 0x77, 0x6e, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x6e, 0x64, 0x57, 0x6e,
+ 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18,
+ 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77,
+ 0x12, 0x17, 0x0a, 0x07, 0x72, 0x63, 0x76, 0x5f, 0x77, 0x6e, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x06, 0x72, 0x63, 0x76, 0x57, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x63, 0x76,
+ 0x5f, 0x77, 0x75, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x63, 0x76, 0x57,
+ 0x75, 0x70,
+}
+
+var (
+ file_tcp_stream_proto_rawDescOnce sync.Once
+ file_tcp_stream_proto_rawDescData = file_tcp_stream_proto_rawDesc
+)
+
+func file_tcp_stream_proto_rawDescGZIP() []byte {
+ file_tcp_stream_proto_rawDescOnce.Do(func() {
+ file_tcp_stream_proto_rawDescData = protoimpl.X.CompressGZIP(file_tcp_stream_proto_rawDescData)
+ })
+ return file_tcp_stream_proto_rawDescData
+}
+
+var file_tcp_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_tcp_stream_proto_goTypes = []interface{}{
+ (*TcpStreamEntry)(nil), // 0: tcp_stream_entry
+}
+var file_tcp_stream_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_tcp_stream_proto_init() }
+func file_tcp_stream_proto_init() {
+ if File_tcp_stream_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_tcp_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TcpStreamEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_tcp_stream_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_tcp_stream_proto_goTypes,
+ DependencyIndexes: file_tcp_stream_proto_depIdxs,
+ MessageInfos: file_tcp_stream_proto_msgTypes,
+ }.Build()
+ File_tcp_stream_proto = out.File
+ file_tcp_stream_proto_rawDesc = nil
+ file_tcp_stream_proto_goTypes = nil
+ file_tcp_stream_proto_depIdxs = nil
+}
diff --git a/crit/images/tcp-stream.proto b/crit/images/tcp-stream.proto
new file mode 100644
index 0000000..c2244ba
--- /dev/null
+++ b/crit/images/tcp-stream.proto
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message tcp_stream_entry {
+ required uint32 inq_len = 1;
+ required uint32 inq_seq = 2;
+ required uint32 outq_len = 3; /* unsent and sent data in the send queue*/
+ required uint32 outq_seq = 4;
+
+ required uint32 opt_mask = 5 [(criu).hex = true]; /* TCPI_OPT_ bits */
+ required uint32 snd_wscale = 6;
+ required uint32 mss_clamp = 7;
+ optional uint32 rcv_wscale = 8;
+ optional uint32 timestamp = 9;
+
+ optional bool cork = 10;
+ optional bool nodelay = 11;
+
+ optional uint32 unsq_len = 12; /* unsent data in the send queue */
+
+ optional uint32 snd_wl1 = 13;
+ optional uint32 snd_wnd = 14;
+ optional uint32 max_window = 15;
+ optional uint32 rcv_wnd = 16;
+ optional uint32 rcv_wup = 17;
+}
diff --git a/crit/images/time.pb.go b/crit/images/time.pb.go
new file mode 100644
index 0000000..a3bdfc0
--- /dev/null
+++ b/crit/images/time.pb.go
@@ -0,0 +1,151 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: time.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Timeval struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TvSec *uint64 `protobuf:"varint,1,req,name=tv_sec,json=tvSec" json:"tv_sec,omitempty"`
+ TvUsec *uint64 `protobuf:"varint,2,req,name=tv_usec,json=tvUsec" json:"tv_usec,omitempty"`
+}
+
+func (x *Timeval) Reset() {
+ *x = Timeval{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_time_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Timeval) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Timeval) ProtoMessage() {}
+
+func (x *Timeval) ProtoReflect() protoreflect.Message {
+ mi := &file_time_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Timeval.ProtoReflect.Descriptor instead.
+func (*Timeval) Descriptor() ([]byte, []int) {
+ return file_time_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Timeval) GetTvSec() uint64 {
+ if x != nil && x.TvSec != nil {
+ return *x.TvSec
+ }
+ return 0
+}
+
+func (x *Timeval) GetTvUsec() uint64 {
+ if x != nil && x.TvUsec != nil {
+ return *x.TvUsec
+ }
+ return 0
+}
+
+var File_time_proto protoreflect.FileDescriptor
+
+var file_time_proto_rawDesc = []byte{
+ 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x07,
+ 0x74, 0x69, 0x6d, 0x65, 0x76, 0x61, 0x6c, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x76, 0x5f, 0x73, 0x65,
+ 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x74, 0x76, 0x53, 0x65, 0x63, 0x12, 0x17,
+ 0x0a, 0x07, 0x74, 0x76, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x06, 0x74, 0x76, 0x55, 0x73, 0x65, 0x63,
+}
+
+var (
+ file_time_proto_rawDescOnce sync.Once
+ file_time_proto_rawDescData = file_time_proto_rawDesc
+)
+
+func file_time_proto_rawDescGZIP() []byte {
+ file_time_proto_rawDescOnce.Do(func() {
+ file_time_proto_rawDescData = protoimpl.X.CompressGZIP(file_time_proto_rawDescData)
+ })
+ return file_time_proto_rawDescData
+}
+
+var file_time_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_time_proto_goTypes = []interface{}{
+ (*Timeval)(nil), // 0: timeval
+}
+var file_time_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_time_proto_init() }
+func file_time_proto_init() {
+ if File_time_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_time_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Timeval); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_time_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_time_proto_goTypes,
+ DependencyIndexes: file_time_proto_depIdxs,
+ MessageInfos: file_time_proto_msgTypes,
+ }.Build()
+ File_time_proto = out.File
+ file_time_proto_rawDesc = nil
+ file_time_proto_goTypes = nil
+ file_time_proto_depIdxs = nil
+}
diff --git a/crit/images/time.proto b/crit/images/time.proto
new file mode 100644
index 0000000..5e5e7ee
--- /dev/null
+++ b/crit/images/time.proto
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message timeval {
+ required uint64 tv_sec = 1;
+ required uint64 tv_usec = 2;
+}
diff --git a/crit/images/timens.pb.go b/crit/images/timens.pb.go
new file mode 100644
index 0000000..f8b629c
--- /dev/null
+++ b/crit/images/timens.pb.go
@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: timens.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Timespec struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TvSec *uint64 `protobuf:"varint,1,req,name=tv_sec,json=tvSec" json:"tv_sec,omitempty"`
+ TvNsec *uint64 `protobuf:"varint,2,req,name=tv_nsec,json=tvNsec" json:"tv_nsec,omitempty"`
+}
+
+func (x *Timespec) Reset() {
+ *x = Timespec{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_timens_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Timespec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Timespec) ProtoMessage() {}
+
+func (x *Timespec) ProtoReflect() protoreflect.Message {
+ mi := &file_timens_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Timespec.ProtoReflect.Descriptor instead.
+func (*Timespec) Descriptor() ([]byte, []int) {
+ return file_timens_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Timespec) GetTvSec() uint64 {
+ if x != nil && x.TvSec != nil {
+ return *x.TvSec
+ }
+ return 0
+}
+
+func (x *Timespec) GetTvNsec() uint64 {
+ if x != nil && x.TvNsec != nil {
+ return *x.TvNsec
+ }
+ return 0
+}
+
+type TimensEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Monotonic *Timespec `protobuf:"bytes,1,req,name=monotonic" json:"monotonic,omitempty"`
+ Boottime *Timespec `protobuf:"bytes,2,req,name=boottime" json:"boottime,omitempty"`
+}
+
+func (x *TimensEntry) Reset() {
+ *x = TimensEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_timens_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TimensEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TimensEntry) ProtoMessage() {}
+
+func (x *TimensEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_timens_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TimensEntry.ProtoReflect.Descriptor instead.
+func (*TimensEntry) Descriptor() ([]byte, []int) {
+ return file_timens_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *TimensEntry) GetMonotonic() *Timespec {
+ if x != nil {
+ return x.Monotonic
+ }
+ return nil
+}
+
+func (x *TimensEntry) GetBoottime() *Timespec {
+ if x != nil {
+ return x.Boottime
+ }
+ return nil
+}
+
+var File_timens_proto protoreflect.FileDescriptor
+
+var file_timens_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a,
+ 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x70, 0x65, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x76,
+ 0x5f, 0x73, 0x65, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x74, 0x76, 0x53, 0x65,
+ 0x63, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x76, 0x5f, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x04, 0x52, 0x06, 0x74, 0x76, 0x4e, 0x73, 0x65, 0x63, 0x22, 0x5e, 0x0a, 0x0c, 0x74, 0x69,
+ 0x6d, 0x65, 0x6e, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x09, 0x6d, 0x6f,
+ 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x09, 0x2e,
+ 0x74, 0x69, 0x6d, 0x65, 0x73, 0x70, 0x65, 0x63, 0x52, 0x09, 0x6d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f,
+ 0x6e, 0x69, 0x63, 0x12, 0x25, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x70, 0x65, 0x63,
+ 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x74, 0x69, 0x6d, 0x65,
+}
+
+var (
+ file_timens_proto_rawDescOnce sync.Once
+ file_timens_proto_rawDescData = file_timens_proto_rawDesc
+)
+
+func file_timens_proto_rawDescGZIP() []byte {
+ file_timens_proto_rawDescOnce.Do(func() {
+ file_timens_proto_rawDescData = protoimpl.X.CompressGZIP(file_timens_proto_rawDescData)
+ })
+ return file_timens_proto_rawDescData
+}
+
+var file_timens_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_timens_proto_goTypes = []interface{}{
+ (*Timespec)(nil), // 0: timespec
+ (*TimensEntry)(nil), // 1: timens_entry
+}
+var file_timens_proto_depIdxs = []int32{
+ 0, // 0: timens_entry.monotonic:type_name -> timespec
+ 0, // 1: timens_entry.boottime:type_name -> timespec
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_timens_proto_init() }
+func file_timens_proto_init() {
+ if File_timens_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_timens_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Timespec); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_timens_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TimensEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_timens_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_timens_proto_goTypes,
+ DependencyIndexes: file_timens_proto_depIdxs,
+ MessageInfos: file_timens_proto_msgTypes,
+ }.Build()
+ File_timens_proto = out.File
+ file_timens_proto_rawDesc = nil
+ file_timens_proto_goTypes = nil
+ file_timens_proto_depIdxs = nil
+}
diff --git a/crit/images/timens.proto b/crit/images/timens.proto
new file mode 100644
index 0000000..79097a1
--- /dev/null
+++ b/crit/images/timens.proto
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message timespec {
+ required uint64 tv_sec = 1;
+ required uint64 tv_nsec = 2;
+}
+message timens_entry {
+ required timespec monotonic = 1;
+ required timespec boottime = 2;
+}
diff --git a/crit/images/timer.pb.go b/crit/images/timer.pb.go
new file mode 100644
index 0000000..88df9f8
--- /dev/null
+++ b/crit/images/timer.pb.go
@@ -0,0 +1,428 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: timer.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ItimerEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Isec *uint64 `protobuf:"varint,1,req,name=isec" json:"isec,omitempty"`
+ Iusec *uint64 `protobuf:"varint,2,req,name=iusec" json:"iusec,omitempty"`
+ Vsec *uint64 `protobuf:"varint,3,req,name=vsec" json:"vsec,omitempty"`
+ Vusec *uint64 `protobuf:"varint,4,req,name=vusec" json:"vusec,omitempty"`
+}
+
+func (x *ItimerEntry) Reset() {
+ *x = ItimerEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_timer_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ItimerEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ItimerEntry) ProtoMessage() {}
+
+func (x *ItimerEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_timer_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ItimerEntry.ProtoReflect.Descriptor instead.
+func (*ItimerEntry) Descriptor() ([]byte, []int) {
+ return file_timer_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ItimerEntry) GetIsec() uint64 {
+ if x != nil && x.Isec != nil {
+ return *x.Isec
+ }
+ return 0
+}
+
+func (x *ItimerEntry) GetIusec() uint64 {
+ if x != nil && x.Iusec != nil {
+ return *x.Iusec
+ }
+ return 0
+}
+
+func (x *ItimerEntry) GetVsec() uint64 {
+ if x != nil && x.Vsec != nil {
+ return *x.Vsec
+ }
+ return 0
+}
+
+func (x *ItimerEntry) GetVusec() uint64 {
+ if x != nil && x.Vusec != nil {
+ return *x.Vusec
+ }
+ return 0
+}
+
+type PosixTimerEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ItId *uint32 `protobuf:"varint,1,req,name=it_id,json=itId" json:"it_id,omitempty"`
+ ClockId *uint32 `protobuf:"varint,2,req,name=clock_id,json=clockId" json:"clock_id,omitempty"`
+ SiSigno *uint32 `protobuf:"varint,3,req,name=si_signo,json=siSigno" json:"si_signo,omitempty"`
+ ItSigevNotify *uint32 `protobuf:"varint,4,req,name=it_sigev_notify,json=itSigevNotify" json:"it_sigev_notify,omitempty"`
+ SivalPtr *uint64 `protobuf:"varint,5,req,name=sival_ptr,json=sivalPtr" json:"sival_ptr,omitempty"`
+ Overrun *uint32 `protobuf:"varint,6,req,name=overrun" json:"overrun,omitempty"`
+ Isec *uint64 `protobuf:"varint,7,req,name=isec" json:"isec,omitempty"`
+ Insec *uint64 `protobuf:"varint,8,req,name=insec" json:"insec,omitempty"`
+ Vsec *uint64 `protobuf:"varint,9,req,name=vsec" json:"vsec,omitempty"`
+ Vnsec *uint64 `protobuf:"varint,10,req,name=vnsec" json:"vnsec,omitempty"`
+ NotifyThreadId *int32 `protobuf:"varint,11,opt,name=notify_thread_id,json=notifyThreadId" json:"notify_thread_id,omitempty"`
+}
+
+func (x *PosixTimerEntry) Reset() {
+ *x = PosixTimerEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_timer_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PosixTimerEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PosixTimerEntry) ProtoMessage() {}
+
+func (x *PosixTimerEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_timer_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PosixTimerEntry.ProtoReflect.Descriptor instead.
+func (*PosixTimerEntry) Descriptor() ([]byte, []int) {
+ return file_timer_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PosixTimerEntry) GetItId() uint32 {
+ if x != nil && x.ItId != nil {
+ return *x.ItId
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetClockId() uint32 {
+ if x != nil && x.ClockId != nil {
+ return *x.ClockId
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetSiSigno() uint32 {
+ if x != nil && x.SiSigno != nil {
+ return *x.SiSigno
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetItSigevNotify() uint32 {
+ if x != nil && x.ItSigevNotify != nil {
+ return *x.ItSigevNotify
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetSivalPtr() uint64 {
+ if x != nil && x.SivalPtr != nil {
+ return *x.SivalPtr
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetOverrun() uint32 {
+ if x != nil && x.Overrun != nil {
+ return *x.Overrun
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetIsec() uint64 {
+ if x != nil && x.Isec != nil {
+ return *x.Isec
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetInsec() uint64 {
+ if x != nil && x.Insec != nil {
+ return *x.Insec
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetVsec() uint64 {
+ if x != nil && x.Vsec != nil {
+ return *x.Vsec
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetVnsec() uint64 {
+ if x != nil && x.Vnsec != nil {
+ return *x.Vnsec
+ }
+ return 0
+}
+
+func (x *PosixTimerEntry) GetNotifyThreadId() int32 {
+ if x != nil && x.NotifyThreadId != nil {
+ return *x.NotifyThreadId
+ }
+ return 0
+}
+
+type TaskTimersEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Real *ItimerEntry `protobuf:"bytes,1,req,name=real" json:"real,omitempty"`
+ Virt *ItimerEntry `protobuf:"bytes,2,req,name=virt" json:"virt,omitempty"`
+ Prof *ItimerEntry `protobuf:"bytes,3,req,name=prof" json:"prof,omitempty"`
+ Posix []*PosixTimerEntry `protobuf:"bytes,4,rep,name=posix" json:"posix,omitempty"`
+}
+
+func (x *TaskTimersEntry) Reset() {
+ *x = TaskTimersEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_timer_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TaskTimersEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskTimersEntry) ProtoMessage() {}
+
+func (x *TaskTimersEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_timer_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TaskTimersEntry.ProtoReflect.Descriptor instead.
+func (*TaskTimersEntry) Descriptor() ([]byte, []int) {
+ return file_timer_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *TaskTimersEntry) GetReal() *ItimerEntry {
+ if x != nil {
+ return x.Real
+ }
+ return nil
+}
+
+func (x *TaskTimersEntry) GetVirt() *ItimerEntry {
+ if x != nil {
+ return x.Virt
+ }
+ return nil
+}
+
+func (x *TaskTimersEntry) GetProf() *ItimerEntry {
+ if x != nil {
+ return x.Prof
+ }
+ return nil
+}
+
+func (x *TaskTimersEntry) GetPosix() []*PosixTimerEntry {
+ if x != nil {
+ return x.Posix
+ }
+ return nil
+}
+
+var File_timer_proto protoreflect.FileDescriptor
+
+var file_timer_proto_rawDesc = []byte{
+ 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x62, 0x0a,
+ 0x0c, 0x69, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a,
+ 0x04, 0x69, 0x73, 0x65, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x69, 0x73, 0x65,
+ 0x63, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x75, 0x73, 0x65, 0x63, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x05, 0x69, 0x75, 0x73, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x73, 0x65, 0x63, 0x18,
+ 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x76, 0x73, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x76,
+ 0x75, 0x73, 0x65, 0x63, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x76, 0x75, 0x73, 0x65,
+ 0x63, 0x22, 0xbb, 0x02, 0x0a, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x78, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x13, 0x0a, 0x05, 0x69, 0x74, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x69, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08,
+ 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07,
+ 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x69, 0x5f, 0x73, 0x69,
+ 0x67, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x69, 0x53, 0x69, 0x67,
+ 0x6e, 0x6f, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x65, 0x76, 0x5f, 0x6e,
+ 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0d, 0x69, 0x74, 0x53,
+ 0x69, 0x67, 0x65, 0x76, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x69,
+ 0x76, 0x61, 0x6c, 0x5f, 0x70, 0x74, 0x72, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x08, 0x73,
+ 0x69, 0x76, 0x61, 0x6c, 0x50, 0x74, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x76, 0x65, 0x72, 0x72,
+ 0x75, 0x6e, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x75,
+ 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x65, 0x63, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x52,
+ 0x04, 0x69, 0x73, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x08,
+ 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x76,
+ 0x73, 0x65, 0x63, 0x18, 0x09, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x76, 0x73, 0x65, 0x63, 0x12,
+ 0x14, 0x0a, 0x05, 0x76, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05,
+ 0x76, 0x6e, 0x73, 0x65, 0x63, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f,
+ 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x22,
+ 0xa6, 0x01, 0x0a, 0x11, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x69, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x04, 0x72, 0x65, 0x61, 0x6c, 0x12, 0x21, 0x0a, 0x04, 0x76, 0x69, 0x72, 0x74,
+ 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x69, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x76, 0x69, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x70,
+ 0x72, 0x6f, 0x66, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x69, 0x74, 0x69, 0x6d,
+ 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x70, 0x72, 0x6f, 0x66, 0x12, 0x28,
+ 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x69, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
+ 0x70, 0x6f, 0x73, 0x69, 0x78, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x69, 0x78,
+}
+
+var (
+ file_timer_proto_rawDescOnce sync.Once
+ file_timer_proto_rawDescData = file_timer_proto_rawDesc
+)
+
+func file_timer_proto_rawDescGZIP() []byte {
+ file_timer_proto_rawDescOnce.Do(func() {
+ file_timer_proto_rawDescData = protoimpl.X.CompressGZIP(file_timer_proto_rawDescData)
+ })
+ return file_timer_proto_rawDescData
+}
+
+var file_timer_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_timer_proto_goTypes = []interface{}{
+ (*ItimerEntry)(nil), // 0: itimer_entry
+ (*PosixTimerEntry)(nil), // 1: posix_timer_entry
+ (*TaskTimersEntry)(nil), // 2: task_timers_entry
+}
+var file_timer_proto_depIdxs = []int32{
+ 0, // 0: task_timers_entry.real:type_name -> itimer_entry
+ 0, // 1: task_timers_entry.virt:type_name -> itimer_entry
+ 0, // 2: task_timers_entry.prof:type_name -> itimer_entry
+ 1, // 3: task_timers_entry.posix:type_name -> posix_timer_entry
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_timer_proto_init() }
+func file_timer_proto_init() {
+ if File_timer_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_timer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ItimerEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_timer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PosixTimerEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_timer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TaskTimersEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_timer_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_timer_proto_goTypes,
+ DependencyIndexes: file_timer_proto_depIdxs,
+ MessageInfos: file_timer_proto_msgTypes,
+ }.Build()
+ File_timer_proto = out.File
+ file_timer_proto_rawDesc = nil
+ file_timer_proto_goTypes = nil
+ file_timer_proto_depIdxs = nil
+}
diff --git a/crit/images/timer.proto b/crit/images/timer.proto
new file mode 100644
index 0000000..3b95562
--- /dev/null
+++ b/crit/images/timer.proto
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message itimer_entry {
+ required uint64 isec = 1;
+ required uint64 iusec = 2;
+ required uint64 vsec = 3;
+ required uint64 vusec = 4;
+}
+
+message posix_timer_entry {
+ required uint32 it_id = 1;
+ required uint32 clock_id = 2;
+ required uint32 si_signo = 3;
+ required uint32 it_sigev_notify = 4;
+ required uint64 sival_ptr = 5;
+ required uint32 overrun = 6;
+
+ required uint64 isec = 7;
+ required uint64 insec = 8;
+ required uint64 vsec = 9;
+ required uint64 vnsec = 10;
+ optional int32 notify_thread_id= 11;
+}
+
+message task_timers_entry {
+ required itimer_entry real = 1;
+ required itimer_entry virt = 2;
+ required itimer_entry prof = 3;
+ repeated posix_timer_entry posix = 4;
+}
diff --git a/crit/images/timerfd.pb.go b/crit/images/timerfd.pb.go
new file mode 100644
index 0000000..17cd382
--- /dev/null
+++ b/crit/images/timerfd.pb.go
@@ -0,0 +1,234 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: timerfd.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TimerfdEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Flags *uint32 `protobuf:"varint,2,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,3,req,name=fown" json:"fown,omitempty"`
+ Clockid *uint32 `protobuf:"varint,4,req,name=clockid" json:"clockid,omitempty"`
+ Ticks *uint64 `protobuf:"varint,5,req,name=ticks" json:"ticks,omitempty"`
+ SettimeFlags *uint32 `protobuf:"varint,6,req,name=settime_flags,json=settimeFlags" json:"settime_flags,omitempty"`
+ Vsec *uint64 `protobuf:"varint,7,req,name=vsec" json:"vsec,omitempty"`
+ Vnsec *uint64 `protobuf:"varint,8,req,name=vnsec" json:"vnsec,omitempty"`
+ Isec *uint64 `protobuf:"varint,9,req,name=isec" json:"isec,omitempty"`
+ Insec *uint64 `protobuf:"varint,10,req,name=insec" json:"insec,omitempty"`
+}
+
+func (x *TimerfdEntry) Reset() {
+ *x = TimerfdEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_timerfd_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TimerfdEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TimerfdEntry) ProtoMessage() {}
+
+func (x *TimerfdEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_timerfd_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TimerfdEntry.ProtoReflect.Descriptor instead.
+func (*TimerfdEntry) Descriptor() ([]byte, []int) {
+ return file_timerfd_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TimerfdEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *TimerfdEntry) GetClockid() uint32 {
+ if x != nil && x.Clockid != nil {
+ return *x.Clockid
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetTicks() uint64 {
+ if x != nil && x.Ticks != nil {
+ return *x.Ticks
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetSettimeFlags() uint32 {
+ if x != nil && x.SettimeFlags != nil {
+ return *x.SettimeFlags
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetVsec() uint64 {
+ if x != nil && x.Vsec != nil {
+ return *x.Vsec
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetVnsec() uint64 {
+ if x != nil && x.Vnsec != nil {
+ return *x.Vnsec
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetIsec() uint64 {
+ if x != nil && x.Isec != nil {
+ return *x.Isec
+ }
+ return 0
+}
+
+func (x *TimerfdEntry) GetInsec() uint64 {
+ if x != nil && x.Insec != nil {
+ return *x.Insec
+ }
+ return 0
+}
+
+var File_timerfd_proto protoreflect.FileDescriptor
+
+var file_timerfd_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x66, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x0a, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77,
+ 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65,
+ 0x72, 0x66, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52,
+ 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x18, 0x03,
+ 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x69, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x69,
+ 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x05, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x0d, 0x73, 0x65, 0x74, 0x74, 0x69,
+ 0x6d, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05,
+ 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x6c,
+ 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x73, 0x65, 0x63, 0x18, 0x07, 0x20, 0x02, 0x28,
+ 0x04, 0x52, 0x04, 0x76, 0x73, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6e, 0x73, 0x65, 0x63,
+ 0x18, 0x08, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x76, 0x6e, 0x73, 0x65, 0x63, 0x12, 0x12, 0x0a,
+ 0x04, 0x69, 0x73, 0x65, 0x63, 0x18, 0x09, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x69, 0x73, 0x65,
+ 0x63, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x05, 0x69, 0x6e, 0x73, 0x65, 0x63,
+}
+
+var (
+ file_timerfd_proto_rawDescOnce sync.Once
+ file_timerfd_proto_rawDescData = file_timerfd_proto_rawDesc
+)
+
+func file_timerfd_proto_rawDescGZIP() []byte {
+ file_timerfd_proto_rawDescOnce.Do(func() {
+ file_timerfd_proto_rawDescData = protoimpl.X.CompressGZIP(file_timerfd_proto_rawDescData)
+ })
+ return file_timerfd_proto_rawDescData
+}
+
+var file_timerfd_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_timerfd_proto_goTypes = []interface{}{
+ (*TimerfdEntry)(nil), // 0: timerfd_entry
+ (*FownEntry)(nil), // 1: fown_entry
+}
+var file_timerfd_proto_depIdxs = []int32{
+ 1, // 0: timerfd_entry.fown:type_name -> fown_entry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_timerfd_proto_init() }
+func file_timerfd_proto_init() {
+ if File_timerfd_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_timerfd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TimerfdEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_timerfd_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_timerfd_proto_goTypes,
+ DependencyIndexes: file_timerfd_proto_depIdxs,
+ MessageInfos: file_timerfd_proto_msgTypes,
+ }.Build()
+ File_timerfd_proto = out.File
+ file_timerfd_proto_rawDesc = nil
+ file_timerfd_proto_goTypes = nil
+ file_timerfd_proto_depIdxs = nil
+}
diff --git a/crit/images/timerfd.proto b/crit/images/timerfd.proto
new file mode 100644
index 0000000..0bdf125
--- /dev/null
+++ b/crit/images/timerfd.proto
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+
+message timerfd_entry {
+ required uint32 id = 1;
+ required uint32 flags = 2 [(criu).hex = true];
+ required fown_entry fown = 3;
+
+ required uint32 clockid = 4;
+ required uint64 ticks = 5;
+ required uint32 settime_flags = 6 [(criu).hex = true];
+
+ required uint64 vsec = 7;
+ required uint64 vnsec = 8;
+ required uint64 isec = 9;
+ required uint64 insec = 10;
+}
diff --git a/crit/images/tty.pb.go b/crit/images/tty.pb.go
new file mode 100644
index 0000000..ae849ba
--- /dev/null
+++ b/crit/images/tty.pb.go
@@ -0,0 +1,831 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: tty.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TtyType int32
+
+const (
+ TtyType_UNKNOWN TtyType = 0
+ TtyType_PTY TtyType = 1
+ TtyType_CONSOLE TtyType = 2
+ TtyType_VT TtyType = 3
+ TtyType_CTTY TtyType = 4
+ TtyType_EXT_TTY TtyType = 5
+ TtyType_SERIAL TtyType = 6
+)
+
+// Enum value maps for TtyType.
+var (
+ TtyType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "PTY",
+ 2: "CONSOLE",
+ 3: "VT",
+ 4: "CTTY",
+ 5: "EXT_TTY",
+ 6: "SERIAL",
+ }
+ TtyType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "PTY": 1,
+ "CONSOLE": 2,
+ "VT": 3,
+ "CTTY": 4,
+ "EXT_TTY": 5,
+ "SERIAL": 6,
+ }
+)
+
+func (x TtyType) Enum() *TtyType {
+ p := new(TtyType)
+ *p = x
+ return p
+}
+
+func (x TtyType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (TtyType) Descriptor() protoreflect.EnumDescriptor {
+ return file_tty_proto_enumTypes[0].Descriptor()
+}
+
+func (TtyType) Type() protoreflect.EnumType {
+ return &file_tty_proto_enumTypes[0]
+}
+
+func (x TtyType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *TtyType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = TtyType(num)
+ return nil
+}
+
+// Deprecated: Use TtyType.Descriptor instead.
+func (TtyType) EnumDescriptor() ([]byte, []int) {
+ return file_tty_proto_rawDescGZIP(), []int{0}
+}
+
+type WinsizeEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ WsRow *uint32 `protobuf:"varint,1,req,name=ws_row,json=wsRow" json:"ws_row,omitempty"`
+ WsCol *uint32 `protobuf:"varint,2,req,name=ws_col,json=wsCol" json:"ws_col,omitempty"`
+ WsXpixel *uint32 `protobuf:"varint,3,req,name=ws_xpixel,json=wsXpixel" json:"ws_xpixel,omitempty"`
+ WsYpixel *uint32 `protobuf:"varint,4,req,name=ws_ypixel,json=wsYpixel" json:"ws_ypixel,omitempty"`
+}
+
+func (x *WinsizeEntry) Reset() {
+ *x = WinsizeEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tty_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WinsizeEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WinsizeEntry) ProtoMessage() {}
+
+func (x *WinsizeEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tty_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WinsizeEntry.ProtoReflect.Descriptor instead.
+func (*WinsizeEntry) Descriptor() ([]byte, []int) {
+ return file_tty_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *WinsizeEntry) GetWsRow() uint32 {
+ if x != nil && x.WsRow != nil {
+ return *x.WsRow
+ }
+ return 0
+}
+
+func (x *WinsizeEntry) GetWsCol() uint32 {
+ if x != nil && x.WsCol != nil {
+ return *x.WsCol
+ }
+ return 0
+}
+
+func (x *WinsizeEntry) GetWsXpixel() uint32 {
+ if x != nil && x.WsXpixel != nil {
+ return *x.WsXpixel
+ }
+ return 0
+}
+
+func (x *WinsizeEntry) GetWsYpixel() uint32 {
+ if x != nil && x.WsYpixel != nil {
+ return *x.WsYpixel
+ }
+ return 0
+}
+
+type TermiosEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CIflag *uint32 `protobuf:"varint,1,req,name=c_iflag,json=cIflag" json:"c_iflag,omitempty"`
+ COflag *uint32 `protobuf:"varint,2,req,name=c_oflag,json=cOflag" json:"c_oflag,omitempty"`
+ CCflag *uint32 `protobuf:"varint,3,req,name=c_cflag,json=cCflag" json:"c_cflag,omitempty"`
+ CLflag *uint32 `protobuf:"varint,4,req,name=c_lflag,json=cLflag" json:"c_lflag,omitempty"`
+ CLine *uint32 `protobuf:"varint,5,req,name=c_line,json=cLine" json:"c_line,omitempty"`
+ CIspeed *uint32 `protobuf:"varint,6,req,name=c_ispeed,json=cIspeed" json:"c_ispeed,omitempty"`
+ COspeed *uint32 `protobuf:"varint,7,req,name=c_ospeed,json=cOspeed" json:"c_ospeed,omitempty"`
+ CCc []uint32 `protobuf:"varint,8,rep,name=c_cc,json=cCc" json:"c_cc,omitempty"`
+}
+
+func (x *TermiosEntry) Reset() {
+ *x = TermiosEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tty_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TermiosEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TermiosEntry) ProtoMessage() {}
+
+func (x *TermiosEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tty_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TermiosEntry.ProtoReflect.Descriptor instead.
+func (*TermiosEntry) Descriptor() ([]byte, []int) {
+ return file_tty_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *TermiosEntry) GetCIflag() uint32 {
+ if x != nil && x.CIflag != nil {
+ return *x.CIflag
+ }
+ return 0
+}
+
+func (x *TermiosEntry) GetCOflag() uint32 {
+ if x != nil && x.COflag != nil {
+ return *x.COflag
+ }
+ return 0
+}
+
+func (x *TermiosEntry) GetCCflag() uint32 {
+ if x != nil && x.CCflag != nil {
+ return *x.CCflag
+ }
+ return 0
+}
+
+func (x *TermiosEntry) GetCLflag() uint32 {
+ if x != nil && x.CLflag != nil {
+ return *x.CLflag
+ }
+ return 0
+}
+
+func (x *TermiosEntry) GetCLine() uint32 {
+ if x != nil && x.CLine != nil {
+ return *x.CLine
+ }
+ return 0
+}
+
+func (x *TermiosEntry) GetCIspeed() uint32 {
+ if x != nil && x.CIspeed != nil {
+ return *x.CIspeed
+ }
+ return 0
+}
+
+func (x *TermiosEntry) GetCOspeed() uint32 {
+ if x != nil && x.COspeed != nil {
+ return *x.COspeed
+ }
+ return 0
+}
+
+func (x *TermiosEntry) GetCCc() []uint32 {
+ if x != nil {
+ return x.CCc
+ }
+ return nil
+}
+
+type TtyPtyEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index *uint32 `protobuf:"varint,1,req,name=index" json:"index,omitempty"`
+}
+
+func (x *TtyPtyEntry) Reset() {
+ *x = TtyPtyEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tty_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TtyPtyEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TtyPtyEntry) ProtoMessage() {}
+
+func (x *TtyPtyEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tty_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TtyPtyEntry.ProtoReflect.Descriptor instead.
+func (*TtyPtyEntry) Descriptor() ([]byte, []int) {
+ return file_tty_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *TtyPtyEntry) GetIndex() uint32 {
+ if x != nil && x.Index != nil {
+ return *x.Index
+ }
+ return 0
+}
+
+type TtyDataEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TtyId *uint32 `protobuf:"varint,1,req,name=tty_id,json=ttyId" json:"tty_id,omitempty"`
+ Data []byte `protobuf:"bytes,2,req,name=data" json:"data,omitempty"`
+}
+
+func (x *TtyDataEntry) Reset() {
+ *x = TtyDataEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tty_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TtyDataEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TtyDataEntry) ProtoMessage() {}
+
+func (x *TtyDataEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tty_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TtyDataEntry.ProtoReflect.Descriptor instead.
+func (*TtyDataEntry) Descriptor() ([]byte, []int) {
+ return file_tty_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *TtyDataEntry) GetTtyId() uint32 {
+ if x != nil && x.TtyId != nil {
+ return *x.TtyId
+ }
+ return 0
+}
+
+func (x *TtyDataEntry) GetData() []byte {
+ if x != nil {
+ return x.Data
+ }
+ return nil
+}
+
+type TtyInfoEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Type *TtyType `protobuf:"varint,2,req,name=type,enum=TtyType" json:"type,omitempty"`
+ Locked *bool `protobuf:"varint,3,req,name=locked" json:"locked,omitempty"` // Unix98 PTY only
+ Exclusive *bool `protobuf:"varint,4,req,name=exclusive" json:"exclusive,omitempty"`
+ PacketMode *bool `protobuf:"varint,5,req,name=packet_mode,json=packetMode" json:"packet_mode,omitempty"` // Unix98 PTY only
+ Sid *uint32 `protobuf:"varint,6,req,name=sid" json:"sid,omitempty"`
+ Pgrp *uint32 `protobuf:"varint,7,req,name=pgrp" json:"pgrp,omitempty"`
+ // Convenient for printing errors and such, with this
+ // device encoded we can figure out major and minor
+ // numbers.
+ Rdev *uint32 `protobuf:"varint,8,req,name=rdev" json:"rdev,omitempty"`
+ Termios *TermiosEntry `protobuf:"bytes,9,opt,name=termios" json:"termios,omitempty"`
+ TermiosLocked *TermiosEntry `protobuf:"bytes,10,opt,name=termios_locked,json=termiosLocked" json:"termios_locked,omitempty"`
+ Winsize *WinsizeEntry `protobuf:"bytes,11,opt,name=winsize" json:"winsize,omitempty"`
+ // These are optional fields which presence depends on
+ // TTY type.
+ Pty *TtyPtyEntry `protobuf:"bytes,12,opt,name=pty" json:"pty,omitempty"`
+ Dev *uint32 `protobuf:"varint,13,opt,name=dev" json:"dev,omitempty"`
+ Uid *uint32 `protobuf:"varint,14,opt,name=uid" json:"uid,omitempty"`
+ Gid *uint32 `protobuf:"varint,15,opt,name=gid" json:"gid,omitempty"`
+}
+
+func (x *TtyInfoEntry) Reset() {
+ *x = TtyInfoEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tty_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TtyInfoEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TtyInfoEntry) ProtoMessage() {}
+
+func (x *TtyInfoEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tty_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TtyInfoEntry.ProtoReflect.Descriptor instead.
+func (*TtyInfoEntry) Descriptor() ([]byte, []int) {
+ return file_tty_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *TtyInfoEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *TtyInfoEntry) GetType() TtyType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return TtyType_UNKNOWN
+}
+
+func (x *TtyInfoEntry) GetLocked() bool {
+ if x != nil && x.Locked != nil {
+ return *x.Locked
+ }
+ return false
+}
+
+func (x *TtyInfoEntry) GetExclusive() bool {
+ if x != nil && x.Exclusive != nil {
+ return *x.Exclusive
+ }
+ return false
+}
+
+func (x *TtyInfoEntry) GetPacketMode() bool {
+ if x != nil && x.PacketMode != nil {
+ return *x.PacketMode
+ }
+ return false
+}
+
+func (x *TtyInfoEntry) GetSid() uint32 {
+ if x != nil && x.Sid != nil {
+ return *x.Sid
+ }
+ return 0
+}
+
+func (x *TtyInfoEntry) GetPgrp() uint32 {
+ if x != nil && x.Pgrp != nil {
+ return *x.Pgrp
+ }
+ return 0
+}
+
+func (x *TtyInfoEntry) GetRdev() uint32 {
+ if x != nil && x.Rdev != nil {
+ return *x.Rdev
+ }
+ return 0
+}
+
+func (x *TtyInfoEntry) GetTermios() *TermiosEntry {
+ if x != nil {
+ return x.Termios
+ }
+ return nil
+}
+
+func (x *TtyInfoEntry) GetTermiosLocked() *TermiosEntry {
+ if x != nil {
+ return x.TermiosLocked
+ }
+ return nil
+}
+
+func (x *TtyInfoEntry) GetWinsize() *WinsizeEntry {
+ if x != nil {
+ return x.Winsize
+ }
+ return nil
+}
+
+func (x *TtyInfoEntry) GetPty() *TtyPtyEntry {
+ if x != nil {
+ return x.Pty
+ }
+ return nil
+}
+
+func (x *TtyInfoEntry) GetDev() uint32 {
+ if x != nil && x.Dev != nil {
+ return *x.Dev
+ }
+ return 0
+}
+
+func (x *TtyInfoEntry) GetUid() uint32 {
+ if x != nil && x.Uid != nil {
+ return *x.Uid
+ }
+ return 0
+}
+
+func (x *TtyInfoEntry) GetGid() uint32 {
+ if x != nil && x.Gid != nil {
+ return *x.Gid
+ }
+ return 0
+}
+
+type TtyFileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ TtyInfoId *uint32 `protobuf:"varint,2,req,name=tty_info_id,json=ttyInfoId" json:"tty_info_id,omitempty"`
+ Flags *uint32 `protobuf:"varint,3,req,name=flags" json:"flags,omitempty"`
+ Fown *FownEntry `protobuf:"bytes,4,req,name=fown" json:"fown,omitempty"`
+ // optional sint32 mnt_id = 5 [default = 0];
+ RegfId *uint32 `protobuf:"varint,6,opt,name=regf_id,json=regfId" json:"regf_id,omitempty"`
+}
+
+func (x *TtyFileEntry) Reset() {
+ *x = TtyFileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tty_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TtyFileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TtyFileEntry) ProtoMessage() {}
+
+func (x *TtyFileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tty_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TtyFileEntry.ProtoReflect.Descriptor instead.
+func (*TtyFileEntry) Descriptor() ([]byte, []int) {
+ return file_tty_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *TtyFileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *TtyFileEntry) GetTtyInfoId() uint32 {
+ if x != nil && x.TtyInfoId != nil {
+ return *x.TtyInfoId
+ }
+ return 0
+}
+
+func (x *TtyFileEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *TtyFileEntry) GetFown() *FownEntry {
+ if x != nil {
+ return x.Fown
+ }
+ return nil
+}
+
+func (x *TtyFileEntry) GetRegfId() uint32 {
+ if x != nil && x.RegfId != nil {
+ return *x.RegfId
+ }
+ return 0
+}
+
+var File_tty_proto protoreflect.FileDescriptor
+
+var file_tty_proto_rawDesc = []byte{
+ 0x0a, 0x09, 0x74, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x6f, 0x77, 0x6e, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x77, 0x73, 0x5f, 0x72, 0x6f, 0x77, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x77, 0x73, 0x52, 0x6f, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x77,
+ 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x77, 0x73, 0x43,
+ 0x6f, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x73, 0x5f, 0x78, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x18,
+ 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x77, 0x73, 0x58, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x12,
+ 0x1b, 0x0a, 0x09, 0x77, 0x73, 0x5f, 0x79, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x08, 0x77, 0x73, 0x59, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x22, 0xd3, 0x01, 0x0a,
+ 0x0d, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6f, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x17,
+ 0x0a, 0x07, 0x63, 0x5f, 0x69, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x06, 0x63, 0x49, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x5f, 0x6f, 0x66, 0x6c,
+ 0x61, 0x67, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x4f, 0x66, 0x6c, 0x61, 0x67,
+ 0x12, 0x17, 0x0a, 0x07, 0x63, 0x5f, 0x63, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, 0x02, 0x28,
+ 0x0d, 0x52, 0x06, 0x63, 0x43, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x5f, 0x6c,
+ 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x4c, 0x66, 0x6c,
+ 0x61, 0x67, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x05, 0x63, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x5f, 0x69,
+ 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x49, 0x73,
+ 0x70, 0x65, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x5f, 0x6f, 0x73, 0x70, 0x65, 0x65, 0x64,
+ 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x4f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x12,
+ 0x11, 0x0a, 0x04, 0x63, 0x5f, 0x63, 0x63, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x03, 0x63,
+ 0x43, 0x63, 0x22, 0x25, 0x0a, 0x0d, 0x74, 0x74, 0x79, 0x5f, 0x70, 0x74, 0x79, 0x5f, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x3b, 0x0a, 0x0e, 0x74, 0x74, 0x79,
+ 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x74,
+ 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x74, 0x79,
+ 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c,
+ 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb2, 0x03, 0x0a, 0x0e, 0x74, 0x74, 0x79, 0x5f, 0x69,
+ 0x6e, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x08, 0x2e, 0x54, 0x74, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65,
+ 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12,
+ 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x02,
+ 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x12, 0x1f, 0x0a,
+ 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x02,
+ 0x28, 0x08, 0x52, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x10,
+ 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x03, 0x73, 0x69, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x70, 0x67, 0x72, 0x70, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04,
+ 0x70, 0x67, 0x72, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x64, 0x65, 0x76, 0x18, 0x08, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x04, 0x72, 0x64, 0x65, 0x76, 0x12, 0x28, 0x0a, 0x07, 0x74, 0x65, 0x72, 0x6d,
+ 0x69, 0x6f, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x72, 0x6d,
+ 0x69, 0x6f, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x65, 0x72, 0x6d, 0x69,
+ 0x6f, 0x73, 0x12, 0x35, 0x0a, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6f, 0x73, 0x5f, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x72,
+ 0x6d, 0x69, 0x6f, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x65, 0x72, 0x6d,
+ 0x69, 0x6f, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x77, 0x69, 0x6e,
+ 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x77, 0x69, 0x6e,
+ 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x73,
+ 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x70, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x0e, 0x2e, 0x74, 0x74, 0x79, 0x5f, 0x70, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x03, 0x70, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x76, 0x18, 0x0d, 0x20, 0x01,
+ 0x28, 0x0d, 0x52, 0x03, 0x64, 0x65, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x0e,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64,
+ 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0e,
+ 0x74, 0x74, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e,
+ 0x0a, 0x0b, 0x74, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
+ 0x02, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x12, 0x1b,
+ 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2,
+ 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x66,
+ 0x6f, 0x77, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6f, 0x77, 0x6e,
+ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x6f, 0x77, 0x6e, 0x12, 0x17, 0x0a, 0x07,
+ 0x72, 0x65, 0x67, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72,
+ 0x65, 0x67, 0x66, 0x49, 0x64, 0x2a, 0x57, 0x0a, 0x07, 0x54, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a,
+ 0x03, 0x50, 0x54, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c,
+ 0x45, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x54, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43,
+ 0x54, 0x54, 0x59, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x54, 0x5f, 0x54, 0x54, 0x59,
+ 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, 0x10, 0x06,
+}
+
+var (
+ file_tty_proto_rawDescOnce sync.Once
+ file_tty_proto_rawDescData = file_tty_proto_rawDesc
+)
+
+func file_tty_proto_rawDescGZIP() []byte {
+ file_tty_proto_rawDescOnce.Do(func() {
+ file_tty_proto_rawDescData = protoimpl.X.CompressGZIP(file_tty_proto_rawDescData)
+ })
+ return file_tty_proto_rawDescData
+}
+
+var file_tty_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_tty_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_tty_proto_goTypes = []interface{}{
+ (TtyType)(0), // 0: TtyType
+ (*WinsizeEntry)(nil), // 1: winsize_entry
+ (*TermiosEntry)(nil), // 2: termios_entry
+ (*TtyPtyEntry)(nil), // 3: tty_pty_entry
+ (*TtyDataEntry)(nil), // 4: tty_data_entry
+ (*TtyInfoEntry)(nil), // 5: tty_info_entry
+ (*TtyFileEntry)(nil), // 6: tty_file_entry
+ (*FownEntry)(nil), // 7: fown_entry
+}
+var file_tty_proto_depIdxs = []int32{
+ 0, // 0: tty_info_entry.type:type_name -> TtyType
+ 2, // 1: tty_info_entry.termios:type_name -> termios_entry
+ 2, // 2: tty_info_entry.termios_locked:type_name -> termios_entry
+ 1, // 3: tty_info_entry.winsize:type_name -> winsize_entry
+ 3, // 4: tty_info_entry.pty:type_name -> tty_pty_entry
+ 7, // 5: tty_file_entry.fown:type_name -> fown_entry
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_tty_proto_init() }
+func file_tty_proto_init() {
+ if File_tty_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ file_fown_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_tty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WinsizeEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tty_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TermiosEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tty_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TtyPtyEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tty_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TtyDataEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tty_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TtyInfoEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tty_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TtyFileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_tty_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_tty_proto_goTypes,
+ DependencyIndexes: file_tty_proto_depIdxs,
+ EnumInfos: file_tty_proto_enumTypes,
+ MessageInfos: file_tty_proto_msgTypes,
+ }.Build()
+ File_tty_proto = out.File
+ file_tty_proto_rawDesc = nil
+ file_tty_proto_goTypes = nil
+ file_tty_proto_depIdxs = nil
+}
diff --git a/crit/images/tty.proto b/crit/images/tty.proto
new file mode 100644
index 0000000..14bc543
--- /dev/null
+++ b/crit/images/tty.proto
@@ -0,0 +1,92 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+import "fown.proto";
+
+message winsize_entry {
+ required uint32 ws_row = 1;
+ required uint32 ws_col = 2;
+ required uint32 ws_xpixel = 3;
+ required uint32 ws_ypixel = 4;
+};
+
+message termios_entry {
+ required uint32 c_iflag = 1;
+ required uint32 c_oflag = 2;
+ required uint32 c_cflag = 3;
+ required uint32 c_lflag = 4;
+ required uint32 c_line = 5;
+ required uint32 c_ispeed = 6;
+ required uint32 c_ospeed = 7;
+
+ repeated uint32 c_cc = 8;
+}
+
+message tty_pty_entry {
+ required uint32 index = 1;
+}
+
+enum TtyType {
+ UNKNOWN = 0;
+ PTY = 1;
+ CONSOLE = 2;
+ VT = 3;
+ CTTY = 4;
+ EXT_TTY = 5;
+ SERIAL = 6;
+}
+
+message tty_data_entry {
+ required uint32 tty_id = 1;
+ required bytes data = 2;
+
+ // optional sint32 mnt_id = 3 [default = 0];
+}
+
+message tty_info_entry {
+ required uint32 id = 1;
+
+ required TtyType type = 2;
+
+ required bool locked = 3; /* Unix98 PTY only */
+ required bool exclusive = 4;
+ required bool packet_mode = 5; /* Unix98 PTY only */
+
+ required uint32 sid = 6;
+ required uint32 pgrp = 7;
+
+ /*
+ * Convenient for printing errors and such, with this
+ * device encoded we can figure out major and minor
+ * numbers.
+ */
+ required uint32 rdev = 8;
+
+ optional termios_entry termios = 9;
+ optional termios_entry termios_locked = 10;
+ optional winsize_entry winsize = 11;
+
+ /*
+ * These are optional fields which presence depends on
+ * TTY type.
+ */
+ optional tty_pty_entry pty = 12;
+ optional uint32 dev = 13;
+
+ optional uint32 uid = 14;
+ optional uint32 gid = 15;
+
+ // optional sint32 mnt_id = 16 [default = 0];
+};
+
+message tty_file_entry {
+ required uint32 id = 1;
+ required uint32 tty_info_id = 2;
+
+ required uint32 flags = 3 [(criu).hex = true];
+ required fown_entry fown = 4;
+ // optional sint32 mnt_id = 5 [default = 0];
+ optional uint32 regf_id = 6;
+}
diff --git a/crit/images/tun.pb.go b/crit/images/tun.pb.go
new file mode 100644
index 0000000..7d33bdf
--- /dev/null
+++ b/crit/images/tun.pb.go
@@ -0,0 +1,272 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: tun.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TunfileEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
+ Netdev *string `protobuf:"bytes,2,opt,name=netdev" json:"netdev,omitempty"`
+ Detached *bool `protobuf:"varint,3,opt,name=detached" json:"detached,omitempty"`
+ NsId *uint32 `protobuf:"varint,4,opt,name=ns_id,json=nsId" json:"ns_id,omitempty"`
+}
+
+func (x *TunfileEntry) Reset() {
+ *x = TunfileEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tun_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TunfileEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TunfileEntry) ProtoMessage() {}
+
+func (x *TunfileEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tun_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TunfileEntry.ProtoReflect.Descriptor instead.
+func (*TunfileEntry) Descriptor() ([]byte, []int) {
+ return file_tun_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TunfileEntry) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *TunfileEntry) GetNetdev() string {
+ if x != nil && x.Netdev != nil {
+ return *x.Netdev
+ }
+ return ""
+}
+
+func (x *TunfileEntry) GetDetached() bool {
+ if x != nil && x.Detached != nil {
+ return *x.Detached
+ }
+ return false
+}
+
+func (x *TunfileEntry) GetNsId() uint32 {
+ if x != nil && x.NsId != nil {
+ return *x.NsId
+ }
+ return 0
+}
+
+type TunLinkEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Flags *uint32 `protobuf:"varint,1,req,name=flags" json:"flags,omitempty"`
+ Owner *int32 `protobuf:"varint,2,req,name=owner" json:"owner,omitempty"`
+ Group *int32 `protobuf:"varint,3,req,name=group" json:"group,omitempty"`
+ Vnethdr *uint32 `protobuf:"varint,4,req,name=vnethdr" json:"vnethdr,omitempty"`
+ Sndbuf *uint32 `protobuf:"varint,5,req,name=sndbuf" json:"sndbuf,omitempty"`
+}
+
+func (x *TunLinkEntry) Reset() {
+ *x = TunLinkEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tun_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TunLinkEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TunLinkEntry) ProtoMessage() {}
+
+func (x *TunLinkEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_tun_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TunLinkEntry.ProtoReflect.Descriptor instead.
+func (*TunLinkEntry) Descriptor() ([]byte, []int) {
+ return file_tun_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *TunLinkEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *TunLinkEntry) GetOwner() int32 {
+ if x != nil && x.Owner != nil {
+ return *x.Owner
+ }
+ return 0
+}
+
+func (x *TunLinkEntry) GetGroup() int32 {
+ if x != nil && x.Group != nil {
+ return *x.Group
+ }
+ return 0
+}
+
+func (x *TunLinkEntry) GetVnethdr() uint32 {
+ if x != nil && x.Vnethdr != nil {
+ return *x.Vnethdr
+ }
+ return 0
+}
+
+func (x *TunLinkEntry) GetSndbuf() uint32 {
+ if x != nil && x.Sndbuf != nil {
+ return *x.Sndbuf
+ }
+ return 0
+}
+
+var File_tun_proto protoreflect.FileDescriptor
+
+var file_tun_proto_rawDesc = []byte{
+ 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x0d, 0x74, 0x75, 0x6e, 0x66, 0x69,
+ 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x65, 0x74, 0x64,
+ 0x65, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76,
+ 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x08, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x13, 0x0a, 0x05,
+ 0x6e, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6e, 0x73, 0x49,
+ 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x74, 0x75, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x65,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67,
+ 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05,
+ 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x18, 0x03, 0x20, 0x02, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a,
+ 0x07, 0x76, 0x6e, 0x65, 0x74, 0x68, 0x64, 0x72, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07,
+ 0x76, 0x6e, 0x65, 0x74, 0x68, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6e, 0x64, 0x62, 0x75,
+ 0x66, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x6e, 0x64, 0x62, 0x75, 0x66,
+}
+
+var (
+ file_tun_proto_rawDescOnce sync.Once
+ file_tun_proto_rawDescData = file_tun_proto_rawDesc
+)
+
+func file_tun_proto_rawDescGZIP() []byte {
+ file_tun_proto_rawDescOnce.Do(func() {
+ file_tun_proto_rawDescData = protoimpl.X.CompressGZIP(file_tun_proto_rawDescData)
+ })
+ return file_tun_proto_rawDescData
+}
+
+var file_tun_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_tun_proto_goTypes = []interface{}{
+ (*TunfileEntry)(nil), // 0: tunfile_entry
+ (*TunLinkEntry)(nil), // 1: tun_link_entry
+}
+var file_tun_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_tun_proto_init() }
+func file_tun_proto_init() {
+ if File_tun_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_tun_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TunfileEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tun_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TunLinkEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_tun_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_tun_proto_goTypes,
+ DependencyIndexes: file_tun_proto_depIdxs,
+ MessageInfos: file_tun_proto_msgTypes,
+ }.Build()
+ File_tun_proto = out.File
+ file_tun_proto_rawDesc = nil
+ file_tun_proto_goTypes = nil
+ file_tun_proto_depIdxs = nil
+}
diff --git a/crit/images/tun.proto b/crit/images/tun.proto
new file mode 100644
index 0000000..ad61037
--- /dev/null
+++ b/crit/images/tun.proto
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message tunfile_entry {
+ required uint32 id = 1;
+ optional string netdev = 2;
+ optional bool detached = 3;
+ optional uint32 ns_id = 4;
+};
+
+message tun_link_entry {
+ required uint32 flags = 1 [(criu).hex = true];
+ required int32 owner = 2;
+ required int32 group = 3;
+ required uint32 vnethdr = 4;
+ required uint32 sndbuf = 5;
+};
diff --git a/crit/images/userns.pb.go b/crit/images/userns.pb.go
new file mode 100644
index 0000000..57b30d4
--- /dev/null
+++ b/crit/images/userns.pb.go
@@ -0,0 +1,238 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: userns.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UidGidExtent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ First *uint32 `protobuf:"varint,1,req,name=first" json:"first,omitempty"`
+ LowerFirst *uint32 `protobuf:"varint,2,req,name=lower_first,json=lowerFirst" json:"lower_first,omitempty"`
+ Count *uint32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
+}
+
+func (x *UidGidExtent) Reset() {
+ *x = UidGidExtent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_userns_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UidGidExtent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UidGidExtent) ProtoMessage() {}
+
+func (x *UidGidExtent) ProtoReflect() protoreflect.Message {
+ mi := &file_userns_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UidGidExtent.ProtoReflect.Descriptor instead.
+func (*UidGidExtent) Descriptor() ([]byte, []int) {
+ return file_userns_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UidGidExtent) GetFirst() uint32 {
+ if x != nil && x.First != nil {
+ return *x.First
+ }
+ return 0
+}
+
+func (x *UidGidExtent) GetLowerFirst() uint32 {
+ if x != nil && x.LowerFirst != nil {
+ return *x.LowerFirst
+ }
+ return 0
+}
+
+func (x *UidGidExtent) GetCount() uint32 {
+ if x != nil && x.Count != nil {
+ return *x.Count
+ }
+ return 0
+}
+
+type UsernsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UidMap []*UidGidExtent `protobuf:"bytes,1,rep,name=uid_map,json=uidMap" json:"uid_map,omitempty"`
+ GidMap []*UidGidExtent `protobuf:"bytes,2,rep,name=gid_map,json=gidMap" json:"gid_map,omitempty"`
+}
+
+func (x *UsernsEntry) Reset() {
+ *x = UsernsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_userns_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UsernsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UsernsEntry) ProtoMessage() {}
+
+func (x *UsernsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_userns_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UsernsEntry.ProtoReflect.Descriptor instead.
+func (*UsernsEntry) Descriptor() ([]byte, []int) {
+ return file_userns_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UsernsEntry) GetUidMap() []*UidGidExtent {
+ if x != nil {
+ return x.UidMap
+ }
+ return nil
+}
+
+func (x *UsernsEntry) GetGidMap() []*UidGidExtent {
+ if x != nil {
+ return x.GidMap
+ }
+ return nil
+}
+
+var File_userns_proto protoreflect.FileDescriptor
+
+var file_userns_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d,
+ 0x0a, 0x0e, 0x75, 0x69, 0x64, 0x5f, 0x67, 0x69, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74,
+ 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f,
+ 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x6c, 0x6f, 0x77,
+ 0x65, 0x72, 0x46, 0x69, 0x72, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x62, 0x0a,
+ 0x0c, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x28, 0x0a,
+ 0x07, 0x75, 0x69, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f,
+ 0x2e, 0x75, 0x69, 0x64, 0x5f, 0x67, 0x69, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52,
+ 0x06, 0x75, 0x69, 0x64, 0x4d, 0x61, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x67, 0x69, 0x64, 0x5f, 0x6d,
+ 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x69, 0x64, 0x5f, 0x67,
+ 0x69, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x67, 0x69, 0x64, 0x4d, 0x61,
+ 0x70,
+}
+
+var (
+ file_userns_proto_rawDescOnce sync.Once
+ file_userns_proto_rawDescData = file_userns_proto_rawDesc
+)
+
+func file_userns_proto_rawDescGZIP() []byte {
+ file_userns_proto_rawDescOnce.Do(func() {
+ file_userns_proto_rawDescData = protoimpl.X.CompressGZIP(file_userns_proto_rawDescData)
+ })
+ return file_userns_proto_rawDescData
+}
+
+var file_userns_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_userns_proto_goTypes = []interface{}{
+ (*UidGidExtent)(nil), // 0: uid_gid_extent
+ (*UsernsEntry)(nil), // 1: userns_entry
+}
+var file_userns_proto_depIdxs = []int32{
+ 0, // 0: userns_entry.uid_map:type_name -> uid_gid_extent
+ 0, // 1: userns_entry.gid_map:type_name -> uid_gid_extent
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_userns_proto_init() }
+func file_userns_proto_init() {
+ if File_userns_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_userns_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UidGidExtent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_userns_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UsernsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_userns_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_userns_proto_goTypes,
+ DependencyIndexes: file_userns_proto_depIdxs,
+ MessageInfos: file_userns_proto_msgTypes,
+ }.Build()
+ File_userns_proto = out.File
+ file_userns_proto_rawDesc = nil
+ file_userns_proto_goTypes = nil
+ file_userns_proto_depIdxs = nil
+}
diff --git a/crit/images/userns.proto b/crit/images/userns.proto
new file mode 100644
index 0000000..3a23cbb
--- /dev/null
+++ b/crit/images/userns.proto
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message uid_gid_extent {
+ required uint32 first = 1;
+ required uint32 lower_first = 2;
+ required uint32 count = 3;
+}
+
+message userns_entry {
+ repeated uid_gid_extent uid_map = 1;
+ repeated uid_gid_extent gid_map = 2;
+}
diff --git a/crit/images/utsns.pb.go b/crit/images/utsns.pb.go
new file mode 100644
index 0000000..64d7139
--- /dev/null
+++ b/crit/images/utsns.pb.go
@@ -0,0 +1,152 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: utsns.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UtsnsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Nodename *string `protobuf:"bytes,1,req,name=nodename" json:"nodename,omitempty"`
+ Domainname *string `protobuf:"bytes,2,req,name=domainname" json:"domainname,omitempty"`
+}
+
+func (x *UtsnsEntry) Reset() {
+ *x = UtsnsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_utsns_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UtsnsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UtsnsEntry) ProtoMessage() {}
+
+func (x *UtsnsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_utsns_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UtsnsEntry.ProtoReflect.Descriptor instead.
+func (*UtsnsEntry) Descriptor() ([]byte, []int) {
+ return file_utsns_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UtsnsEntry) GetNodename() string {
+ if x != nil && x.Nodename != nil {
+ return *x.Nodename
+ }
+ return ""
+}
+
+func (x *UtsnsEntry) GetDomainname() string {
+ if x != nil && x.Domainname != nil {
+ return *x.Domainname
+ }
+ return ""
+}
+
+var File_utsns_proto protoreflect.FileDescriptor
+
+var file_utsns_proto_rawDesc = []byte{
+ 0x0a, 0x0b, 0x75, 0x74, 0x73, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a,
+ 0x0b, 0x75, 0x74, 0x73, 0x6e, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08,
+ 0x6e, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08,
+ 0x6e, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x6d, 0x61,
+ 0x69, 0x6e, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f,
+ 0x6d, 0x61, 0x69, 0x6e, 0x6e, 0x61, 0x6d, 0x65,
+}
+
+var (
+ file_utsns_proto_rawDescOnce sync.Once
+ file_utsns_proto_rawDescData = file_utsns_proto_rawDesc
+)
+
+func file_utsns_proto_rawDescGZIP() []byte {
+ file_utsns_proto_rawDescOnce.Do(func() {
+ file_utsns_proto_rawDescData = protoimpl.X.CompressGZIP(file_utsns_proto_rawDescData)
+ })
+ return file_utsns_proto_rawDescData
+}
+
+var file_utsns_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_utsns_proto_goTypes = []interface{}{
+ (*UtsnsEntry)(nil), // 0: utsns_entry
+}
+var file_utsns_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_utsns_proto_init() }
+func file_utsns_proto_init() {
+ if File_utsns_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_utsns_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UtsnsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_utsns_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_utsns_proto_goTypes,
+ DependencyIndexes: file_utsns_proto_depIdxs,
+ MessageInfos: file_utsns_proto_msgTypes,
+ }.Build()
+ File_utsns_proto = out.File
+ file_utsns_proto_rawDesc = nil
+ file_utsns_proto_goTypes = nil
+ file_utsns_proto_depIdxs = nil
+}
diff --git a/crit/images/utsns.proto b/crit/images/utsns.proto
new file mode 100644
index 0000000..efc689f
--- /dev/null
+++ b/crit/images/utsns.proto
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message utsns_entry {
+ required string nodename = 1;
+ required string domainname = 2;
+}
diff --git a/crit/images/vma.pb.go b/crit/images/vma.pb.go
new file mode 100644
index 0000000..0343500
--- /dev/null
+++ b/crit/images/vma.pb.go
@@ -0,0 +1,237 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.5
+// source: vma.proto
+
+package images
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type VmaEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Start *uint64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"`
+ End *uint64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"`
+ Pgoff *uint64 `protobuf:"varint,3,req,name=pgoff" json:"pgoff,omitempty"`
+ Shmid *uint64 `protobuf:"varint,4,req,name=shmid" json:"shmid,omitempty"`
+ Prot *uint32 `protobuf:"varint,5,req,name=prot" json:"prot,omitempty"`
+ Flags *uint32 `protobuf:"varint,6,req,name=flags" json:"flags,omitempty"`
+ Status *uint32 `protobuf:"varint,7,req,name=status" json:"status,omitempty"`
+ // This fd thing is unused in the image, it was lost
+ // while switching from execve restore model. It is
+ // -1 by default.
+ Fd *int64 `protobuf:"zigzag64,8,req,name=fd" json:"fd,omitempty"`
+ // madvise flags bitmap
+ Madv *uint64 `protobuf:"varint,9,opt,name=madv" json:"madv,omitempty"`
+ // file status flags
+ Fdflags *uint32 `protobuf:"varint,10,opt,name=fdflags" json:"fdflags,omitempty"`
+}
+
+func (x *VmaEntry) Reset() {
+ *x = VmaEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_vma_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VmaEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VmaEntry) ProtoMessage() {}
+
+func (x *VmaEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_vma_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VmaEntry.ProtoReflect.Descriptor instead.
+func (*VmaEntry) Descriptor() ([]byte, []int) {
+ return file_vma_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *VmaEntry) GetStart() uint64 {
+ if x != nil && x.Start != nil {
+ return *x.Start
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetEnd() uint64 {
+ if x != nil && x.End != nil {
+ return *x.End
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetPgoff() uint64 {
+ if x != nil && x.Pgoff != nil {
+ return *x.Pgoff
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetShmid() uint64 {
+ if x != nil && x.Shmid != nil {
+ return *x.Shmid
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetProt() uint32 {
+ if x != nil && x.Prot != nil {
+ return *x.Prot
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetFlags() uint32 {
+ if x != nil && x.Flags != nil {
+ return *x.Flags
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetStatus() uint32 {
+ if x != nil && x.Status != nil {
+ return *x.Status
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetFd() int64 {
+ if x != nil && x.Fd != nil {
+ return *x.Fd
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetMadv() uint64 {
+ if x != nil && x.Madv != nil {
+ return *x.Madv
+ }
+ return 0
+}
+
+func (x *VmaEntry) GetFdflags() uint32 {
+ if x != nil && x.Fdflags != nil {
+ return *x.Fdflags
+ }
+ return 0
+}
+
+var File_vma_proto protoreflect.FileDescriptor
+
+var file_vma_proto_rawDesc = []byte{
+ 0x0a, 0x09, 0x76, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x6f, 0x70, 0x74,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x02, 0x0a, 0x09, 0x76, 0x6d, 0x61, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61,
+ 0x72, 0x74, 0x12, 0x17, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x42,
+ 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70,
+ 0x67, 0x6f, 0x66, 0x66, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x70, 0x67, 0x6f, 0x66,
+ 0x66, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x6d, 0x69, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04,
+ 0x52, 0x05, 0x73, 0x68, 0x6d, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x04, 0x70, 0x72, 0x6f, 0x74, 0x18,
+ 0x05, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x0e, 0xd2, 0x3f, 0x0b, 0x1a, 0x09, 0x6d, 0x6d, 0x61, 0x70,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x52, 0x04, 0x70, 0x72, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x05, 0x66,
+ 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x42, 0x0f, 0xd2, 0x3f, 0x0c, 0x1a,
+ 0x0a, 0x6d, 0x6d, 0x61, 0x70, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x02,
+ 0x28, 0x0d, 0x42, 0x10, 0xd2, 0x3f, 0x0d, 0x1a, 0x0b, 0x6d, 0x6d, 0x61, 0x70, 0x2e, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02,
+ 0x66, 0x64, 0x18, 0x08, 0x20, 0x02, 0x28, 0x12, 0x52, 0x02, 0x66, 0x64, 0x12, 0x19, 0x0a, 0x04,
+ 0x6d, 0x61, 0x64, 0x76, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08,
+ 0x01, 0x52, 0x04, 0x6d, 0x61, 0x64, 0x76, 0x12, 0x1f, 0x0a, 0x07, 0x66, 0x64, 0x66, 0x6c, 0x61,
+ 0x67, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x05, 0xd2, 0x3f, 0x02, 0x08, 0x01, 0x52,
+ 0x07, 0x66, 0x64, 0x66, 0x6c, 0x61, 0x67, 0x73,
+}
+
+var (
+ file_vma_proto_rawDescOnce sync.Once
+ file_vma_proto_rawDescData = file_vma_proto_rawDesc
+)
+
+func file_vma_proto_rawDescGZIP() []byte {
+ file_vma_proto_rawDescOnce.Do(func() {
+ file_vma_proto_rawDescData = protoimpl.X.CompressGZIP(file_vma_proto_rawDescData)
+ })
+ return file_vma_proto_rawDescData
+}
+
+var file_vma_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_vma_proto_goTypes = []interface{}{
+ (*VmaEntry)(nil), // 0: vma_entry
+}
+var file_vma_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_vma_proto_init() }
+func file_vma_proto_init() {
+ if File_vma_proto != nil {
+ return
+ }
+ file_opts_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_vma_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VmaEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_vma_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_vma_proto_goTypes,
+ DependencyIndexes: file_vma_proto_depIdxs,
+ MessageInfos: file_vma_proto_msgTypes,
+ }.Build()
+ File_vma_proto = out.File
+ file_vma_proto_rawDesc = nil
+ file_vma_proto_goTypes = nil
+ file_vma_proto_depIdxs = nil
+}
diff --git a/crit/images/vma.proto b/crit/images/vma.proto
new file mode 100644
index 0000000..0c07d51
--- /dev/null
+++ b/crit/images/vma.proto
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+import "opts.proto";
+
+message vma_entry {
+ required uint64 start = 1 [(criu).hex = true];
+ required uint64 end = 2 [(criu).hex = true];
+ required uint64 pgoff = 3;
+ required uint64 shmid = 4;
+ required uint32 prot = 5 [(criu).flags = "mmap.prot" ];
+ required uint32 flags = 6 [(criu).flags = "mmap.flags" ];
+ required uint32 status = 7 [(criu).flags = "mmap.status" ];
+ /*
+ * This fd thing is unused in the image, it was lost
+ * while switching from execve restore model. It is
+ * -1 by default.
+ */
+ required sint64 fd = 8;
+
+ /* madvise flags bitmap */
+ optional uint64 madv = 9 [(criu).hex = true];
+
+ /* file status flags */
+ optional uint32 fdflags = 10 [(criu).hex = true];
+}
diff --git a/crit/stats.go b/crit/stats.go
new file mode 100644
index 0000000..898bb90
--- /dev/null
+++ b/crit/stats.go
@@ -0,0 +1,51 @@
+package crit
+
+import (
+ "errors"
+ "path/filepath"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+)
+
+const (
+ StatsDump = "stats-dump"
+ StatsRestore = "stats-restore"
+)
+
+// Helper function to load stats file into Go struct
+func getStats(path string) (*images.StatsEntry, error) {
+ c := New(path, "", "", false, false)
+ statsImg, err := c.Decode()
+ if err != nil {
+ return nil, err
+ }
+
+ stats, ok := statsImg.Entries[0].Message.(*images.StatsEntry)
+ if !ok {
+ return nil, errors.New("Failed to type assert stats image")
+ }
+
+ return stats, nil
+}
+
+// GetDumpStats returns the dump statistics of a checkpoint.
+// dir is the path to the directory with the checkpoint images.
+func GetDumpStats(dir string) (*images.DumpStatsEntry, error) {
+ stats, err := getStats(filepath.Join(dir, StatsDump))
+ if err != nil {
+ return nil, err
+ }
+
+ return stats.GetDump(), nil
+}
+
+// GetRestoreStats returns the restore statistics of a checkpoint.
+// dir is the path to the directory with the checkpoint images.
+func GetRestoreStats(dir string) (*images.RestoreStatsEntry, error) {
+ stats, err := getStats(filepath.Join(dir, StatsRestore))
+ if err != nil {
+ return nil, err
+ }
+
+ return stats.GetRestore(), nil
+}
diff --git a/crit/utils.go b/crit/utils.go
new file mode 100644
index 0000000..3de826e
--- /dev/null
+++ b/crit/utils.go
@@ -0,0 +1,231 @@
+package crit
+
+import (
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "path/filepath"
+ "strconv"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+ "github.com/checkpoint-restore/go-criu/v6/magic"
+)
+
+// Helper to decode magic name from hex value
+func readMagic(f *os.File) (string, error) {
+ magicMap := magic.LoadMagic()
+ // Read magic
+ magicBuf := make([]byte, 4)
+ if _, err := f.Read(magicBuf); err != nil {
+ return "", err
+ }
+ magicValue := uint64(binary.LittleEndian.Uint32(magicBuf))
+ if magicValue == magicMap.ByName["IMG_COMMON"] ||
+ magicValue == magicMap.ByName["IMG_SERVICE"] {
+ if _, err := f.Read(magicBuf); err != nil {
+ return "", err
+ }
+ magicValue = uint64(binary.LittleEndian.Uint32(magicBuf))
+ }
+
+ // Identify magic
+ magicName, ok := magicMap.ByValue[magicValue]
+ if !ok {
+ return "", errors.New(fmt.Sprintf("Unknown magic 0x%x", magicValue))
+ }
+
+ return magicName, nil
+}
+
+// Helper to convert bytes into a more readable unit
+func countBytes(n int64) string {
+ const UNIT int64 = 1024
+ if n < UNIT {
+ return fmt.Sprint(n, " B")
+ }
+ div, exp := UNIT, 0
+ for i := n / UNIT; i >= UNIT; i /= UNIT {
+ div *= UNIT
+ exp++
+ }
+ return fmt.Sprintf("%.1f %cB", float64(n)/float64(div), "KMGTPE"[exp])
+}
+
+// Function to count number of top-level entries
+func countImg(f *os.File) (*CriuImage, error) {
+ img := CriuImage{}
+ var err error
+
+ // Identify magic
+ if img.Magic, err = readMagic(f); err != nil {
+ return nil, err
+ }
+
+ count := 0
+ sizeBuf := make([]byte, 4)
+ // Read payload size and increment counter until EOF
+ for {
+ if n, err := f.Read(sizeBuf); err != nil {
+ if n == 0 && err == io.EOF {
+ break
+ }
+ return nil, err
+ }
+
+ payloadSize := int64(binary.LittleEndian.Uint32(sizeBuf))
+ if _, err = f.Seek(payloadSize, 1); err != nil {
+ return nil, err
+ }
+ count++
+ }
+ // Decrement counter by 1 for pagemap file,
+ // as pagemap head is not a top-level entry
+ if img.Magic == "PAGEMAP" {
+ count--
+ }
+
+ entry := CriuEntry{Extra: strconv.Itoa(count)}
+ img.Entries = append(img.Entries, &entry)
+ return &img, nil
+}
+
+// Helper to decode image when file path is given
+func getImg(path string) (*CriuImage, error) {
+ file, err := os.Open(path)
+ if err != nil {
+ return nil, errors.New(fmt.Sprint("Error opening binary file: ", err))
+ }
+ defer file.Close()
+
+ return decodeImg(file, false)
+}
+
+// Global variables to cache loaded images
+var (
+ filesImg, regImg, pipeImg, unixSkImg *CriuImage
+)
+
+// Helper to get file path for exploring file descriptors
+func getFilePath(dir string, fId uint32, fType images.FdTypes) (string, error) {
+ var filePath string
+ var err error
+ // Get open files
+ if filesImg == nil {
+ filesImg, err = getImg(filepath.Join(dir, "files.img"))
+ if err != nil {
+ return "", err
+ }
+ }
+
+ // Check if file entry is present
+ var file *images.FileEntry
+ for _, entry := range filesImg.Entries {
+ file = entry.Message.(*images.FileEntry)
+ if file.GetId() == fId {
+ break
+ }
+ }
+
+ switch fType {
+ case images.FdTypes_REG:
+ filePath, err = getRegFilePath(dir, file, fId)
+ case images.FdTypes_PIPE:
+ filePath, err = getPipeFilePath(dir, file, fId)
+ case images.FdTypes_UNIXSK:
+ filePath, err = getUnixSkFilePath(dir, file, fId)
+ default:
+ filePath = fmt.Sprintf("%s.%d", images.FdTypes_name[int32(fType)], fId)
+ }
+
+ return filePath, err
+}
+
+// Helper to get file path of regular files
+func getRegFilePath(dir string, file *images.FileEntry, fId uint32) (string, error) {
+ var err error
+ if file != nil {
+ if file.GetReg() != nil {
+ return file.GetReg().GetName(), nil
+ }
+ return "Unknown path", nil
+ }
+
+ if regImg == nil {
+ regImg, err = getImg(filepath.Join(dir, "reg-files.img"))
+ if err != nil {
+ return "", err
+ }
+ }
+ for _, entry := range regImg.Entries {
+ regFile := entry.Message.(*images.RegFileEntry)
+ if regFile.GetId() == fId {
+ return regFile.GetName(), nil
+ }
+ }
+
+ return "Unknown path", nil
+}
+
+// Helper to get file path of pipe files
+func getPipeFilePath(dir string, file *images.FileEntry, fId uint32) (string, error) {
+ var err error
+ if file != nil {
+ if file.GetPipe() != nil {
+ return fmt.Sprintf("pipe[%d]", file.GetPipe().GetPipeId()), nil
+ }
+ return "pipe[?]", nil
+ }
+
+ if pipeImg == nil {
+ pipeImg, err = getImg(filepath.Join(dir, "pipes.img"))
+ if err != nil {
+ return "", err
+ }
+ }
+ for _, entry := range pipeImg.Entries {
+ pipeFile := entry.Message.(*images.PipeEntry)
+ if pipeFile.GetId() == fId {
+ return fmt.Sprintf("pipe[%d]", pipeFile.GetPipeId()), nil
+ }
+ }
+
+ return "pipe[?]", nil
+}
+
+// Helper to get file path of UNIX socket files
+func getUnixSkFilePath(dir string, file *images.FileEntry, fId uint32) (string, error) {
+ var err error
+ if file != nil {
+ if file.GetUsk() != nil {
+ return fmt.Sprintf(
+ "unix[%d (%d) %s]",
+ file.GetUsk().GetIno(),
+ file.GetUsk().GetPeer(),
+ file.GetUsk().GetName(),
+ ), nil
+ }
+ return "unix[?]", nil
+ }
+
+ if unixSkImg == nil {
+ unixSkImg, err = getImg(filepath.Join(dir, "unixsk.img"))
+ if err != nil {
+ return "", err
+ }
+ }
+ for _, entry := range unixSkImg.Entries {
+ unixSkFile := entry.Message.(*images.UnixSkEntry)
+ if unixSkFile.GetId() == fId {
+ return fmt.Sprintf(
+ "unix[%d (%d) %s]",
+ unixSkFile.GetIno(),
+ unixSkFile.GetPeer(),
+ unixSkFile.GetName(),
+ ), nil
+ }
+ }
+
+ return "unix[?]", nil
+}
diff --git a/features.go b/features.go
new file mode 100644
index 0000000..4e779d9
--- /dev/null
+++ b/features.go
@@ -0,0 +1,45 @@
+package criu
+
+import (
+ "fmt"
+
+ "github.com/checkpoint-restore/go-criu/v6/rpc"
+)
+
+// Feature checking in go-criu is based on the libcriu feature checking function.
+
+// Feature checking allows the user to check if CRIU supports
+// certain features. There are CRIU features which do not depend
+// on the version of CRIU but on kernel features or architecture.
+//
+// One example is memory tracking. Memory tracking can be disabled
+// in the kernel or there are architectures which do not support
+// it (aarch64 for example). By using the feature check a libcriu
+// user can easily query CRIU if a certain feature is available.
+//
+// The features which should be checked can be marked in the
+// structure 'struct criu_feature_check'. Each structure member
+// that is set to true will result in CRIU checking for the
+// availability of that feature in the current combination of
+// CRIU/kernel/architecture.
+//
+// Available features will be set to true when the function
+// returns successfully. Missing features will be set to false.
+
+func (c *Criu) FeatureCheck(features *rpc.CriuFeatures) (*rpc.CriuFeatures, error) {
+ resp, err := c.doSwrkWithResp(
+ rpc.CriuReqType_FEATURE_CHECK,
+ nil,
+ nil,
+ features,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ if resp.GetType() != rpc.CriuReqType_FEATURE_CHECK {
+ return nil, fmt.Errorf("Unexpected CRIU RPC response")
+ }
+
+ return features, nil
+}
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..b70cd0d
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,9 @@
+module github.com/checkpoint-restore/go-criu/v6
+
+go 1.16
+
+require (
+ github.com/spf13/cobra v1.5.0
+ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
+ google.golang.org/protobuf v1.28.1
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..d48fdeb
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,20 @@
+github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
+github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=
+github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
+google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
diff --git a/magic/magic.go b/magic/magic.go
new file mode 100644
index 0000000..3d5aad6
--- /dev/null
+++ b/magic/magic.go
@@ -0,0 +1,158 @@
+// Code generated by magicgen. DO NOT EDIT.
+
+package magic
+
+type MagicMap struct {
+ ByName map[string]uint64
+ ByValue map[uint64]string
+}
+
+func LoadMagic() MagicMap {
+ magicMap := MagicMap{
+ ByName: make(map[string]uint64),
+ ByValue: make(map[uint64]string),
+ }
+ magicMap.ByName["APPARMOR"] = 1497509959
+ magicMap.ByValue[1497509959] = "APPARMOR"
+ magicMap.ByName["AUTOFS"] = 1228224835
+ magicMap.ByValue[1228224835] = "AUTOFS"
+ magicMap.ByName["BINFMT_MISC"] = 1731474211
+ magicMap.ByValue[1731474211] = "BINFMT_MISC"
+ magicMap.ByName["BPFMAP_DATA"] = 1681014835
+ magicMap.ByValue[1681014835] = "BPFMAP_DATA"
+ magicMap.ByName["BPFMAP_FILE"] = 1464885570
+ magicMap.ByValue[1464885570] = "BPFMAP_FILE"
+ magicMap.ByName["CGROUP"] = 1496855344
+ magicMap.ByValue[1496855344] = "CGROUP"
+ magicMap.ByName["CORE"] = 1426405447
+ magicMap.ByValue[1426405447] = "CORE"
+ magicMap.ByName["CPUINFO"] = 1631600659
+ magicMap.ByValue[1631600659] = "CPUINFO"
+ magicMap.ByName["CREDS"] = 1409430855
+ magicMap.ByValue[1409430855] = "CREDS"
+ magicMap.ByName["CRTOOLS_IMAGES_V1_1"] = 2
+ magicMap.ByValue[2] = "CRTOOLS_IMAGES_V1_1"
+ magicMap.ByName["EVENTFD_FILE"] = 1146238754
+ magicMap.ByValue[1146238754] = "EVENTFD_FILE"
+ magicMap.ByName["EVENTPOLL_FILE"] = 1157773400
+ magicMap.ByValue[1157773400] = "EVENTPOLL_FILE"
+ magicMap.ByName["EVENTPOLL_TFD"] = 1145255750
+ magicMap.ByValue[1145255750] = "EVENTPOLL_TFD"
+ magicMap.ByName["EXT_FILES"] = 1495619137
+ magicMap.ByValue[1495619137] = "EXT_FILES"
+ magicMap.ByName["FANOTIFY_FILE"] = 1426678050
+ magicMap.ByValue[1426678050] = "FANOTIFY_FILE"
+ magicMap.ByName["FANOTIFY_MARK"] = 1448108085
+ magicMap.ByValue[1448108085] = "FANOTIFY_MARK"
+ magicMap.ByName["FDINFO"] = 1445017394
+ magicMap.ByValue[1445017394] = "FDINFO"
+ magicMap.ByName["FIFO_DATA"] = 1496526932
+ magicMap.ByValue[1496526932] = "FIFO_DATA"
+ magicMap.ByName["FIFO"] = 1479952697
+ magicMap.ByValue[1479952697] = "FIFO"
+ magicMap.ByName["FILES"] = 1445998904
+ magicMap.ByValue[1445998904] = "FILES"
+ magicMap.ByName["FILE_LOCKS"] = 1412576790
+ magicMap.ByValue[1412576790] = "FILE_LOCKS"
+ magicMap.ByName["FS"] = 1363163410
+ magicMap.ByValue[1363163410] = "FS"
+ magicMap.ByName["GHOST_FILE"] = 1381512709
+ magicMap.ByValue[1381512709] = "GHOST_FILE"
+ magicMap.ByName["IDS"] = 1413685296
+ magicMap.ByValue[1413685296] = "IDS"
+ magicMap.ByName["IMG_COMMON"] = 1414939417
+ magicMap.ByValue[1414939417] = "IMG_COMMON"
+ magicMap.ByName["IMG_SERVICE"] = 1427134784
+ magicMap.ByValue[1427134784] = "IMG_SERVICE"
+ magicMap.ByName["INETSK"] = 1447311441
+ magicMap.ByValue[1447311441] = "INETSK"
+ magicMap.ByName["INOTIFY_FILE"] = 1212302385
+ magicMap.ByValue[1212302385] = "INOTIFY_FILE"
+ magicMap.ByName["INOTIFY_WD"] = 1414930441
+ magicMap.ByValue[1414930441] = "INOTIFY_WD"
+ magicMap.ByName["INVENTORY"] = 1479618838
+ magicMap.ByValue[1479618838] = "INVENTORY"
+ magicMap.ByName["IPCNS_MSG"] = 1430599479
+ magicMap.ByValue[1430599479] = "IPCNS_MSG"
+ magicMap.ByName["IPCNS_SEM"] = 1498886169
+ magicMap.ByValue[1498886169] = "IPCNS_SEM"
+ magicMap.ByName["IPCNS_SHM"] = 1177038916
+ magicMap.ByValue[1177038916] = "IPCNS_SHM"
+ magicMap.ByName["IPC_VAR"] = 1393643527
+ magicMap.ByValue[1393643527] = "IPC_VAR"
+ magicMap.ByName["IRMAP_CACHE"] = 1459634265
+ magicMap.ByValue[1459634265] = "IRMAP_CACHE"
+ magicMap.ByName["ITIMERS"] = 1464221782
+ magicMap.ByValue[1464221782] = "ITIMERS"
+ magicMap.ByName["KDAT"] = 1459762264
+ magicMap.ByValue[1459762264] = "KDAT"
+ magicMap.ByName["MEMFD_INODE"] = 1212495001
+ magicMap.ByValue[1212495001] = "MEMFD_INODE"
+ magicMap.ByName["MM"] = 1464412192
+ magicMap.ByValue[1464412192] = "MM"
+ magicMap.ByName["MNTS"] = 1431714088
+ magicMap.ByValue[1431714088] = "MNTS"
+ magicMap.ByName["NETDEV"] = 1463236945
+ magicMap.ByValue[1463236945] = "NETDEV"
+ magicMap.ByName["NETLINK_SK"] = 1476417044
+ magicMap.ByValue[1476417044] = "NETLINK_SK"
+ magicMap.ByName["NETNS"] = 1435711314
+ magicMap.ByValue[1435711314] = "NETNS"
+ magicMap.ByName["NS_FILES"] = 1631141905
+ magicMap.ByValue[1631141905] = "NS_FILES"
+ magicMap.ByName["PACKETSK"] = 1615152664
+ magicMap.ByValue[1615152664] = "PACKETSK"
+ magicMap.ByName["PAGEMAP"] = 1443381285
+ magicMap.ByValue[1443381285] = "PAGEMAP"
+ magicMap.ByName["PIDNS"] = 1628795686
+ magicMap.ByValue[1628795686] = "PIDNS"
+ magicMap.ByName["PIPES_DATA"] = 1447376649
+ magicMap.ByValue[1447376649] = "PIPES_DATA"
+ magicMap.ByName["PIPES"] = 1448162645
+ magicMap.ByValue[1448162645] = "PIPES"
+ magicMap.ByName["POSIX_TIMERS"] = 1382037847
+ magicMap.ByValue[1382037847] = "POSIX_TIMERS"
+ magicMap.ByName["PSTREE"] = 1344745520
+ magicMap.ByValue[1344745520] = "PSTREE"
+ magicMap.ByName["REG_FILES"] = 1345730102
+ magicMap.ByValue[1345730102] = "REG_FILES"
+ magicMap.ByName["REMAP_FPATH"] = 1494432084
+ magicMap.ByValue[1494432084] = "REMAP_FPATH"
+ magicMap.ByName["RLIMIT"] = 1460746533
+ magicMap.ByValue[1460746533] = "RLIMIT"
+ magicMap.ByName["SECCOMP"] = 1681993801
+ magicMap.ByValue[1681993801] = "SECCOMP"
+ magicMap.ByName["SIGACT"] = 1429488129
+ magicMap.ByValue[1429488129] = "SIGACT"
+ magicMap.ByName["SIGNALFD"] = 1462908960
+ magicMap.ByValue[1462908960] = "SIGNALFD"
+ magicMap.ByName["SIGNAL"] = 1495619143
+ magicMap.ByValue[1495619143] = "SIGNAL"
+ magicMap.ByName["SK_QUEUES"] = 1445347366
+ magicMap.ByValue[1445347366] = "SK_QUEUES"
+ magicMap.ByName["STATS"] = 1460220678
+ magicMap.ByValue[1460220678] = "STATS"
+ magicMap.ByName["TCP_STREAM"] = 1363563782
+ magicMap.ByValue[1363563782] = "TCP_STREAM"
+ magicMap.ByName["TIMENS"] = 1125205043
+ magicMap.ByValue[1125205043] = "TIMENS"
+ magicMap.ByName["TIMERFD"] = 1346975506
+ magicMap.ByValue[1346975506] = "TIMERFD"
+ magicMap.ByName["TTY_DATA"] = 1497444390
+ magicMap.ByValue[1497444390] = "TTY_DATA"
+ magicMap.ByName["TTY_FILES"] = 1497575461
+ magicMap.ByValue[1497575461] = "TTY_FILES"
+ magicMap.ByName["TTY_INFO"] = 1497706550
+ magicMap.ByValue[1497706550] = "TTY_INFO"
+ magicMap.ByName["TUNFILE"] = 1460942673
+ magicMap.ByValue[1460942673] = "TUNFILE"
+ magicMap.ByName["UNIXSK"] = 1412905283
+ magicMap.ByValue[1412905283] = "UNIXSK"
+ magicMap.ByName["USERNS"] = 1430735110
+ magicMap.ByValue[1430735110] = "USERNS"
+ magicMap.ByName["UTSNS"] = 1413952003
+ magicMap.ByValue[1413952003] = "UTSNS"
+ magicMap.ByName["VMAS"] = 1410479927
+ magicMap.ByValue[1410479927] = "VMAS"
+ return magicMap
+}
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..2e099c8
--- /dev/null
+++ b/main.go
@@ -0,0 +1,264 @@
+package criu
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "os/exec"
+ "strconv"
+ "syscall"
+
+ "github.com/checkpoint-restore/go-criu/v6/rpc"
+ "google.golang.org/protobuf/proto"
+)
+
+// Criu struct
+type Criu struct {
+ swrkCmd *exec.Cmd
+ swrkSk *os.File
+ swrkPath string
+}
+
+// MakeCriu returns the Criu object required for most operations
+func MakeCriu() *Criu {
+ return &Criu{
+ swrkPath: "criu",
+ }
+}
+
+// SetCriuPath allows setting the path to the CRIU binary
+// if it is in a non standard location
+func (c *Criu) SetCriuPath(path string) {
+ c.swrkPath = path
+}
+
+// Prepare sets up everything for the RPC communication to CRIU
+func (c *Criu) Prepare() error {
+ fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_SEQPACKET, 0)
+ if err != nil {
+ return err
+ }
+
+ cln := os.NewFile(uintptr(fds[0]), "criu-xprt-cln")
+ syscall.CloseOnExec(fds[0])
+ srv := os.NewFile(uintptr(fds[1]), "criu-xprt-srv")
+ defer srv.Close()
+
+ args := []string{"swrk", strconv.Itoa(fds[1])}
+ // #nosec G204
+ cmd := exec.Command(c.swrkPath, args...)
+
+ err = cmd.Start()
+ if err != nil {
+ cln.Close()
+ return err
+ }
+
+ c.swrkCmd = cmd
+ c.swrkSk = cln
+
+ return nil
+}
+
+// Cleanup cleans up
+func (c *Criu) Cleanup() {
+ if c.swrkCmd != nil {
+ c.swrkSk.Close()
+ c.swrkSk = nil
+ _ = c.swrkCmd.Wait()
+ c.swrkCmd = nil
+ }
+}
+
+func (c *Criu) sendAndRecv(reqB []byte) ([]byte, int, error) {
+ cln := c.swrkSk
+ _, err := cln.Write(reqB)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ respB := make([]byte, 2*4096)
+ n, err := cln.Read(respB)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ return respB, n, nil
+}
+
+func (c *Criu) doSwrk(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify) error {
+ resp, err := c.doSwrkWithResp(reqType, opts, nfy, nil)
+ if err != nil {
+ return err
+ }
+ respType := resp.GetType()
+ if respType != reqType {
+ return errors.New("unexpected CRIU RPC response")
+ }
+
+ return nil
+}
+
+func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify, features *rpc.CriuFeatures) (*rpc.CriuResp, error) {
+ var resp *rpc.CriuResp
+
+ req := rpc.CriuReq{
+ Type: &reqType,
+ Opts: opts,
+ }
+
+ if nfy != nil {
+ opts.NotifyScripts = proto.Bool(true)
+ }
+
+ if features != nil {
+ req.Features = features
+ }
+
+ if c.swrkCmd == nil {
+ err := c.Prepare()
+ if err != nil {
+ return nil, err
+ }
+
+ defer c.Cleanup()
+ }
+
+ for {
+ reqB, err := proto.Marshal(&req)
+ if err != nil {
+ return nil, err
+ }
+
+ respB, respS, err := c.sendAndRecv(reqB)
+ if err != nil {
+ return nil, err
+ }
+
+ resp = &rpc.CriuResp{}
+ err = proto.Unmarshal(respB[:respS], resp)
+ if err != nil {
+ return nil, err
+ }
+
+ if !resp.GetSuccess() {
+ return resp, fmt.Errorf("operation failed (msg:%s err:%d)",
+ resp.GetCrErrmsg(), resp.GetCrErrno())
+ }
+
+ respType := resp.GetType()
+ if respType != rpc.CriuReqType_NOTIFY {
+ break
+ }
+ if nfy == nil {
+ return resp, errors.New("unexpected notify")
+ }
+
+ notify := resp.GetNotify()
+ switch notify.GetScript() {
+ case "pre-dump":
+ err = nfy.PreDump()
+ case "post-dump":
+ err = nfy.PostDump()
+ case "pre-restore":
+ err = nfy.PreRestore()
+ case "post-restore":
+ err = nfy.PostRestore(notify.GetPid())
+ case "network-lock":
+ err = nfy.NetworkLock()
+ case "network-unlock":
+ err = nfy.NetworkUnlock()
+ case "setup-namespaces":
+ err = nfy.SetupNamespaces(notify.GetPid())
+ case "post-setup-namespaces":
+ err = nfy.PostSetupNamespaces()
+ case "post-resume":
+ err = nfy.PostResume()
+ default:
+ err = nil
+ }
+
+ if err != nil {
+ return resp, err
+ }
+
+ req = rpc.CriuReq{
+ Type: &respType,
+ NotifySuccess: proto.Bool(true),
+ }
+ }
+
+ return resp, nil
+}
+
+// Dump dumps a process
+func (c *Criu) Dump(opts *rpc.CriuOpts, nfy Notify) error {
+ return c.doSwrk(rpc.CriuReqType_DUMP, opts, nfy)
+}
+
+// Restore restores a process
+func (c *Criu) Restore(opts *rpc.CriuOpts, nfy Notify) error {
+ return c.doSwrk(rpc.CriuReqType_RESTORE, opts, nfy)
+}
+
+// PreDump does a pre-dump
+func (c *Criu) PreDump(opts *rpc.CriuOpts, nfy Notify) error {
+ return c.doSwrk(rpc.CriuReqType_PRE_DUMP, opts, nfy)
+}
+
+// StartPageServer starts the page server
+func (c *Criu) StartPageServer(opts *rpc.CriuOpts) error {
+ return c.doSwrk(rpc.CriuReqType_PAGE_SERVER, opts, nil)
+}
+
+// StartPageServerChld starts the page server and returns PID and port
+func (c *Criu) StartPageServerChld(opts *rpc.CriuOpts) (int, int, error) {
+ resp, err := c.doSwrkWithResp(rpc.CriuReqType_PAGE_SERVER_CHLD, opts, nil, nil)
+ if err != nil {
+ return 0, 0, err
+ }
+
+ return int(resp.Ps.GetPid()), int(resp.Ps.GetPort()), nil
+}
+
+// GetCriuVersion executes the VERSION RPC call and returns the version
+// as an integer. Major * 10000 + Minor * 100 + SubLevel
+func (c *Criu) GetCriuVersion() (int, error) {
+ resp, err := c.doSwrkWithResp(rpc.CriuReqType_VERSION, nil, nil, nil)
+ if err != nil {
+ return 0, err
+ }
+
+ if resp.GetType() != rpc.CriuReqType_VERSION {
+ return 0, fmt.Errorf("Unexpected CRIU RPC response")
+ }
+
+ version := int(*resp.GetVersion().MajorNumber) * 10000
+ version += int(*resp.GetVersion().MinorNumber) * 100
+ if resp.GetVersion().Sublevel != nil {
+ version += int(*resp.GetVersion().Sublevel)
+ }
+
+ if resp.GetVersion().Gitid != nil {
+ // taken from runc: if it is a git release -> increase minor by 1
+ version -= (version % 100)
+ version += 100
+ }
+
+ return version, nil
+}
+
+// IsCriuAtLeast checks if the version is at least the same
+// as the parameter version
+func (c *Criu) IsCriuAtLeast(version int) (bool, error) {
+ criuVersion, err := c.GetCriuVersion()
+ if err != nil {
+ return false, err
+ }
+
+ if criuVersion >= version {
+ return true, nil
+ }
+
+ return false, nil
+}
diff --git a/notify.go b/notify.go
new file mode 100644
index 0000000..a177f2b
--- /dev/null
+++ b/notify.go
@@ -0,0 +1,62 @@
+package criu
+
+// Notify interface
+type Notify interface {
+ PreDump() error
+ PostDump() error
+ PreRestore() error
+ PostRestore(pid int32) error
+ NetworkLock() error
+ NetworkUnlock() error
+ SetupNamespaces(pid int32) error
+ PostSetupNamespaces() error
+ PostResume() error
+}
+
+// NoNotify struct
+type NoNotify struct{}
+
+// PreDump NoNotify
+func (c NoNotify) PreDump() error {
+ return nil
+}
+
+// PostDump NoNotify
+func (c NoNotify) PostDump() error {
+ return nil
+}
+
+// PreRestore NoNotify
+func (c NoNotify) PreRestore() error {
+ return nil
+}
+
+// PostRestore NoNotify
+func (c NoNotify) PostRestore(pid int32) error {
+ return nil
+}
+
+// NetworkLock NoNotify
+func (c NoNotify) NetworkLock() error {
+ return nil
+}
+
+// NetworkUnlock NoNotify
+func (c NoNotify) NetworkUnlock() error {
+ return nil
+}
+
+// SetupNamespaces NoNotify
+func (c NoNotify) SetupNamespaces(pid int32) error {
+ return nil
+}
+
+// PostSetupNamespaces NoNotify
+func (c NoNotify) PostSetupNamespaces() error {
+ return nil
+}
+
+// PostResume NoNotify
+func (c NoNotify) PostResume() error {
+ return nil
+}
diff --git a/phaul/api.go b/phaul/api.go
new file mode 100644
index 0000000..f675f80
--- /dev/null
+++ b/phaul/api.go
@@ -0,0 +1,45 @@
+package phaul
+
+import (
+ "github.com/checkpoint-restore/go-criu/v6"
+)
+
+// Config is the configuration which is passed around
+//
+// Pid is what we migrate
+// Memfd is the file descriptor via which criu can transfer memory pages.
+// Wdir is the directory where phaul can put images and other stuff
+type Config struct {
+ Pid int
+ Memfd int
+ Wdir string
+}
+
+// Remote interface
+// Rpc between PhaulClient and PhaulServer. When client
+// calls anything on this one, the corresponding method
+// should be called on PhaulServer object.
+type Remote interface {
+ StartIter() error
+ StopIter() error
+}
+
+// Local interface
+// Interface to local classes. Client calls them when it needs something on the source node.
+//
+// Methods:
+//
+// - DumpCopyRestore() is called on client side when the
+// pre-iterations are over and it's time to do full dump,
+// copy images and restore them on the server side.
+// All the time this method is executed victim tree is
+// frozen on client. Returning nil kills the tree, error
+// unfreezes it and resumes. The criu argument is the
+// pointer on created criu.Criu object on which client
+// may call Dump(). The requirement on opts passed are:
+// set Ps.Fd to comm.Memfd
+// set ParentImg to lastClientImagesPath
+// set TrackMem to true
+type Local interface {
+ DumpCopyRestore(criu *criu.Criu, c Config, lastClientImagesPath string) error
+}
diff --git a/phaul/client.go b/phaul/client.go
new file mode 100644
index 0000000..fd5e877
--- /dev/null
+++ b/phaul/client.go
@@ -0,0 +1,141 @@
+package phaul
+
+import (
+ "fmt"
+ "path/filepath"
+
+ "github.com/checkpoint-restore/go-criu/v6"
+ "github.com/checkpoint-restore/go-criu/v6/crit"
+ "github.com/checkpoint-restore/go-criu/v6/crit/images"
+ "github.com/checkpoint-restore/go-criu/v6/rpc"
+ "google.golang.org/protobuf/proto"
+)
+
+const (
+ minPagesWritten uint64 = 64
+ maxIters int = 8
+ maxGrowDelta int64 = 32
+)
+
+// Client struct
+type Client struct {
+ local Local
+ remote Remote
+ cfg Config
+}
+
+// MakePhaulClient function
+// Main entry point. Caller should create the client object by
+// passing here local, remote and comm. See comment in corresponding
+// interfaces/structs for explanation.
+//
+// Then call client.Migrate() and enjoy :)
+func MakePhaulClient(l Local, r Remote, c Config) (*Client, error) {
+ return &Client{local: l, remote: r, cfg: c}, nil
+}
+
+func isLastIter(iter int, stats *images.DumpStatsEntry, prevStats *images.DumpStatsEntry) bool {
+ if iter >= maxIters {
+ fmt.Printf("`- max iters reached\n")
+ return true
+ }
+
+ pagesWritten := stats.GetPagesWritten()
+ if pagesWritten < minPagesWritten {
+ fmt.Printf("`- tiny pre-dump (%d) reached\n", int(pagesWritten))
+ return true
+ }
+
+ pagesDelta := int64(pagesWritten) - int64(prevStats.GetPagesWritten())
+ if pagesDelta >= maxGrowDelta {
+ fmt.Printf("`- grow iter (%d) reached\n", int(pagesDelta))
+ return true
+ }
+
+ return false
+}
+
+// Migrate function
+func (pc *Client) Migrate() error {
+ criu := criu.MakeCriu()
+ psi := rpc.CriuPageServerInfo{
+ Fd: proto.Int32(int32(pc.cfg.Memfd)),
+ }
+ opts := &rpc.CriuOpts{
+ Pid: proto.Int32(int32(pc.cfg.Pid)),
+ LogLevel: proto.Int32(4),
+ LogFile: proto.String("pre-dump.log"),
+ Ps: &psi,
+ }
+
+ err := criu.Prepare()
+ if err != nil {
+ return err
+ }
+
+ defer criu.Cleanup()
+
+ imgs, err := preparePhaulImages(pc.cfg.Wdir)
+ if err != nil {
+ return err
+ }
+ prevStats := &images.DumpStatsEntry{}
+ iter := 0
+
+ for {
+ err = pc.remote.StartIter()
+ if err != nil {
+ return err
+ }
+
+ prevP := imgs.lastImagesDir()
+ imgDir, err := imgs.openNextDir()
+ if err != nil {
+ return err
+ }
+
+ opts.ImagesDirFd = proto.Int32(int32(imgDir.Fd()))
+ if prevP != "" {
+ opts.ParentImg = proto.String(prevP)
+ }
+
+ err = criu.PreDump(opts, nil)
+ imgDir.Close()
+ if err != nil {
+ return err
+ }
+
+ iter++
+
+ err = pc.remote.StopIter()
+ if err != nil {
+ return err
+ }
+
+ // Get dump statistics with crit
+ c := crit.New(filepath.Join(imgDir.Name(), "stats-dump"), "", "", false, false)
+ statsImg, err := c.Decode()
+ if err != nil {
+ return err
+ }
+ stats := statsImg.Entries[0].Message.(*images.StatsEntry).GetDump()
+
+ if isLastIter(iter, stats, prevStats) {
+ break
+ }
+
+ prevStats = stats
+ }
+
+ err = pc.remote.StartIter()
+ if err == nil {
+ prevP := imgs.lastImagesDir()
+ err = pc.local.DumpCopyRestore(criu, pc.cfg, prevP)
+ err2 := pc.remote.StopIter()
+ if err == nil {
+ err = err2
+ }
+ }
+
+ return err
+}
diff --git a/phaul/images.go b/phaul/images.go
new file mode 100644
index 0000000..f355a86
--- /dev/null
+++ b/phaul/images.go
@@ -0,0 +1,42 @@
+package phaul
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+)
+
+type image struct {
+ cursor int
+ dir string
+}
+
+//nolint:unparam // suppress "error is always nil" warning
+func preparePhaulImages(wdir string) (*image, error) {
+ return &image{dir: wdir}, nil
+}
+
+func (i *image) getPath(idx int) string {
+ return fmt.Sprintf(i.dir+"/%d", idx)
+}
+
+func (i *image) openNextDir() (*os.File, error) {
+ ipath := i.getPath(i.cursor)
+ err := os.Mkdir(ipath, 0o700)
+ if err != nil {
+ return nil, err
+ }
+
+ i.cursor++
+ return os.Open(ipath)
+}
+
+func (i *image) lastImagesDir() string {
+ var ret string
+ if i.cursor == 0 {
+ ret = ""
+ } else {
+ ret, _ = filepath.Abs(i.getPath(i.cursor - 1))
+ }
+ return ret
+}
diff --git a/phaul/server.go b/phaul/server.go
new file mode 100644
index 0000000..da17756
--- /dev/null
+++ b/phaul/server.go
@@ -0,0 +1,108 @@
+package phaul
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+
+ "github.com/checkpoint-restore/go-criu/v6"
+ "github.com/checkpoint-restore/go-criu/v6/rpc"
+ "golang.org/x/sys/unix"
+ "google.golang.org/protobuf/proto"
+)
+
+// Server struct
+type Server struct {
+ cfg Config
+ imgs *image
+ cr *criu.Criu
+ process *os.Process
+}
+
+// MakePhaulServer function
+// Main entry point. Make the server with comm and call PhaulRemote
+// methods on it upon client requests.
+func MakePhaulServer(c Config) (*Server, error) {
+ img, err := preparePhaulImages(c.Wdir)
+ if err != nil {
+ return nil, err
+ }
+
+ cr := criu.MakeCriu()
+
+ return &Server{imgs: img, cfg: c, cr: cr}, nil
+}
+
+// StartIter phaul.Remote methods
+func (s *Server) StartIter() error {
+ fmt.Printf("S: start iter\n")
+ psi := rpc.CriuPageServerInfo{
+ Fd: proto.Int32(int32(s.cfg.Memfd)),
+ }
+ opts := &rpc.CriuOpts{
+ LogLevel: proto.Int32(4),
+ LogFile: proto.String("ps.log"),
+ Ps: &psi,
+ }
+
+ prevP := s.imgs.lastImagesDir()
+ imgDir, err := s.imgs.openNextDir()
+ if err != nil {
+ return err
+ }
+ defer imgDir.Close()
+
+ opts.ImagesDirFd = proto.Int32(int32(imgDir.Fd()))
+ if prevP != "" {
+ p, err := filepath.Abs(imgDir.Name())
+ if err != nil {
+ return err
+ }
+ rel, err := filepath.Rel(p, prevP)
+ if err != nil {
+ return err
+ }
+ opts.ParentImg = proto.String(rel)
+ }
+
+ pid, _, err := s.cr.StartPageServerChld(opts)
+ if err != nil {
+ return err
+ }
+
+ s.process, err = os.FindProcess(pid)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// StopIter function
+func (s *Server) StopIter() error {
+ if s.process == nil {
+ return errors.New("No process to stop")
+ }
+ state, err := s.process.Wait()
+ if err != nil && !errors.Is(err, unix.ECHILD) {
+ return err
+ }
+
+ if err == nil && !state.Success() {
+ return fmt.Errorf("page-server failed: %s", state)
+ }
+ return nil
+}
+
+// Server-local methods
+
+// LastImagesDir function
+func (s *Server) LastImagesDir() string {
+ return s.imgs.lastImagesDir()
+}
+
+// GetCriu function
+func (s *Server) GetCriu() *criu.Criu {
+ return s.cr
+}
diff --git a/rpc/rpc.pb.go b/rpc/rpc.pb.go
new file mode 100644
index 0000000..67bd859
--- /dev/null
+++ b/rpc/rpc.pb.go
@@ -0,0 +1,2327 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.19.4
+// source: rpc/rpc.proto
+
+package rpc
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CriuCgMode int32
+
+const (
+ CriuCgMode_IGNORE CriuCgMode = 0
+ CriuCgMode_CG_NONE CriuCgMode = 1
+ CriuCgMode_PROPS CriuCgMode = 2
+ CriuCgMode_SOFT CriuCgMode = 3
+ CriuCgMode_FULL CriuCgMode = 4
+ CriuCgMode_STRICT CriuCgMode = 5
+ CriuCgMode_DEFAULT CriuCgMode = 6
+)
+
+// Enum value maps for CriuCgMode.
+var (
+ CriuCgMode_name = map[int32]string{
+ 0: "IGNORE",
+ 1: "CG_NONE",
+ 2: "PROPS",
+ 3: "SOFT",
+ 4: "FULL",
+ 5: "STRICT",
+ 6: "DEFAULT",
+ }
+ CriuCgMode_value = map[string]int32{
+ "IGNORE": 0,
+ "CG_NONE": 1,
+ "PROPS": 2,
+ "SOFT": 3,
+ "FULL": 4,
+ "STRICT": 5,
+ "DEFAULT": 6,
+ }
+)
+
+func (x CriuCgMode) Enum() *CriuCgMode {
+ p := new(CriuCgMode)
+ *p = x
+ return p
+}
+
+func (x CriuCgMode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CriuCgMode) Descriptor() protoreflect.EnumDescriptor {
+ return file_rpc_rpc_proto_enumTypes[0].Descriptor()
+}
+
+func (CriuCgMode) Type() protoreflect.EnumType {
+ return &file_rpc_rpc_proto_enumTypes[0]
+}
+
+func (x CriuCgMode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CriuCgMode) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CriuCgMode(num)
+ return nil
+}
+
+// Deprecated: Use CriuCgMode.Descriptor instead.
+func (CriuCgMode) EnumDescriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{0}
+}
+
+type CriuNetworkLockMethod int32
+
+const (
+ CriuNetworkLockMethod_IPTABLES CriuNetworkLockMethod = 1
+ CriuNetworkLockMethod_NFTABLES CriuNetworkLockMethod = 2
+)
+
+// Enum value maps for CriuNetworkLockMethod.
+var (
+ CriuNetworkLockMethod_name = map[int32]string{
+ 1: "IPTABLES",
+ 2: "NFTABLES",
+ }
+ CriuNetworkLockMethod_value = map[string]int32{
+ "IPTABLES": 1,
+ "NFTABLES": 2,
+ }
+)
+
+func (x CriuNetworkLockMethod) Enum() *CriuNetworkLockMethod {
+ p := new(CriuNetworkLockMethod)
+ *p = x
+ return p
+}
+
+func (x CriuNetworkLockMethod) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CriuNetworkLockMethod) Descriptor() protoreflect.EnumDescriptor {
+ return file_rpc_rpc_proto_enumTypes[1].Descriptor()
+}
+
+func (CriuNetworkLockMethod) Type() protoreflect.EnumType {
+ return &file_rpc_rpc_proto_enumTypes[1]
+}
+
+func (x CriuNetworkLockMethod) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CriuNetworkLockMethod) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CriuNetworkLockMethod(num)
+ return nil
+}
+
+// Deprecated: Use CriuNetworkLockMethod.Descriptor instead.
+func (CriuNetworkLockMethod) EnumDescriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{1}
+}
+
+type CriuPreDumpMode int32
+
+const (
+ CriuPreDumpMode_SPLICE CriuPreDumpMode = 1
+ CriuPreDumpMode_VM_READ CriuPreDumpMode = 2
+)
+
+// Enum value maps for CriuPreDumpMode.
+var (
+ CriuPreDumpMode_name = map[int32]string{
+ 1: "SPLICE",
+ 2: "VM_READ",
+ }
+ CriuPreDumpMode_value = map[string]int32{
+ "SPLICE": 1,
+ "VM_READ": 2,
+ }
+)
+
+func (x CriuPreDumpMode) Enum() *CriuPreDumpMode {
+ p := new(CriuPreDumpMode)
+ *p = x
+ return p
+}
+
+func (x CriuPreDumpMode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CriuPreDumpMode) Descriptor() protoreflect.EnumDescriptor {
+ return file_rpc_rpc_proto_enumTypes[2].Descriptor()
+}
+
+func (CriuPreDumpMode) Type() protoreflect.EnumType {
+ return &file_rpc_rpc_proto_enumTypes[2]
+}
+
+func (x CriuPreDumpMode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CriuPreDumpMode) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CriuPreDumpMode(num)
+ return nil
+}
+
+// Deprecated: Use CriuPreDumpMode.Descriptor instead.
+func (CriuPreDumpMode) EnumDescriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{2}
+}
+
+type CriuReqType int32
+
+const (
+ CriuReqType_EMPTY CriuReqType = 0
+ CriuReqType_DUMP CriuReqType = 1
+ CriuReqType_RESTORE CriuReqType = 2
+ CriuReqType_CHECK CriuReqType = 3
+ CriuReqType_PRE_DUMP CriuReqType = 4
+ CriuReqType_PAGE_SERVER CriuReqType = 5
+ CriuReqType_NOTIFY CriuReqType = 6
+ CriuReqType_CPUINFO_DUMP CriuReqType = 7
+ CriuReqType_CPUINFO_CHECK CriuReqType = 8
+ CriuReqType_FEATURE_CHECK CriuReqType = 9
+ CriuReqType_VERSION CriuReqType = 10
+ CriuReqType_WAIT_PID CriuReqType = 11
+ CriuReqType_PAGE_SERVER_CHLD CriuReqType = 12
+ CriuReqType_SINGLE_PRE_DUMP CriuReqType = 13
+)
+
+// Enum value maps for CriuReqType.
+var (
+ CriuReqType_name = map[int32]string{
+ 0: "EMPTY",
+ 1: "DUMP",
+ 2: "RESTORE",
+ 3: "CHECK",
+ 4: "PRE_DUMP",
+ 5: "PAGE_SERVER",
+ 6: "NOTIFY",
+ 7: "CPUINFO_DUMP",
+ 8: "CPUINFO_CHECK",
+ 9: "FEATURE_CHECK",
+ 10: "VERSION",
+ 11: "WAIT_PID",
+ 12: "PAGE_SERVER_CHLD",
+ 13: "SINGLE_PRE_DUMP",
+ }
+ CriuReqType_value = map[string]int32{
+ "EMPTY": 0,
+ "DUMP": 1,
+ "RESTORE": 2,
+ "CHECK": 3,
+ "PRE_DUMP": 4,
+ "PAGE_SERVER": 5,
+ "NOTIFY": 6,
+ "CPUINFO_DUMP": 7,
+ "CPUINFO_CHECK": 8,
+ "FEATURE_CHECK": 9,
+ "VERSION": 10,
+ "WAIT_PID": 11,
+ "PAGE_SERVER_CHLD": 12,
+ "SINGLE_PRE_DUMP": 13,
+ }
+)
+
+func (x CriuReqType) Enum() *CriuReqType {
+ p := new(CriuReqType)
+ *p = x
+ return p
+}
+
+func (x CriuReqType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CriuReqType) Descriptor() protoreflect.EnumDescriptor {
+ return file_rpc_rpc_proto_enumTypes[3].Descriptor()
+}
+
+func (CriuReqType) Type() protoreflect.EnumType {
+ return &file_rpc_rpc_proto_enumTypes[3]
+}
+
+func (x CriuReqType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CriuReqType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CriuReqType(num)
+ return nil
+}
+
+// Deprecated: Use CriuReqType.Descriptor instead.
+func (CriuReqType) EnumDescriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{3}
+}
+
+type CriuPageServerInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Address *string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
+ Port *int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
+ Pid *int32 `protobuf:"varint,3,opt,name=pid" json:"pid,omitempty"`
+ Fd *int32 `protobuf:"varint,4,opt,name=fd" json:"fd,omitempty"`
+}
+
+func (x *CriuPageServerInfo) Reset() {
+ *x = CriuPageServerInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuPageServerInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuPageServerInfo) ProtoMessage() {}
+
+func (x *CriuPageServerInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuPageServerInfo.ProtoReflect.Descriptor instead.
+func (*CriuPageServerInfo) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CriuPageServerInfo) GetAddress() string {
+ if x != nil && x.Address != nil {
+ return *x.Address
+ }
+ return ""
+}
+
+func (x *CriuPageServerInfo) GetPort() int32 {
+ if x != nil && x.Port != nil {
+ return *x.Port
+ }
+ return 0
+}
+
+func (x *CriuPageServerInfo) GetPid() int32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+func (x *CriuPageServerInfo) GetFd() int32 {
+ if x != nil && x.Fd != nil {
+ return *x.Fd
+ }
+ return 0
+}
+
+type CriuVethPair struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ IfIn *string `protobuf:"bytes,1,req,name=if_in,json=ifIn" json:"if_in,omitempty"`
+ IfOut *string `protobuf:"bytes,2,req,name=if_out,json=ifOut" json:"if_out,omitempty"`
+}
+
+func (x *CriuVethPair) Reset() {
+ *x = CriuVethPair{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuVethPair) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuVethPair) ProtoMessage() {}
+
+func (x *CriuVethPair) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuVethPair.ProtoReflect.Descriptor instead.
+func (*CriuVethPair) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CriuVethPair) GetIfIn() string {
+ if x != nil && x.IfIn != nil {
+ return *x.IfIn
+ }
+ return ""
+}
+
+func (x *CriuVethPair) GetIfOut() string {
+ if x != nil && x.IfOut != nil {
+ return *x.IfOut
+ }
+ return ""
+}
+
+type ExtMountMap struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
+ Val *string `protobuf:"bytes,2,req,name=val" json:"val,omitempty"`
+}
+
+func (x *ExtMountMap) Reset() {
+ *x = ExtMountMap{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExtMountMap) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtMountMap) ProtoMessage() {}
+
+func (x *ExtMountMap) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExtMountMap.ProtoReflect.Descriptor instead.
+func (*ExtMountMap) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ExtMountMap) GetKey() string {
+ if x != nil && x.Key != nil {
+ return *x.Key
+ }
+ return ""
+}
+
+func (x *ExtMountMap) GetVal() string {
+ if x != nil && x.Val != nil {
+ return *x.Val
+ }
+ return ""
+}
+
+type JoinNamespace struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ns *string `protobuf:"bytes,1,req,name=ns" json:"ns,omitempty"`
+ NsFile *string `protobuf:"bytes,2,req,name=ns_file,json=nsFile" json:"ns_file,omitempty"`
+ ExtraOpt *string `protobuf:"bytes,3,opt,name=extra_opt,json=extraOpt" json:"extra_opt,omitempty"`
+}
+
+func (x *JoinNamespace) Reset() {
+ *x = JoinNamespace{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *JoinNamespace) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*JoinNamespace) ProtoMessage() {}
+
+func (x *JoinNamespace) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use JoinNamespace.ProtoReflect.Descriptor instead.
+func (*JoinNamespace) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *JoinNamespace) GetNs() string {
+ if x != nil && x.Ns != nil {
+ return *x.Ns
+ }
+ return ""
+}
+
+func (x *JoinNamespace) GetNsFile() string {
+ if x != nil && x.NsFile != nil {
+ return *x.NsFile
+ }
+ return ""
+}
+
+func (x *JoinNamespace) GetExtraOpt() string {
+ if x != nil && x.ExtraOpt != nil {
+ return *x.ExtraOpt
+ }
+ return ""
+}
+
+type InheritFd struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
+ Fd *int32 `protobuf:"varint,2,req,name=fd" json:"fd,omitempty"`
+}
+
+func (x *InheritFd) Reset() {
+ *x = InheritFd{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InheritFd) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InheritFd) ProtoMessage() {}
+
+func (x *InheritFd) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InheritFd.ProtoReflect.Descriptor instead.
+func (*InheritFd) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *InheritFd) GetKey() string {
+ if x != nil && x.Key != nil {
+ return *x.Key
+ }
+ return ""
+}
+
+func (x *InheritFd) GetFd() int32 {
+ if x != nil && x.Fd != nil {
+ return *x.Fd
+ }
+ return 0
+}
+
+type CgroupRoot struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ctrl *string `protobuf:"bytes,1,opt,name=ctrl" json:"ctrl,omitempty"`
+ Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"`
+}
+
+func (x *CgroupRoot) Reset() {
+ *x = CgroupRoot{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CgroupRoot) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CgroupRoot) ProtoMessage() {}
+
+func (x *CgroupRoot) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CgroupRoot.ProtoReflect.Descriptor instead.
+func (*CgroupRoot) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CgroupRoot) GetCtrl() string {
+ if x != nil && x.Ctrl != nil {
+ return *x.Ctrl
+ }
+ return ""
+}
+
+func (x *CgroupRoot) GetPath() string {
+ if x != nil && x.Path != nil {
+ return *x.Path
+ }
+ return ""
+}
+
+type UnixSk struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Inode *uint32 `protobuf:"varint,1,req,name=inode" json:"inode,omitempty"`
+}
+
+func (x *UnixSk) Reset() {
+ *x = UnixSk{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UnixSk) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UnixSk) ProtoMessage() {}
+
+func (x *UnixSk) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UnixSk.ProtoReflect.Descriptor instead.
+func (*UnixSk) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *UnixSk) GetInode() uint32 {
+ if x != nil && x.Inode != nil {
+ return *x.Inode
+ }
+ return 0
+}
+
+type CriuOpts struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ImagesDirFd *int32 `protobuf:"varint,1,req,name=images_dir_fd,json=imagesDirFd" json:"images_dir_fd,omitempty"`
+ Pid *int32 `protobuf:"varint,2,opt,name=pid" json:"pid,omitempty"` // if not set on dump, will dump requesting process
+ LeaveRunning *bool `protobuf:"varint,3,opt,name=leave_running,json=leaveRunning" json:"leave_running,omitempty"`
+ ExtUnixSk *bool `protobuf:"varint,4,opt,name=ext_unix_sk,json=extUnixSk" json:"ext_unix_sk,omitempty"`
+ TcpEstablished *bool `protobuf:"varint,5,opt,name=tcp_established,json=tcpEstablished" json:"tcp_established,omitempty"`
+ EvasiveDevices *bool `protobuf:"varint,6,opt,name=evasive_devices,json=evasiveDevices" json:"evasive_devices,omitempty"`
+ ShellJob *bool `protobuf:"varint,7,opt,name=shell_job,json=shellJob" json:"shell_job,omitempty"`
+ FileLocks *bool `protobuf:"varint,8,opt,name=file_locks,json=fileLocks" json:"file_locks,omitempty"`
+ LogLevel *int32 `protobuf:"varint,9,opt,name=log_level,json=logLevel,def=2" json:"log_level,omitempty"`
+ LogFile *string `protobuf:"bytes,10,opt,name=log_file,json=logFile" json:"log_file,omitempty"` // No subdirs are allowed. Consider using work-dir
+ Ps *CriuPageServerInfo `protobuf:"bytes,11,opt,name=ps" json:"ps,omitempty"`
+ NotifyScripts *bool `protobuf:"varint,12,opt,name=notify_scripts,json=notifyScripts" json:"notify_scripts,omitempty"`
+ Root *string `protobuf:"bytes,13,opt,name=root" json:"root,omitempty"`
+ ParentImg *string `protobuf:"bytes,14,opt,name=parent_img,json=parentImg" json:"parent_img,omitempty"`
+ TrackMem *bool `protobuf:"varint,15,opt,name=track_mem,json=trackMem" json:"track_mem,omitempty"`
+ AutoDedup *bool `protobuf:"varint,16,opt,name=auto_dedup,json=autoDedup" json:"auto_dedup,omitempty"`
+ WorkDirFd *int32 `protobuf:"varint,17,opt,name=work_dir_fd,json=workDirFd" json:"work_dir_fd,omitempty"`
+ LinkRemap *bool `protobuf:"varint,18,opt,name=link_remap,json=linkRemap" json:"link_remap,omitempty"`
+ Veths []*CriuVethPair `protobuf:"bytes,19,rep,name=veths" json:"veths,omitempty"` // DEPRECATED, use external instead
+ CpuCap *uint32 `protobuf:"varint,20,opt,name=cpu_cap,json=cpuCap,def=4294967295" json:"cpu_cap,omitempty"`
+ ForceIrmap *bool `protobuf:"varint,21,opt,name=force_irmap,json=forceIrmap" json:"force_irmap,omitempty"`
+ ExecCmd []string `protobuf:"bytes,22,rep,name=exec_cmd,json=execCmd" json:"exec_cmd,omitempty"`
+ ExtMnt []*ExtMountMap `protobuf:"bytes,23,rep,name=ext_mnt,json=extMnt" json:"ext_mnt,omitempty"` // DEPRECATED, use external instead
+ ManageCgroups *bool `protobuf:"varint,24,opt,name=manage_cgroups,json=manageCgroups" json:"manage_cgroups,omitempty"` // backward compatibility
+ CgRoot []*CgroupRoot `protobuf:"bytes,25,rep,name=cg_root,json=cgRoot" json:"cg_root,omitempty"`
+ RstSibling *bool `protobuf:"varint,26,opt,name=rst_sibling,json=rstSibling" json:"rst_sibling,omitempty"` // swrk only
+ InheritFd []*InheritFd `protobuf:"bytes,27,rep,name=inherit_fd,json=inheritFd" json:"inherit_fd,omitempty"` // swrk only
+ AutoExtMnt *bool `protobuf:"varint,28,opt,name=auto_ext_mnt,json=autoExtMnt" json:"auto_ext_mnt,omitempty"`
+ ExtSharing *bool `protobuf:"varint,29,opt,name=ext_sharing,json=extSharing" json:"ext_sharing,omitempty"`
+ ExtMasters *bool `protobuf:"varint,30,opt,name=ext_masters,json=extMasters" json:"ext_masters,omitempty"`
+ SkipMnt []string `protobuf:"bytes,31,rep,name=skip_mnt,json=skipMnt" json:"skip_mnt,omitempty"`
+ EnableFs []string `protobuf:"bytes,32,rep,name=enable_fs,json=enableFs" json:"enable_fs,omitempty"`
+ UnixSkIno []*UnixSk `protobuf:"bytes,33,rep,name=unix_sk_ino,json=unixSkIno" json:"unix_sk_ino,omitempty"` // DEPRECATED, use external instead
+ ManageCgroupsMode *CriuCgMode `protobuf:"varint,34,opt,name=manage_cgroups_mode,json=manageCgroupsMode,enum=CriuCgMode" json:"manage_cgroups_mode,omitempty"`
+ GhostLimit *uint32 `protobuf:"varint,35,opt,name=ghost_limit,json=ghostLimit,def=1048576" json:"ghost_limit,omitempty"`
+ IrmapScanPaths []string `protobuf:"bytes,36,rep,name=irmap_scan_paths,json=irmapScanPaths" json:"irmap_scan_paths,omitempty"`
+ External []string `protobuf:"bytes,37,rep,name=external" json:"external,omitempty"`
+ EmptyNs *uint32 `protobuf:"varint,38,opt,name=empty_ns,json=emptyNs" json:"empty_ns,omitempty"`
+ JoinNs []*JoinNamespace `protobuf:"bytes,39,rep,name=join_ns,json=joinNs" json:"join_ns,omitempty"`
+ CgroupProps *string `protobuf:"bytes,41,opt,name=cgroup_props,json=cgroupProps" json:"cgroup_props,omitempty"`
+ CgroupPropsFile *string `protobuf:"bytes,42,opt,name=cgroup_props_file,json=cgroupPropsFile" json:"cgroup_props_file,omitempty"`
+ CgroupDumpController []string `protobuf:"bytes,43,rep,name=cgroup_dump_controller,json=cgroupDumpController" json:"cgroup_dump_controller,omitempty"`
+ FreezeCgroup *string `protobuf:"bytes,44,opt,name=freeze_cgroup,json=freezeCgroup" json:"freeze_cgroup,omitempty"`
+ Timeout *uint32 `protobuf:"varint,45,opt,name=timeout" json:"timeout,omitempty"`
+ TcpSkipInFlight *bool `protobuf:"varint,46,opt,name=tcp_skip_in_flight,json=tcpSkipInFlight" json:"tcp_skip_in_flight,omitempty"`
+ WeakSysctls *bool `protobuf:"varint,47,opt,name=weak_sysctls,json=weakSysctls" json:"weak_sysctls,omitempty"`
+ LazyPages *bool `protobuf:"varint,48,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"`
+ StatusFd *int32 `protobuf:"varint,49,opt,name=status_fd,json=statusFd" json:"status_fd,omitempty"`
+ OrphanPtsMaster *bool `protobuf:"varint,50,opt,name=orphan_pts_master,json=orphanPtsMaster" json:"orphan_pts_master,omitempty"`
+ ConfigFile *string `protobuf:"bytes,51,opt,name=config_file,json=configFile" json:"config_file,omitempty"`
+ TcpClose *bool `protobuf:"varint,52,opt,name=tcp_close,json=tcpClose" json:"tcp_close,omitempty"`
+ LsmProfile *string `protobuf:"bytes,53,opt,name=lsm_profile,json=lsmProfile" json:"lsm_profile,omitempty"`
+ TlsCacert *string `protobuf:"bytes,54,opt,name=tls_cacert,json=tlsCacert" json:"tls_cacert,omitempty"`
+ TlsCacrl *string `protobuf:"bytes,55,opt,name=tls_cacrl,json=tlsCacrl" json:"tls_cacrl,omitempty"`
+ TlsCert *string `protobuf:"bytes,56,opt,name=tls_cert,json=tlsCert" json:"tls_cert,omitempty"`
+ TlsKey *string `protobuf:"bytes,57,opt,name=tls_key,json=tlsKey" json:"tls_key,omitempty"`
+ Tls *bool `protobuf:"varint,58,opt,name=tls" json:"tls,omitempty"`
+ TlsNoCnVerify *bool `protobuf:"varint,59,opt,name=tls_no_cn_verify,json=tlsNoCnVerify" json:"tls_no_cn_verify,omitempty"`
+ CgroupYard *string `protobuf:"bytes,60,opt,name=cgroup_yard,json=cgroupYard" json:"cgroup_yard,omitempty"`
+ PreDumpMode *CriuPreDumpMode `protobuf:"varint,61,opt,name=pre_dump_mode,json=preDumpMode,enum=CriuPreDumpMode,def=1" json:"pre_dump_mode,omitempty"`
+ PidfdStoreSk *int32 `protobuf:"varint,62,opt,name=pidfd_store_sk,json=pidfdStoreSk" json:"pidfd_store_sk,omitempty"`
+ LsmMountContext *string `protobuf:"bytes,63,opt,name=lsm_mount_context,json=lsmMountContext" json:"lsm_mount_context,omitempty"`
+ NetworkLock *CriuNetworkLockMethod `protobuf:"varint,64,opt,name=network_lock,json=networkLock,enum=CriuNetworkLockMethod,def=1" json:"network_lock,omitempty"`
+ MntnsCompatMode *bool `protobuf:"varint,65,opt,name=mntns_compat_mode,json=mntnsCompatMode" json:"mntns_compat_mode,omitempty"` // optional bool check_mounts = 128;
+}
+
+// Default values for CriuOpts fields.
+const (
+ Default_CriuOpts_LogLevel = int32(2)
+ Default_CriuOpts_CpuCap = uint32(4294967295)
+ Default_CriuOpts_GhostLimit = uint32(1048576)
+ Default_CriuOpts_PreDumpMode = CriuPreDumpMode_SPLICE
+ Default_CriuOpts_NetworkLock = CriuNetworkLockMethod_IPTABLES
+)
+
+func (x *CriuOpts) Reset() {
+ *x = CriuOpts{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuOpts) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuOpts) ProtoMessage() {}
+
+func (x *CriuOpts) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuOpts.ProtoReflect.Descriptor instead.
+func (*CriuOpts) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *CriuOpts) GetImagesDirFd() int32 {
+ if x != nil && x.ImagesDirFd != nil {
+ return *x.ImagesDirFd
+ }
+ return 0
+}
+
+func (x *CriuOpts) GetPid() int32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+func (x *CriuOpts) GetLeaveRunning() bool {
+ if x != nil && x.LeaveRunning != nil {
+ return *x.LeaveRunning
+ }
+ return false
+}
+
+func (x *CriuOpts) GetExtUnixSk() bool {
+ if x != nil && x.ExtUnixSk != nil {
+ return *x.ExtUnixSk
+ }
+ return false
+}
+
+func (x *CriuOpts) GetTcpEstablished() bool {
+ if x != nil && x.TcpEstablished != nil {
+ return *x.TcpEstablished
+ }
+ return false
+}
+
+func (x *CriuOpts) GetEvasiveDevices() bool {
+ if x != nil && x.EvasiveDevices != nil {
+ return *x.EvasiveDevices
+ }
+ return false
+}
+
+func (x *CriuOpts) GetShellJob() bool {
+ if x != nil && x.ShellJob != nil {
+ return *x.ShellJob
+ }
+ return false
+}
+
+func (x *CriuOpts) GetFileLocks() bool {
+ if x != nil && x.FileLocks != nil {
+ return *x.FileLocks
+ }
+ return false
+}
+
+func (x *CriuOpts) GetLogLevel() int32 {
+ if x != nil && x.LogLevel != nil {
+ return *x.LogLevel
+ }
+ return Default_CriuOpts_LogLevel
+}
+
+func (x *CriuOpts) GetLogFile() string {
+ if x != nil && x.LogFile != nil {
+ return *x.LogFile
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetPs() *CriuPageServerInfo {
+ if x != nil {
+ return x.Ps
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetNotifyScripts() bool {
+ if x != nil && x.NotifyScripts != nil {
+ return *x.NotifyScripts
+ }
+ return false
+}
+
+func (x *CriuOpts) GetRoot() string {
+ if x != nil && x.Root != nil {
+ return *x.Root
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetParentImg() string {
+ if x != nil && x.ParentImg != nil {
+ return *x.ParentImg
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTrackMem() bool {
+ if x != nil && x.TrackMem != nil {
+ return *x.TrackMem
+ }
+ return false
+}
+
+func (x *CriuOpts) GetAutoDedup() bool {
+ if x != nil && x.AutoDedup != nil {
+ return *x.AutoDedup
+ }
+ return false
+}
+
+func (x *CriuOpts) GetWorkDirFd() int32 {
+ if x != nil && x.WorkDirFd != nil {
+ return *x.WorkDirFd
+ }
+ return 0
+}
+
+func (x *CriuOpts) GetLinkRemap() bool {
+ if x != nil && x.LinkRemap != nil {
+ return *x.LinkRemap
+ }
+ return false
+}
+
+func (x *CriuOpts) GetVeths() []*CriuVethPair {
+ if x != nil {
+ return x.Veths
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetCpuCap() uint32 {
+ if x != nil && x.CpuCap != nil {
+ return *x.CpuCap
+ }
+ return Default_CriuOpts_CpuCap
+}
+
+func (x *CriuOpts) GetForceIrmap() bool {
+ if x != nil && x.ForceIrmap != nil {
+ return *x.ForceIrmap
+ }
+ return false
+}
+
+func (x *CriuOpts) GetExecCmd() []string {
+ if x != nil {
+ return x.ExecCmd
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetExtMnt() []*ExtMountMap {
+ if x != nil {
+ return x.ExtMnt
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetManageCgroups() bool {
+ if x != nil && x.ManageCgroups != nil {
+ return *x.ManageCgroups
+ }
+ return false
+}
+
+func (x *CriuOpts) GetCgRoot() []*CgroupRoot {
+ if x != nil {
+ return x.CgRoot
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetRstSibling() bool {
+ if x != nil && x.RstSibling != nil {
+ return *x.RstSibling
+ }
+ return false
+}
+
+func (x *CriuOpts) GetInheritFd() []*InheritFd {
+ if x != nil {
+ return x.InheritFd
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetAutoExtMnt() bool {
+ if x != nil && x.AutoExtMnt != nil {
+ return *x.AutoExtMnt
+ }
+ return false
+}
+
+func (x *CriuOpts) GetExtSharing() bool {
+ if x != nil && x.ExtSharing != nil {
+ return *x.ExtSharing
+ }
+ return false
+}
+
+func (x *CriuOpts) GetExtMasters() bool {
+ if x != nil && x.ExtMasters != nil {
+ return *x.ExtMasters
+ }
+ return false
+}
+
+func (x *CriuOpts) GetSkipMnt() []string {
+ if x != nil {
+ return x.SkipMnt
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetEnableFs() []string {
+ if x != nil {
+ return x.EnableFs
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetUnixSkIno() []*UnixSk {
+ if x != nil {
+ return x.UnixSkIno
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetManageCgroupsMode() CriuCgMode {
+ if x != nil && x.ManageCgroupsMode != nil {
+ return *x.ManageCgroupsMode
+ }
+ return CriuCgMode_IGNORE
+}
+
+func (x *CriuOpts) GetGhostLimit() uint32 {
+ if x != nil && x.GhostLimit != nil {
+ return *x.GhostLimit
+ }
+ return Default_CriuOpts_GhostLimit
+}
+
+func (x *CriuOpts) GetIrmapScanPaths() []string {
+ if x != nil {
+ return x.IrmapScanPaths
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetExternal() []string {
+ if x != nil {
+ return x.External
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetEmptyNs() uint32 {
+ if x != nil && x.EmptyNs != nil {
+ return *x.EmptyNs
+ }
+ return 0
+}
+
+func (x *CriuOpts) GetJoinNs() []*JoinNamespace {
+ if x != nil {
+ return x.JoinNs
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetCgroupProps() string {
+ if x != nil && x.CgroupProps != nil {
+ return *x.CgroupProps
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetCgroupPropsFile() string {
+ if x != nil && x.CgroupPropsFile != nil {
+ return *x.CgroupPropsFile
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetCgroupDumpController() []string {
+ if x != nil {
+ return x.CgroupDumpController
+ }
+ return nil
+}
+
+func (x *CriuOpts) GetFreezeCgroup() string {
+ if x != nil && x.FreezeCgroup != nil {
+ return *x.FreezeCgroup
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTimeout() uint32 {
+ if x != nil && x.Timeout != nil {
+ return *x.Timeout
+ }
+ return 0
+}
+
+func (x *CriuOpts) GetTcpSkipInFlight() bool {
+ if x != nil && x.TcpSkipInFlight != nil {
+ return *x.TcpSkipInFlight
+ }
+ return false
+}
+
+func (x *CriuOpts) GetWeakSysctls() bool {
+ if x != nil && x.WeakSysctls != nil {
+ return *x.WeakSysctls
+ }
+ return false
+}
+
+func (x *CriuOpts) GetLazyPages() bool {
+ if x != nil && x.LazyPages != nil {
+ return *x.LazyPages
+ }
+ return false
+}
+
+func (x *CriuOpts) GetStatusFd() int32 {
+ if x != nil && x.StatusFd != nil {
+ return *x.StatusFd
+ }
+ return 0
+}
+
+func (x *CriuOpts) GetOrphanPtsMaster() bool {
+ if x != nil && x.OrphanPtsMaster != nil {
+ return *x.OrphanPtsMaster
+ }
+ return false
+}
+
+func (x *CriuOpts) GetConfigFile() string {
+ if x != nil && x.ConfigFile != nil {
+ return *x.ConfigFile
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTcpClose() bool {
+ if x != nil && x.TcpClose != nil {
+ return *x.TcpClose
+ }
+ return false
+}
+
+func (x *CriuOpts) GetLsmProfile() string {
+ if x != nil && x.LsmProfile != nil {
+ return *x.LsmProfile
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTlsCacert() string {
+ if x != nil && x.TlsCacert != nil {
+ return *x.TlsCacert
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTlsCacrl() string {
+ if x != nil && x.TlsCacrl != nil {
+ return *x.TlsCacrl
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTlsCert() string {
+ if x != nil && x.TlsCert != nil {
+ return *x.TlsCert
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTlsKey() string {
+ if x != nil && x.TlsKey != nil {
+ return *x.TlsKey
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetTls() bool {
+ if x != nil && x.Tls != nil {
+ return *x.Tls
+ }
+ return false
+}
+
+func (x *CriuOpts) GetTlsNoCnVerify() bool {
+ if x != nil && x.TlsNoCnVerify != nil {
+ return *x.TlsNoCnVerify
+ }
+ return false
+}
+
+func (x *CriuOpts) GetCgroupYard() string {
+ if x != nil && x.CgroupYard != nil {
+ return *x.CgroupYard
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetPreDumpMode() CriuPreDumpMode {
+ if x != nil && x.PreDumpMode != nil {
+ return *x.PreDumpMode
+ }
+ return Default_CriuOpts_PreDumpMode
+}
+
+func (x *CriuOpts) GetPidfdStoreSk() int32 {
+ if x != nil && x.PidfdStoreSk != nil {
+ return *x.PidfdStoreSk
+ }
+ return 0
+}
+
+func (x *CriuOpts) GetLsmMountContext() string {
+ if x != nil && x.LsmMountContext != nil {
+ return *x.LsmMountContext
+ }
+ return ""
+}
+
+func (x *CriuOpts) GetNetworkLock() CriuNetworkLockMethod {
+ if x != nil && x.NetworkLock != nil {
+ return *x.NetworkLock
+ }
+ return Default_CriuOpts_NetworkLock
+}
+
+func (x *CriuOpts) GetMntnsCompatMode() bool {
+ if x != nil && x.MntnsCompatMode != nil {
+ return *x.MntnsCompatMode
+ }
+ return false
+}
+
+type CriuDumpResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Restored *bool `protobuf:"varint,1,opt,name=restored" json:"restored,omitempty"`
+}
+
+func (x *CriuDumpResp) Reset() {
+ *x = CriuDumpResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuDumpResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuDumpResp) ProtoMessage() {}
+
+func (x *CriuDumpResp) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuDumpResp.ProtoReflect.Descriptor instead.
+func (*CriuDumpResp) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *CriuDumpResp) GetRestored() bool {
+ if x != nil && x.Restored != nil {
+ return *x.Restored
+ }
+ return false
+}
+
+type CriuRestoreResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Pid *int32 `protobuf:"varint,1,req,name=pid" json:"pid,omitempty"`
+}
+
+func (x *CriuRestoreResp) Reset() {
+ *x = CriuRestoreResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuRestoreResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuRestoreResp) ProtoMessage() {}
+
+func (x *CriuRestoreResp) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuRestoreResp.ProtoReflect.Descriptor instead.
+func (*CriuRestoreResp) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *CriuRestoreResp) GetPid() int32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+type CriuNotify struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Script *string `protobuf:"bytes,1,opt,name=script" json:"script,omitempty"`
+ Pid *int32 `protobuf:"varint,2,opt,name=pid" json:"pid,omitempty"`
+}
+
+func (x *CriuNotify) Reset() {
+ *x = CriuNotify{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuNotify) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuNotify) ProtoMessage() {}
+
+func (x *CriuNotify) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuNotify.ProtoReflect.Descriptor instead.
+func (*CriuNotify) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *CriuNotify) GetScript() string {
+ if x != nil && x.Script != nil {
+ return *x.Script
+ }
+ return ""
+}
+
+func (x *CriuNotify) GetPid() int32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+//
+// List of features which can queried via
+// CRIU_REQ_TYPE__FEATURE_CHECK
+type CriuFeatures struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MemTrack *bool `protobuf:"varint,1,opt,name=mem_track,json=memTrack" json:"mem_track,omitempty"`
+ LazyPages *bool `protobuf:"varint,2,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"`
+ PidfdStore *bool `protobuf:"varint,3,opt,name=pidfd_store,json=pidfdStore" json:"pidfd_store,omitempty"`
+}
+
+func (x *CriuFeatures) Reset() {
+ *x = CriuFeatures{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuFeatures) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuFeatures) ProtoMessage() {}
+
+func (x *CriuFeatures) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuFeatures.ProtoReflect.Descriptor instead.
+func (*CriuFeatures) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *CriuFeatures) GetMemTrack() bool {
+ if x != nil && x.MemTrack != nil {
+ return *x.MemTrack
+ }
+ return false
+}
+
+func (x *CriuFeatures) GetLazyPages() bool {
+ if x != nil && x.LazyPages != nil {
+ return *x.LazyPages
+ }
+ return false
+}
+
+func (x *CriuFeatures) GetPidfdStore() bool {
+ if x != nil && x.PidfdStore != nil {
+ return *x.PidfdStore
+ }
+ return false
+}
+
+type CriuReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Type *CriuReqType `protobuf:"varint,1,req,name=type,enum=CriuReqType" json:"type,omitempty"`
+ Opts *CriuOpts `protobuf:"bytes,2,opt,name=opts" json:"opts,omitempty"`
+ NotifySuccess *bool `protobuf:"varint,3,opt,name=notify_success,json=notifySuccess" json:"notify_success,omitempty"`
+ //
+ // When set service won't close the connection but
+ // will wait for more req-s to appear. Works not
+ // for all request types.
+ KeepOpen *bool `protobuf:"varint,4,opt,name=keep_open,json=keepOpen" json:"keep_open,omitempty"`
+ //
+ // 'features' can be used to query which features
+ // are supported by the installed criu/kernel
+ // via RPC.
+ Features *CriuFeatures `protobuf:"bytes,5,opt,name=features" json:"features,omitempty"`
+ // 'pid' is used for WAIT_PID
+ Pid *uint32 `protobuf:"varint,6,opt,name=pid" json:"pid,omitempty"`
+}
+
+func (x *CriuReq) Reset() {
+ *x = CriuReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuReq) ProtoMessage() {}
+
+func (x *CriuReq) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuReq.ProtoReflect.Descriptor instead.
+func (*CriuReq) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *CriuReq) GetType() CriuReqType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return CriuReqType_EMPTY
+}
+
+func (x *CriuReq) GetOpts() *CriuOpts {
+ if x != nil {
+ return x.Opts
+ }
+ return nil
+}
+
+func (x *CriuReq) GetNotifySuccess() bool {
+ if x != nil && x.NotifySuccess != nil {
+ return *x.NotifySuccess
+ }
+ return false
+}
+
+func (x *CriuReq) GetKeepOpen() bool {
+ if x != nil && x.KeepOpen != nil {
+ return *x.KeepOpen
+ }
+ return false
+}
+
+func (x *CriuReq) GetFeatures() *CriuFeatures {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
+func (x *CriuReq) GetPid() uint32 {
+ if x != nil && x.Pid != nil {
+ return *x.Pid
+ }
+ return 0
+}
+
+type CriuResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Type *CriuReqType `protobuf:"varint,1,req,name=type,enum=CriuReqType" json:"type,omitempty"`
+ Success *bool `protobuf:"varint,2,req,name=success" json:"success,omitempty"`
+ Dump *CriuDumpResp `protobuf:"bytes,3,opt,name=dump" json:"dump,omitempty"`
+ Restore *CriuRestoreResp `protobuf:"bytes,4,opt,name=restore" json:"restore,omitempty"`
+ Notify *CriuNotify `protobuf:"bytes,5,opt,name=notify" json:"notify,omitempty"`
+ Ps *CriuPageServerInfo `protobuf:"bytes,6,opt,name=ps" json:"ps,omitempty"`
+ CrErrno *int32 `protobuf:"varint,7,opt,name=cr_errno,json=crErrno" json:"cr_errno,omitempty"`
+ Features *CriuFeatures `protobuf:"bytes,8,opt,name=features" json:"features,omitempty"`
+ CrErrmsg *string `protobuf:"bytes,9,opt,name=cr_errmsg,json=crErrmsg" json:"cr_errmsg,omitempty"`
+ Version *CriuVersion `protobuf:"bytes,10,opt,name=version" json:"version,omitempty"`
+ Status *int32 `protobuf:"varint,11,opt,name=status" json:"status,omitempty"`
+}
+
+func (x *CriuResp) Reset() {
+ *x = CriuResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuResp) ProtoMessage() {}
+
+func (x *CriuResp) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuResp.ProtoReflect.Descriptor instead.
+func (*CriuResp) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *CriuResp) GetType() CriuReqType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return CriuReqType_EMPTY
+}
+
+func (x *CriuResp) GetSuccess() bool {
+ if x != nil && x.Success != nil {
+ return *x.Success
+ }
+ return false
+}
+
+func (x *CriuResp) GetDump() *CriuDumpResp {
+ if x != nil {
+ return x.Dump
+ }
+ return nil
+}
+
+func (x *CriuResp) GetRestore() *CriuRestoreResp {
+ if x != nil {
+ return x.Restore
+ }
+ return nil
+}
+
+func (x *CriuResp) GetNotify() *CriuNotify {
+ if x != nil {
+ return x.Notify
+ }
+ return nil
+}
+
+func (x *CriuResp) GetPs() *CriuPageServerInfo {
+ if x != nil {
+ return x.Ps
+ }
+ return nil
+}
+
+func (x *CriuResp) GetCrErrno() int32 {
+ if x != nil && x.CrErrno != nil {
+ return *x.CrErrno
+ }
+ return 0
+}
+
+func (x *CriuResp) GetFeatures() *CriuFeatures {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
+func (x *CriuResp) GetCrErrmsg() string {
+ if x != nil && x.CrErrmsg != nil {
+ return *x.CrErrmsg
+ }
+ return ""
+}
+
+func (x *CriuResp) GetVersion() *CriuVersion {
+ if x != nil {
+ return x.Version
+ }
+ return nil
+}
+
+func (x *CriuResp) GetStatus() int32 {
+ if x != nil && x.Status != nil {
+ return *x.Status
+ }
+ return 0
+}
+
+// Answer for criu_req_type.VERSION requests
+type CriuVersion struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MajorNumber *int32 `protobuf:"varint,1,req,name=major_number,json=majorNumber" json:"major_number,omitempty"`
+ MinorNumber *int32 `protobuf:"varint,2,req,name=minor_number,json=minorNumber" json:"minor_number,omitempty"`
+ Gitid *string `protobuf:"bytes,3,opt,name=gitid" json:"gitid,omitempty"`
+ Sublevel *int32 `protobuf:"varint,4,opt,name=sublevel" json:"sublevel,omitempty"`
+ Extra *int32 `protobuf:"varint,5,opt,name=extra" json:"extra,omitempty"`
+ Name *string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"`
+}
+
+func (x *CriuVersion) Reset() {
+ *x = CriuVersion{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_rpc_rpc_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CriuVersion) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriuVersion) ProtoMessage() {}
+
+func (x *CriuVersion) ProtoReflect() protoreflect.Message {
+ mi := &file_rpc_rpc_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriuVersion.ProtoReflect.Descriptor instead.
+func (*CriuVersion) Descriptor() ([]byte, []int) {
+ return file_rpc_rpc_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *CriuVersion) GetMajorNumber() int32 {
+ if x != nil && x.MajorNumber != nil {
+ return *x.MajorNumber
+ }
+ return 0
+}
+
+func (x *CriuVersion) GetMinorNumber() int32 {
+ if x != nil && x.MinorNumber != nil {
+ return *x.MinorNumber
+ }
+ return 0
+}
+
+func (x *CriuVersion) GetGitid() string {
+ if x != nil && x.Gitid != nil {
+ return *x.Gitid
+ }
+ return ""
+}
+
+func (x *CriuVersion) GetSublevel() int32 {
+ if x != nil && x.Sublevel != nil {
+ return *x.Sublevel
+ }
+ return 0
+}
+
+func (x *CriuVersion) GetExtra() int32 {
+ if x != nil && x.Extra != nil {
+ return *x.Extra
+ }
+ return 0
+}
+
+func (x *CriuVersion) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+var File_rpc_rpc_proto protoreflect.FileDescriptor
+
+var file_rpc_rpc_proto_rawDesc = []byte{
+ 0x0a, 0x0d, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x67, 0x0a, 0x15, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72,
+ 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72,
+ 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,
+ 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x66, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x63, 0x72, 0x69, 0x75,
+ 0x5f, 0x76, 0x65, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x12, 0x13, 0x0a, 0x05, 0x69, 0x66,
+ 0x5f, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x69, 0x66, 0x49, 0x6e, 0x12,
+ 0x15, 0x0a, 0x06, 0x69, 0x66, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52,
+ 0x05, 0x69, 0x66, 0x4f, 0x75, 0x74, 0x22, 0x33, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x6f,
+ 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c,
+ 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x56, 0x0a, 0x0e, 0x6a,
+ 0x6f, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a,
+ 0x02, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x02, 0x6e, 0x73, 0x12, 0x17, 0x0a,
+ 0x07, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06,
+ 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f,
+ 0x6f, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x72, 0x61,
+ 0x4f, 0x70, 0x74, 0x22, 0x2e, 0x0a, 0x0a, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x5f, 0x66,
+ 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03,
+ 0x6b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52,
+ 0x02, 0x66, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x72, 0x6f,
+ 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x74, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x63, 0x74, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02,
+ 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x1f, 0x0a, 0x07, 0x75, 0x6e,
+ 0x69, 0x78, 0x5f, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x80, 0x12, 0x0a, 0x09,
+ 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x6d, 0x61,
+ 0x67, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x5f, 0x66, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05,
+ 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x44, 0x69, 0x72, 0x46, 0x64, 0x12, 0x10, 0x0a,
+ 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12,
+ 0x23, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x75, 0x6e,
+ 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x78,
+ 0x5f, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, 0x74, 0x55, 0x6e,
+ 0x69, 0x78, 0x53, 0x6b, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x63, 0x70, 0x5f, 0x65, 0x73, 0x74, 0x61,
+ 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74,
+ 0x63, 0x70, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x27, 0x0a,
+ 0x0f, 0x65, 0x76, 0x61, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x73, 0x69, 0x76, 0x65, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f,
+ 0x6a, 0x6f, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x68, 0x65, 0x6c, 0x6c,
+ 0x4a, 0x6f, 0x62, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x6f, 0x63,
+ 0x6b, 0x73, 0x12, 0x1e, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
+ 0x09, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x32, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76,
+ 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x26, 0x0a,
+ 0x02, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x72, 0x69, 0x75,
+ 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66,
+ 0x6f, 0x52, 0x02, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6e,
+ 0x6f, 0x74, 0x69, 0x66, 0x79, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04,
+ 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6d, 0x67, 0x18, 0x0e,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6d, 0x67, 0x12,
+ 0x1b, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x0f, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x08, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4d, 0x65, 0x6d, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x64, 0x75, 0x70, 0x12, 0x1e, 0x0a, 0x0b, 0x77,
+ 0x6f, 0x72, 0x6b, 0x5f, 0x64, 0x69, 0x72, 0x5f, 0x66, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x69, 0x72, 0x46, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6c,
+ 0x69, 0x6e, 0x6b, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x6d, 0x61, 0x70, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x65,
+ 0x74, 0x68, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x72, 0x69, 0x75,
+ 0x5f, 0x76, 0x65, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x52, 0x05, 0x76, 0x65, 0x74, 0x68,
+ 0x73, 0x12, 0x23, 0x0a, 0x07, 0x63, 0x70, 0x75, 0x5f, 0x63, 0x61, 0x70, 0x18, 0x14, 0x20, 0x01,
+ 0x28, 0x0d, 0x3a, 0x0a, 0x34, 0x32, 0x39, 0x34, 0x39, 0x36, 0x37, 0x32, 0x39, 0x35, 0x52, 0x06,
+ 0x63, 0x70, 0x75, 0x43, 0x61, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f,
+ 0x69, 0x72, 0x6d, 0x61, 0x70, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f, 0x72,
+ 0x63, 0x65, 0x49, 0x72, 0x6d, 0x61, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x78, 0x65, 0x63, 0x5f,
+ 0x63, 0x6d, 0x64, 0x18, 0x16, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x65, 0x63, 0x43,
+ 0x6d, 0x64, 0x12, 0x27, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x6e, 0x74, 0x18, 0x17, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
+ 0x6d, 0x61, 0x70, 0x52, 0x06, 0x65, 0x78, 0x74, 0x4d, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x18, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x43, 0x67, 0x72, 0x6f, 0x75,
+ 0x70, 0x73, 0x12, 0x25, 0x0a, 0x07, 0x63, 0x67, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x19, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x72, 0x6f, 0x6f,
+ 0x74, 0x52, 0x06, 0x63, 0x67, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x73, 0x74,
+ 0x5f, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
+ 0x72, 0x73, 0x74, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, 0x0a, 0x69, 0x6e,
+ 0x68, 0x65, 0x72, 0x69, 0x74, 0x5f, 0x66, 0x64, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b,
+ 0x2e, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x5f, 0x66, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x68,
+ 0x65, 0x72, 0x69, 0x74, 0x46, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x65,
+ 0x78, 0x74, 0x5f, 0x6d, 0x6e, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75,
+ 0x74, 0x6f, 0x45, 0x78, 0x74, 0x4d, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x5f,
+ 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65,
+ 0x78, 0x74, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74,
+ 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
+ 0x65, 0x78, 0x74, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x6b,
+ 0x69, 0x70, 0x5f, 0x6d, 0x6e, 0x74, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6b,
+ 0x69, 0x70, 0x4d, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f,
+ 0x66, 0x73, 0x18, 0x20, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
+ 0x46, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6b, 0x5f, 0x69, 0x6e,
+ 0x6f, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73,
+ 0x6b, 0x52, 0x09, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6b, 0x49, 0x6e, 0x6f, 0x12, 0x3d, 0x0a, 0x13,
+ 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x5f, 0x6d,
+ 0x6f, 0x64, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63, 0x72, 0x69, 0x75,
+ 0x5f, 0x63, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x52, 0x11, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x43, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x67,
+ 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0d,
+ 0x3a, 0x07, 0x31, 0x30, 0x34, 0x38, 0x35, 0x37, 0x36, 0x52, 0x0a, 0x67, 0x68, 0x6f, 0x73, 0x74,
+ 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x72, 0x6d, 0x61, 0x70, 0x5f, 0x73,
+ 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x24, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x0e, 0x69, 0x72, 0x6d, 0x61, 0x70, 0x53, 0x63, 0x61, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12,
+ 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x25, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x65,
+ 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x6e, 0x73, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65,
+ 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x73, 0x12, 0x28, 0x0a, 0x07, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x6e,
+ 0x73, 0x18, 0x27, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x6a, 0x6f, 0x69, 0x6e, 0x4e, 0x73,
+ 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x73,
+ 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72,
+ 0x6f, 0x70, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x72,
+ 0x6f, 0x70, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
+ 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x70, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x12,
+ 0x34, 0x0a, 0x16, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x14, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x75, 0x6d, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72,
+ 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x5f,
+ 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72,
+ 0x65, 0x65, 0x7a, 0x65, 0x43, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69,
+ 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x69, 0x6d,
+ 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x6b, 0x69, 0x70,
+ 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0f, 0x74, 0x63, 0x70, 0x53, 0x6b, 0x69, 0x70, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68,
+ 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c,
+ 0x73, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x65, 0x61, 0x6b, 0x53, 0x79, 0x73,
+ 0x63, 0x74, 0x6c, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x7a, 0x79, 0x5f, 0x70, 0x61, 0x67,
+ 0x65, 0x73, 0x18, 0x30, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x61, 0x7a, 0x79, 0x50, 0x61,
+ 0x67, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x64,
+ 0x18, 0x31, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x64,
+ 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x72, 0x70, 0x68, 0x61, 0x6e, 0x5f, 0x70, 0x74, 0x73, 0x5f, 0x6d,
+ 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x32, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x72, 0x70,
+ 0x68, 0x61, 0x6e, 0x50, 0x74, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x33, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1b, 0x0a,
+ 0x09, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x34, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x08, 0x74, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x73,
+ 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x35, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x6c, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74,
+ 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x65, 0x72, 0x74, 0x18, 0x36, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x74, 0x6c, 0x73, 0x43, 0x61, 0x63, 0x65, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6c,
+ 0x73, 0x5f, 0x63, 0x61, 0x63, 0x72, 0x6c, 0x18, 0x37, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
+ 0x6c, 0x73, 0x43, 0x61, 0x63, 0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6c, 0x73, 0x5f, 0x63,
+ 0x65, 0x72, 0x74, 0x18, 0x38, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6c, 0x73, 0x43, 0x65,
+ 0x72, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x39, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74,
+ 0x6c, 0x73, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x27, 0x0a,
+ 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x6e, 0x6f, 0x5f, 0x63, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66,
+ 0x79, 0x18, 0x3b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x4e, 0x6f, 0x43, 0x6e,
+ 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x5f, 0x79, 0x61, 0x72, 0x64, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x59, 0x61, 0x72, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x5f, 0x64,
+ 0x75, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x3d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13,
+ 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x6d,
+ 0x6f, 0x64, 0x65, 0x3a, 0x06, 0x53, 0x50, 0x4c, 0x49, 0x43, 0x45, 0x52, 0x0b, 0x70, 0x72, 0x65,
+ 0x44, 0x75, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x69, 0x64, 0x66,
+ 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x6b, 0x18, 0x3e, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x0c, 0x70, 0x69, 0x64, 0x66, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6b, 0x12, 0x2a,
+ 0x0a, 0x11, 0x6c, 0x73, 0x6d, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x18, 0x3f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x73, 0x6d, 0x4d, 0x6f,
+ 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x0c, 0x6e, 0x65,
+ 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x40, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x19, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f,
+ 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x08, 0x49, 0x50, 0x54,
+ 0x41, 0x42, 0x4c, 0x45, 0x53, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f,
+ 0x63, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x6e, 0x74, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70,
+ 0x61, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x41, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6d,
+ 0x6e, 0x74, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x2c,
+ 0x0a, 0x0e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70,
+ 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x25, 0x0a, 0x11,
+ 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73,
+ 0x70, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x03,
+ 0x70, 0x69, 0x64, 0x22, 0x37, 0x0a, 0x0b, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6e, 0x6f, 0x74, 0x69,
+ 0x66, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x6c, 0x0a, 0x0d,
+ 0x63, 0x72, 0x69, 0x75, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a,
+ 0x09, 0x6d, 0x65, 0x6d, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61,
+ 0x7a, 0x79, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
+ 0x6c, 0x61, 0x7a, 0x79, 0x50, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x64,
+ 0x66, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
+ 0x70, 0x69, 0x64, 0x66, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x08, 0x63,
+ 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
+ 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6f,
+ 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x72, 0x69, 0x75,
+ 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6e,
+ 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x53, 0x75, 0x63, 0x63, 0x65,
+ 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x12,
+ 0x2a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x73, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70,
+ 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x8f, 0x03,
+ 0x0a, 0x09, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75,
+ 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
+ 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08,
+ 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x75, 0x6d,
+ 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x64,
+ 0x75, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x52, 0x04, 0x64, 0x75, 0x6d, 0x70, 0x12, 0x2c,
+ 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x12, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72,
+ 0x65, 0x73, 0x70, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x06,
+ 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63,
+ 0x72, 0x69, 0x75, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69,
+ 0x66, 0x79, 0x12, 0x26, 0x0a, 0x02, 0x70, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
+ 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65,
+ 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x52, 0x02, 0x70, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x72,
+ 0x5f, 0x65, 0x72, 0x72, 0x6e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x72,
+ 0x45, 0x72, 0x72, 0x6e, 0x6f, 0x12, 0x2a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x66,
+ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x72, 0x45, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x12, 0x27,
+ 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x0d, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
+ 0xb0, 0x01, 0x0a, 0x0c, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x4e, 0x75, 0x6d,
+ 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d,
+ 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x6f, 0x72,
+ 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x69, 0x74, 0x69, 0x64, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x69, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
+ 0x73, 0x75, 0x62, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
+ 0x73, 0x75, 0x62, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72,
+ 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x2a, 0x5f, 0x0a, 0x0c, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x63, 0x67, 0x5f, 0x6d, 0x6f,
+ 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x00, 0x12, 0x0b,
+ 0x0a, 0x07, 0x43, 0x47, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50,
+ 0x52, 0x4f, 0x50, 0x53, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x4f, 0x46, 0x54, 0x10, 0x03,
+ 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54,
+ 0x52, 0x49, 0x43, 0x54, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c,
+ 0x54, 0x10, 0x06, 0x2a, 0x36, 0x0a, 0x18, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6e, 0x65, 0x74, 0x77,
+ 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
+ 0x0c, 0x0a, 0x08, 0x49, 0x50, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x0c, 0x0a,
+ 0x08, 0x4e, 0x46, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x02, 0x2a, 0x2d, 0x0a, 0x12, 0x63,
+ 0x72, 0x69, 0x75, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64,
+ 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x4c, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a,
+ 0x07, 0x56, 0x4d, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x2a, 0xe5, 0x01, 0x0a, 0x0d, 0x63,
+ 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05,
+ 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x55, 0x4d, 0x50, 0x10,
+ 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x02, 0x12, 0x09,
+ 0x0a, 0x05, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45,
+ 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x47, 0x45, 0x5f,
+ 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49,
+ 0x46, 0x59, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x50, 0x55, 0x49, 0x4e, 0x46, 0x4f, 0x5f,
+ 0x44, 0x55, 0x4d, 0x50, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x50, 0x55, 0x49, 0x4e, 0x46,
+ 0x4f, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x45, 0x41,
+ 0x54, 0x55, 0x52, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07,
+ 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x57, 0x41, 0x49,
+ 0x54, 0x5f, 0x50, 0x49, 0x44, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x47, 0x45, 0x5f,
+ 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x48, 0x4c, 0x44, 0x10, 0x0c, 0x12, 0x13, 0x0a,
+ 0x0f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x5f, 0x44, 0x55, 0x4d, 0x50,
+ 0x10, 0x0d,
+}
+
+var (
+ file_rpc_rpc_proto_rawDescOnce sync.Once
+ file_rpc_rpc_proto_rawDescData = file_rpc_rpc_proto_rawDesc
+)
+
+func file_rpc_rpc_proto_rawDescGZIP() []byte {
+ file_rpc_rpc_proto_rawDescOnce.Do(func() {
+ file_rpc_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_rpc_proto_rawDescData)
+ })
+ return file_rpc_rpc_proto_rawDescData
+}
+
+var file_rpc_rpc_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
+var file_rpc_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_rpc_rpc_proto_goTypes = []interface{}{
+ (CriuCgMode)(0), // 0: criu_cg_mode
+ (CriuNetworkLockMethod)(0), // 1: criu_network_lock_method
+ (CriuPreDumpMode)(0), // 2: criu_pre_dump_mode
+ (CriuReqType)(0), // 3: criu_req_type
+ (*CriuPageServerInfo)(nil), // 4: criu_page_server_info
+ (*CriuVethPair)(nil), // 5: criu_veth_pair
+ (*ExtMountMap)(nil), // 6: ext_mount_map
+ (*JoinNamespace)(nil), // 7: join_namespace
+ (*InheritFd)(nil), // 8: inherit_fd
+ (*CgroupRoot)(nil), // 9: cgroup_root
+ (*UnixSk)(nil), // 10: unix_sk
+ (*CriuOpts)(nil), // 11: criu_opts
+ (*CriuDumpResp)(nil), // 12: criu_dump_resp
+ (*CriuRestoreResp)(nil), // 13: criu_restore_resp
+ (*CriuNotify)(nil), // 14: criu_notify
+ (*CriuFeatures)(nil), // 15: criu_features
+ (*CriuReq)(nil), // 16: criu_req
+ (*CriuResp)(nil), // 17: criu_resp
+ (*CriuVersion)(nil), // 18: criu_version
+}
+var file_rpc_rpc_proto_depIdxs = []int32{
+ 4, // 0: criu_opts.ps:type_name -> criu_page_server_info
+ 5, // 1: criu_opts.veths:type_name -> criu_veth_pair
+ 6, // 2: criu_opts.ext_mnt:type_name -> ext_mount_map
+ 9, // 3: criu_opts.cg_root:type_name -> cgroup_root
+ 8, // 4: criu_opts.inherit_fd:type_name -> inherit_fd
+ 10, // 5: criu_opts.unix_sk_ino:type_name -> unix_sk
+ 0, // 6: criu_opts.manage_cgroups_mode:type_name -> criu_cg_mode
+ 7, // 7: criu_opts.join_ns:type_name -> join_namespace
+ 2, // 8: criu_opts.pre_dump_mode:type_name -> criu_pre_dump_mode
+ 1, // 9: criu_opts.network_lock:type_name -> criu_network_lock_method
+ 3, // 10: criu_req.type:type_name -> criu_req_type
+ 11, // 11: criu_req.opts:type_name -> criu_opts
+ 15, // 12: criu_req.features:type_name -> criu_features
+ 3, // 13: criu_resp.type:type_name -> criu_req_type
+ 12, // 14: criu_resp.dump:type_name -> criu_dump_resp
+ 13, // 15: criu_resp.restore:type_name -> criu_restore_resp
+ 14, // 16: criu_resp.notify:type_name -> criu_notify
+ 4, // 17: criu_resp.ps:type_name -> criu_page_server_info
+ 15, // 18: criu_resp.features:type_name -> criu_features
+ 18, // 19: criu_resp.version:type_name -> criu_version
+ 20, // [20:20] is the sub-list for method output_type
+ 20, // [20:20] is the sub-list for method input_type
+ 20, // [20:20] is the sub-list for extension type_name
+ 20, // [20:20] is the sub-list for extension extendee
+ 0, // [0:20] is the sub-list for field type_name
+}
+
+func init() { file_rpc_rpc_proto_init() }
+func file_rpc_rpc_proto_init() {
+ if File_rpc_rpc_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_rpc_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuPageServerInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuVethPair); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExtMountMap); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*JoinNamespace); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InheritFd); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CgroupRoot); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UnixSk); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuOpts); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuDumpResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuRestoreResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuNotify); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuFeatures); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_rpc_rpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CriuVersion); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_rpc_rpc_proto_rawDesc,
+ NumEnums: 4,
+ NumMessages: 15,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_rpc_rpc_proto_goTypes,
+ DependencyIndexes: file_rpc_rpc_proto_depIdxs,
+ EnumInfos: file_rpc_rpc_proto_enumTypes,
+ MessageInfos: file_rpc_rpc_proto_msgTypes,
+ }.Build()
+ File_rpc_rpc_proto = out.File
+ file_rpc_rpc_proto_rawDesc = nil
+ file_rpc_rpc_proto_goTypes = nil
+ file_rpc_rpc_proto_depIdxs = nil
+}
diff --git a/rpc/rpc.proto b/rpc/rpc.proto
new file mode 100644
index 0000000..a6cc5da
--- /dev/null
+++ b/rpc/rpc.proto
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message criu_page_server_info {
+ optional string address = 1;
+ optional int32 port = 2;
+ optional int32 pid = 3;
+ optional int32 fd = 4;
+}
+
+message criu_veth_pair {
+ required string if_in = 1;
+ required string if_out = 2;
+};
+
+message ext_mount_map {
+ required string key = 1;
+ required string val = 2;
+};
+
+message join_namespace {
+ required string ns = 1;
+ required string ns_file = 2;
+ optional string extra_opt = 3;
+}
+
+message inherit_fd {
+ required string key = 1;
+ required int32 fd = 2;
+};
+
+message cgroup_root {
+ optional string ctrl = 1;
+ required string path = 2;
+};
+
+message unix_sk {
+ required uint32 inode = 1;
+};
+
+enum criu_cg_mode {
+ IGNORE = 0;
+ CG_NONE = 1;
+ PROPS = 2;
+ SOFT = 3;
+ FULL = 4;
+ STRICT = 5;
+ DEFAULT = 6;
+};
+
+enum criu_network_lock_method {
+ IPTABLES = 1;
+ NFTABLES = 2;
+};
+
+enum criu_pre_dump_mode {
+ SPLICE = 1;
+ VM_READ = 2;
+};
+
+message criu_opts {
+ required int32 images_dir_fd = 1;
+ optional int32 pid = 2; /* if not set on dump, will dump requesting process */
+
+ optional bool leave_running = 3;
+ optional bool ext_unix_sk = 4;
+ optional bool tcp_established = 5;
+ optional bool evasive_devices = 6;
+ optional bool shell_job = 7;
+ optional bool file_locks = 8;
+ optional int32 log_level = 9 [default = 2];
+ optional string log_file = 10; /* No subdirs are allowed. Consider using work-dir */
+
+ optional criu_page_server_info ps = 11;
+
+ optional bool notify_scripts = 12;
+
+ optional string root = 13;
+ optional string parent_img = 14;
+ optional bool track_mem = 15;
+ optional bool auto_dedup = 16;
+
+ optional int32 work_dir_fd = 17;
+ optional bool link_remap = 18;
+ repeated criu_veth_pair veths = 19; /* DEPRECATED, use external instead */
+
+ optional uint32 cpu_cap = 20 [default = 0xffffffff];
+ optional bool force_irmap = 21;
+ repeated string exec_cmd = 22;
+
+ repeated ext_mount_map ext_mnt = 23; /* DEPRECATED, use external instead */
+ optional bool manage_cgroups = 24; /* backward compatibility */
+ repeated cgroup_root cg_root = 25;
+
+ optional bool rst_sibling = 26; /* swrk only */
+ repeated inherit_fd inherit_fd = 27; /* swrk only */
+
+ optional bool auto_ext_mnt = 28;
+ optional bool ext_sharing = 29;
+ optional bool ext_masters = 30;
+
+ repeated string skip_mnt = 31;
+ repeated string enable_fs = 32;
+
+ repeated unix_sk unix_sk_ino = 33; /* DEPRECATED, use external instead */
+
+ optional criu_cg_mode manage_cgroups_mode = 34;
+ optional uint32 ghost_limit = 35 [default = 0x100000];
+ repeated string irmap_scan_paths = 36;
+ repeated string external = 37;
+ optional uint32 empty_ns = 38;
+ repeated join_namespace join_ns = 39;
+
+ optional string cgroup_props = 41;
+ optional string cgroup_props_file = 42;
+ repeated string cgroup_dump_controller = 43;
+
+ optional string freeze_cgroup = 44;
+ optional uint32 timeout = 45;
+ optional bool tcp_skip_in_flight = 46;
+ optional bool weak_sysctls = 47;
+ optional bool lazy_pages = 48;
+ optional int32 status_fd = 49;
+ optional bool orphan_pts_master = 50;
+ optional string config_file = 51;
+ optional bool tcp_close = 52;
+ optional string lsm_profile = 53;
+ optional string tls_cacert = 54;
+ optional string tls_cacrl = 55;
+ optional string tls_cert = 56;
+ optional string tls_key = 57;
+ optional bool tls = 58;
+ optional bool tls_no_cn_verify = 59;
+ optional string cgroup_yard = 60;
+ optional criu_pre_dump_mode pre_dump_mode = 61 [default = SPLICE];
+ optional int32 pidfd_store_sk = 62;
+ optional string lsm_mount_context = 63;
+ optional criu_network_lock_method network_lock = 64 [default = IPTABLES];
+ optional bool mntns_compat_mode = 65;
+/* optional bool check_mounts = 128; */
+}
+
+message criu_dump_resp {
+ optional bool restored = 1;
+}
+
+message criu_restore_resp {
+ required int32 pid = 1;
+}
+
+message criu_notify {
+ optional string script = 1;
+ optional int32 pid = 2;
+}
+
+enum criu_req_type {
+ EMPTY = 0;
+ DUMP = 1;
+ RESTORE = 2;
+ CHECK = 3;
+ PRE_DUMP = 4;
+ PAGE_SERVER = 5;
+
+ NOTIFY = 6;
+
+ CPUINFO_DUMP = 7;
+ CPUINFO_CHECK = 8;
+
+ FEATURE_CHECK = 9;
+
+ VERSION = 10;
+
+ WAIT_PID = 11;
+ PAGE_SERVER_CHLD = 12;
+
+ SINGLE_PRE_DUMP = 13;
+}
+
+/*
+ * List of features which can queried via
+ * CRIU_REQ_TYPE__FEATURE_CHECK
+ */
+message criu_features {
+ optional bool mem_track = 1;
+ optional bool lazy_pages = 2;
+ optional bool pidfd_store = 3;
+}
+
+/*
+ * Request -- each type corresponds to must-be-there
+ * request arguments of respective type
+ */
+
+message criu_req {
+ required criu_req_type type = 1;
+
+ optional criu_opts opts = 2;
+ optional bool notify_success = 3;
+
+ /*
+ * When set service won't close the connection but
+ * will wait for more req-s to appear. Works not
+ * for all request types.
+ */
+ optional bool keep_open = 4;
+ /*
+ * 'features' can be used to query which features
+ * are supported by the installed criu/kernel
+ * via RPC.
+ */
+ optional criu_features features = 5;
+
+ /* 'pid' is used for WAIT_PID */
+ optional uint32 pid = 6;
+}
+
+/*
+ * Response -- it states whether the request was served
+ * and additional request-specific information
+ */
+
+message criu_resp {
+ required criu_req_type type = 1;
+ required bool success = 2;
+
+ optional criu_dump_resp dump = 3;
+ optional criu_restore_resp restore = 4;
+ optional criu_notify notify = 5;
+ optional criu_page_server_info ps = 6;
+
+ optional int32 cr_errno = 7;
+ optional criu_features features = 8;
+ optional string cr_errmsg = 9;
+ optional criu_version version = 10;
+
+ optional int32 status = 11;
+}
+
+/* Answer for criu_req_type.VERSION requests */
+message criu_version {
+ required int32 major_number = 1;
+ required int32 minor_number = 2;
+ optional string gitid = 3;
+ optional int32 sublevel = 4;
+ optional int32 extra = 5;
+ optional string name = 6;
+}
diff --git a/scripts/Makefile b/scripts/Makefile
new file mode 100644
index 0000000..9f70443
--- /dev/null
+++ b/scripts/Makefile
@@ -0,0 +1,19 @@
+GO ?= go
+
+magic-gen: clean magic.h
+ $(GO) run magicgen.go magic.h ../magic/magic.go
+
+magic.h:
+ curl -s https://raw.githubusercontent.com/checkpoint-restore/criu/criu-dev/criu/include/magic.h -o magic.h
+
+test:
+ @echo "Running unit test"
+ $(GO) test -v
+ @echo "Running E2E test"
+ @./magicgen-test.sh
+ @rm -f input.h output.go expected.go
+
+clean:
+ rm -f ../magic/magic.go magic.h
+
+.PHONY: magic-gen test clean
diff --git a/scripts/README.md b/scripts/README.md
new file mode 100644
index 0000000..8dfd4da
--- /dev/null
+++ b/scripts/README.md
@@ -0,0 +1,11 @@
+This directory contains scripts used by go-criu.
+
+# `magicgen`
+CRIU uses a 32-bit integer value to determine the type of image file. These values are called *magics*, and are defined [here](https://github.com/checkpoint-restore/criu/tree/master/criu/include/magic.h). `magicgen.go` processes this header file and generates `../magic/magic.go` with a map of magic names and values.
+
+`Usage: magicgen.go /path/to/magic.h /path/to/magic.go`
+
+A set of Makefile targets are provided for convenience:
+- `make` or `make magic-gen`: Generate `../magic/magic.go`
+- `make test`: Run unit test and E2E test for `magicgen.go`
+- `make clean`: Remove `../magic/magic.go` and `magic.h`
diff --git a/scripts/magicgen-test.sh b/scripts/magicgen-test.sh
new file mode 100755
index 0000000..a8e6bf4
--- /dev/null
+++ b/scripts/magicgen-test.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+# print all commands to stdout for debugging
+set -x
+
+# generate sample input file
+cat > input.h <<EOF
+#define TEST 0xbc614e
+EOF
+
+# generate expected output file
+cat > expected.go <<EOF
+// Code generated by magicgen. DO NOT EDIT.
+
+package magic
+
+type MagicMap struct {
+ ByName map[string]uint64
+ ByValue map[uint64]string
+}
+
+func LoadMagic() MagicMap {
+ magicMap := MagicMap{
+ ByName: make(map[string]uint64),
+ ByValue: make(map[uint64]string),
+ }
+ magicMap.ByName["TEST"] = 12345678
+ magicMap.ByValue[12345678] = "TEST"
+ return magicMap
+}
+EOF
+
+go run magicgen.go input.h output.go
+cmp output.go expected.go
+if [[ $? -eq 0 ]]
+then
+ echo "PASS"
+ exit 0
+else
+ echo "FAIL"
+ diff output.go expected.go
+ exit 1
+fi
diff --git a/scripts/magicgen.go b/scripts/magicgen.go
new file mode 100644
index 0000000..f256010
--- /dev/null
+++ b/scripts/magicgen.go
@@ -0,0 +1,112 @@
+package main
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "log"
+ "os"
+ "sort"
+ "strconv"
+ "strings"
+)
+
+func main() {
+ // Check arguments
+ if len(os.Args) != 3 {
+ log.Fatal("Usage: magicgen.go path/to/magic.h path/to/magic.go")
+ }
+
+ magicHPath := os.Args[1]
+ magicGoPath := os.Args[2]
+ // Open magic.h
+ magicHFile, err := os.Open(magicHPath)
+ if err != nil {
+ log.Fatal("Failed to open magic.h")
+ }
+ defer magicHFile.Close()
+ // Open magic.json if it exists, else create it
+ magicGoFile, err := os.Create(magicGoPath)
+ if err != nil {
+ log.Fatal("Failed to open magic.go")
+ }
+ defer magicGoFile.Close()
+
+ magics := readMagics(magicHFile)
+ writeMagics(magicGoFile, magics)
+}
+
+func readMagics(in io.Reader) map[string]uint64 {
+ magics := make(map[string]uint64)
+
+ r := bufio.NewScanner(in)
+ // Read line by line
+ for r.Scan() {
+ tokens := strings.Fields(r.Text())
+ if len(tokens) >= 3 {
+ if tokens[0] == "#define" {
+ magicName := tokens[1]
+ magicHex := tokens[2]
+ // Check if magic is defined as another magic
+ if _, ok := magics[magicHex]; ok {
+ continue
+ }
+ /* Base 0 has to be used to parse magicHex instead
+ of base 16 as the string contains 0x at the
+ beginning, which strconv.ParseUint cannot parse. */
+ magicHexInt, err := strconv.ParseUint(magicHex, 0, 64)
+ if err != nil {
+ log.Printf("Failed to parse magic %s\n", magicName)
+ continue
+ }
+ magics[magicName] = magicHexInt
+ }
+ }
+ }
+
+ return magics
+}
+
+func writeMagics(out io.Writer, magics map[string]uint64) {
+ // Sort the magic names alphabetically and use
+ // this in the generated file for consistency
+ magicNames := make([]string, 0, len(magics))
+ for name := range magics {
+ magicNames = append(magicNames, name)
+ }
+ sort.Strings(magicNames)
+
+ w := bufio.NewWriter(out)
+ fmt.Fprintf(w,
+ `// Code generated by magicgen. DO NOT EDIT.
+
+package magic
+
+type MagicMap struct {
+ ByName map[string]uint64
+ ByValue map[uint64]string
+}
+
+func LoadMagic() MagicMap {
+ magicMap := MagicMap{
+ ByName: make(map[string]uint64),
+ ByValue: make(map[uint64]string),
+ }`)
+
+ for _, name := range magicNames {
+ v := magics[name]
+ // Ignore RAW_IMAGE_MAGIC and V1 magic
+ if v == 0 || v == 1 {
+ continue
+ }
+ if strings.Contains(name, "_MAGIC") == true {
+ name = strings.Replace(name, "_MAGIC", "", -1)
+ }
+ fmt.Fprintf(w, "\n\tmagicMap.ByName[\"%s\"] = %d",
+ name, v)
+ fmt.Fprintf(w, "\n\tmagicMap.ByValue[%d] = \"%s\"",
+ v, name)
+ }
+ fmt.Fprintf(w, "\n\treturn magicMap\n}\n")
+ w.Flush()
+}
diff --git a/scripts/magicgen_test.go b/scripts/magicgen_test.go
new file mode 100644
index 0000000..cdc761f
--- /dev/null
+++ b/scripts/magicgen_test.go
@@ -0,0 +1,110 @@
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "reflect"
+ "strings"
+ "testing"
+)
+
+type testRead struct {
+ in string
+ expected map[string]uint64
+}
+
+type testWrite struct {
+ in map[string]uint64
+ expected string
+}
+
+func TestReadMagics(t *testing.T) {
+ tests := []testRead{
+ {
+ // Simple
+ in: "#define TEST 0xbc614e",
+ expected: map[string]uint64{
+ "TEST": 12345678,
+ },
+ },
+ {
+ // With duplicate
+ in: `#define TEST 0xbc614e
+#define V1 1
+#define TEST_COPY TEST
+#define RAW 0x0
+`,
+ expected: map[string]uint64{
+ "V1": 1,
+ "TEST": 12345678,
+ "RAW": 0,
+ },
+ },
+ }
+
+ for _, test := range tests {
+ got := readMagics(strings.NewReader(test.in))
+ if !reflect.DeepEqual(got, test.expected) {
+ t.Errorf("Got: %v\nExpected: %v", got, test.expected)
+ }
+ }
+}
+
+func TestWriteMagics(t *testing.T) {
+ expectedPrefix := `// Code generated by magicgen. DO NOT EDIT.
+
+package magic
+
+type MagicMap struct {
+ ByName map[string]uint64
+ ByValue map[uint64]string
+}
+
+func LoadMagic() MagicMap {
+ magicMap := MagicMap{
+ ByName: make(map[string]uint64),
+ ByValue: make(map[uint64]string),
+ }`
+ expectedSuffix := "\n\treturn magicMap\n}\n"
+
+ tests := []testWrite{
+ {
+ // Simple
+ in: map[string]uint64{
+ "TEST": 12345678,
+ },
+ expected: `
+ magicMap.ByName["TEST"] = 12345678
+ magicMap.ByValue[12345678] = "TEST"`,
+ },
+ {
+ // With suffix
+ in: map[string]uint64{
+ "TEST_MAGIC": 12345678,
+ },
+ expected: `
+ magicMap.ByName["TEST"] = 12345678
+ magicMap.ByValue[12345678] = "TEST"`,
+ },
+ {
+ // With values to be ignored
+ in: map[string]uint64{
+ "V1": 1,
+ "TEST": 12345678,
+ "RAW": 0,
+ },
+ expected: `
+ magicMap.ByName["TEST"] = 12345678
+ magicMap.ByValue[12345678] = "TEST"`,
+ },
+ }
+
+ for _, test := range tests {
+ got := &bytes.Buffer{}
+ want := fmt.Sprint(expectedPrefix, test.expected, expectedSuffix)
+ writeMagics(got, test.in)
+ if !reflect.DeepEqual(got.String(), want) {
+ t.Errorf("Got: %v\nExpected: %v", got, want)
+ }
+ }
+}
diff --git a/stats/stats.pb.go b/stats/stats.pb.go
new file mode 100644
index 0000000..0be0ced
--- /dev/null
+++ b/stats/stats.pb.go
@@ -0,0 +1,462 @@
+// SPDX-License-Identifier: MIT
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.19.4
+// source: stats/stats.proto
+
+package stats
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// This one contains statistics about dump/restore process
+type DumpStatsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ FreezingTime *uint32 `protobuf:"varint,1,req,name=freezing_time,json=freezingTime" json:"freezing_time,omitempty"`
+ FrozenTime *uint32 `protobuf:"varint,2,req,name=frozen_time,json=frozenTime" json:"frozen_time,omitempty"`
+ MemdumpTime *uint32 `protobuf:"varint,3,req,name=memdump_time,json=memdumpTime" json:"memdump_time,omitempty"`
+ MemwriteTime *uint32 `protobuf:"varint,4,req,name=memwrite_time,json=memwriteTime" json:"memwrite_time,omitempty"`
+ PagesScanned *uint64 `protobuf:"varint,5,req,name=pages_scanned,json=pagesScanned" json:"pages_scanned,omitempty"`
+ PagesSkippedParent *uint64 `protobuf:"varint,6,req,name=pages_skipped_parent,json=pagesSkippedParent" json:"pages_skipped_parent,omitempty"`
+ PagesWritten *uint64 `protobuf:"varint,7,req,name=pages_written,json=pagesWritten" json:"pages_written,omitempty"`
+ IrmapResolve *uint32 `protobuf:"varint,8,opt,name=irmap_resolve,json=irmapResolve" json:"irmap_resolve,omitempty"`
+ PagesLazy *uint64 `protobuf:"varint,9,req,name=pages_lazy,json=pagesLazy" json:"pages_lazy,omitempty"`
+ PagePipes *uint64 `protobuf:"varint,10,opt,name=page_pipes,json=pagePipes" json:"page_pipes,omitempty"`
+ PagePipeBufs *uint64 `protobuf:"varint,11,opt,name=page_pipe_bufs,json=pagePipeBufs" json:"page_pipe_bufs,omitempty"`
+ ShpagesScanned *uint64 `protobuf:"varint,12,opt,name=shpages_scanned,json=shpagesScanned" json:"shpages_scanned,omitempty"`
+ ShpagesSkippedParent *uint64 `protobuf:"varint,13,opt,name=shpages_skipped_parent,json=shpagesSkippedParent" json:"shpages_skipped_parent,omitempty"`
+ ShpagesWritten *uint64 `protobuf:"varint,14,opt,name=shpages_written,json=shpagesWritten" json:"shpages_written,omitempty"`
+}
+
+func (x *DumpStatsEntry) Reset() {
+ *x = DumpStatsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_stats_stats_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DumpStatsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DumpStatsEntry) ProtoMessage() {}
+
+func (x *DumpStatsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_stats_stats_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DumpStatsEntry.ProtoReflect.Descriptor instead.
+func (*DumpStatsEntry) Descriptor() ([]byte, []int) {
+ return file_stats_stats_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *DumpStatsEntry) GetFreezingTime() uint32 {
+ if x != nil && x.FreezingTime != nil {
+ return *x.FreezingTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetFrozenTime() uint32 {
+ if x != nil && x.FrozenTime != nil {
+ return *x.FrozenTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetMemdumpTime() uint32 {
+ if x != nil && x.MemdumpTime != nil {
+ return *x.MemdumpTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetMemwriteTime() uint32 {
+ if x != nil && x.MemwriteTime != nil {
+ return *x.MemwriteTime
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesScanned() uint64 {
+ if x != nil && x.PagesScanned != nil {
+ return *x.PagesScanned
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesSkippedParent() uint64 {
+ if x != nil && x.PagesSkippedParent != nil {
+ return *x.PagesSkippedParent
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesWritten() uint64 {
+ if x != nil && x.PagesWritten != nil {
+ return *x.PagesWritten
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetIrmapResolve() uint32 {
+ if x != nil && x.IrmapResolve != nil {
+ return *x.IrmapResolve
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagesLazy() uint64 {
+ if x != nil && x.PagesLazy != nil {
+ return *x.PagesLazy
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagePipes() uint64 {
+ if x != nil && x.PagePipes != nil {
+ return *x.PagePipes
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetPagePipeBufs() uint64 {
+ if x != nil && x.PagePipeBufs != nil {
+ return *x.PagePipeBufs
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetShpagesScanned() uint64 {
+ if x != nil && x.ShpagesScanned != nil {
+ return *x.ShpagesScanned
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetShpagesSkippedParent() uint64 {
+ if x != nil && x.ShpagesSkippedParent != nil {
+ return *x.ShpagesSkippedParent
+ }
+ return 0
+}
+
+func (x *DumpStatsEntry) GetShpagesWritten() uint64 {
+ if x != nil && x.ShpagesWritten != nil {
+ return *x.ShpagesWritten
+ }
+ return 0
+}
+
+type RestoreStatsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PagesCompared *uint64 `protobuf:"varint,1,req,name=pages_compared,json=pagesCompared" json:"pages_compared,omitempty"`
+ PagesSkippedCow *uint64 `protobuf:"varint,2,req,name=pages_skipped_cow,json=pagesSkippedCow" json:"pages_skipped_cow,omitempty"`
+ ForkingTime *uint32 `protobuf:"varint,3,req,name=forking_time,json=forkingTime" json:"forking_time,omitempty"`
+ RestoreTime *uint32 `protobuf:"varint,4,req,name=restore_time,json=restoreTime" json:"restore_time,omitempty"`
+ PagesRestored *uint64 `protobuf:"varint,5,opt,name=pages_restored,json=pagesRestored" json:"pages_restored,omitempty"`
+}
+
+func (x *RestoreStatsEntry) Reset() {
+ *x = RestoreStatsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_stats_stats_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RestoreStatsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RestoreStatsEntry) ProtoMessage() {}
+
+func (x *RestoreStatsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_stats_stats_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RestoreStatsEntry.ProtoReflect.Descriptor instead.
+func (*RestoreStatsEntry) Descriptor() ([]byte, []int) {
+ return file_stats_stats_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RestoreStatsEntry) GetPagesCompared() uint64 {
+ if x != nil && x.PagesCompared != nil {
+ return *x.PagesCompared
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetPagesSkippedCow() uint64 {
+ if x != nil && x.PagesSkippedCow != nil {
+ return *x.PagesSkippedCow
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetForkingTime() uint32 {
+ if x != nil && x.ForkingTime != nil {
+ return *x.ForkingTime
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetRestoreTime() uint32 {
+ if x != nil && x.RestoreTime != nil {
+ return *x.RestoreTime
+ }
+ return 0
+}
+
+func (x *RestoreStatsEntry) GetPagesRestored() uint64 {
+ if x != nil && x.PagesRestored != nil {
+ return *x.PagesRestored
+ }
+ return 0
+}
+
+type StatsEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Dump *DumpStatsEntry `protobuf:"bytes,1,opt,name=dump" json:"dump,omitempty"`
+ Restore *RestoreStatsEntry `protobuf:"bytes,2,opt,name=restore" json:"restore,omitempty"`
+}
+
+func (x *StatsEntry) Reset() {
+ *x = StatsEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_stats_stats_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StatsEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StatsEntry) ProtoMessage() {}
+
+func (x *StatsEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_stats_stats_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StatsEntry.ProtoReflect.Descriptor instead.
+func (*StatsEntry) Descriptor() ([]byte, []int) {
+ return file_stats_stats_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *StatsEntry) GetDump() *DumpStatsEntry {
+ if x != nil {
+ return x.Dump
+ }
+ return nil
+}
+
+func (x *StatsEntry) GetRestore() *RestoreStatsEntry {
+ if x != nil {
+ return x.Restore
+ }
+ return nil
+}
+
+var File_stats_stats_proto protoreflect.FileDescriptor
+
+var file_stats_stats_proto_rawDesc = []byte{
+ 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x10, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x61,
+ 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x65, 0x65,
+ 0x7a, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52,
+ 0x0c, 0x66, 0x72, 0x65, 0x65, 0x7a, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a,
+ 0x0b, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02,
+ 0x28, 0x0d, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21,
+ 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x64, 0x75, 0x6d, 0x70, 0x54, 0x69, 0x6d,
+ 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69,
+ 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x77, 0x72, 0x69,
+ 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f,
+ 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x53, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x12, 0x70, 0x61, 0x67, 0x65, 0x73,
+ 0x53, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a,
+ 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x07,
+ 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x65, 0x73, 0x57, 0x72, 0x69, 0x74, 0x74,
+ 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x72, 0x6d, 0x61, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x6f,
+ 0x6c, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x69, 0x72, 0x6d, 0x61, 0x70,
+ 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x73,
+ 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x09, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x67,
+ 0x65, 0x73, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70,
+ 0x69, 0x70, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65,
+ 0x50, 0x69, 0x70, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x69,
+ 0x70, 0x65, 0x5f, 0x62, 0x75, 0x66, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70,
+ 0x61, 0x67, 0x65, 0x50, 0x69, 0x70, 0x65, 0x42, 0x75, 0x66, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73,
+ 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x0c,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x63, 0x61,
+ 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f,
+ 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0d,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x6b, 0x69,
+ 0x70, 0x70, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x68,
+ 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x0e, 0x20,
+ 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x57, 0x72, 0x69, 0x74,
+ 0x74, 0x65, 0x6e, 0x22, 0xd5, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20,
+ 0x02, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72,
+ 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70,
+ 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0f, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x77, 0x12, 0x21,
+ 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03,
+ 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d,
+ 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d,
+ 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
+ 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x72, 0x65,
+ 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x61,
+ 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x64, 0x0a, 0x0b, 0x73,
+ 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x75,
+ 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x75, 0x6d,
+ 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x74, 0x61,
+ 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72,
+ 0x65,
+}
+
+var (
+ file_stats_stats_proto_rawDescOnce sync.Once
+ file_stats_stats_proto_rawDescData = file_stats_stats_proto_rawDesc
+)
+
+func file_stats_stats_proto_rawDescGZIP() []byte {
+ file_stats_stats_proto_rawDescOnce.Do(func() {
+ file_stats_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_stats_stats_proto_rawDescData)
+ })
+ return file_stats_stats_proto_rawDescData
+}
+
+var file_stats_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_stats_stats_proto_goTypes = []interface{}{
+ (*DumpStatsEntry)(nil), // 0: dump_stats_entry
+ (*RestoreStatsEntry)(nil), // 1: restore_stats_entry
+ (*StatsEntry)(nil), // 2: stats_entry
+}
+var file_stats_stats_proto_depIdxs = []int32{
+ 0, // 0: stats_entry.dump:type_name -> dump_stats_entry
+ 1, // 1: stats_entry.restore:type_name -> restore_stats_entry
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_stats_stats_proto_init() }
+func file_stats_stats_proto_init() {
+ if File_stats_stats_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_stats_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DumpStatsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_stats_stats_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RestoreStatsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_stats_stats_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StatsEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_stats_stats_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_stats_stats_proto_goTypes,
+ DependencyIndexes: file_stats_stats_proto_depIdxs,
+ MessageInfos: file_stats_stats_proto_msgTypes,
+ }.Build()
+ File_stats_stats_proto = out.File
+ file_stats_stats_proto_rawDesc = nil
+ file_stats_stats_proto_goTypes = nil
+ file_stats_stats_proto_depIdxs = nil
+}
diff --git a/stats/stats.proto b/stats/stats.proto
new file mode 100644
index 0000000..64e4618
--- /dev/null
+++ b/stats/stats.proto
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+// This one contains statistics about dump/restore process
+message dump_stats_entry {
+ required uint32 freezing_time = 1;
+ required uint32 frozen_time = 2;
+ required uint32 memdump_time = 3;
+ required uint32 memwrite_time = 4;
+
+ required uint64 pages_scanned = 5;
+ required uint64 pages_skipped_parent = 6;
+ required uint64 pages_written = 7;
+
+ optional uint32 irmap_resolve = 8;
+
+ required uint64 pages_lazy = 9;
+ optional uint64 page_pipes = 10;
+ optional uint64 page_pipe_bufs = 11;
+
+ optional uint64 shpages_scanned = 12;
+ optional uint64 shpages_skipped_parent = 13;
+ optional uint64 shpages_written = 14;
+}
+
+message restore_stats_entry {
+ required uint64 pages_compared = 1;
+ required uint64 pages_skipped_cow = 2;
+
+ required uint32 forking_time = 3;
+ required uint32 restore_time = 4;
+
+ optional uint64 pages_restored = 5;
+}
+
+message stats_entry {
+ optional dump_stats_entry dump = 1;
+ optional restore_stats_entry restore = 2;
+}
diff --git a/stats/types.go b/stats/types.go
new file mode 100644
index 0000000..69d5b0c
--- /dev/null
+++ b/stats/types.go
@@ -0,0 +1,14 @@
+package stats
+
+const (
+ StatsDump = "stats-dump"
+ StatsRestore = "stats-restore"
+
+ ImgServiceMagic = 0x55105940 /* Zlatoust */
+ StatsMagic = 0x57093306 /* Ostashkov */
+
+ PrimaryMagicOffset = 0x0
+ SecondaryMagicOffset = 0x4
+ SizeOffset = 0x8
+ PayloadOffset = 0xC
+)
diff --git a/stats/utils.go b/stats/utils.go
new file mode 100644
index 0000000..933e887
--- /dev/null
+++ b/stats/utils.go
@@ -0,0 +1,53 @@
+package stats
+
+import (
+ "encoding/binary"
+ "errors"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+
+ "google.golang.org/protobuf/proto"
+)
+
+func readStatisticsFile(imgDir *os.File, fileName string) (*StatsEntry, error) {
+ buf, err := ioutil.ReadFile(filepath.Join(imgDir.Name(), fileName))
+ if err != nil {
+ return nil, err
+ }
+
+ if binary.LittleEndian.Uint32(buf[PrimaryMagicOffset:SecondaryMagicOffset]) != ImgServiceMagic {
+ return nil, errors.New("Primary magic not found")
+ }
+
+ if binary.LittleEndian.Uint32(buf[SecondaryMagicOffset:SizeOffset]) != StatsMagic {
+ return nil, errors.New("Secondary magic not found")
+ }
+
+ payloadSize := binary.LittleEndian.Uint32(buf[SizeOffset:PayloadOffset])
+
+ st := &StatsEntry{}
+ if err := proto.Unmarshal(buf[PayloadOffset:PayloadOffset+payloadSize], st); err != nil {
+ return nil, err
+ }
+
+ return st, nil
+}
+
+func CriuGetDumpStats(imgDir *os.File) (*DumpStatsEntry, error) {
+ st, err := readStatisticsFile(imgDir, StatsDump)
+ if err != nil {
+ return nil, err
+ }
+
+ return st.GetDump(), nil
+}
+
+func CriuGetRestoreStats(imgDir *os.File) (*RestoreStatsEntry, error) {
+ st, err := readStatisticsFile(imgDir, StatsRestore)
+ if err != nil {
+ return nil, err
+ }
+
+ return st.GetRestore(), nil
+}
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..03a1d5b
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,84 @@
+SHELL = /bin/bash
+GO ?= go
+CC ?= gcc
+COVERAGE_PATH ?= $(shell pwd)/.coverage
+CRIU_FEATURE_MEM_TRACK = $(shell if criu check --feature mem_dirty_track > /dev/null; then echo 1; else echo 0; fi)
+CRIU_FEATURE_LAZY_PAGES = $(shell if criu check --feature uffd-noncoop > /dev/null; then echo 1; else echo 0; fi)
+CRIU_FEATURE_PIDFD_STORE = $(shell if criu check --feature pidfd_store > /dev/null; then echo 1; else echo 0; fi)
+
+export CRIU_FEATURE_MEM_TRACK CRIU_FEATURE_LAZY_PAGES CRIU_FEATURE_PIDFD_STORE
+
+TEST_PAYLOAD := piggie/piggie
+TEST_BINARIES := test $(TEST_PAYLOAD) phaul/phaul
+COVERAGE_BINARIES := test.coverage phaul/phaul.coverage
+
+all: $(TEST_BINARIES) phaul-test
+ mkdir -p image
+ PID=$$(piggie/piggie) && { \
+ test dump $$PID image && \
+ test restore image; \
+ pkill -9 piggie; \
+ }
+ rm -rf image
+
+piggie/piggie: piggie/piggie.c
+ $(CC) $^ -o $@
+
+test: main.go
+ $(GO) build -v -o $@ $^
+
+phaul/phaul: phaul/main.go
+ $(GO) build -v -o $@ $^
+
+phaul-test: $(TEST_BINARIES)
+ rm -rf image
+ PID=$$(piggie/piggie) && { \
+ phaul/phaul $$PID; \
+ pkill -9 piggie; \
+ }
+
+crit-test:
+ $(MAKE) -C crit
+
+test.coverage: *.go
+ $(GO) test \
+ -covermode=count \
+ -coverpkg=./... \
+ -mod=vendor \
+ -tags coverage \
+ -buildmode=pie -c -o $@ $^
+
+phaul/phaul.coverage: phaul/*.go
+ $(GO) test \
+ -covermode=count \
+ -coverpkg=./... \
+ -mod=vendor \
+ -tags coverage \
+ -buildmode=pie -c -o $@ $^
+
+coverage: $(COVERAGE_BINARIES) $(TEST_PAYLOAD)
+ mkdir -p $(COVERAGE_PATH)
+ mkdir -p image
+ PID=$$(piggie/piggie) && { \
+ ./test.coverage -test.coverprofile=coverprofile.integration.$$RANDOM -test.outputdir=${COVERAGE_PATH} COVERAGE dump $$PID image && \
+ ./test.coverage -test.coverprofile=coverprofile.integration.$$RANDOM -test.outputdir=${COVERAGE_PATH} COVERAGE restore image; \
+ pkill -9 piggie; \
+ }
+ rm -rf image
+ PID=$$(piggie/piggie) && { \
+ phaul/phaul.coverage -test.coverprofile=coverprofile.integration.$$RANDOM -test.outputdir=${COVERAGE_PATH} COVERAGE $$PID; \
+ pkill -9 piggie; \
+ }
+ echo "mode: set" > .coverage/coverage.out && cat .coverage/coverprofile* | \
+ grep -v mode: | sort -r | awk '{if($$1 != last) {print $$0;last=$$1}}' >> .coverage/coverage.out
+
+codecov:
+ curl -Os https://uploader.codecov.io/latest/linux/codecov
+ chmod +x codecov
+ ./codecov -f '.coverage/coverage.out'
+
+clean:
+ @rm -f $(TEST_BINARIES) $(COVERAGE_BINARIES) codecov
+ @rm -rf image $(COVERAGE_PATH)
+
+.PHONY: all clean coverage codecov crit-test phaul-test
diff --git a/test/crit/Makefile b/test/crit/Makefile
new file mode 100644
index 0000000..da7e3d4
--- /dev/null
+++ b/test/crit/Makefile
@@ -0,0 +1,37 @@
+CC ?= gcc
+GO ?= go
+CRIU ?= criu
+
+all: unit-test integration-test e2e-test clean
+
+unit-test: test-imgs
+ go test -v ./...
+
+integration-test: test-imgs crit-test
+ @echo "Running integration test"
+ @./crit-test
+
+e2e-test: ../../crit/bin/crit test-imgs crit-test.sh
+ @echo "Running E2E test"
+ @./crit-test.sh
+
+test-imgs: ../loop/loop
+ $(eval PID := $(shell ../loop/loop))
+ mkdir -p $@
+ $(CRIU) dump -v4 -o dump.log -D $@ -t $(PID)
+ $(CRIU) restore -v4 -o restore.log -D $@ -d
+ pkill -9 loop
+
+../../crit/bin/crit:
+ $(MAKE) -C ../../crit bin/crit
+
+../loop/loop: ../loop/loop.c
+ $(CC) $^ -o $@
+
+crit-test: main.go
+ $(GO) build -v -o $@ $^
+
+clean:
+ @rm -rf test-imgs
+
+.PHONY: all test unit-test integration-test e2e-test clean
diff --git a/test/crit/crit-test.sh b/test/crit/crit-test.sh
new file mode 100755
index 0000000..b2da9e7
--- /dev/null
+++ b/test/crit/crit-test.sh
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+set -x
+
+CRIT=../../crit/bin/crit
+TEST_IMG_DIR=test-imgs
+
+function gen_img_list {
+ images_list=$(find "$TEST_IMG_DIR" -regex '^[^\.]*\.img$')
+ if [ -z "$images_list" ]; then
+ echo "Failed to generate images"
+ exit 1
+ fi
+}
+
+function recode_test {
+ for x in $images_list
+ do
+ echo "=== $x"
+ if [[ $x == *pages* ]]; then
+ echo "=== SKIP"
+ continue
+ fi
+
+ echo " -- to json"
+ $CRIT decode -i "$x" -o "$x"".json" --pretty || exit $?
+ echo " -- to img"
+ $CRIT encode -i "$x"".json" -o "$x"".json.img" || exit $?
+ echo " -- cmp"
+ cmp "$x" "$x"".json.img" || exit $?
+
+ echo "=== done"
+ done
+}
+
+
+function command_test {
+ PROTO_IN="$TEST_IMG_DIR"/inventory.img
+ JSON_IN=$(mktemp -p "$TEST_IMG_DIR" tmp.XXXXXXXXXX.json)
+ OUT=$(mktemp -p "$TEST_IMG_DIR" tmp.XXXXXXXXXX.img)
+
+ # prepare
+ $CRIT decode -i "$PROTO_IN" -o "$JSON_IN"
+
+ # proto in - json out decode
+ $CRIT decode -i "$PROTO_IN" || exit 1
+ $CRIT decode -i "$PROTO_IN" -o "$OUT" || exit 1
+ $CRIT decode -i "$PROTO_IN" > "$OUT" || exit 1
+ $CRIT decode < "$PROTO_IN" || exit 1
+ $CRIT decode -o "$OUT" < "$PROTO_IN" || exit 1
+ $CRIT decode < "$PROTO_IN" > "$OUT" || exit 1
+
+ # json in - proto out decode -> should fail
+ $CRIT decode -i "$JSON_IN" || true
+ $CRIT decode -i "$JSON_IN" -o "$OUT" || true
+ $CRIT decode -i "$JSON_IN" > "$OUT" || true
+
+ # json in - proto out encode
+ $CRIT encode -i "$JSON_IN" || exit 1
+ $CRIT encode -i "$JSON_IN" -o "$OUT" || exit 1
+ $CRIT encode -i "$JSON_IN" > "$OUT" || exit 1
+ $CRIT encode < "$JSON_IN" || exit 1
+ $CRIT encode -o "$OUT" < "$JSON_IN" || exit 1
+ $CRIT encode < "$JSON_IN" > "$OUT" || exit 1
+
+ # proto in - json out encode -> should fail
+ $CRIT encode -i "$PROTO_IN" || true
+ $CRIT encode -i "$PROTO_IN" -o "$OUT" || true
+ $CRIT encode -i "$PROTO_IN" > "$OUT" || true
+
+ # explore image directory
+ $CRIT x "$TEST_IMG_DIR" ps || exit 1
+ $CRIT x "$TEST_IMG_DIR" fds || exit 1
+ $CRIT x "$TEST_IMG_DIR" mems || exit 1
+ $CRIT x "$TEST_IMG_DIR" rss || exit 1
+}
+
+echo "Generating image list..."
+gen_img_list
+echo "Testing recode..."
+recode_test
+echo "Testing commands..."
+command_test
diff --git a/test/crit/main.go b/test/crit/main.go
new file mode 100644
index 0000000..7728f3c
--- /dev/null
+++ b/test/crit/main.go
@@ -0,0 +1,110 @@
+package main
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "log"
+ "os"
+ "path/filepath"
+ "regexp"
+ "strings"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit"
+)
+
+const TEST_IMG_DIR = "test-imgs"
+
+func main() {
+ // Get list of image files
+ imgs, err := getImgs()
+ if err != nil {
+ log.Fatal(err)
+ }
+ // Run recode test
+ if err = recodeImgs(imgs); err != nil {
+ log.Fatal(err)
+ }
+ log.Println("=== PASS")
+}
+
+func recodeImgs(imgs []string) error {
+ for _, img := range imgs {
+ log.Println("===", img)
+ testImg := fmt.Sprintf("%s.test.img", img)
+ c := crit.New(img, testImg, "", false, false)
+ // Decode the binary image file
+ decodedImg, err := c.Decode()
+ if err != nil {
+ return errors.New(fmt.Sprint("[DECODE]: ", err))
+ }
+ // Encode it into test binary image file
+ if err = c.Encode(decodedImg); err != nil {
+ return errors.New(fmt.Sprint("[ENCODE]: ", err))
+ }
+ // Open and compare original and test files
+ imgBytes, err := os.ReadFile(img)
+ if err != nil {
+ return err
+ }
+ testImgBytes, err := os.ReadFile(testImg)
+ if err != nil {
+ return err
+ }
+ if !bytes.Equal(imgBytes, testImgBytes) {
+ return errors.New(fmt.Sprint("[RECODE]: Files do not match"))
+ }
+ }
+
+ return nil
+}
+
+func getImgs() ([]string, error) {
+ // Certain image files generated by CRIU do not
+ // use the protobuf format and contain raw binary
+ // data. Some image files are also generated using
+ // external tools (ifaddr, route, tmpfs). As these
+ // images cannot be processed by CRIT, they are
+ // excluded from the tests.
+ skipImgs := []string{
+ "pages-",
+ "pages-shmem-",
+ "iptables-",
+ "ip6tables-",
+ "nftables-",
+ "route-",
+ "route6-",
+ "ifaddr-",
+ "tmpfs-",
+ "tmpfs-dev-",
+ "autofs-",
+ "netns-ct-",
+ "netns-exp-",
+ "rule-",
+ }
+ // "*.test.img", "*.json.img" or "tmp.*.img" files
+ // must be skipped as they are generated by tests
+ criuImg := regexp.MustCompile(`^[^\.]*\.img$`)
+ dir, err := filepath.Glob(fmt.Sprintf("%s/*.img", TEST_IMG_DIR))
+ if err != nil {
+ return nil, err
+ }
+ var imgs []string
+
+nextFile:
+ for _, file := range dir {
+ if filepath.Ext(file) == ".img" {
+ if !criuImg.MatchString(file) {
+ continue
+ }
+ for _, skip := range skipImgs {
+ if strings.HasPrefix(filepath.Base(file), skip) {
+ continue nextFile
+ }
+ }
+ imgs = append(imgs, file)
+ }
+ }
+
+ return imgs, nil
+}
diff --git a/test/crit/stats_test.go b/test/crit/stats_test.go
new file mode 100644
index 0000000..9072f87
--- /dev/null
+++ b/test/crit/stats_test.go
@@ -0,0 +1,27 @@
+package main
+
+import (
+ "testing"
+
+ "github.com/checkpoint-restore/go-criu/v6/crit"
+)
+
+func TestGetDumpStats(t *testing.T) {
+ dumpStats, err := crit.GetDumpStats("test-imgs")
+ if err != nil {
+ t.Error("Failed to get stats")
+ }
+ if dumpStats.GetPagesWritten() == 0 {
+ t.Error("PagesWritten is 0")
+ }
+}
+
+func TestGetRestoreStats(t *testing.T) {
+ restoreStats, err := crit.GetRestoreStats("test-imgs")
+ if err != nil {
+ t.Error("Failed to get stats")
+ }
+ if restoreStats.GetForkingTime() == 0 {
+ t.Error("ForkingTime is 0")
+ }
+}
diff --git a/test/loop/loop.c b/test/loop/loop.c
new file mode 100644
index 0000000..736e7f8
--- /dev/null
+++ b/test/loop/loop.c
@@ -0,0 +1,63 @@
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(void)
+{
+ pid_t pid;
+ pid_t sid;
+ int res = EXIT_FAILURE;
+ int start_pipe[2];
+
+ if (pipe(start_pipe)) {
+ perror("pipe failed!");
+ goto out;
+ }
+
+ pid = fork();
+ if (pid < 0) {
+ perror("fork failed!");
+ goto out;
+ }
+
+ if (pid == 0) {
+ close(start_pipe[0]);
+
+ sid = setsid();
+ if (sid < 0) {
+ perror("setsid failed!");
+ res = EXIT_FAILURE;
+ write(start_pipe[1], &res, sizeof(res));
+ close(start_pipe[1]);
+ exit(1);
+ }
+
+ // Create a file descriptor for "crit x ./ fds" test
+ open("/dev/null", O_RDONLY);
+
+ chdir("/");
+ close(STDIN_FILENO);
+ close(STDOUT_FILENO);
+ close(STDERR_FILENO);
+
+ res = EXIT_SUCCESS;
+ write(start_pipe[1], &res, sizeof(res));
+ close(start_pipe[1]);
+
+ while (1) {
+ sleep(1);
+ }
+ }
+
+ close(start_pipe[1]);
+ read(start_pipe[0], &res, sizeof(res));
+ close(start_pipe[0]);
+
+out:
+ if (res == EXIT_SUCCESS)
+ printf("%d\n", pid);
+ return res;
+}
diff --git a/test/main.go b/test/main.go
new file mode 100644
index 0000000..f9c9d4c
--- /dev/null
+++ b/test/main.go
@@ -0,0 +1,194 @@
+package main
+
+import (
+ "fmt"
+ "log"
+ "os"
+ "strconv"
+
+ "github.com/checkpoint-restore/go-criu/v6"
+ "github.com/checkpoint-restore/go-criu/v6/rpc"
+ "google.golang.org/protobuf/proto"
+)
+
+// TestNfy struct
+type TestNfy struct {
+ criu.NoNotify
+}
+
+// PreDump test function
+func (c TestNfy) PreDump() error {
+ log.Println("TEST PRE DUMP")
+ return nil
+}
+
+func doDump(c *criu.Criu, pidS string, imgDir string, pre bool, prevImg string) error {
+ log.Println("Dumping")
+ pid, err := strconv.ParseInt(pidS, 10, 0)
+ if err != nil {
+ return fmt.Errorf("can't parse pid: %w", err)
+ }
+ img, err := os.Open(imgDir)
+ if err != nil {
+ return fmt.Errorf("can't open image dir: %w", err)
+ }
+ defer img.Close()
+
+ opts := &rpc.CriuOpts{
+ Pid: proto.Int32(int32(pid)),
+ ImagesDirFd: proto.Int32(int32(img.Fd())),
+ LogLevel: proto.Int32(4),
+ LogFile: proto.String("dump.log"),
+ }
+
+ if prevImg != "" {
+ opts.ParentImg = proto.String(prevImg)
+ opts.TrackMem = proto.Bool(true)
+ }
+
+ if pre {
+ err = c.PreDump(opts, TestNfy{})
+ } else {
+ err = c.Dump(opts, TestNfy{})
+ }
+ if err != nil {
+ return fmt.Errorf("dump fail: %w", err)
+ }
+
+ return nil
+}
+
+func featureCheck(c *criu.Criu) error {
+ features := &rpc.CriuFeatures{}
+ featuresToCompare := &rpc.CriuFeatures{}
+ env := os.Getenv("CRIU_FEATURE_MEM_TRACK")
+ if env != "" {
+ val, err := strconv.Atoi(env)
+ if err != nil {
+ return err
+ }
+ features.MemTrack = proto.Bool(val != 0)
+ featuresToCompare.MemTrack = proto.Bool(val != 0)
+ }
+ env = os.Getenv("CRIU_FEATURE_LAZY_PAGES")
+ if env != "" {
+ val, err := strconv.Atoi(env)
+ if err != nil {
+ return err
+ }
+ features.LazyPages = proto.Bool(val != 0)
+ featuresToCompare.LazyPages = proto.Bool(val != 0)
+ }
+ env = os.Getenv("CRIU_FEATURE_PIDFD_STORE")
+ if env != "" {
+ val, err := strconv.Atoi(env)
+ if err != nil {
+ return err
+ }
+ features.PidfdStore = proto.Bool(val != 0)
+ featuresToCompare.PidfdStore = proto.Bool(val != 0)
+ }
+
+ features, err := c.FeatureCheck(features)
+ if err != nil {
+ return err
+ }
+
+ if *features.MemTrack != *featuresToCompare.MemTrack {
+ return fmt.Errorf(
+ "Unexpected MemTrack FeatureCheck result %v:%v",
+ *features.MemTrack,
+ *featuresToCompare.MemTrack,
+ )
+ }
+
+ if *features.LazyPages != *featuresToCompare.LazyPages {
+ return fmt.Errorf(
+ "Unexpected LazyPages FeatureCheck result %v:%v",
+ *features.LazyPages,
+ *featuresToCompare.LazyPages,
+ )
+ }
+
+ if *features.PidfdStore != *featuresToCompare.PidfdStore {
+ return fmt.Errorf(
+ "Unexpected PidfdStore FeatureCheck result %v:%v",
+ *features.PidfdStore,
+ *featuresToCompare.PidfdStore,
+ )
+ }
+
+ return nil
+}
+
+// Usage: test $act $pid $images_dir
+func main() {
+ c := criu.MakeCriu()
+ // Read out CRIU version
+ version, err := c.GetCriuVersion()
+ if err != nil {
+ fmt.Println(err)
+ os.Exit(1)
+ }
+ log.Println("CRIU version", version)
+ // Check if version at least 3.2
+ result, err := c.IsCriuAtLeast(30200)
+ if err != nil {
+ log.Fatalln(err)
+ }
+ if !result {
+ log.Fatalln("CRIU version to old")
+ }
+
+ if err = featureCheck(c); err != nil {
+ log.Fatalln(err)
+ }
+
+ act := os.Args[1]
+ switch act {
+ case "dump":
+ err := doDump(c, os.Args[2], os.Args[3], false, "")
+ if err != nil {
+ log.Fatalln("dump failed:", err)
+ }
+ case "dump2":
+ err := c.Prepare()
+ if err != nil {
+ fmt.Print(err)
+ os.Exit(1)
+ }
+
+ err = doDump(c, os.Args[2], os.Args[3]+"/pre", true, "")
+ if err != nil {
+ log.Fatalln("pre-dump failed:", err)
+ }
+ err = doDump(c, os.Args[2], os.Args[3], false, "./pre")
+ if err != nil {
+ log.Fatalln("dump failed: ", err)
+ }
+
+ c.Cleanup()
+ case "restore":
+ log.Println("Restoring")
+ img, err := os.Open(os.Args[2])
+ if err != nil {
+ log.Fatalln("can't open image dir:", err)
+ }
+ defer img.Close()
+
+ opts := &rpc.CriuOpts{
+ ImagesDirFd: proto.Int32(int32(img.Fd())),
+ LogLevel: proto.Int32(4),
+ LogFile: proto.String("restore.log"),
+ }
+
+ err = c.Restore(opts, nil)
+ if err != nil {
+ log.Fatalln("restore failed:", err)
+ }
+ default:
+ log.Fatalln("unknown action")
+ }
+
+ log.Println("Success")
+}
diff --git a/test/main_coverage_test.go b/test/main_coverage_test.go
new file mode 100644
index 0000000..d818813
--- /dev/null
+++ b/test/main_coverage_test.go
@@ -0,0 +1,40 @@
+//go:build coverage
+// +build coverage
+
+package main
+
+import (
+ "os"
+ "os/signal"
+ "strings"
+ "testing"
+)
+
+// NOTE: do not use this in production. Binaries built with this file are
+// merely useful to collect coverage data.
+func TestCoverageMain(_ *testing.T) {
+ var args []string
+
+ for _, arg := range os.Args {
+ switch {
+ case strings.HasPrefix(arg, "COVERAGE"):
+ // Dummy argument to enable global flags.
+ case strings.HasPrefix(arg, "-test"):
+ // Make sure we don't pass `go test` specific flags to
+ // main.
+ default:
+ args = append(args, arg)
+ }
+ }
+
+ signal.Reset()
+ os.Args = args
+ main() // "run" to
+
+ // Make sure that std{err,out} write to /dev/null so we prevent the
+ // testing backend to print "PASS" along with the coverage. We really
+ // want the coverage to be set via the `-test.coverprofile=$path` flag.
+ null, _ := os.Open(os.DevNull)
+ os.Stdout = null
+ os.Stderr = null
+}
diff --git a/test/main_test.go b/test/main_test.go
new file mode 100644
index 0000000..e5bc078
--- /dev/null
+++ b/test/main_test.go
@@ -0,0 +1,11 @@
+package main_test
+
+import (
+ "testing"
+)
+
+func TestMain(t *testing.T) {
+ // Do nothing. We just need dummy to make `ginkgo` happy. Without that,
+ // `ginkgo` would try to execute the _coverage_test.go _despite_ the
+ t.Parallel()
+}
diff --git a/test/phaul/main.go b/test/phaul/main.go
new file mode 100644
index 0000000..9440403
--- /dev/null
+++ b/test/phaul/main.go
@@ -0,0 +1,194 @@
+package main
+
+import (
+ "fmt"
+ "os"
+ "strconv"
+ "strings"
+ "syscall"
+
+ "github.com/checkpoint-restore/go-criu/v6"
+ "github.com/checkpoint-restore/go-criu/v6/phaul"
+ "github.com/checkpoint-restore/go-criu/v6/rpc"
+ "google.golang.org/protobuf/proto"
+)
+
+type testLocal struct {
+ criu.NoNotify
+ r *testRemote
+}
+
+type testRemote struct {
+ srv *phaul.Server
+}
+
+/* Dir where test will put dump images */
+const imagesDir = "image"
+
+func prepareImages() error {
+ err := os.Mkdir(imagesDir, 0o700)
+ if err != nil {
+ return err
+ }
+
+ /* Work dir for PhaulClient */
+ err = os.Mkdir(imagesDir+"/local", 0o700)
+ if err != nil {
+ return err
+ }
+
+ /* Work dir for PhaulServer */
+ err = os.Mkdir(imagesDir+"/remote", 0o700)
+ if err != nil {
+ return err
+ }
+
+ /* Work dir for DumpCopyRestore */
+ err = os.Mkdir(imagesDir+"/test", 0o700)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func mergeImages(dumpDir, lastPreDumpDir string) error {
+ idir, err := os.Open(dumpDir)
+ if err != nil {
+ return err
+ }
+
+ defer idir.Close()
+
+ imgs, err := idir.Readdirnames(0)
+ if err != nil {
+ return err
+ }
+
+ for _, fname := range imgs {
+ if !strings.HasSuffix(fname, ".img") {
+ continue
+ }
+
+ fmt.Printf("\t%s -> %s/\n", fname, lastPreDumpDir)
+ err = syscall.Link(dumpDir+"/"+fname, lastPreDumpDir+"/"+fname)
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (r *testRemote) doRestore() error {
+ lastSrvImagesDir := r.srv.LastImagesDir()
+ /*
+ * In imagesDir we have images from dump, in the
+ * lastSrvImagesDir -- where server-side images
+ * (from page server, with pages and pagemaps) are.
+ * Need to put former into latter and restore from
+ * them.
+ */
+ err := mergeImages(imagesDir+"/test", lastSrvImagesDir)
+ if err != nil {
+ return err
+ }
+
+ imgDir, err := os.Open(lastSrvImagesDir)
+ if err != nil {
+ return err
+ }
+ defer imgDir.Close()
+
+ opts := &rpc.CriuOpts{
+ LogLevel: proto.Int32(4),
+ LogFile: proto.String("restore.log"),
+ ImagesDirFd: proto.Int32(int32(imgDir.Fd())),
+ }
+
+ cr := r.srv.GetCriu()
+ fmt.Printf("Do restore\n")
+ return cr.Restore(opts, nil)
+}
+
+func (l *testLocal) PostDump() error {
+ return l.r.doRestore()
+}
+
+func (l *testLocal) DumpCopyRestore(cr *criu.Criu, cfg phaul.Config, lastClnImagesDir string) error {
+ fmt.Printf("Final stage\n")
+
+ imgDir, err := os.Open(imagesDir + "/test")
+ if err != nil {
+ return err
+ }
+ defer imgDir.Close()
+
+ psi := rpc.CriuPageServerInfo{
+ Fd: proto.Int32(int32(cfg.Memfd)),
+ }
+
+ opts := &rpc.CriuOpts{
+ Pid: proto.Int32(int32(cfg.Pid)),
+ LogLevel: proto.Int32(4),
+ LogFile: proto.String("dump.log"),
+ ImagesDirFd: proto.Int32(int32(imgDir.Fd())),
+ TrackMem: proto.Bool(true),
+ ParentImg: proto.String(lastClnImagesDir),
+ Ps: &psi,
+ }
+
+ fmt.Printf("Do dump\n")
+ return cr.Dump(opts, l)
+}
+
+func main() {
+ pid, _ := strconv.Atoi(os.Args[1])
+ fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_STREAM, 0)
+ if err != nil {
+ fmt.Printf("Can't make socketpair: %v\n", err)
+ os.Exit(1)
+ }
+
+ err = prepareImages()
+ if err != nil {
+ fmt.Printf("Can't prepare dirs for images: %v\n", err)
+ os.Exit(1)
+ return
+ }
+
+ fmt.Printf("Make server part (socket %d)\n", fds[1])
+ srv, err := phaul.MakePhaulServer(phaul.Config{
+ Pid: pid,
+ Memfd: fds[1],
+ Wdir: imagesDir + "/remote",
+ })
+ if err != nil {
+ fmt.Printf("Unable to run a server: %v", err)
+ os.Exit(1)
+ return
+ }
+
+ r := &testRemote{srv}
+
+ fmt.Printf("Make client part (socket %d)\n", fds[0])
+ cln, err := phaul.MakePhaulClient(&testLocal{r: r}, srv,
+ phaul.Config{
+ Pid: pid,
+ Memfd: fds[0],
+ Wdir: imagesDir + "/local",
+ })
+ if err != nil {
+ fmt.Printf("Unable to run a client: %v\n", err)
+ os.Exit(1)
+ }
+
+ fmt.Printf("Migrate\n")
+ err = cln.Migrate()
+ if err != nil {
+ fmt.Printf("Failed: %v\n", err)
+ os.Exit(1)
+ }
+
+ fmt.Printf("SUCCESS!\n")
+}
diff --git a/test/phaul/main_coverage_test.go b/test/phaul/main_coverage_test.go
new file mode 100644
index 0000000..141ca56
--- /dev/null
+++ b/test/phaul/main_coverage_test.go
@@ -0,0 +1,39 @@
+// +build coverage
+
+package main
+
+import (
+ "os"
+ "os/signal"
+ "strings"
+ "testing"
+)
+
+// NOTE: do not use this in production. Binaries built with this file are
+// merely useful to collect coverage data.
+func TestCoverageMain(_ *testing.T) {
+ var args []string
+
+ for _, arg := range os.Args {
+ switch {
+ case strings.HasPrefix(arg, "COVERAGE"):
+ // Dummy argument to enable global flags.
+ case strings.HasPrefix(arg, "-test"):
+ // Make sure we don't pass `go test` specific flags to
+ // main.
+ default:
+ args = append(args, arg)
+ }
+ }
+
+ signal.Reset()
+ os.Args = args
+ main() // "run" it
+
+ // Make sure that std{err,out} write to /dev/null so we prevent the
+ // testing backend to print "PASS" along with the coverage. We really
+ // want the coverage to be set via the `-test.coverprofile=$path` flag.
+ null, _ := os.Open(os.DevNull)
+ os.Stdout = null
+ os.Stderr = null
+}
diff --git a/test/phaul/main_test.go b/test/phaul/main_test.go
new file mode 100644
index 0000000..e5bc078
--- /dev/null
+++ b/test/phaul/main_test.go
@@ -0,0 +1,11 @@
+package main_test
+
+import (
+ "testing"
+)
+
+func TestMain(t *testing.T) {
+ // Do nothing. We just need dummy to make `ginkgo` happy. Without that,
+ // `ginkgo` would try to execute the _coverage_test.go _despite_ the
+ t.Parallel()
+}
diff --git a/test/piggie/piggie.c b/test/piggie/piggie.c
new file mode 100644
index 0000000..bcab213
--- /dev/null
+++ b/test/piggie/piggie.c
@@ -0,0 +1,61 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <signal.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <sched.h>
+
+#define STKS (4*4096)
+
+#ifndef CLONE_NEWPID
+#define CLONE_NEWPID 0x20000000
+#endif
+
+static int do_test(void *logf)
+{
+ int fd, i = 0;
+
+ setsid();
+
+ close(0);
+ close(1);
+ close(2);
+
+ fd = open("/dev/null", O_RDONLY);
+ if (fd != 0) {
+ dup2(fd, 0);
+ close(fd);
+ }
+
+ fd = open(logf, O_WRONLY | O_TRUNC | O_CREAT, 0600);
+ dup2(fd, 1);
+ dup2(fd, 2);
+ if (fd != 1 && fd != 2)
+ close(fd);
+
+ while (1) {
+ sleep(1);
+ printf("%d\n", i++);
+ fflush(stdout);
+ }
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ int pid;
+ void *stk;
+
+ stk = mmap(NULL, STKS, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANON | MAP_GROWSDOWN, 0, 0);
+ pid = clone(do_test, stk + STKS, SIGCHLD | CLONE_NEWPID, argv[1]);
+ if (pid < 0) {
+ fprintf(stderr, "clone() failed: %m\n");
+ return 1;
+ }
+ printf("%d\n", pid);
+
+ return 0;
+}