RE: [????] [PATCH v2] x86/math64: handle #DE in mul_u64_u64_div_u64()
From: Li,Rongqing
Date: Wed Jul 30 2025 - 00:54:11 EST
> Change mul_u64_u64_div_u64() to return ULONG_MAX if the result doesn't fit
> into u64 or div == 0. The former matches the generic implementation in
> lib/math/div64.c, the latter doesn't. Perhaps we will add a WARN() into the
> fixup_exception() paths later.
>
> No need to use _ASM_EXTABLE_TYPE_REG(), we know that the target register
> is pt_regs->ax with offset == 0, so a simple EX_DATA_REG(0) should work just
> fine.
>
> Reported-by: Li RongQing <lirongqing@xxxxxxxxx>
> Link:
> https://lore.kernel.org/all/78a0d7bb20504c0884d474868eccd858@xxxxxxxxx/
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
> ---
Tested-by: Li RongQing <lirongqing@xxxxxxxxx>
Thanks for fixing
Br