Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp169743pxb; Fri, 15 Jan 2021 10:01:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGklrt4rsRhoS5oFttjsRxM1F2XQYAWSQK0i0EwVn4l63ad1pmDejcd0pqXg9+qDAihqVE X-Received: by 2002:a17:906:29d4:: with SMTP id y20mr5025356eje.294.1610733682809; Fri, 15 Jan 2021 10:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610733682; cv=none; d=google.com; s=arc-20160816; b=rNSWM73mFpocYJ/FFe4EBhLttklU5p2PH/3OR9cf+IR/UF0+xvenAeJ4iSuk4dD8vJ WdD9pWPR+2IrWNhlKYO7cT0Mdvk+u4oO8N52k2iTG7rVsjRPnAQRdECy6YsFhpOYm6jn Ho1fUmJF6furj4uPBAzfmcUnWo25jMZ79eeidtRLIsW2yfo9+otM5rKSg6lsWYdJiw8B ljvYl2nT22B165G5r9rmUNx78zqDUQAq4WL9V/paUBbAj69VUMlHhcj0FaOovVjRhC4J b8dDGeco8dZnEApFkgV4tm92Ptu5LS9IlPa+HXxKxBk0x0N+S0d5Z6Um3KDeQHnZ0DoO ipJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=YmoONv3wQpOkoeeyDIZHtWQV/jwkYaia/9bkmSrvRsc=; b=RRSrl49dJBKFgjJMdWRomMMNXeQ4CQ2NsSYewV1UYGGxcTS3Bfc7uO9rn40uwuMgIg AQ0EzKUyVDe45LgTk9SiZnTaqZuwVO+/ajzTUJh0qnDiVq71YTO88/0/Y4kiykrB9+c8 NFO+qbNwGWTtFegHIUyD4rKZ4fUnQPdWyqVJBC08SgFwggk90doY5J9N0BfewqoJ2Lfa sZ40PRNA/G4uP4KHTIGLOXcu9thrpIQ48qvd/5g8VA5tP9uASdLyjgaQEqhYohhyPnWN 7torpg/rGtfAelqGDZfxTYptrLg28uHQrFxS5KqT6cbqjzsn7bYIE+VAIYQA/lYo5+Mp oO0A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ha21si4718214ejb.150.2021.01.15.10.00.59; Fri, 15 Jan 2021 10:01:22 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733286AbhAOSAJ (ORCPT + 99 others); Fri, 15 Jan 2021 13:00:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:37444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726355AbhAOSAI (ORCPT ); Fri, 15 Jan 2021 13:00:08 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A10CB23A59; Fri, 15 Jan 2021 17:59:25 +0000 (UTC) Date: Fri, 15 Jan 2021 17:59:23 +0000 From: Catalin Marinas To: Andrey Konovalov Cc: Andrew Morton , Vincenzo Frascino , Dmitry Vyukov , Alexander Potapenko , Marco Elver , Will Deacon , Andrey Ryabinin , Peter Collingbourne , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] kasan, arm64: fix pointer tags in KASAN reports Message-ID: <20210115175922.GI16707@gaia> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 06:41:53PM +0100, Andrey Konovalov wrote: > As of the "arm64: expose FAR_EL1 tag bits in siginfo" patch, the address > that is passed to report_tag_fault has pointer tags in the format of 0x0X, > while KASAN uses 0xFX format (note the difference in the top 4 bits). > > Fix up the pointer tag for kernel pointers in do_tag_check_fault by > setting them to the same value as bit 55. Explicitly use __untagged_addr() > instead of untagged_addr(), as the latter doesn't affect TTBR1 addresses. > > Link: https://linux-review.googlesource.com/id/I9ced973866036d8679e8f4ae325de547eb969649 Reviewed-by: Catalin Marinas Unless there are other comments, I'll queue this for -rc5 through the arm64 tree (I already finalised the arm64 for-next/fixes branch for this week). -- Catalin