Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756947AbcK3IG2 (ORCPT ); Wed, 30 Nov 2016 03:06:28 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:63418 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbcK3IGU (ORCPT ); Wed, 30 Nov 2016 03:06:20 -0500 Message-ID: <583E8864.9000305@huawei.com> Date: Wed, 30 Nov 2016 16:05:56 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: , CC: Linux MM , LKML , Yisheng Xie , wangwei Subject: [RFC] kasan: is it a wrong report from kasan? Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7527 Lines: 72 The kernel version is v4.1, and I find some error reports from kasan. I'm not sure whether it is a wrong report. 11-29 07:57:26.513 <3>[12507.758056s][pid:0,cpu3,swapper/3]BUG: KASAN: stack-out-of-bounds in trace_event_buffer_lock_reserve+0x50/0x170 at addr ffffffc035903bf0 11-29 07:57:26.513 <3>[12507.758087s][pid:0,cpu3,swapper/3]Write of size 8 by task swapper/3/0 11-29 07:57:26.513 <0>[12507.758117s][pid:0,cpu3,swapper/3]page:ffffffbdc0d740c0 count:0 mapcount:0 mapping: (null) index:0x0 11-29 07:57:26.513 <0>[12507.758117s][pid:0,cpu3,swapper/3]flags: 0x0() 11-29 07:57:26.513 <1>[12507.758148s][pid:0,cpu3,swapper/3]page dumped because: kasan: bad access detected 11-29 07:57:26.513 <4>[12507.758178s][pid:0,cpu3,swapper/3]CPU: 3 PID: 0 Comm: swapper/3 Tainted: G B 4.1.18-gd8679e8 #1 11-29 07:57:26.513 <4>[12507.758209s][pid:0,cpu3,swapper/3]TGID: 0 Comm: swapper/3 11-29 07:57:26.513 <4>[12507.758239s][pid:0,cpu3,swapper/3]Hardware name: hi6250 (DT) 11-29 07:57:26.514 <0>[12507.758239s][pid:0,cpu3,swapper/3]Call trace: 11-29 07:57:26.514 <4>[12507.758270s][pid:0,cpu3,swapper/3][] dump_backtrace+0x0/0x1f4 11-29 07:57:26.515 <4>[12507.758300s][pid:0,cpu3,swapper/3][] show_stack+0x20/0x28 11-29 07:57:26.516 <4>[12507.758331s][pid:0,cpu3,swapper/3][] dump_stack+0x84/0xa8 11-29 07:57:26.516 <4>[12507.758361s][pid:0,cpu3,swapper/3][] kasan_report+0x54c/0x574 11-29 07:57:26.517 <4>[12507.758361s][pid:0,cpu3,swapper/3][] __asan_store8+0x6c/0x84 11-29 07:57:26.517 <4>[12507.758392s][pid:0,cpu3,swapper/3][] trace_event_buffer_lock_reserve+0x50/0x170 11-29 07:57:26.517 <4>[12507.758422s][pid:0,cpu3,swapper/3][] ftrace_event_buffer_reserve+0x8c/0xd8 11-29 07:57:26.517 <4>[12507.758453s][pid:0,cpu3,swapper/3][] ftrace_raw_event_sched_wakeup_template+0xe0/0x194 11-29 07:57:26.517 <4>[12507.758483s][pid:0,cpu3,swapper/3][] ttwu_do_wakeup+0x19c/0x200 11-29 07:57:26.517 <4>[12507.758514s][pid:0,cpu3,swapper/3][] try_to_wake_up+0x558/0x638 11-29 07:57:26.517 <4>[12507.758514s][pid:0,cpu3,swapper/3][] wake_up_process+0x3c/0x78 11-29 07:57:26.517 <4>[12507.758544s][pid:0,cpu3,swapper/3][] raise_softirq+0xa0/0xb4 11-29 07:57:26.517 <4>[12507.758575s][pid:0,cpu3,swapper/3][] invoke_rcu_core+0x5c/0x6c 11-29 07:57:26.518 <4>[12507.758605s][pid:0,cpu3,swapper/3][] rcu_needs_cpu+0x190/0x198 11-29 07:57:26.518 <4>[12507.758636s][pid:0,cpu3,swapper/3][] __tick_nohz_idle_enter+0x220/0x814 11-29 07:57:26.518 <4>[12507.758666s][pid:0,cpu3,swapper/3][] tick_nohz_idle_enter+0x68/0xa8 11-29 07:57:26.518 <4>[12507.758697s][pid:0,cpu3,swapper/3][] cpu_startup_entry+0x88/0x51c 11-29 07:57:26.518 <4>[12507.758697s][pid:0,cpu3,swapper/3][] secondary_start_kernel+0x1d8/0x22c 11-29 07:57:26.518 <3>[12507.758728s][pid:0,cpu3,swapper/3]Memory state around the buggy address: 11-29 07:57:26.518 <3>[12507.758758s][pid:0,cpu3,swapper/3] ffffffc035903a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11-29 07:57:26.518 <3>[12507.758758s][pid:0,cpu3,swapper/3] ffffffc035903b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11-29 07:57:26.518 <3>[12507.758789s][pid:0,cpu3,swapper/3]>ffffffc035903b80: 00 00 00 00 f1 f1 f1 f1 00 00 f1 f1 f1 f1 f3 f3 11-29 07:57:26.518 <3>[12507.758819s][pid:0,cpu3,swapper/3] ^ 11-29 07:57:26.519 <3>[12507.758850s][pid:0,cpu3,swapper/3] ffffffc035903c00: 00 00 00 00 f4 f4 00 00 00 00 00 00 00 00 00 00 11-29 07:57:26.519 <3>[12507.758850s][pid:0,cpu3,swapper/3] ffffffc035903c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11-29 07:57:26.523 <3>[12507.759735s][pid:0,cpu3,swapper/3]BUG: KASAN: stack-out-of-bounds in ftrace_event_buffer_reserve+0x98/0xd8 at addr ffffffc035903bf8 11-29 07:57:26.523 <3>[12507.759765s][pid:0,cpu3,swapper/3]Write of size 8 by task swapper/3/0 11-29 07:57:26.523 <0>[12507.759765s][pid:0,cpu3,swapper/3]page:ffffffbdc0d740c0 count:0 mapcount:0 mapping: (null) index:0x0 11-29 07:57:26.523 <0>[12507.759796s][pid:0,cpu3,swapper/3]flags: 0x0() 11-29 07:57:26.523 <1>[12507.759826s][pid:0,cpu3,swapper/3]page dumped because: kasan: bad access detected 11-29 07:57:26.523 <4>[12507.759857s][pid:0,cpu3,swapper/3]CPU: 3 PID: 0 Comm: swapper/3 Tainted: G B 4.1.18-gd8679e8 #1 11-29 07:57:26.524 <4>[12507.759857s][pid:0,cpu3,swapper/3]TGID: 0 Comm: swapper/3 11-29 07:57:26.524 <4>[12507.759887s][pid:0,cpu3,swapper/3]Hardware name: hi6250 (DT) 11-29 07:57:26.524 <0>[12507.759887s][pid:0,cpu3,swapper/3]Call trace: 11-29 07:57:26.524 <4>[12507.759918s][pid:0,cpu3,swapper/3][] dump_backtrace+0x0/0x1f4 11-29 07:57:26.524 <4>[12507.759948s][pid:0,cpu3,swapper/3][] show_stack+0x20/0x28 11-29 07:57:26.524 <4>[12507.759979s][pid:0,cpu3,swapper/3][] dump_stack+0x84/0xa8 11-29 07:57:26.524 <4>[12507.760009s][pid:0,cpu3,swapper/3][] kasan_report+0x54c/0x574 11-29 07:57:26.524 <4>[12507.760009s][pid:0,cpu3,swapper/3][] __asan_store8+0x6c/0x84 11-29 07:57:26.524 <4>[12507.760040s][pid:0,cpu3,swapper/3][] ftrace_event_buffer_reserve+0x98/0xd8 11-29 07:57:26.525 <4>[12507.760070s][pid:0,cpu3,swapper/3][] ftrace_raw_event_sched_wakeup_template+0xe0/0x194 11-29 07:57:26.525 <4>[12507.760101s][pid:0,cpu3,swapper/3][] ttwu_do_wakeup+0x19c/0x200 11-29 07:57:26.525 <4>[12507.760131s][pid:0,cpu3,swapper/3][] try_to_wake_up+0x558/0x638 11-29 07:57:26.525 <4>[12507.760131s][pid:0,cpu3,swapper/3][] wake_up_process+0x3c/0x78 11-29 07:57:26.525 <4>[12507.760162s][pid:0,cpu3,swapper/3][] raise_softirq+0xa0/0xb4 11-29 07:57:26.525 <4>[12507.760192s][pid:0,cpu3,swapper/3][] invoke_rcu_core+0x5c/0x6c 11-29 07:57:26.525 <4>[12507.760223s][pid:0,cpu3,swapper/3][] rcu_needs_cpu+0x190/0x198 11-29 07:57:26.525 <4>[12507.760253s][pid:0,cpu3,swapper/3][] __tick_nohz_idle_enter+0x220/0x814 11-29 07:57:26.525 <4>[12507.760253s][pid:0,cpu3,swapper/3][] tick_nohz_idle_enter+0x68/0xa8 11-29 07:57:26.526 <4>[12507.760284s][pid:0,cpu3,swapper/3][] cpu_startup_entry+0x88/0x51c 11-29 07:57:26.526 <4>[12507.760314s][pid:0,cpu3,swapper/3][] secondary_start_kernel+0x1d8/0x22c 11-29 07:57:26.526 <3>[12507.760345s][pid:0,cpu3,swapper/3]Memory state around the buggy address: 11-29 07:57:26.526 <3>[12507.760345s][pid:0,cpu3,swapper/3] ffffffc035903a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11-29 07:57:26.526 <3>[12507.760375s][pid:0,cpu3,swapper/3] ffffffc035903b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11-29 07:57:26.526 <3>[12507.760406s][pid:0,cpu3,swapper/3]>ffffffc035903b80: 00 00 00 00 f1 f1 f1 f1 00 00 f1 f1 f1 f1 f3 f3 11-29 07:57:26.526 <3>[12507.760406s][pid:0,cpu3,swapper/3] ^ 11-29 07:57:26.526 <3>[12507.760437s][pid:0,cpu3,swapper/3] ffffffc035903c00: 00 00 00 00 f4 f4 00 00 00 00 00 00 00 00 00 00 11-29 07:57:26.526 <3>[12507.760467s][pid:0,cpu3,swapper/3] ffffffc035903c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00