* Re: [PATCH] fair sched: Fix signed integer overflow problem in fair sched
[not found] <1D850B2B2FDCCD4EAD93967D2CFC56B113ABAB1E@dggemm501-mbs.china.huawei.com>
@ 2020-04-02 15:33 ` Peter Zijlstra
0 siblings, 0 replies; only message in thread
From: Peter Zijlstra @ 2020-04-02 15:33 UTC (permalink / raw)
To: hejingxian
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
juri.lelli@redhat.com, vincent.guittot@linaro.org,
dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com,
mgorman@suse.de, Hushiyuan, hewenliang (C)
On Thu, Apr 02, 2020 at 02:52:40PM +0000, hejingxian wrote:
> During execution applications in my arm64 virtual machine with UBSAN, the UBSAN error message is showed:
> UBSAN: Undefined behaviour in kernel/sched/fair.c
> signed integer overflow:
> 166982794708445 * 64885 cannot be represented in type 'long int'
> CPU: 40 PID: 4134072 Comm: stress-ng-sched Kdump: loaded Tainted: G B W OE 4.19.95-vhulk2002.1.0.0041.eulerosv2r8.aarch64 #1
> Hardware name: Huawei TaiShan 2280 V2/BC82AMDD, BIOS 0.98 08/25/2019
> Call trace:
> dump_backtrace+0x0/0x310
> show_stack+0x28/0x38
> dump_stack+0xd8/0x108
> ubsan_epilogue+0x1c/0x94
> handle_overflow+0x14c/0x19c
> __ubsan_handle_mul_overflow+0x34/0x44
> task_numa_find_cpu+0xdec/0x1058
> task_numa_migrate+0x3ac/0x12d0
> task_numa_fault+0x4f0/0x5f0
> do_numa_page+0x480/0x848
> __handle_mm_fault+0x8d8/0x9b0
> handle_mm_fault+0x280/0x460
> do_page_fault+0x3ec/0x890
> do_translation_fault+0xe4/0x100
> do_mem_abort+0xc0/0x1b0
> el0_da+0x24/0x28
>
> The multiplication of signed long integers in load_too_imbalanced may
> occur overflow, then we use unsigned long integers instead of signed integers.
NAK, UBSAN is smoking dope, and you patch is actively wrong.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-02 15:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1D850B2B2FDCCD4EAD93967D2CFC56B113ABAB1E@dggemm501-mbs.china.huawei.com>
2020-04-02 15:33 ` [PATCH] fair sched: Fix signed integer overflow problem in fair sched Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox