Files
msm-5.15/include/crypto/hash.h
Giuliano Procida 587cfd8e66 ANDROID: fix alignment of struct shash_desc member
Prior to a recent patch series the alignment of struct shash_desc's
trailing zero-length array member __ctx was 16 bytes. Textually, this
was represented as "(((16UL)))" due to the following macro
definitions:

 #define __AC(X,Y)       (X##Y)
 #define _AC(X,Y)        __AC(X,Y)
 #define _UL(x)          (_AC(x, UL))
 #define UL(x)           (_UL(x))
 #define MTE_GRANULE_SIZE       UL(16)
 #define ARCH_SLAB_MINALIGN     MTE_GRANULE_SIZE

The series removed the definition in terms of MTE_GRANULE_SIZE
resulting in a fallback value (8 bytes on ARM 64) being used instead:

 #ifndef ARCH_SLAB_MINALIGN
 #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
 #endif

So there were size, alignment and symtypes changes, breaking ABI
compatibility.

This change corrects all issues, but possibly not in the best way.

Fixes: de23208aef7069b2 ("BACKPORT: mm: make minimum slab alignment a runtime property")
Bug: 238956478
Change-Id: If8eecad25ab662c5194f8cb6fe7e356e4173a030
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-09-26 23:57:43 +00:00

34 KiB