projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1107887
)
decompress: Use 8 byte alignment
author
Ard Biesheuvel
<ardb@kernel.org>
Mon, 7 Aug 2023 16:27:15 +0000
(18:27 +0200)
committer
Borislav Petkov (AMD)
<bp@alien8.de>
Mon, 7 Aug 2023 18:55:27 +0000
(20:55 +0200)
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
include/linux/decompress/mm.h
patch
|
blob
|
history
diff --git
a/include/linux/decompress/mm.h
b/include/linux/decompress/mm.h
index 9192986b1a7313234f467732cbb4a2bd6eb59252..ac862422df158bef7fe7ad287066668ea5b6c425 100644
(file)
--- a/
include/linux/decompress/mm.h
+++ b/
include/linux/decompress/mm.h
@@
-48,7
+48,7
@@
MALLOC_VISIBLE void *malloc(int size)
if (!malloc_ptr)
malloc_ptr = free_mem_ptr;
- malloc_ptr = (malloc_ptr +
3) & ~3
; /* Align */
+ malloc_ptr = (malloc_ptr +
7) & ~7
; /* Align */
p = (void *)malloc_ptr;
malloc_ptr += size;