From: Peter Zijlstra <peterz@infradead.org>
To: hejingxian <hejingxian@huawei.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"bsegall@google.com" <bsegall@google.com>,
"mgorman@suse.de" <mgorman@suse.de>,
Hushiyuan <hushiyuan@huawei.com>,
"hewenliang (C)" <hewenliang4@huawei.com>
Subject: Re: [PATCH] fair sched: Fix signed integer overflow problem in fair sched
Date: Thu, 2 Apr 2020 17:33:16 +0200 [thread overview]
Message-ID: <20200402153316.GF20730@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1D850B2B2FDCCD4EAD93967D2CFC56B113ABAB1E@dggemm501-mbs.china.huawei.com>
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.
parent reply other threads:[~2020-04-02 15:33 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1D850B2B2FDCCD4EAD93967D2CFC56B113ABAB1E@dggemm501-mbs.china.huawei.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200402153316.GF20730@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=hejingxian@huawei.com \
--cc=hewenliang4@huawei.com \
--cc=hushiyuan@huawei.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox