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: 12401417 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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,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 6F85BC4338F for ; Tue, 27 Jul 2021 04:03:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35BDF6056B for ; Tue, 27 Jul 2021 04:03:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 35BDF6056B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MoeQRsjOz64b/aetVzcaOlYSbv9ciKW6OcpsAE6Ob6Q=; b=Izh+YBIR/2sB9t NVDWPke8Jrg0IiJkNqov9J+FqeSZgAtXXwBjoQ1IWwHLnBtyWy8DmmJOcIFLP2L0SQvbamKOF+6VN lmEdWf6PPPsPlHWW1QDePj6j37stiov17E1scGun7kEQ7eKbEBvufPizFoWFkRdzQBimTlcRmkXKN /aI0Fxrpht55j+OE1cPRR4uMt9dLr9FWat5VGcRZylwGCHaRnQN1beSpuW/dgZJvLk3bZVrlPUmAB K2FhTmNBjIFwA3xYsQTRGjD3fuzNofliLgCl+mQ/YONT9gHJgpi7BBXCObRabOkKvImFjB80qNYIF 2YJgXgRRT022+2G8nguw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8EH7-00D6BT-Oj; Tue, 27 Jul 2021 04:01:03 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8EH3-00D69q-A3; Tue, 27 Jul 2021 04:00:58 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210726_210057_404054_5E66E4C8 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(); }