Add upstream patch to improve performance on some type-cast operations

This commit is contained in:
Björn Esser 2022-11-28 22:30:40 +01:00
parent 5345044877
commit 7af6c06cde
No known key found for this signature in database
GPG Key ID: F52E98007594C21D
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,23 @@
From 9d5e7b7307f264c2d177a1f014fa3a3b9da524df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Sun, 20 Nov 2022 09:57:15 +0100
Subject: [PATCH] alg-yescrypt-platform.c: Optimize some cast operation for
performance.
---
lib/alg-yescrypt-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/alg-yescrypt-platform.c b/lib/alg-yescrypt-platform.c
index d68af2d..fbad1dc 100644
--- a/lib/alg-yescrypt-platform.c
+++ b/lib/alg-yescrypt-platform.c
@@ -59,7 +59,7 @@ static void *alloc_region(yescrypt_region_t *region, size_t size)
if (base != MAP_FAILED) {
base_size = new_size;
} else if (flags & MAP_HUGETLB) {
- flags &= (unsigned int)~(MAP_HUGETLB | MAP_HUGE_2MB);
+ flags &= ~(unsigned int)(MAP_HUGETLB | MAP_HUGE_2MB);
base = mmap(NULL, size, PROT_READ | PROT_WRITE, (int)flags, -1, 0);
}

View File

@ -175,6 +175,7 @@ Source2: %{url}/releases/download/v%{version}/%{name}-gpgkey.gpg
Source3: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz.sha256sum
# Patch 0000 - 2999: Backported patches from upstream.
Patch0000: %{url}/commit/9d5e7b7307f2.patch#/%{name}-4.4.33-yescrypt_platform_cast_performance.patch
# Patch 3000 - 5999: Backported patches from pull requests.
@ -577,6 +578,7 @@ done
%changelog
* Mon Nov 28 2022 Björn Esser <besser82@fedoraproject.org> - 4.4.33-3
- Convert License to SPDX expression
- Add upstream patch to improve performance on some type-cast operations
* Mon Nov 21 2022 Björn Esser <besser82@fedoraproject.org> - 4.4.33-2
- Do not BR the compat package during bootstrap