Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp4155143ybt; Sun, 5 Jul 2020 19:23:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqBC9AbIsJCQOXOCKePSbQ6co7rl6HQumvUwsUEPwtROwh/C/bqGtYRNdIIGl06u2UJAW/ X-Received: by 2002:a17:906:4949:: with SMTP id f9mr18391796ejt.495.1594002216111; Sun, 05 Jul 2020 19:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594002216; cv=none; d=google.com; s=arc-20160816; b=GuTaBJYibccYq2uKQPqBMCS25yGKDauutNMYLP+x2lxkOn8wFJ38TWja2NretitKnc P0zOlBgbzeZUFHGyY/2T8sOLk5lTJLyZ+IIiJRVJyt8egilYxWT62pAaip57KDPb3L09 aiQ/LTkXYwJgNdgx1eotM9hx+p7Y8vGyriRBYpk+TK7MToYM87/8kGPBuBDKCMdA1y4l 5PxkkHQiD0U+yGLACKq5mVPBe8Zqihvld2PQQUfCAg5JXxQhJ/Hn4sGv69ZTV6oGPXjT rkH0YjYzZeLcI3MR7Yazxtuvu1LO3dcuyPu5fUm16m5GDY1icUEJKZXgt1oGasEZXmRZ 15hw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=SiWDphWYGnavflkljTLom2j3mHnFMDqK/JoyQBPF1o4=; b=tJIhwXb8aFARi5uihCRvAqHilsa+MfXxHLpxNG/pvHSIkHrZyqmTaBn7XD+fhPKhtL gEFE0VBy6eEH/rRXJHo38Ema0RSBfrMpLuMXzYSYfsHe+VdLkjNOjW6O8ggdOgj2RsG/ s0/9JqlDwlSis96CxIRu16+vWq5bjUf2Lh/M28fn9MbvSOsBZCHM9w/aK7O4vf6GhKsp G4NrMVHmPHPE14Peqmy7mk1c8zGWBh5MZkdi8s9/WzfEv4qr5H3pKlSrYYY57bOw+n5A QpGaiMY/ho4Vd3LRMm/5YsssoTAfiluRAfRoDi9hidXS6pq39l6NWG0AiFUDDLU2DV8a aKBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=jouIo6bW; 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 n12si9237068ejg.253.2020.07.05.19.23.12; Sun, 05 Jul 2020 19:23:36 -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=jouIo6bW; 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 S1728641AbgGFCWC (ORCPT + 99 others); Sun, 5 Jul 2020 22:22:02 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:47386 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728579AbgGFCWC (ORCPT ); Sun, 5 Jul 2020 22:22:02 -0400 X-UUID: 728303f5350049de813bb76e59e979b3-20200706 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=SiWDphWYGnavflkljTLom2j3mHnFMDqK/JoyQBPF1o4=; b=jouIo6bW2xrjquA3OK2ZX/C1mn8AeTPPLzt6GGIDaMA4oOrwEWe7GkQBbNOy2FP/WfG6VJsdWL+PGX3Ns6q62k34ZNRLUBPWv0bxtjMUAlyGnfNQJNnT6F4qx5b4/zaiJd+80Z621aFhcRKhpi67HrCNmDMk3xMPZxWTxPAVh7Q=; X-UUID: 728303f5350049de813bb76e59e979b3-20200706 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 2007695977; Mon, 06 Jul 2020 10:21:53 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Jul 2020 10:21:50 +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; Mon, 6 Jul 2020 10:21:52 +0800 From: Walter Wu To: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger CC: , , , , wsd_upstream , , Walter Wu , Andrey Konovalov , Andrew Morton Subject: [PATCH v2] kasan: fix KASAN unit tests for tag-based KASAN Date: Mon, 6 Jul 2020 10:21:50 +0800 Message-ID: <20200706022150.20848-1-walter-zh.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain 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 V2UgdXNlIHRhZy1iYXNlZCBLQVNBTiwgdGhlbiBLQVNBTiB1bml0IHRlc3RzIGRvbid0IGRldGVj dCBvdXQtb2YtYm91bmRzDQptZW1vcnkgYWNjZXNzLiBUaGV5IG5lZWQgdG8gYmUgZml4ZWQuDQoN CldpdGggdGFnLWJhc2VkIEtBU0FOLCB0aGUgc3RhdGUgb2YgZWFjaCAxNiBhbGlnbmVkIGJ5dGVz IG9mIG1lbW9yeSBpcw0K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