summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-08-12 04:31:51 -0700
committerMike Rapoport (Microsoft) <rppt@kernel.org>2026-08-31 14:17:41 +0300
commitc711461303af9f796b293b5ac06f49a885e46e71 (patch)
tree407cd7040bacb56495d4668e9da2e35aa99d702b /scripts/Makefile.thinlto
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
downloadlinux-next-c711461303af9f796b293b5ac06f49a885e46e71.tar.gz
linux-next-c711461303af9f796b293b5ac06f49a885e46e71.zip
kexec_file: stop the top-down search before it underflows
locate_mem_hole_top_down() walks candidates downwards by subtracting PAGE_SIZE whenever the window conflicts with an existing segment or with an architecture exclude range. Nothing stops that subtraction at zero, so a search that reaches the bottom of the address space wraps temp_start around and continues. The walk starts inside the range being scanned and only moves down, so bail out once a candidate ends up above end. That covers every step in the loop rather than the subtractions alone, and it matches locate_mem_hole_bottom_up(), which already bounds its candidate on both sides. This is a better check than subtracting with check_sub_overflow(), given that we would have 3 subtractions in this block, and this single fix would take care of them all (instead of three check_sub_overflow()). Fixes: cb1052581e2b ("kexec: implementation of new syscall kexec_file_load") Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Bradley Morgan <include@grrlz.net> Link: https://patch.msgid.link/20260812-kexec_posioned-v6-1-e477887086f0@debian.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions