From a745547ce946729579c399aa84e4aad472e56cd92dac2555b98d185965a9cc7e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 22 Feb 2021 20:15:45 +0000 Subject: [PATCH] Accepting request 874283 from home:Guillaume_G:branches:openSUSE:Factory:ARM - Revert last commit and fix bug boo#1181402 with a proper patch: * fix-aliasing-aarch64.patch OBS-URL: https://build.opensuse.org/request/show/874283 OBS-URL: https://build.opensuse.org/package/show/Base:System/dd_rescue?expand=0&rev=52 --- dd_rescue.changes | 6 ++++++ dd_rescue.spec | 6 ++---- fix-aliasing-aarch64.patch | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 fix-aliasing-aarch64.patch diff --git a/dd_rescue.changes b/dd_rescue.changes index 94e846d..d70bbf7 100644 --- a/dd_rescue.changes +++ b/dd_rescue.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 22 10:40:53 UTC 2021 - Guillaume GARDET + +- Revert last commit and fix bug boo#1181402 with a proper patch: + * fix-aliasing-aarch64.patch + ------------------------------------------------------------------- Thu Jan 28 22:41:26 UTC 2021 - Dirk Müller diff --git a/dd_rescue.spec b/dd_rescue.spec index 4ca93b6..405cfb0 100644 --- a/dd_rescue.spec +++ b/dd_rescue.spec @@ -36,6 +36,8 @@ Patch2: ddr_1998-check-nofail-noxattr.diff Patch3: ddr_1998-sysrandom.diff Patch4: ddr_1998-testhole.diff Patch5: ddr_1998-ossl11-warn.diff +# boo#1181402 +Patch6: fix-aliasing-aarch64.patch BuildRequires: autoconf BuildRequires: libattr-devel BuildRequires: libopenssl-devel @@ -131,10 +133,6 @@ autoconf touch .dep OPT_FLAGS="%{optflags}" -%ifarch aarch64 -OPT_FLAGS+=" -fno-strict-aliasing" -%endif - %make_build RPM_OPT_FLAGS="$OPT_FLAGS" LIBDIR=%{_libdir} LIB=%{_lib} %install diff --git a/fix-aliasing-aarch64.patch b/fix-aliasing-aarch64.patch new file mode 100644 index 0000000..ab71e0f --- /dev/null +++ b/fix-aliasing-aarch64.patch @@ -0,0 +1,26 @@ +--- a/aes_arm64.c ++++ a/aes_arm64.c +@@ -158,8 +158,8 @@ inline void AES_ARM8_EKey_DKey(const u32* ekey, + int AES_ARM8_KeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits, int rounds) + { + /* expand the cipher key: */ +- int Nr = AES_ARM8_KeySetupEnc((u32*)crypto->xkeys, cipherKey, keyBits, rounds); +- AES_ARM8_EKey_DKey((u32*)crypto->xkeys, rk, Nr); ++ int Nr = AES_ARM8_KeySetupEnc(crypto->xkeys->data32, cipherKey, keyBits, rounds); ++ AES_ARM8_EKey_DKey(crypto->xkeys->data32, rk, Nr); + return Nr; + } + +--- a/secmem.h ++++ a/secmem.h +@@ -10,8 +10,9 @@ + # include "config.h" + #endif + +-typedef struct _roundkey { ++typedef union _roundkey { + unsigned char data[16]; ++ unsigned int data32[4]; + } roundkey; + + typedef struct _ciphblk {