From patchwork Sat Jun 26 10:09:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?S3Vhbi1ZaW5nIExlZSAo5p2O5Yag56mOKQ==?= X-Patchwork-Id: 12346383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MIME_BASE64_TEXT,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57D7CC49EA5 for ; Sat, 26 Jun 2021 10:09:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0064861278 for ; Sat, 26 Jun 2021 10:09:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0064861278 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 211EF6B006C; Sat, 26 Jun 2021 06:09:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1742A6B0070; Sat, 26 Jun 2021 06:09:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F2E006B0071; Sat, 26 Jun 2021 06:09:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id BB3B56B006C for ; Sat, 26 Jun 2021 06:09:47 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C0DF51802DF94 for ; Sat, 26 Jun 2021 10:09:47 +0000 (UTC) X-FDA: 78295453614.30.E10AB0B Received: from mailgw02.mediatek.com (mailgw02.mediatek.com [216.200.240.185]) by imf26.hostedemail.com (Postfix) with ESMTP id 2678F4142C6E for ; Sat, 26 Jun 2021 10:09:44 +0000 (UTC) X-UUID: b1fde24c1fd64ae682fbe79aa52718ba-20210626 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=x8BTyACVehC4YC0R7Ee40AY/tvOvCQKq8/1wf23Ro8w=; b=OvpMYwkaW/mbusjKscIyq1jjvKTSLOHMxwybf196Favdhx5Lb3IWJpMKiVTvxmAhy6IixcD/FeWcPZj0bzV3+5tDVMwdji/pEYl/8wNBzGKeKpc1eTf/0Rd/CMGri5gYtZLi7REe+O6YzGr+VYiOUyaSZJxwZspbGGlyU/Qm6Yc=; X-UUID: b1fde24c1fd64ae682fbe79aa52718ba-20210626 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 793065210; Sat, 26 Jun 2021 03:09:37 -0700 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 26 Jun 2021 03:09:35 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 26 Jun 2021 18:09:33 +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; Sat, 26 Jun 2021 18:09:33 +0800 From: Kuan-Ying Lee To: Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Marco Elver , Dmitry Vyukov , Andrew Morton , Matthias Brugger CC: , , , , , , , , Kuan-Ying Lee Subject: [PATCH v4 0/3] kasan: add memory corruption identification support for hw tag-based kasan Date: Sat, 26 Jun 2021 18:09:28 +0800 Message-ID: <20210626100931.22794-1-Kuan-Ying.Lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=mediatek.com header.s=dk header.b=OvpMYwka; spf=pass (imf26.hostedemail.com: domain of kuan-ying.lee@mediatek.com designates 216.200.240.185 as permitted sender) smtp.mailfrom=kuan-ying.lee@mediatek.com; dmarc=pass (policy=none) header.from=mediatek.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 2678F4142C6E X-Stat-Signature: 8bb6c3tzrfag9ukupjab8zfg9yzgmtws X-HE-Tag: 1624702184-511357 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add memory corruption identification for hardware tag-based KASAN mode. Changes since v4: - Change report_tags.h to report_tags.c - Refine the commit message - Test lib/test_kasan module with SW_TAGS mode - Test lib/test_kasan module with HW_TAGS mode - Rebase to latest linux-next Changes since v3: - Preserve Copyright from hw_tags.c/sw_tags.c and report_sw_tags.c/report_hw_tags.c - Make non-trivial change in kasan sw tag-based mode Changes since v2: - Thanks for Marco's Suggestion - Rename the CONFIG_KASAN_SW_TAGS_IDENTIFY - Integrate tag-based kasan common part - Rebase to latest linux-next Kuan-Ying Lee (3): kasan: rename CONFIG_KASAN_SW_TAGS_IDENTIFY to CONFIG_KASAN_TAGS_IDENTIFY kasan: integrate the common part of two KASAN tag-based modes kasan: add memory corruption identification support for hardware tag-based mode lib/Kconfig.kasan | 4 +-- mm/kasan/Makefile | 4 +-- mm/kasan/hw_tags.c | 22 --------------- mm/kasan/kasan.h | 4 +-- mm/kasan/report_hw_tags.c | 5 ---- mm/kasan/report_sw_tags.c | 43 ---------------------------- mm/kasan/report_tags.c | 51 +++++++++++++++++++++++++++++++++ mm/kasan/sw_tags.c | 41 --------------------------- mm/kasan/tags.c | 59 +++++++++++++++++++++++++++++++++++++++ 9 files changed, 116 insertions(+), 117 deletions(-) create mode 100644 mm/kasan/report_tags.c create mode 100644 mm/kasan/tags.c