Accepting request 1091121 from home:tiwai:branches:devel:tools
- Update to criu 3.18: New features: * Allow CRIU to be used as non-root * Add SIGTSTP support * Add opt to skip file r/w/x check on restore Bugfixes: * Many fixes here and there Improvements: * cgroup2: Dump cgroup controllers of every threads in a process * save IP_FREEBIND option for SOCK_RAW sockets also * support IP_PKTINFO and IPV6_RECVPKTINFO options * Implement hw breakpoint for arm64 platform * Set only used XFEATURE_* in xstate_bv * Checkpoint and restore some global properties * A checkpoint optimization for highly sparse ghost files (--ghost-fiemap) - Refresh criu-py-install-fix.diff: a workaround for non-working python-pip inside build environment by reviving the old setup script - Fix shebang of criu-ns script: criu-ns-python3-shebang.patch - Drop obsoleted patches: criu-fix-conflicting-headers.patch mount-add-definition-for-FSOPEN_CLOEXEC.patch OBS-URL: https://build.opensuse.org/request/show/1091121 OBS-URL: https://build.opensuse.org/package/show/devel:tools/criu?expand=0&rev=117
This commit is contained in:
parent
124c73f897
commit
ed0c6841f8
@ -39,4 +39,4 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
+export CFLAGS += $(FEATURE_DEFINES) $(FEATURE_CFLAGS)
|
||||
|
||||
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
|
||||
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW FSCONFIG MEMFD_CREATE OPENAT2
|
||||
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW MEMFD_CREATE \
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f90fe2323ed1b84f273dc41dde1a38dd424157a57f713d1ba39094e70f90eca6
|
||||
size 1323445
|
BIN
criu-3.18.tar.gz
(Stored with Git LFS)
Normal file
BIN
criu-3.18.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,254 +0,0 @@
|
||||
From 4c86d6a7d54abb64fc5a15131f3351224e8c071b Mon Sep 17 00:00:00 2001
|
||||
From: Radostin Stoyanov <rstoyanov@fedoraproject.org>
|
||||
Date: Sun, 31 Jul 2022 16:07:30 +0000
|
||||
Subject: [PATCH] criu: fix conflicting headers
|
||||
|
||||
There are several changes in glibc 2.36 that make sys/mount.h header
|
||||
incompatible with kernel headers:
|
||||
|
||||
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
|
||||
|
||||
This patch removes conflicting includes for `<linux/mount.h>` and
|
||||
updates the content of `criu/include/linux/mount.h` to match
|
||||
`/usr/include/sys/mount.h`. In addition, inline definitions sys_*()
|
||||
functions have been moved from "linux/mount.h" to "syscall.h" to
|
||||
avoid conflicts with `uapi/compel/plugins/std/syscall.h` and
|
||||
`<unistd.h>`. The include for `<linux/aio_abi.h>` has been replaced
|
||||
with local include to avoid conflicts with `<sys/mount.h>`.
|
||||
|
||||
Fixes: #1949
|
||||
|
||||
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
|
||||
---
|
||||
Makefile.config | 2 -
|
||||
criu/cgroup.c | 1
|
||||
criu/cr-check.c | 2 -
|
||||
criu/cr-restore.c | 3 +-
|
||||
criu/include/aio.h | 2 -
|
||||
criu/include/linux/aio_abi.h | 14 ++++++++++++
|
||||
criu/include/linux/mount.h | 48 ++++++++++++++++++++++---------------------
|
||||
criu/include/syscall.h | 17 +++++++++++++++
|
||||
criu/pie/parasite.c | 2 -
|
||||
criu/util.c | 1
|
||||
scripts/feature-tests.mak | 13 -----------
|
||||
11 files changed, 64 insertions(+), 41 deletions(-)
|
||||
create mode 100644 criu/include/linux/aio_abi.h
|
||||
create mode 100644 criu/include/syscall.h
|
||||
|
||||
--- a/Makefile.config
|
||||
+++ b/Makefile.config
|
||||
@@ -81,7 +81,7 @@ export DEFINES += $(FEATURE_DEFINES)
|
||||
export CFLAGS += $(FEATURE_DEFINES) $(FEATURE_CFLAGS)
|
||||
|
||||
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
|
||||
- SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW FSCONFIG MEMFD_CREATE OPENAT2
|
||||
+ SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW MEMFD_CREATE OPENAT2
|
||||
|
||||
# $1 - config name
|
||||
define gen-feature-test
|
||||
--- a/criu/cgroup.c
|
||||
+++ b/criu/cgroup.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "images/cgroup.pb-c.h"
|
||||
#include "kerndat.h"
|
||||
#include "linux/mount.h"
|
||||
+#include "syscall.h"
|
||||
|
||||
/*
|
||||
* This structure describes set of controller groups
|
||||
--- a/criu/cr-check.c
|
||||
+++ b/criu/cr-check.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <sys/prctl.h>
|
||||
#include <sched.h>
|
||||
#include <sys/mount.h>
|
||||
-#include <linux/aio_abi.h>
|
||||
|
||||
#include "../soccr/soccr.h"
|
||||
|
||||
@@ -52,6 +51,7 @@
|
||||
#include "net.h"
|
||||
#include "restorer.h"
|
||||
#include "uffd.h"
|
||||
+#include "linux/aio_abi.h"
|
||||
|
||||
#include "images/inventory.pb-c.h"
|
||||
|
||||
--- a/criu/cr-restore.c
|
||||
+++ b/criu/cr-restore.c
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <compel/ptrace.h>
|
||||
#include "common/compiler.h"
|
||||
|
||||
-#include "linux/mount.h"
|
||||
#include "linux/rseq.h"
|
||||
|
||||
#include "clone-noasan.h"
|
||||
@@ -86,6 +85,8 @@
|
||||
#include <compel/plugins/std/syscall-codes.h>
|
||||
#include "compel/include/asm/syscall.h"
|
||||
|
||||
+#include "linux/mount.h"
|
||||
+
|
||||
#include "protobuf.h"
|
||||
#include "images/sa.pb-c.h"
|
||||
#include "images/timer.pb-c.h"
|
||||
--- a/criu/include/aio.h
|
||||
+++ b/criu/include/aio.h
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __CR_AIO_H__
|
||||
#define __CR_AIO_H__
|
||||
|
||||
-#include <linux/aio_abi.h>
|
||||
+#include "linux/aio_abi.h"
|
||||
#include "images/mm.pb-c.h"
|
||||
unsigned int aio_estimate_nr_reqs(unsigned int size);
|
||||
int dump_aio_ring(MmEntry *mme, struct vma_area *vma);
|
||||
--- /dev/null
|
||||
+++ b/criu/include/linux/aio_abi.h
|
||||
@@ -0,0 +1,14 @@
|
||||
+#ifndef __LINUX__AIO_ABI_H
|
||||
+#define __LINUX__AIO_ABI_H
|
||||
+
|
||||
+typedef __kernel_ulong_t aio_context_t;
|
||||
+
|
||||
+/* read() from /dev/aio returns these structures. */
|
||||
+struct io_event {
|
||||
+ __u64 data; /* the data field from the iocb */
|
||||
+ __u64 obj; /* what iocb this event came from */
|
||||
+ __s64 res; /* result code for this event */
|
||||
+ __s64 res2; /* secondary result */
|
||||
+};
|
||||
+
|
||||
+#endif /* __LINUX__AIO_ABI_H */
|
||||
--- a/criu/include/linux/mount.h
|
||||
+++ b/criu/include/linux/mount.h
|
||||
@@ -4,32 +4,34 @@
|
||||
#include "common/config.h"
|
||||
#include "compel/plugins/std/syscall-codes.h"
|
||||
|
||||
-#ifdef CONFIG_HAS_FSCONFIG
|
||||
-#include <linux/mount.h>
|
||||
-#else
|
||||
+/* Copied from /usr/include/sys/mount.h */
|
||||
+
|
||||
+#ifndef FSCONFIG_CMD_CREATE
|
||||
+/* The type of fsconfig call made. */
|
||||
enum fsconfig_command {
|
||||
- FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
|
||||
- FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
|
||||
- FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
|
||||
- FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
|
||||
- FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
|
||||
- FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
|
||||
- FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
|
||||
+ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
|
||||
+#define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
|
||||
+ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
|
||||
+#define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
|
||||
+ FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
|
||||
+#define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
|
||||
+ FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
|
||||
+#define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
|
||||
+ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
|
||||
+#define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
|
||||
+ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
|
||||
+#define FSCONFIG_SET_FD FSCONFIG_SET_FD
|
||||
+ FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
|
||||
+#define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
|
||||
FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
|
||||
+#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
|
||||
};
|
||||
-#endif
|
||||
+#endif // FSCONFIG_CMD_CREATE
|
||||
|
||||
-static inline int sys_fsopen(const char *fsname, unsigned int flags)
|
||||
-{
|
||||
- return syscall(__NR_fsopen, fsname, flags);
|
||||
-}
|
||||
-static inline int sys_fsconfig(int fd, unsigned int cmd, const char *key, const char *value, int aux)
|
||||
-{
|
||||
- return syscall(__NR_fsconfig, fd, cmd, key, value, aux);
|
||||
-}
|
||||
-static inline int sys_fsmount(int fd, unsigned int flags, unsigned int attr_flags)
|
||||
-{
|
||||
- return syscall(__NR_fsmount, fd, flags, attr_flags);
|
||||
-}
|
||||
+#ifndef MS_MGC_VAL
|
||||
+/* Magic mount flag number. Has to be or-ed to the flag values. */
|
||||
+#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
|
||||
+#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
|
||||
+#endif
|
||||
|
||||
#endif
|
||||
--- /dev/null
|
||||
+++ b/criu/include/syscall.h
|
||||
@@ -0,0 +1,17 @@
|
||||
+#ifndef __CR_SYSCALL_H__
|
||||
+#define __CR_SYSCALL_H__
|
||||
+
|
||||
+static inline int sys_fsopen(const char *fsname, unsigned int flags)
|
||||
+{
|
||||
+ return syscall(__NR_fsopen, fsname, flags);
|
||||
+}
|
||||
+static inline int sys_fsconfig(int fd, unsigned int cmd, const char *key, const char *value, int aux)
|
||||
+{
|
||||
+ return syscall(__NR_fsconfig, fd, cmd, key, value, aux);
|
||||
+}
|
||||
+static inline int sys_fsmount(int fd, unsigned int flags, unsigned int attr_flags)
|
||||
+{
|
||||
+ return syscall(__NR_fsmount, fd, flags, attr_flags);
|
||||
+}
|
||||
+
|
||||
+#endif /* __CR_SYSCALL_H__ */
|
||||
\ No newline at end of file
|
||||
--- a/criu/pie/parasite.c
|
||||
+++ b/criu/pie/parasite.c
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <signal.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/capability.h>
|
||||
-#include <sys/mount.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/uio.h>
|
||||
@@ -14,6 +13,7 @@
|
||||
#include "int.h"
|
||||
#include "types.h"
|
||||
#include <compel/plugins/std/syscall.h>
|
||||
+#include "linux/mount.h"
|
||||
#include "parasite.h"
|
||||
#include "fcntl.h"
|
||||
#include "prctl.h"
|
||||
--- a/criu/util.c
|
||||
+++ b/criu/util.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "mem.h"
|
||||
#include "namespaces.h"
|
||||
#include "criu-log.h"
|
||||
+#include "syscall.h"
|
||||
|
||||
#include "clone-noasan.h"
|
||||
#include "cr_options.h"
|
||||
--- a/scripts/feature-tests.mak
|
||||
+++ b/scripts/feature-tests.mak
|
||||
@@ -137,19 +137,6 @@ ENTRY(main)
|
||||
END(main)
|
||||
endef
|
||||
|
||||
-define FEATURE_TEST_FSCONFIG
|
||||
-
|
||||
-#include <linux/mount.h>
|
||||
-
|
||||
-int main(void)
|
||||
-{
|
||||
- if (FSCONFIG_CMD_CREATE > 0)
|
||||
- return 0;
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-endef
|
||||
-
|
||||
define FEATURE_TEST_NFTABLES_LIB_API_0
|
||||
|
||||
#include <string.h>
|
12
criu-ns-python3-shebang.patch
Normal file
12
criu-ns-python3-shebang.patch
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
scripts/criu-ns | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/scripts/criu-ns
|
||||
+++ b/scripts/criu-ns
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/python3
|
||||
import ctypes
|
||||
import ctypes.util
|
||||
import errno
|
@ -1,15 +1,56 @@
|
||||
---
|
||||
lib/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
lib/Makefile | 7 ++++++-
|
||||
scripts/crit-setup.py | 25 +++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/lib/Makefile
|
||||
+++ b/lib/Makefile
|
||||
@@ -53,7 +53,7 @@ install: lib-c lib-py crit/crit lib/c/cr
|
||||
$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)/criu/),' lib/c/criu.pc.in > lib/c/criu.pc
|
||||
@@ -2,6 +2,10 @@ CRIU_SO := libcriu.so
|
||||
CRIU_A := libcriu.a
|
||||
UAPI_HEADERS := lib/c/criu.h images/rpc.proto images/rpc.pb-c.h criu/include/version.h
|
||||
|
||||
+#
|
||||
+# File to keep track of files installed by setup.py
|
||||
+CRIT_SETUP_FILES := lib/.crit-setup.files
|
||||
+
|
||||
all-y += lib-c lib-a lib-py
|
||||
|
||||
#
|
||||
@@ -56,7 +60,8 @@ install: lib-c lib-a lib-py crit/crit li
|
||||
$(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
|
||||
ifeq ($(PYTHON),python3)
|
||||
$(E) " INSTALL " crit
|
||||
- $(Q) $(PYTHON) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
|
||||
- $(Q) $(PYTHON) -m pip install --upgrade --force-reinstall --prefix=$(DESTDIR)$(PREFIX) ./crit
|
||||
+ # $(Q) $(PYTHON) -m pip install --upgrade --force-reinstall --prefix=$(DESTDIR)$(PREFIX) ./crit
|
||||
+ $(Q) $(PYTHON) scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
|
||||
endif
|
||||
.PHONY: install
|
||||
|
||||
uninstall:
|
||||
--- /dev/null
|
||||
+++ b/scripts/crit-setup.py
|
||||
@@ -0,0 +1,25 @@
|
||||
+import os
|
||||
+from distutils.core import setup
|
||||
+
|
||||
+criu_version = "0.0.1"
|
||||
+env = os.environ
|
||||
+
|
||||
+if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env:
|
||||
+ criu_version = '{}.{}'.format(
|
||||
+ env['CRIU_VERSION_MAJOR'],
|
||||
+ env['CRIU_VERSION_MINOR']
|
||||
+ )
|
||||
+
|
||||
+ if 'CRIU_VERSION_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']:
|
||||
+ criu_version += '.' + env['CRIU_VERSION_SUBLEVEL']
|
||||
+
|
||||
+setup(name="crit",
|
||||
+ version=criu_version,
|
||||
+ description="CRiu Image Tool",
|
||||
+ author="CRIU team",
|
||||
+ author_email="criu@openvz.org",
|
||||
+ license="GPLv2",
|
||||
+ url="https://github.com/checkpoint-restore/criu",
|
||||
+ package_dir={'pycriu': 'lib/py'},
|
||||
+ packages=["pycriu", "pycriu.images"],
|
||||
+ scripts=["crit/crit"])
|
||||
|
27
criu.changes
27
criu.changes
@ -1,3 +1,30 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 6 15:31:57 UTC 2023 - Takashi Iwai <tiwai@suse.com>
|
||||
|
||||
- Update to criu 3.18:
|
||||
New features:
|
||||
* Allow CRIU to be used as non-root
|
||||
* Add SIGTSTP support
|
||||
* Add opt to skip file r/w/x check on restore
|
||||
Bugfixes:
|
||||
* Many fixes here and there
|
||||
Improvements:
|
||||
* cgroup2: Dump cgroup controllers of every threads in a process
|
||||
* save IP_FREEBIND option for SOCK_RAW sockets also
|
||||
* support IP_PKTINFO and IPV6_RECVPKTINFO options
|
||||
* Implement hw breakpoint for arm64 platform
|
||||
* Set only used XFEATURE_* in xstate_bv
|
||||
* Checkpoint and restore some global properties
|
||||
* A checkpoint optimization for highly sparse ghost files (--ghost-fiemap)
|
||||
- Refresh criu-py-install-fix.diff:
|
||||
a workaround for non-working python-pip inside build environment by
|
||||
reviving the old setup script
|
||||
- Fix shebang of criu-ns script:
|
||||
criu-ns-python3-shebang.patch
|
||||
- Drop obsoleted patches:
|
||||
criu-fix-conflicting-headers.patch
|
||||
mount-add-definition-for-FSOPEN_CLOEXEC.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 30 14:17:33 UTC 2022 - Takashi Iwai <tiwai@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package criu
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -33,7 +33,7 @@
|
||||
%define proto_c_ver %(protoc-c --version | head -1 | awk '{print $2}')
|
||||
|
||||
Name: criu
|
||||
Version: 3.17.1
|
||||
Version: 3.18
|
||||
Release: 0
|
||||
Summary: Checkpoint/Restore In Userspace Tools
|
||||
License: GPL-2.0-only
|
||||
@ -44,9 +44,7 @@ Patch1: criu-py-install-fix.diff
|
||||
Patch2: 0002-Fix-build-with-nftables-installed-in-different-direc.patch
|
||||
Patch3: criu-amdgpu-plugin-fix.patch
|
||||
Patch4: plugin-dir-path.patch
|
||||
# upstream fixes
|
||||
Patch5: criu-fix-conflicting-headers.patch
|
||||
Patch6: mount-add-definition-for-FSOPEN_CLOEXEC.patch
|
||||
Patch5: criu-ns-python3-shebang.patch
|
||||
BuildRequires: libcap-devel
|
||||
%if %{with_amdgpu_plugin}
|
||||
BuildRequires: libdrm-devel
|
||||
@ -128,7 +126,6 @@ to develop applications with CRIU library.
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
# default off
|
||||
echo "BINFMT_MISC_VIRTUALIZED" > .config
|
||||
|
||||
|
@ -1,106 +0,0 @@
|
||||
From 517c0947050e63aac72f63a3bf373d76264723b9 Mon Sep 17 00:00:00 2001
|
||||
From: Radostin Stoyanov <rstoyanov@fedoraproject.org>
|
||||
Date: Wed, 24 Aug 2022 21:20:30 +0200
|
||||
Subject: [PATCH] mount: add definition for FSOPEN_CLOEXEC
|
||||
|
||||
A recent change in glibc introduced `enum fsconfig_command` [1] and as a
|
||||
result the compilation of criu fails with the following errors
|
||||
|
||||
In file included from criu/pie/util.c:3:
|
||||
/usr/include/sys/mount.h:240:6: error: redeclaration of 'enum fsconfig_command'
|
||||
240 | enum fsconfig_command
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
In file included from /usr/include/sys/mount.h:32:
|
||||
criu/include/linux/mount.h:11:6: note: originally defined here
|
||||
11 | enum fsconfig_command {
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:242:3: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG'
|
||||
242 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:12:9: note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum fsconfig_command'
|
||||
12 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:244:3: error: redeclaration of enumerator 'FSCONFIG_SET_STRING'
|
||||
244 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:14:9: note: previous definition of 'FSCONFIG_SET_STRING' with type 'enum fsconfig_command'
|
||||
14 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:246:3: error: redeclaration of enumerator 'FSCONFIG_SET_BINARY'
|
||||
246 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:16:9: note: previous definition of 'FSCONFIG_SET_BINARY' with type 'enum fsconfig_command'
|
||||
16 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:248:3: error: redeclaration of enumerator 'FSCONFIG_SET_PATH'
|
||||
248 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:18:9: note: previous definition of 'FSCONFIG_SET_PATH' with type 'enum fsconfig_command'
|
||||
18 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:250:3: error: redeclaration of enumerator 'FSCONFIG_SET_PATH_EMPTY'
|
||||
250 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:20:9: note: previous definition of 'FSCONFIG_SET_PATH_EMPTY' with type 'enum fsconfig_command'
|
||||
20 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:252:3: error: redeclaration of enumerator 'FSCONFIG_SET_FD'
|
||||
252 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
|
||||
| ^~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:22:9: note: previous definition of 'FSCONFIG_SET_FD' with type 'enum fsconfig_command'
|
||||
22 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
|
||||
| ^~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:254:3: error: redeclaration of enumerator 'FSCONFIG_CMD_CREATE'
|
||||
254 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:24:9: note: previous definition of 'FSCONFIG_CMD_CREATE' with type 'enum fsconfig_command'
|
||||
24 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
/usr/include/sys/mount.h:256:3: error: redeclaration of enumerator 'FSCONFIG_CMD_RECONFIGURE'
|
||||
256 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
criu/include/linux/mount.h:26:9: note: previous definition of 'FSCONFIG_CMD_RECONFIGURE' with type 'enum fsconfig_command'
|
||||
26 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
|
||||
|
||||
This patch adds definition for FSOPEN_CLOEXEC to solve this problem. In particular,
|
||||
sys/mount.h includes ifndef check for FSOPEN_CLOEXEC surrounding `enum fsconfig_command`.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=7eae6a91e9b1670330c9f15730082c91c0b1d570
|
||||
|
||||
Reported-by: Younes Manton (@ymanton)
|
||||
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
|
||||
---
|
||||
criu/include/linux/mount.h | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/criu/include/linux/mount.h b/criu/include/linux/mount.h
|
||||
index 0d55a588cb9a..fefafa89e14d 100644
|
||||
--- a/criu/include/linux/mount.h
|
||||
+++ b/criu/include/linux/mount.h
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/* Copied from /usr/include/sys/mount.h */
|
||||
|
||||
-#ifndef FSCONFIG_CMD_CREATE
|
||||
+#ifndef FSOPEN_CLOEXEC
|
||||
/* The type of fsconfig call made. */
|
||||
enum fsconfig_command {
|
||||
FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
|
||||
@@ -26,7 +26,13 @@ enum fsconfig_command {
|
||||
FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
|
||||
#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
|
||||
};
|
||||
-#endif // FSCONFIG_CMD_CREATE
|
||||
+
|
||||
+#endif // FSOPEN_CLOEXEC
|
||||
+
|
||||
+/* fsopen flags. With the redundant definition, we check if the kernel,
|
||||
+ * glibc value and our value still match.
|
||||
+ */
|
||||
+#define FSOPEN_CLOEXEC 0x00000001
|
||||
|
||||
#ifndef MS_MGC_VAL
|
||||
/* Magic mount flag number. Has to be or-ed to the flag values. */
|
||||
--
|
||||
2.35.3
|
||||
|
Loading…
Reference in New Issue
Block a user