Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D06E1C636D6 for ; Wed, 22 Feb 2023 12:09:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e0nF4zfL714rrH4Sek3fkO0+AQk3m/vqlwSNV4EAbL8=; b=yZ/THrht5WoLIT kHFjmuY6cWu0LRHxU6/PRXlUwAqibzuY8rrY3MVff6g2IR7RX0KCkQD6AX10a6IUDe+UTifz7fgCV uCcrRhZcD7boH5uyArc2VsbN9L/pOn84mJXZZJjSqwiIsjfOlVNOSEYbDvzawqXohQfhRF4yU5r+V HEVH/u8vCuErhEpuLFno9d3e9cJVzyU5VimKhCvxkj7UnhAKJuCY7yx5CeJzFxJu/m6LkCLINim9+ VoOWUZTb71kQeUw0Zu4ChlRTfLhKtf5UOFcFJM4zikq9pqPx9ezsX38qK58q7wodd5H7mmx27pUfD 0Ft8JHC8Ui1ThX1FJK7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUnuv-00CHhV-Bc; Wed, 22 Feb 2023 12:08:13 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUnur-00CHfE-Gs for linux-arm-kernel@lists.infradead.org; Wed, 22 Feb 2023 12:08:11 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 98C1361403; Wed, 22 Feb 2023 12:08:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AA1CC433D2; Wed, 22 Feb 2023 12:08:02 +0000 (UTC) Date: Wed, 22 Feb 2023 12:07:59 +0000 From: Catalin Marinas To: Matija Glavinic Pecotic Cc: linux-arm-kernel@lists.infradead.org, robh@kernel.org Subject: Re: Cortex A15: Errata 798181: Moving a virtual page that is being accessed by an active process can lead to unexpected behavior Message-ID: References: <60195c8c-8efd-e31b-0da2-ab40b13f5fe5@nokia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <60195c8c-8efd-e31b-0da2-ab40b13f5fe5@nokia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230222_040809_619517_ABB8EECB X-CRM114-Status: GOOD ( 17.77 ) 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 Wed, Feb 22, 2023 at 10:07:23AM +0100, Matija Glavinic Pecotic wrote: > I have noticed that we are using local_flush_tlb_kernel_range > in couple of places while errata from subject is applied in > flush_tlb_kernel_range. We have local_flush_tlb_kernel in: > > section_update > __set_fixmap > set_top_pte > #define arch_kmap_local_post_map local_flush_tlb_kernel_page > - arch_kmap_local_post_map is further used around kmap > > I would like to double check this is safe. From errata itself, > I cannot make up whether it depends to context, I have impression > it doesnt, and one should apply it even in e.g. when map/unmap > is done in interrupt. > > I hope you still remember this topic. Would you please be able > to help to clarify whether applying it depends to context? IIRC this erratum is problematic only when there are concurrent CPUs still accessing the mapping being modified. That's usually when touching user pages (e.g. for migration, write-back) and the kernel either goes through a break-before-make sequence or changes the PTE permissions. I don't think any of the functions you mentioned fall into this category (of concurrent accesses to the VA being unmapped). I found the erratum on page 28 in this document: https://documentation-service.arm.com/static/5fb64a3bd77dd807b9a80852 -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel