Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp373245ybl; Fri, 23 Aug 2019 02:06:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPWZUuJpIC8DCgSKLFGV6cvheuBjhcKW3Gp4FGkF5kcXa9oHwPxGCzakVG8zHKd8PX82z7 X-Received: by 2002:a17:90a:9dca:: with SMTP id x10mr4197841pjv.100.1566551213655; Fri, 23 Aug 2019 02:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566551213; cv=none; d=google.com; s=arc-20160816; b=TfVMEx/QRU0nW9a5D6L4Vq6E+x5Ohlzrq53FLX5PwSSHV4hCy94t/RlKwcD8dQP45y 7cgBoQOSOElpcfhakezm+4EpPwr8hvcBVISOTBAup0L+1LiGBgb2Zu5jUX7vyiaBFMW6 dlPlOTrRWiWu3UqMAvvMAWP+8hyLzJn/UNvx/SbgCUdBU9WdwjSZZtWKOPxmHzzsCnXl 2FV/PSyV/XS6HVCDnTwVbB4WIxlem/SXjHlAtGfXzAMIb1gSIZGYDlniqHWSoXUy0Iz5 QPp0lBNs5LsS3RhHHQUypnVXh6vMs8lxjHdhkTE7uiJZQ4/gNzGDLbhxtOSzhZMpc/wi /f6Q== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=PCUYYMrMUgtjHI1LL/QfO7TlQ1xsexkKsNv5TvVOSHI=; b=DVVInqn6Z9PKCBBMlsPGF6cC8msgcewDod4idFKgg0BOU3XLXuzDEfLJTBH4OBxH3k DlVQ7yZVnhTrJBtxGn8/HX2X3r9lfpRYoRnxerT85KxhfMJRqpIBLQNh8WCm0TXQFxHn +jgeAbfV3GxSy43Fary9OLRMfhu0Bjw2EGQHyzesDO+gM2M8hn2ATvi8awnu5hkmp4yv oYfNb25S6GQdcNb6bkOg5Kzkehgfwd44A5QZz/j+PesffOPzoA1946ZPQRV88IhHbVdC 8MC3d6q/PmjbNePeeXSlF0+VEf4G05BDes4VaNZ+Ur/RagnSZtq+XFbC1x8uKBSflip/ pHsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hgj0cXSF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj10si1931209plb.23.2019.08.23.02.06.38; Fri, 23 Aug 2019 02:06:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hgj0cXSF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727392AbfHVXs7 (ORCPT + 99 others); Thu, 22 Aug 2019 19:48:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:45330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727378AbfHVXs7 (ORCPT ); Thu, 22 Aug 2019 19:48:59 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 365AC233A0; Thu, 22 Aug 2019 23:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566517738; bh=trAvxIds03qyczpKRNMmw+JkjF/vubiWJu0COHu1Ixw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hgj0cXSFqi7crwfzIP24q8ZxyUF3OWheAjO98TmG6zmRb0uc5k+GVwz4bGdc4Iit9 gFIZU2zVa2WmObx7zaBrmwiGqoSHGHxMrnsQ6gxovyD8HAegKL3nFmZOSWwY6yXAd7 zw0eSgnfNNSsrdou2B5m67VspZsqbJ+zBUhrSIvA= Date: Thu, 22 Aug 2019 16:48:57 -0700 From: Andrew Morton To: Mark Rutland Cc: linux-kernel@vger.kernel.org, Alexander Potapenko , Andrey Ryabinin , Dmitry Vyukov , Will Deacon Subject: Re: [PATCHv2] lib/test_kasan: add roundtrip tests Message-Id: <20190822164857.460353a8195bfd5ddb3d5f50@linux-foundation.org> In-Reply-To: <20190819161449.30248-1-mark.rutland@arm.com> References: <20190819161449.30248-1-mark.rutland@arm.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Aug 2019 17:14:49 +0100 Mark Rutland wrote: > In several places we need to be able to operate on pointers which have > gone via a roundtrip: > > virt -> {phys,page} -> virt > > With KASAN_SW_TAGS, we can't preserve the tag for SLUB objects, and the > {phys,page} -> virt conversion will use KASAN_TAG_KERNEL. > > This patch adds tests to ensure that this works as expected, without > false positives which have recently been spotted [1,2] in testing. > > [1] https://lore.kernel.org/linux-arm-kernel/20190819114420.2535-1-walter-zh.wu@mediatek.com/ > [2] https://lore.kernel.org/linux-arm-kernel/20190819132347.GB9927@lakrids.cambridge.arm.com/ > > > ... > The only change I'm seeing from v1 is: --- a/lib/test_kasan.c~lib-test_kasan-add-roundtrip-tests-v2 +++ a/lib/test_kasan.c @@ -19,7 +19,6 @@ #include #include -#include #include /* which is really kinda wrong. We should strictly include linux/io.h for things like virt_to_phys(). So I think I'll stick with v1 plus my fixlet: --- a/lib/test_kasan.c~lib-test_kasan-add-roundtrip-tests-checkpatch-fixes +++ a/lib/test_kasan.c @@ -18,8 +18,8 @@ #include #include #include +#include -#include #include /* > Since v1: > * Spin as a separate patch > * Fix typo > * Note examples in commit message. So I'm not sure what happened to these things. Did you send the correct patch?