Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

decompress: Use 8 byte alignment

The ZSTD decompressor requires malloc() allocations to be 8 byte
aligned, so ensure that this the case.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230807162720.545787-19-ardb@kernel.org

authored by

Ard Biesheuvel and committed by
Borislav Petkov (AMD)
8217ad0a 11078876

+1 -1
+1 -1
include/linux/decompress/mm.h
··· 48 48 if (!malloc_ptr) 49 49 malloc_ptr = free_mem_ptr; 50 50 51 - malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */ 51 + malloc_ptr = (malloc_ptr + 7) & ~7; /* Align */ 52 52 53 53 p = (void *)malloc_ptr; 54 54 malloc_ptr += size;