Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1761262ybj; Wed, 6 May 2020 04:59:03 -0700 (PDT) X-Google-Smtp-Source: APiQypIJUBiTu485X69rHEOij6TeYyz2a9XAuSgxMk93emCmPhaUhcvMTEpucLPjqDHJL59TY/6+ X-Received: by 2002:a17:906:2f8f:: with SMTP id w15mr7031797eji.255.1588766343448; Wed, 06 May 2020 04:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588766343; cv=none; d=google.com; s=arc-20160816; b=lmq4snZoetEFtvTysFIVkzglcZGxZuD/GOHu3HhE6J/Gbau1B2EQQPRvBPv6lTWpLB +Xleib6VUZ/wRtxuk3DmG3ydSun866m6+8HpsEbcBT5l44mR3X1badxuH2CeWzdQajzo jS9Nf5Rb6zIiz5brXQ+K5jtcaU7eMchx6+NoE7BhXav1U+8doNuSX5DhX2FXN15wXluS 4w1i7XNG9HSd+gYj2tv/D8YPUBHvoppoFDWgVlvpmrBOY69z7CFEYKADXlpD7g7FGl2K j865Z50yMSE/seIUD/hJNBZYD1hc2rx6uJbdvloDtdFfAf/ZUFjjqqApBnYfgwZAgZQx 12AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=MNY7QjHyK2N8v2XPbveR8rY3W7ehZggZwWilVhYjlQw=; b=n4Y74DXJt7prOqFQH6Oke55aYPXj0gAAuUWsNy0Txvqk9V+OQazcPk22LGaxTMWkRb a5zdGwkFGe6Kg+iGpalmQjmh9pyAD/G3MMVgkIn7v9zZnQYo7olBbKPTpDedSUnz4kfB m+FYWaOo7Zgvx1zNOnGbVJWeeijNEYINHAnchpxP5fhWW5FbBzP4ExQayxuTUO44Ga+f K/CCZ7wsX1mQBF10EeDfVAlmNQR3cBHbVJmPBw40PjOWiywvvbmRkdOkVpeR4lG1gZf1 f+3d/JskSeLJbyFk3UNW/+vaJ+wyJfQ3M3RY/u4yFLtRp586SPUjyMWyyKeAkoUJNCvi 2RNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=PXJKEtd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si296244edi.440.2020.05.06.04.58.40; Wed, 06 May 2020 04:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=PXJKEtd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727792AbgEFL4l (ORCPT + 99 others); Wed, 6 May 2020 07:56:41 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:38462 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725985AbgEFL4l (ORCPT ); Wed, 6 May 2020 07:56:41 -0400 X-UUID: 02a666bec23c4b3eb4474929ed893b68-20200506 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=MNY7QjHyK2N8v2XPbveR8rY3W7ehZggZwWilVhYjlQw=; b=PXJKEtd2EYOa4rA2Hb0vETIQGIbuaIRWoqj+ZhgwmE/kBOQWSyUVFAKUrIGXIxS16PZF+Zsez8211XRDgJtX9345+lZf2IlW7Zb5mvobDYAQXAAQ+D+vQErewCeuq7qeEII5tuzpDqUeJQqy9MpYZ9dns9lh7M5eAaQ6368JM1M=; X-UUID: 02a666bec23c4b3eb4474929ed893b68-20200506 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 2131291375; Wed, 06 May 2020 19:56:35 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 6 May 2020 19:56:31 +0800 Received: from [172.21.84.99] (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 6 May 2020 19:56:30 +0800 Message-ID: <1588766193.23664.28.camel@mtksdccf07> Subject: Re: [PATCH 2/3] kasan: record and print the free track From: Walter Wu To: Dmitry Vyukov CC: Andrey Ryabinin , Alexander Potapenko , Matthias Brugger , kasan-dev , Linux-MM , LKML , Linux ARM , wsd_upstream , Date: Wed, 6 May 2020 19:56:33 +0800 In-Reply-To: References: <20200506052155.14515-1-walter-zh.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIwLTA1LTA2IGF0IDExOjUwICswMjAwLCBEbWl0cnkgVnl1a292IHdyb3RlOg0K PiBPbiBXZWQsIE1heSA2LCAyMDIwIGF0IDc6MjIgQU0gV2FsdGVyIFd1IDx3YWx0ZXItemgud3VA bWVkaWF0ZWsuY29tPiB3cm90ZToNCj4gPg0KPiA+IFdlIGFkZCBuZXcgS0FTQU5fUkNVX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