From patchwork Tue Jul 27 04:00:21 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: 12401425 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=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 E89F7C4338F for ; Tue, 27 Jul 2021 04:00:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 593DD60184 for ; Tue, 27 Jul 2021 04:00:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 593DD60184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E83226B0036; Tue, 27 Jul 2021 00:00:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E32586B005D; Tue, 27 Jul 2021 00:00:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D48658D0001; Tue, 27 Jul 2021 00:00:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id BCEA66B0036 for ; Tue, 27 Jul 2021 00:00:58 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6769D1CFC5 for ; Tue, 27 Jul 2021 04:00:58 +0000 (UTC) X-FDA: 78407016996.09.0E2ABD3 Received: from mailgw01.mediatek.com (mailgw01.mediatek.com [216.200.240.184]) by imf07.hostedemail.com (Postfix) with ESMTP id 331D410022C1 for ; Tue, 27 Jul 2021 04:00:57 +0000 (UTC) X-UUID: c3879a71e49e46afbec061b49527a67e-20210726 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:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=mpXC/mrthXiEWq0igGvtpzzqWviS71zqDtVkSBpa2Lo=; b=V9ts2a4iCZooE8OWKLlFsx4qC1CR7O0VSICWxtNOS7OdUKyQg9S0c1JzILejiVv9tS47C9s554Cv3+95qGmwS3F6xRsGnaoswGn0PvWyw9qUr1xjqJWKriSBEUUop03h/6Qvg7xNi8u+lmUecLrJgYCvl0YztxXoUaItngVLVmw=; X-UUID: c3879a71e49e46afbec061b49527a67e-20210726 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 232804081; Mon, 26 Jul 2021 21:00:51 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Jul 2021 21:00:50 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 27 Jul 2021 12:00:48 +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; Tue, 27 Jul 2021 12:00:43 +0800 From: Kuan-Ying Lee To: Nicholas Tang , Andrew Yang , Andrey Konovalov , "Andrey Ryabinin" , Alexander Potapenko , Marco Elver , Chinwen Chang , Andrew Morton CC: , , , , , Kuan-Ying Lee Subject: [PATCH 2/2] kasan, mm: reset tag for hex dump address Date: Tue, 27 Jul 2021 12:00:21 +0800 Message-ID: <20210727040021.21371-3-Kuan-Ying.Lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210727040021.21371-1-Kuan-Ying.Lee@mediatek.com> References: <20210727040021.21371-1-Kuan-Ying.Lee@mediatek.com> MIME-Version: 1.0 X-MTK: N Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=mediatek.com header.s=dk header.b=V9ts2a4i; spf=pass (imf07.hostedemail.com: domain of kuan-ying.lee@mediatek.com designates 216.200.240.184 as permitted sender) smtp.mailfrom=kuan-ying.lee@mediatek.com; dmarc=pass (policy=none) header.from=mediatek.com X-Rspamd-Server: rspam02 X-Stat-Signature: 1mnt67wu1qwyy46ngan8ufomw3dy8hxi X-Rspamd-Queue-Id: 331D410022C1 X-HE-Tag: 1627358456-714170 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: Text is a string. We need to move this kasan_reset_tag() to address but text. Signed-off-by: Kuan-Ying Lee --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 6dad2b6fda6f..d20674f839ba 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -576,8 +576,8 @@ static void print_section(char *level, char *text, u8 *addr, unsigned int length) { metadata_access_enable(); - print_hex_dump(level, kasan_reset_tag(text), DUMP_PREFIX_ADDRESS, - 16, 1, addr, length, 1); + print_hex_dump(level, text, DUMP_PREFIX_ADDRESS, + 16, 1, kasan_reset_tag((void *)addr), length, 1); metadata_access_disable(); }