From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D895C433DB for ; Fri, 15 Jan 2021 17:59:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E448322262 for ; Fri, 15 Jan 2021 17:59:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E448322262 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 426B48D01C3; Fri, 15 Jan 2021 12:59:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D6618D01B2; Fri, 15 Jan 2021 12:59:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EB308D01C3; Fri, 15 Jan 2021 12:59:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id 1882C8D01B2 for ; Fri, 15 Jan 2021 12:59:30 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D46EC815C0E2 for ; Fri, 15 Jan 2021 17:59:29 +0000 (UTC) X-FDA: 77708771658.17.wine85_450a18a27531 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id B93A6182F4F75 for ; Fri, 15 Jan 2021 17:59:29 +0000 (UTC) X-HE-Tag: wine85_450a18a27531 X-Filterd-Recvd-Size: 2337 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Jan 2021 17:59:29 +0000 (UTC) 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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