Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2673711ybl; Mon, 19 Aug 2019 05:57:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFyHNbV+ugS2NRtNSRH+ieWxmJ/XvfuwOB+gTiwHGq3lRnXSZH/wbRYZmJ8KBoyg6rgsan X-Received: by 2002:a63:4042:: with SMTP id n63mr9127732pga.75.1566219461993; Mon, 19 Aug 2019 05:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566219461; cv=none; d=google.com; s=arc-20160816; b=e1gj8Np+wijuThB7xzBZ26fHHfxab1yHq/9n0vDersrY/wYvklF61gGKm98E9ovwJG QDGO0RoRElsF0DDaNsaEH9SQ2s3XbEa6mcP5zBt46kUzf+r8UdBaDJwW1WvR4mvMb+zB 05+8xTPiQOSyF5zhTVBv1qpdQhU0x9N/yDTbkN/JImI4fjePf+55gXxHpT/AmG04KMCJ 5Z+lmi2UHmQECP+2pO9MKjR50Fki37R/wFHtiKZgG7V34j6X5izI9a544vjGejUzZmWK mAn1wWKKgFnCyQGCi0Uj+dSoE9yj3+VjOgUo6HsGwaOieQQ0zfpadcTGm66wP3jIReoz PqPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=R6yXXBgZg+o5QQAot3xwq1KoOzttzifDq8QrxYrqxoM=; b=m+4Bt58GzdzSmLRhZ6BOiCwoAghBq93HVw5EAJ0JZiNRLuJqOhuSLcmbRxfx4vRQlC +r92Baa9zGD3sg47Mow14FeO2PBBjmLcR+Bwp8xbMqkfGEdtaaBoMzukYAaOZ2Wu749t ON4IUycLgrtTxp7pJF7NdEwGdT/DgOKPMZzoG8AHntSRyaGfS2IMRp3wDC5P4fkiQ7GX 61BJIgFuMzHxJlQb5sIgyOYgF4Cdne6ywGUkKTEZ8KTjxKGWYW6WIcWY5aqH3ZhvGboP /vuqFlrKeSbjoyq5wuW9KBc2CoAtG9X3kPguTMrvdLAf9BJD8V0ef87Pb2r++M2LFPFO /Cwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G6j37x4g; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q206si9596175pgq.483.2019.08.19.05.57.26; Mon, 19 Aug 2019 05:57:41 -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=G6j37x4g; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727602AbfHSM4c (ORCPT + 99 others); Mon, 19 Aug 2019 08:56:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:38448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbfHSM4b (ORCPT ); Mon, 19 Aug 2019 08:56:31 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 073A7205C9; Mon, 19 Aug 2019 12:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566219391; bh=UO4FTZseWCp9eDIq9wbqfeQcfvQgOuhKZNq4SSQZlCA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G6j37x4gi/6X0L/ntZnqejE/KABlXoc3rhzuaqGTCUYmRqon5h34OLBgOYes5raz7 /D4umugtstfQker4f99YG3DdWKtSK+LqlwZWJLF5vfd2dgSPVSF1gZvYXLRoBjdsKm 2/iMibknt0kPfzelxOg5ZQteaN74tyOH0e3mBE9A= Date: Mon, 19 Aug 2019 13:56:26 +0100 From: Will Deacon To: Walter Wu Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Catalin Marinas , Will Deacon , Matthias Brugger , Andrew Morton , Andrey Konovalov , wsd_upstream@mediatek.com, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64: kasan: fix phys_to_virt() false positive on tag-based kasan Message-ID: <20190819125625.bu3nbrldg7te5kwc@willie-the-truck> References: <20190819114420.2535-1-walter-zh.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190819114420.2535-1-walter-zh.wu@mediatek.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 07:44:20PM +0800, Walter Wu wrote: > __arm_v7s_unmap() call iopte_deref() to translate pyh_to_virt address, > but it will modify pointer tag into 0xff, so there is a false positive. > > When enable tag-based kasan, phys_to_virt() function need to rewrite > its original pointer tag in order to avoid kasan report an incorrect > memory corruption. Hmm. Which tree did you see this on? We've recently queued a load of fixes in this area, but I /thought/ they were only needed after the support for 52-bit virtual addressing in the kernel. Will