From patchwork Mon Aug 24 08:12:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Walter Wu X-Patchwork-Id: 11732321 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 844B61392 for ; Mon, 24 Aug 2020 08:12:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 400C32072D for ; Mon, 24 Aug 2020 08:12:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="kpoLH2aZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 400C32072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 80DBC6B0005; Mon, 24 Aug 2020 04:12:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7BD4B6B0006; Mon, 24 Aug 2020 04:12:32 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6AD166B0007; Mon, 24 Aug 2020 04:12:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 555A26B0005 for ; Mon, 24 Aug 2020 04:12:32 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1F354180AD81D for ; Mon, 24 Aug 2020 08:12:32 +0000 (UTC) X-FDA: 77184745344.24.pies01_2b01a9627051 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id E0D221A4A0 for ; Mon, 24 Aug 2020 08:12:31 +0000 (UTC) X-Spam-Summary: 1,0,0,89ceef6db6692f61,d41d8cd98f00b204,walter-zh.wu@mediatek.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1185:1260:1277:1311:1313:1314:1345:1431:1437:1514:1515:1516:1518:1534:1541:1585:1711:1730:1747:1777:1792:1981:2194:2198:2199:2200:2393:2559:2562:2731:3138:3139:3140:3141:3142:3352:3865:3867:3868:3870:3871:3874:4250:5007:6261:6653:7875:8660:9707:10004:10400:11026:11232:11473:11658:11914:12043:12048:12296:12297:12438:12521:12555:12895:13069:13148:13161:13229:13230:13311:13357:14181:14394:14721:21080:21451:21627:21740:21939:30029:30054:30070,0,RBL:210.61.82.184:@mediatek.com:.lbl8.mailshell.net-62.2.12.100 64.100.201.201;04ygi7b3eiifmkomej6ggwtu7ff8eoconke5x1jhkxt6pq1cg15sexg7d1tya1o.wgwfq86aka5qb91i591wk5ah6gbemy6z3dwdk1uoofsn56m9rehuqua1oyitcwz.o-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:99,LUA_SUMMARY:none X-HE-Tag: pies01_2b01a9627051 X-Filterd-Recvd-Size: 4142 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Mon, 24 Aug 2020 08:12:30 +0000 (UTC) X-UUID: 0e1feef9c4bc47e6955e9d1135fde177-20200824 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=HDzXMXMz+Dzcg9DxfMTu2qwgwLYa3ujPve0aUqFM/KA=; b=kpoLH2aZI2pLa/Ty/SwW+EtHT4L5E7rv7qzHiwGTOLFNZe0/t1DZ62i3/oHfLX+wIwWmdg7CwUiLZZRLIqY5Ww0xOPBGuuuQLb/VrtLG8RZYYKRmuepxq6Iivyki5qw5Bhr8fFvmqoVZtztbYYvWmOopk5t0obQFbsd1fkM5zjU=; X-UUID: 0e1feef9c4bc47e6955e9d1135fde177-20200824 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1710976290; Mon, 24 Aug 2020 16:12:25 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 24 Aug 2020 16:12:24 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 24 Aug 2020 16:12:22 +0800 From: Walter Wu To: Marco Elver , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger CC: , , , , wsd_upstream , , Walter Wu Subject: [PATCH v2 3/6] kasan: print timer and workqueue stack Date: Mon, 24 Aug 2020 16:12:22 +0800 Message-ID: <20200824081222.24919-1-walter-zh.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: 5E5BAFD4F7B10F653AFF65497632B9740AE0E97ECCFB021D2E7A102F9709DC8E2000:8 X-MTK: N X-Rspamd-Queue-Id: E0D221A4A0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000951, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The aux_stack[2] is reused to record the call_rcu() call stack, timer init call stack, and enqueuing work call stacks. So that we need to change the auxiliary stack title for common title, print them in KASAN report. Signed-off-by: Walter Wu Suggested-by: Marco Elver Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko --- v2: - Thanks for Marco suggestion. - We modify aux stack title name in KASAN report in order to print call_rcu()/timer/workqueue stack. --- mm/kasan/report.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 4f49fa6cd1aa..886809d0a8dd 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -183,12 +183,12 @@ static void describe_object(struct kmem_cache *cache, void *object, #ifdef CONFIG_KASAN_GENERIC if (alloc_info->aux_stack[0]) { - pr_err("Last call_rcu():\n"); + pr_err("Last potentially related work creation:\n"); print_stack(alloc_info->aux_stack[0]); pr_err("\n"); } if (alloc_info->aux_stack[1]) { - pr_err("Second to last call_rcu():\n"); + pr_err("Second to last potentially related work creation:\n"); print_stack(alloc_info->aux_stack[1]); pr_err("\n"); }