On Wed, 23 Feb 2022 at 03:50, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote: > > On Tue, Feb 15, 2022 at 11:57:17AM +0100, Ard Biesheuvel wrote: > > Dereferencing a misaligned pointer is undefined behavior in C, and may > > result in codegen on architectures such as ARM that trigger alignments > > traps and expensive fixups in software. > > > > Instead, use the get_aligned()/put_aligned() accessors, which are cheap > > or even completely free when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y. > > > > In the converse case, the prior alignment checks ensure that the casts > > are safe, and so no unaligned accessors are necessary. > > > > Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx> > > --- > > crypto/algapi.c | 24 +++++++++++++++++++++--- > > include/crypto/algapi.h | 11 +++++++++-- > > 2 files changed, 30 insertions(+), 5 deletions(-) > > Ard, could you please take a look at the two kbuild reports and > see if there is an issue that needs to be resolved? > My patch is flawed - I'll fix it and send a v2.