Auto sync2gitlab import of fio-3.19-4.el8.src.rpm

This commit is contained in:
CentOS Sources 2022-11-07 20:09:54 +00:00
parent a45397bae5
commit a58e0c9d5d
2 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,56 @@
From 3721c7fe276dbbc93e584359f87913e58f96626e Mon Sep 17 00:00:00 2001
From: Sitsofe Wheeler <sitsofe@yahoo.com>
Date: Mon, 6 Dec 2021 20:02:53 +0000
Subject: [PATCH] os: detect PMULL support before enabling accelerated crc32c
on ARM
Issue #1239 shows a crash on a FUJITSU/A64FX ARM platform at the
following line:
crc/crc32c-arm64.c:
64 t1 = (uint64_t)vmull_p64(crc1, k2);
On armv8 PMULL crypto instructions like vmull_p64 are defined as
optional (see
https://github.com/google/crc32c/pull/6#issuecomment-328713398 and
https://github.com/dotnet/runtime/issues/35143#issuecomment-617263508 ).
Avoid the crash by gating use of the hardware accelerated ARM crc32c
path behind runtime detection of PMULL.
Fixes: https://github.com/axboe/fio/issues/1239
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
os/os-linux.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/os/os-linux.h b/os/os-linux.h
index 808f1d02..3001140c 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -20,6 +20,9 @@
#ifdef ARCH_HAVE_CRC_CRYPTO
#include <sys/auxv.h>
+#ifndef HWCAP_PMULL
+#define HWCAP_PMULL (1 << 4)
+#endif /* HWCAP_PMULL */
#ifndef HWCAP_CRC32
#define HWCAP_CRC32 (1 << 7)
#endif /* HWCAP_CRC32 */
@@ -405,7 +408,8 @@ static inline bool os_cpu_has(cpu_features feature)
#ifdef ARCH_HAVE_CRC_CRYPTO
case CPU_ARM64_CRC32C:
hwcap = getauxval(AT_HWCAP);
- have_feature = (hwcap & HWCAP_CRC32) != 0;
+ have_feature = (hwcap & (HWCAP_PMULL | HWCAP_CRC32)) ==
+ (HWCAP_PMULL | HWCAP_CRC32);
break;
#endif
default:
--
2.38.1

View File

@ -1,6 +1,6 @@
Name: fio
Version: 3.19
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Multithreaded IO generation tool
Group: Applications/System
@ -13,6 +13,7 @@ Patch1: 0001-Unbreak-the-pmemblk-engine.patch
Patch2: 0001-init-fix-unit-of-latency_window.patch
Patch3: 0001-Add-option-latency_run-to-continue-enable-latency_ta.patch
Patch4: 0001-thread_options-Use-unsigned-int-type-for-exit_what-a.patch
Patch5: 0001-os-detect-PMULL-support-before-enabling-accelerated-.patch
BuildRequires: gcc
BuildRequires: libaio-devel
@ -43,6 +44,7 @@ one wants to simulate.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
pathfix.py -i %{__python3} -pn \
doc/conf.py \
@ -68,6 +70,10 @@ make install prefix=%{_prefix} mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT INSTALL
%{_datadir}/%{name}/*
%changelog
* Mon Oct 31 2022 Pavel Reichl <preichl@redhat.com> - 3.19-4
- crc32c_arm64(): fio killed by SIGILL
Fix rhbz#1954143
* Thu Aug 20 2020 Eric Sandeen <sandeen@redhat.com> 3.19-3
- Fix regression in stonewall (#1869305)