Commit 587cfd8e authored by Giuliano Procida's avatar Giuliano Procida Committed by Suren Baghdasaryan
Browse files

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: default avatarGiuliano Procida <gprocida@google.com>
parent e15184fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment