lkml.org 
[lkml]   [2023]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm64: kvm: avoid overflow in integer division
On Thu, May 18, 2023, at 09:30, Marc Zyngier wrote:
> On Wed, 17 May 2023 21:23:39 +0100,
> Arnd Bergmann <arnd@kernel.org> wrote:
>> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
>> index 3386bd28d267..6db9ef288ec3 100644
>> --- a/arch/arm64/kvm/mmu.c
>> +++ b/arch/arm64/kvm/mmu.c
>> @@ -92,8 +92,8 @@ static int kvm_mmu_split_nr_page_tables(u64 range)
>> int n = 0;
>>
>> if (KVM_PGTABLE_MIN_BLOCK_LEVEL < 2)
>> - n += DIV_ROUND_UP_ULL(range, PUD_SIZE);
>> - n += DIV_ROUND_UP_ULL(range, PMD_SIZE);
>> + n += DIV_ROUND_UP(range, PUD_SIZE);
>> + n += DIV_ROUND_UP(range, PMD_SIZE);
>> return n;
>> }
>
> This is against -next, right? Oliver, I assume you'll take this as a
> fix for Ricardo's series?

Yes, correct, I saw it after rebasing my tree from 6.4-rc2 to the
latest -next.

Arnd

\
 
 \ /
  Last update: 2023-05-18 14:15    [W:0.094 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site