projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf457be
)
x86/kaslr: Fix off-by-one error in process_gb_huge_pages()
author
Arvind Sankar
<nivedita@alum.mit.edu>
Tue, 28 Jul 2020 22:57:11 +0000
(18:57 -0400)
committer
Ingo Molnar
<mingo@kernel.org>
Fri, 31 Jul 2020 09:08:17 +0000
(11:08 +0200)
If the remaining size of the region is exactly 1Gb, there is still one
hugepage that can be reserved.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link:
https://lore.kernel.org/r/20200728225722.67457-11-nivedita@alum.mit.edu
arch/x86/boot/compressed/kaslr.c
patch
|
blob
|
history
diff --git
a/arch/x86/boot/compressed/kaslr.c
b/arch/x86/boot/compressed/kaslr.c
index
d074986
..
0df513e
100644
(file)
--- a/
arch/x86/boot/compressed/kaslr.c
+++ b/
arch/x86/boot/compressed/kaslr.c
@@
-562,7
+562,7
@@
process_gb_huge_pages(struct mem_vector *region, unsigned long image_size)
size = region->size - (addr - region->start);
/* Check how many 1GB huge pages can be filtered out: */
- while (size > PUD_SIZE && max_gb_huge_pages) {
+ while (size >
=
PUD_SIZE && max_gb_huge_pages) {
size -= PUD_SIZE;
max_gb_huge_pages--;
i++;