Update to 3.19

Signed-off-by: Adrian Reber <adrian@lisas.de>
This commit is contained in:
Adrian Reber 2023-11-28 14:15:12 +01:00
parent 23b38e9056
commit f6c7edf74c
No known key found for this signature in database
GPG Key ID: 82C9378ED3C4906A
5 changed files with 11 additions and 112 deletions

1
.gitignore vendored
View File

@ -55,3 +55,4 @@
/criu-3.17.tar.gz
/criu-3.17.1.tar.gz
/criu-3.18.tar.gz
/criu-3.19.tar.gz

View File

@ -11,18 +11,13 @@
%undefine _auto_set_build_flags
Name: criu
Version: 3.18
Release: 4%{?dist}
Version: 3.19
Release: 1%{?dist}
Summary: Tool for Checkpoint/Restore in User-space
License: GPL-2.0-only AND LGPL-2.1-only AND MIT
URL: http://criu.org/
Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
# Fix to work on CPUs with larger XSAVE area (Sapphire Rapids)
Patch0: https://github.com/checkpoint-restore/criu/commit/d739260c57576c636759afb312340fa3827312f6.patch
# https://github.com/checkpoint-restore/criu/pull/2232
Patch1: kernel65-s390x.patch
# Add protobuf-c as a dependency.
# We use this patch because the protobuf-c package name
# in RPM and DEB is different.
@ -101,8 +96,6 @@ This script can help to workaround the so called "PID mismatch" problem.
%prep
%setup -q
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 99 -p1
%build
@ -121,9 +114,10 @@ sed -e "s,--upgrade --force-reinstall,--disable-pip-version-check --progress-bar
rm -f crit/pyproject.toml
make install-criu DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
make install-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary}
make install-crit DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary}
make install-man DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/compel.1
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/amdgpu_plugin.1
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/criu-amdgpu-plugin.1
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
@ -149,11 +143,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%{_libdir}/*.so.*
%files -n %{py_prefix}-%{name}
%{python3_sitelib}/pycriu/*
%{python3_sitelib}/pycriu*
%files -n crit
%{_bindir}/crit
%{python3_sitelib}/crit-%{version}.dist-info/
%{python3_sitelib}/crit
%doc %{_mandir}/man1/crit.1*
%files -n criu-ns
@ -161,6 +156,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%doc %{_mandir}/man1/criu-ns.1*
%changelog
* Tue Nov 28 2023 Adrian Reber <adrian@lisas.de> - 3.19-1
- Update to 3.19
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View File

@ -1,74 +0,0 @@
From d739260c57576c636759afb312340fa3827312f6 Mon Sep 17 00:00:00 2001
From: Adrian Reber <areber@redhat.com>
Date: Mon, 24 Apr 2023 09:28:19 +0200
Subject: [PATCH] compel: support XSAVE on newer Intel CPUs
Newer Intel CPUs (Sapphire Rapids) have a much larger xsave area than
before. Looking at older CPUs I see 2440 bytes.
# cpuid -1 -l 0xd -s 0
...
bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
On newer CPUs (Sapphire Rapids) it grows to 11008 bytes.
# cpuid -1 -l 0xd -s 0
...
bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
This increase the xsave area from one page to four pages.
Without this patch the fpu03 test fails, with this patch it works again.
Signed-off-by: Adrian Reber <areber@redhat.com>
---
.../arch/x86/src/lib/include/uapi/asm/fpu.h | 28 +++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
index bd3b0cbd5c..8c83dd9ae4 100644
--- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
+++ b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
@@ -21,7 +21,28 @@
#define XSTATE_YMM 0x4
#define FXSAVE_SIZE 512
-#define XSAVE_SIZE 4096
+/*
+ * This used to be 4096 (one page). There is a comment below concerning
+ * this size:
+ * "One page should be enough for the whole xsave state ;-)"
+ * Which is kind of funny as it is no longer enough ;-)
+ *
+ * Older CPUs:
+ * # cpuid -1 -l 0xd -s 0
+ * ...
+ * bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
+ *
+ * Newer CPUs (Sapphire Rapids):
+ * # cpuid -1 -l 0xd -s 0
+ * ...
+ * bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
+ *
+ * So one page is no longer enough... But:
+ *
+ * Four pages should be enough for the whole xsave state ;-)
+ */
+
+#define XSAVE_SIZE 4*4096
#define XSAVE_HDR_SIZE 64
#define XSAVE_HDR_OFFSET FXSAVE_SIZE
@@ -235,8 +256,11 @@ struct pkru_state {
*
*
* One page should be enough for the whole xsave state ;-)
+ *
+ * Of course it was not ;-) Now using four pages...
+ *
*/
-#define EXTENDED_STATE_AREA_SIZE (4096 - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
+#define EXTENDED_STATE_AREA_SIZE (XSAVE_SIZE - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
/*
* cpu requires it to be 64 byte aligned

View File

@ -1,26 +0,0 @@
https://github.com/checkpoint-restore/criu/pull/2232
diff --git a/compel/arch/s390/src/lib/include/uapi/asm/infect-types.h b/compel/arch/s390/src/lib/include/uapi/asm/infect-types.h
index 87283bc6b..6d55a015f 100644
--- a/compel/arch/s390/src/lib/include/uapi/asm/infect-types.h
+++ b/compel/arch/s390/src/lib/include/uapi/asm/infect-types.h
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <signal.h>
#include <sys/mman.h>
+#include <linux/const.h>
#include <asm/ptrace.h>
#include "common/page.h"
diff --git a/criu/arch/s390/include/asm/restorer.h b/criu/arch/s390/include/asm/restorer.h
index b8472afc8..1a6469837 100644
--- a/criu/arch/s390/include/asm/restorer.h
+++ b/criu/arch/s390/include/asm/restorer.h
@@ -1,6 +1,7 @@
#ifndef __CR_ASM_RESTORER_H__
#define __CR_ASM_RESTORER_H__
+#include <linux/const.h>
#include <asm/ptrace.h>
#include <asm/types.h>

View File

@ -1 +1 @@
SHA512 (criu-3.18.tar.gz) = 3d15554ebd2d08c8904c23b0aba00d505891c14caa4790c2fd12ad6b20bf4058fd210f1d03fd63aacc5ad8bc47e341396b48abbeb474f1fd43c3023fd1ff9171
SHA512 (criu-3.19.tar.gz) = d243818cdac51580c952a80e9164786a67ce5e294c0faa6dc700f5e8da8e36495f0b64f5c27b345ede7d6697ed7a69fa4e9a85cef451f32e3ffeb78564884571