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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 C809FC433DB for ; Fri, 5 Mar 2021 15:45:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5144C6508D for ; Fri, 5 Mar 2021 15:45:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5144C6508D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Cb1RMm1dCXNRhxZZ+BbbSh5zqpMAnDyH+cecBlVWrKw=; b=OTaMNOlSpsqZwDzIq4+KeHm0o k0uInQWBZhLqllAiawKLsnyZ1zN6rUgEYMG5JRs0OeWwUk2ioNNRTq6avEiMR4XGokqkpiNYTiYiJ YNFF0a4qllSM5tyZ2F5RvKKpkti00WXL4CIJVCO2sGbuEam/x9O33FuTrD/PwetWwP6stFy3iVXdi powch5Jc1PGNs1WQ3pUnWVmg4gaToW65C8WGMNoLF9blwcZoJrBZx/usu604g1oXinLZK+ntiwW0+ rSLVvSPV7D7RgbdOpNMC8pB/FSv5nLioh0HXMdjxReRKbIQHIsKLzp2TDF1djNAo029Ru5SkVfuOF gniNI2DSg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lICc7-00FUkH-8Z; Fri, 05 Mar 2021 15:43:40 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lICbt-00FUhH-Ff for linux-arm-kernel@lists.infradead.org; Fri, 05 Mar 2021 15:43:29 +0000 Received: by mail-pj1-x1030.google.com with SMTP id i14so2079886pjz.4 for ; Fri, 05 Mar 2021 07:43:23 -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=qTbQ4CYrvEtOKN3sK9Cdx0Ymm+PDCdjrJdMZxf0RYq0=; b=lwmLF3IOiErjUcagy+4Ncf8810NXSVX+conGSxCWmNt/riBnUgVJQZVMWcg3vcnxXv 6f6wcdEu/uIoZ0KcuP0/IjGSQ0QpIdsVeQ1JJ6TE4O1dOXtmLxvyjHSp7cqN2hvewarc Yw0aNC9TY9kky0pPSGWvkHljTp486c72ju0FrI7R92ojx4ZGsWQ6e/gRElVirmLIK+WQ hWwIyIUyssBSxqzgh8oLFNsccj6aO2DCnM77KkbqIjeUEpI0IdPH6Obwp9dF09e1z4C4 8mlYPiPar785lv8uIL/0PMEEX7f7XAOvkdDyLc4UEfHY9daDyNe/L7+4tET/s1eLH4aT Nd5Q== 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=qTbQ4CYrvEtOKN3sK9Cdx0Ymm+PDCdjrJdMZxf0RYq0=; b=OrTjClZoLUDQlvHYB4b/t60mPEKIoU4X4E+WhclpUpXoE3MmFcVlymcGSjkV+nJLbq tBAPPiAjCVgFEueRHmEiP0Zba76oS3fWNJRsR7u7ckYf2p91nm5OKznCAarh3DqgcFzR 7kfsR0Z+ogzzJS8DM2iDe9uPLZasQom/UjqqbgKJSlke7iuIcxlF66Q7ISu7y+bnsXcm sKre4oNNpARareFmCbCCa3vDNQ9xfzt6UN50cbDPJlCfhvPFlPB7qzvuPyNF1WWIwgbD 9Ipp58C+s1NQdZLLNgmwOtWUq46rGVQJ9wNU7DZLtjm1BnEz6NMIzdeFkr42JB5HrZd2 36gQ== X-Gm-Message-State: AOAM530+Fz20OcrqacK6Z1d+5UXjTXVYTgDOa5Sq2etNa9bhks1aNDdF OGkkqj9DDrIa/utZ8K/PtEPjfBRrxyPW4kdcxNOfcQ== X-Google-Smtp-Source: ABdhPJzdb3CY0QwcYOqHImrSnnH70zbmg63DQ3nvCH+FSGncxT3ZHCijk26cQodq50iP8kPOOhtL3hkAiA5TAMpm3G4= X-Received: by 2002:a17:902:7898:b029:e4:182f:e31d with SMTP id q24-20020a1709027898b02900e4182fe31dmr9028328pll.13.1614959002581; Fri, 05 Mar 2021 07:43:22 -0800 (PST) MIME-Version: 1.0 References: <1aa83e48627978de8068d5e3314185f3a0d7a849.1614302398.git.andreyknvl@google.com> <20210303152355.fa7c3bcb02862ceefea5ca45@linux-foundation.org> In-Reply-To: <20210303152355.fa7c3bcb02862ceefea5ca45@linux-foundation.org> From: Andrey Konovalov Date: Fri, 5 Mar 2021 16:43:11 +0100 Message-ID: Subject: Re: [PATCH] kasan, mm: fix crash with HW_TAGS and DEBUG_PAGEALLOC To: Andrew Morton Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Peter Collingbourne , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , Christoph Hellwig , kasan-dev , Linux ARM , Linux Memory Management List , LKML , stable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_154327_554503_D4EFD936 X-CRM114-Status: GOOD ( 13.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 4, 2021 at 12:23 AM Andrew Morton wrote: > > On Fri, 26 Feb 2021 02:25:37 +0100 Andrey Konovalov wrote: > > > Currently, kasan_free_nondeferred_pages()->kasan_free_pages() is called > > after debug_pagealloc_unmap_pages(). This causes a crash when > > debug_pagealloc is enabled, as HW_TAGS KASAN can't set tags on an > > unmapped page. > > > > This patch puts kasan_free_nondeferred_pages() before > > debug_pagealloc_unmap_pages(). > > > > Besides fixing the crash, this also makes the annotation order consistent > > with debug_pagealloc_map_pages() preceding kasan_alloc_pages(). > > > > This bug exists in 5.12, does it not? > > If so, is cc:stable appropriate and if so, do we have a suitable Fixes: > commit? Sure: Fixes: 94ab5b61ee16 ("kasan, arm64: enable CONFIG_KASAN_HW_TAGS") Cc: _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel