From patchwork Sun Jun 20 11:47:53 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: 12333367 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 CC8ACC48BDF for ; Sun, 20 Jun 2021 11:48:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6697361057 for ; Sun, 20 Jun 2021 11:48:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6697361057 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 EDE1F6B006E; Sun, 20 Jun 2021 07:48:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E8E166B0070; Sun, 20 Jun 2021 07:48:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D2F376B0072; Sun, 20 Jun 2021 07:48:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0165.hostedemail.com [216.40.44.165]) by kanga.kvack.org (Postfix) with ESMTP id 9DD206B006E for ; Sun, 20 Jun 2021 07:48:14 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 48F65A8F8 for ; Sun, 20 Jun 2021 11:48:14 +0000 (UTC) X-FDA: 78273928908.11.4F88E39 Received: from mailgw01.mediatek.com (mailgw01.mediatek.com [216.200.240.184]) by imf10.hostedemail.com (Postfix) with ESMTP id 0C2E042110A4 for ; Sun, 20 Jun 2021 11:48:09 +0000 (UTC) X-UUID: def884c0432049bba1c839676a756574-20210620 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=HR9tr4otcAuAOmU4tJAa0TvZFnThgQGC6FsBcWAxVfE=; b=qgwo3SOyPDDNSajlSYRWkExynROgFA3EtDJkafWjKcy04ef5dSLNvGjWx4llw7LYATPaIrImicmLSaEGbrXceIsbjhKZ5RBfnv7vgg7gIYqnPTtL1gJ+r7zcWXWO2IyGCu6XzrVFaLAQMdcBmeQx6QYDnyIhKRdUvjOK0p/AiDE=; X-UUID: def884c0432049bba1c839676a756574-20210620 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1579966736; Sun, 20 Jun 2021 04:48:08 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 20 Jun 2021 04:48:06 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 20 Jun 2021 19:48:05 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 20 Jun 2021 19:48:05 +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 v3 0/3] kasan: add memory corruption identification support for hw tag-based kasan Date: Sun, 20 Jun 2021 19:47:53 +0800 Message-ID: <20210620114756.31304-1-Kuan-Ying.Lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=mediatek.com header.s=dk header.b=qgwo3SOy; dmarc=pass (policy=none) header.from=mediatek.com; spf=pass (imf10.hostedemail.com: domain of kuan-ying.lee@mediatek.com designates 216.200.240.184 as permitted sender) smtp.mailfrom=kuan-ying.lee@mediatek.com X-Rspamd-Server: rspam02 X-Stat-Signature: ebbt3wmfifm17x4fourr4yqa1j935xgc X-Rspamd-Queue-Id: 0C2E042110A4 X-HE-Tag: 1624189689-462735 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000037, 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 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 | 6 +--- mm/kasan/report_sw_tags.c | 46 +----------------------------- mm/kasan/report_tags.h | 55 ++++++++++++++++++++++++++++++++++++ mm/kasan/sw_tags.c | 41 --------------------------- mm/kasan/tags.c | 59 +++++++++++++++++++++++++++++++++++++++ 9 files changed, 122 insertions(+), 119 deletions(-) create mode 100644 mm/kasan/report_tags.h create mode 100644 mm/kasan/tags.c