add_usable_mem() adds usable memory ranges for the kdump kernel.
The ranges are inclusive, but the partial overlap check uses exclusive
comparisons. This skips ranges with base == loc_end or end == loc_base.
Use inclusive comparisons instead.
Fixes: 7c64e21a1c5a ("powerpc/kexec_file: Restrict memory usage of kdump kernel")
Signed-off-by: Thorsten Blum <redacted>
---
arch/powerpc/kexec/file_load_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
add_usable_mem() adds usable memory ranges for the kdump kernel.
The ranges are inclusive, but the partial overlap check uses exclusive
comparisons. This skips ranges with base == loc_end or end == loc_base.
Use inclusive comparisons instead.
Fixes: 7c64e21a1c5a ("powerpc/kexec_file: Restrict memory usage of kdump kernel")
Signed-off-by: Thorsten Blum <redacted>
---
arch/powerpc/kexec/file_load_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This is interesting. The updated condition basically handles exactly a
one-byte overlap on either side of the usable memory ranges. In practice,
it is very unlikely that we would have such usable memory and LMB ranges.
Thorsten, have you encountered any problem that led you to propose this fix?
- Sourabh Jain
if (loc_base < base)
loc_base = base;
if (loc_end > end)
On Tue, Aug 11, 2026 at 11:51:46AM +0530, Sourabh Jain wrote:
On 09/08/26 21:54, Thorsten Blum wrote:
quoted
add_usable_mem() adds usable memory ranges for the kdump kernel.
The ranges are inclusive, but the partial overlap check uses exclusive
comparisons. This skips ranges with base == loc_end or end == loc_base.
Use inclusive comparisons instead.
Fixes: 7c64e21a1c5a ("powerpc/kexec_file: Restrict memory usage of kdump kernel")
Signed-off-by: Thorsten Blum <redacted>
---
arch/powerpc/kexec/file_load_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This is interesting. The updated condition basically handles exactly a
one-byte overlap on either side of the usable memory ranges. In practice,
it is very unlikely that we would have such usable memory and LMB ranges.
Thorsten, have you encountered any problem that led you to propose this fix?
On Tue, Aug 11, 2026 at 11:51:46AM +0530, Sourabh Jain wrote:
quoted
On 09/08/26 21:54, Thorsten Blum wrote:
quoted
add_usable_mem() adds usable memory ranges for the kdump kernel.
The ranges are inclusive, but the partial overlap check uses exclusive
comparisons. This skips ranges with base == loc_end or end == loc_base.
Use inclusive comparisons instead.
Fixes: 7c64e21a1c5a ("powerpc/kexec_file: Restrict memory usage of kdump kernel")
Signed-off-by: Thorsten Blum <redacted>
---
arch/powerpc/kexec/file_load_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This is interesting. The updated condition basically handles exactly a
one-byte overlap on either side of the usable memory ranges. In practice,
it is very unlikely that we would have such usable memory and LMB ranges.
Thorsten, have you encountered any problem that led you to propose this fix?
On Sun, 09 Aug 2026 18:24:01 +0200, Thorsten Blum wrote:
add_usable_mem() adds usable memory ranges for the kdump kernel.
The ranges are inclusive, but the partial overlap check uses exclusive
comparisons. This skips ranges with base == loc_end or end == loc_base.
Use inclusive comparisons instead.
[...]