Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp178662pxb; Fri, 15 Jan 2021 10:12:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoUFSN93ob0W0SNtN3YihRGJ4owrFhN/dF5ReJtC0ktJXAgFCsQINpwgUKHWknUGRPj6v6 X-Received: by 2002:a17:907:9f9:: with SMTP id ce25mr10431044ejc.352.1610734340042; Fri, 15 Jan 2021 10:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610734340; cv=none; d=google.com; s=arc-20160816; b=AuOYkXsLUHEiCU5ztYLjljpzK7mASw3i8O1umDVQt596j+/tNUg0CJjuhfFqd4191J 2fIVx9JDDfPuoM3tSMbW9+rO9oPbb6ULg0rg983GCS+x/zfZ6AGLOpucjl6YF4aZ7WD1 p2Ah4PvjxunfdLg560KIiOxyhfE6+X7RCCaIOYlw4uNlh4hCPxg2GvjE2pCWAAGL44gF oMgLxw0EOpy6Cs39plZM5gxlE6kJF1rJmqezScqH7tjTg0uHZHkgEhbvS3mTqNgsE9o2 GA4G9wvifspAFmq1Exopvs+bWagwU5lPSBDGyAr/xDWcYTuOPk2nx8fD0vosEGkWM5pn JCug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GeuXFTMHH/dqlLS30TqVtIZ+iZRqb8fjBFP+mG2mN+E=; b=ftESk8mIl2dw3eX2pDuTy+zfPwKaCjaMzDvK1mAW1iCX2ShjVYv+1JuEZy50rhDztw 9XOp8gjZK4TAkMgKt8AVWhDIO1T/kkpDNNMipKNwBgXSTwMub1MBFfKLuAbfwBD18pqa YEcW8uO7RUbDkVBGBqewXuTWcCylhOc6PTwFE8omjnUaoxRid8FG6Xby9NaPkpO0neft HrT6bYaZAqWb5HLIepRldUiKe/QBOIBidip7AoQny+0ib3BLYboAGIK47KNqc7q8dvpv fjxe6PxbkYXnlt2hQ0UfLgnz0d08kM7IAyMQ3mrM24WL28oSAV58p6wx5aVGIw7qfVLR wpXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Xpx51qo9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si3855580ejc.524.2021.01.15.10.11.54; Fri, 15 Jan 2021 10:12:20 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Xpx51qo9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729312AbhAOSJv (ORCPT + 99 others); Fri, 15 Jan 2021 13:09:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbhAOSJu (ORCPT ); Fri, 15 Jan 2021 13:09:50 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8956BC061757 for ; Fri, 15 Jan 2021 10:09:10 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id b8so5116638plx.0 for ; Fri, 15 Jan 2021 10:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GeuXFTMHH/dqlLS30TqVtIZ+iZRqb8fjBFP+mG2mN+E=; b=Xpx51qo9Kemp9C08NnM+/vvKtmkeN700Xd2RXiEx9imbbsKJrIovSuD9Eq+cLLBRSG 1myDAIHn1uYpi5wMOauhn1wJxnNKW88XyT4P3oeRvlHrKKAO6WX/DdOWCy9nxbzUEpNK VR9FIK54FhxjPif+hcQY5QqwWE1FuJCf1EujuCzF0VTmu1Muyf8aEdMya+psKYcEP2FC bSBoMaZoyHxMWhdIs1mQ4NUFMYXG3alZvxPtMkXayqpan5YI7VZPLrVsZCuYpn+ZXvOm 776ncNs78b2pCIQnWyyj6XGlnZk9LOHuWXxqr02wc06nGO6A7Xo3QX8O9ShXN4PIhTlf LBRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GeuXFTMHH/dqlLS30TqVtIZ+iZRqb8fjBFP+mG2mN+E=; b=a6f/6+Tja9XEnZfyHhvxPxIHKQBcP80MlmMxUuSVTaMU7emgTYwLCwXeyTyGgNDi7h 5u4YgBhhiHgUuZ1UwYQWsdg+97t+lwybke2nMBwMxYJwjtZ0cHO9ShQzkCqkyv+xUWq2 AajAFsc2Zjl19N0ul+78KUZVIfTL/oFzlbmZxpWT7+7wUUz7xQlQBfqxD1/pG1Lcg32f jCKXSf60Fzp6/tlphw/bnl24eTCmLUXxvS9e/CkCnbjFvl+z8O7FSUcODPFKz98ETfRC IPc7+njJ3JEXOBid/MHIGCXzql66jSavGUUiL8IJuk/XC38Gnvq3EVG2KtmLb2oaFnFr UjTg== X-Gm-Message-State: AOAM531TjgzIIW9pWeWKPqH3QPFmEjonjJ/WVjit3Cq44GhD3cpRInoX 0E4vz9DItH8G95Rlg8ygT3ScTI/e/MsULwij3Ajo5A== X-Received: by 2002:a17:902:ff06:b029:de:362c:bd0b with SMTP id f6-20020a170902ff06b02900de362cbd0bmr13048327plj.13.1610734149962; Fri, 15 Jan 2021 10:09:09 -0800 (PST) MIME-Version: 1.0 References: <20210115175922.GI16707@gaia> In-Reply-To: <20210115175922.GI16707@gaia> From: Andrey Konovalov Date: Fri, 15 Jan 2021 19:08:59 +0100 Message-ID: Subject: Re: [PATCH v3 2/2] kasan, arm64: fix pointer tags in KASAN reports To: Catalin Marinas 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 , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 6:59 PM Catalin Marinas wrote: > > 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). Sounds good, thank you!