From db8bfb7041b126a229641ca16ae7846af66a8deb Mon Sep 17 00:00:00 2001 From: MaSkingx Date: Mon, 21 Apr 2025 07:24:45 +0000 Subject: [PATCH] vdso: correct data types for ELF hash table sizes Signed-off-by: MaSkingx --- ...-data-types-for-ELF-hash-table-sizes.patch | 38 +++++++++++++++++++ criu.spec | 6 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0006-vdso-correct-data-types-for-ELF-hash-table-sizes.patch diff --git a/0006-vdso-correct-data-types-for-ELF-hash-table-sizes.patch b/0006-vdso-correct-data-types-for-ELF-hash-table-sizes.patch new file mode 100644 index 0000000..4c115e9 --- /dev/null +++ b/0006-vdso-correct-data-types-for-ELF-hash-table-sizes.patch @@ -0,0 +1,38 @@ +From 62a4a5874b4b0bd462f28d659b93c73c5c06a900 Mon Sep 17 00:00:00 2001 +From: Andrei Vagin +Date: Wed, 12 Mar 2025 23:46:05 +0000 +Subject: [PATCH] vdso: correct data types for ELF hash table sizes + +Let's change the data types of `nbucket` and `nchain` to uint32. + +This should fix the following compile-time error on arm32: +/criu/criu/pie/util-vdso.c:336: undefined reference to `__aeabi_uldivmod' + +Signed-off-by: Andrei Vagin +--- + criu/pie/util-vdso.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/criu/pie/util-vdso.c b/criu/pie/util-vdso.c +index af3c089858..8daf5c71f3 100644 +--- a/criu/pie/util-vdso.c ++++ b/criu/pie/util-vdso.c +@@ -302,7 +302,7 @@ static bool elf_symbol_match(uintptr_t mem, size_t size, + static unsigned long elf_symbol_lookup(uintptr_t mem, size_t size, + const char *symbol, uint32_t symbol_hash, unsigned int sym_off, + uintptr_t dynsymbol_names, Dyn_t *dyn_symtab, Phdr_t *load, +- uint64_t nbucket, uint64_t nchain, void *_bucket, Hash_t *chain, ++ uint32_t nbucket, uint32_t nchain, void *_bucket, Hash_t *chain, + const size_t vdso_symbol_length, bool use_gnu_hash) + { + unsigned int j; +@@ -360,7 +360,7 @@ static int parse_elf_symbols(uintptr_t mem, size_t size, Phdr_t *load, + + void *bucket = NULL; + Hash_t *chain = NULL; +- uint64_t nbucket, nchain = 0; ++ uint32_t nbucket, nchain = 0; + + unsigned int sym_off = 0; + unsigned int i = 0; + diff --git a/criu.spec b/criu.spec index af61d98..908f509 100644 --- a/criu.spec +++ b/criu.spec @@ -1,6 +1,6 @@ Name: criu Version: 3.19 -Release: 6 +Release: 7 Provides: crtools = %{version}-%{release} Obsoletes: crtools <= 1.0-2 Summary: A tool of Checkpoint/Restore in User-space @@ -21,6 +21,7 @@ Patch2: 0002-Add-sys_sched_setaffinity-define-for-loongarch64.patch Patch3: 0003-chore-support-building-without-network.patch Patch4: 0004-criu-fix-log_keep_err-signal-deadlock.patch Patch5: 0005-lsm-use-the-user-provided-lsm-label.patch +Patch6: 0006-vdso-correct-data-types-for-ELF-hash-table-sizes.patch %description Checkpoint/Restore in Userspace(CRIU),is a software tool for the linux operating system. @@ -106,6 +107,9 @@ chmod 0755 %{buildroot}/run/%{name}/ %doc %{_mandir}/man1/{compel.1*,crit.1*,criu-ns.1*,criu-amdgpu-plugin.1*} %changelog +* Mon Apr 21 2025 maxin - 3.19-7 +- vdso: correct data types for ELF hash table sizes + * Mon Apr 21 2025 maxin - 3.19-6 - lsm: use the user provided lsm label -- Gitee