Re: [PATCH] arm64/mm: Ensure adequate HUGE_MAX_HSTATE

From: Gavin Shan
Date: Mon Dec 02 2024 - 21:47:57 EST


On 12/2/24 4:44 PM, Anshuman Khandual wrote:
This asserts that HUGE_MAX_HSTATE is sufficient enough preventing potential
hugetlb_max_hstate runtime overflow in hugetlb_add_hstate() thus triggering
a BUG_ON() there after.

Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Ard Biesheuvel <ardb@xxxxxxxxxx>
Cc: Ryan Roberts <ryan.roberts@xxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>
---
This patch applies on v6.13-rc1

arch/arm64/mm/hugetlbpage.c | 12 ++++++++++++
1 file changed, 12 insertions(+)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>