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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 E1E20C56201 for ; Fri, 20 Nov 2020 14:37:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 53AB32224C for ; Fri, 20 Nov 2020 14:37:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ye6cqujw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="pfnWM6mp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53AB32224C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=JSUq0D5qyvxSsYjTjr2YPYl3xGC3UPeSPdI+aTJOJ7U=; b=ye6cqujwkrAdUtldRYC6oXK7L+ psDL8HTx+gEItqKRy5l7wZBmh6iCHnQ9u+jKdiD7RzK5qFrNVeRdUjXyxilsNG5Tcaxi2zJAsf9K8 fByo0u6dO5Zb2hOLy92+WjUTeYmoq4aFmsm2X8BYDBlx0/Hp3mW3cn4TCHtthgabVcs1xHm6SRRkU H/roJNJ6blgfwwaCdVQdaePmX++R8iIOgdFF6F/OaxgtMlm0hcd8t5BF2BA0JhhC4MIddlbSTxclV iyit/dwdFvFg1UcoShgtXvm3BPq/ZO/3lkafODbzMQ96ofV3RC9PevIYCy3PISt76P6WiIBeIs8Qn 3lPL52qQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg7WI-0002hL-Ge; Fri, 20 Nov 2020 14:36:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg7W9-0002e9-Ff for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 14:36:06 +0000 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE6532224C; Fri, 20 Nov 2020 14:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605882963; bh=B2tsz1eLDySQbKv3rPA/SjqjJvraB6qR6zYVvcCJO3U=; h=From:To:Cc:Subject:Date:From; b=pfnWM6mpPr4mUovHZOqS0m5JTkFwwrPNej8iWne6LVWh44CuojQDQ2e8GbrwhJgPw E51LRycawzpz8/vnMjAOh4WPU0NY32mcbFTDSF8NEx1XjZfJ/R/DKKZcwRS6Y95e91 ZyahIyR6nxGDdWxMPTqLMh6D0ytvmdQc3mPINgrQ= From: Will Deacon To: linux-kernel@vger.kernel.org Subject: [PATCH 0/6] tlb: Fix access and (soft-)dirty bit management Date: Fri, 20 Nov 2020 14:35:51 +0000 Message-Id: <20201120143557.6715-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_093605_649436_21297A58 X-CRM114-Status: GOOD ( 17.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yu Zhao , Anshuman Khandual , Peter Zijlstra , kernel-team@android.com, Linus Torvalds , linux-mm@kvack.org, Minchan Kim , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org 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 Hi all, This series attempts to fix some issues relating to our access and (soft-)dirty bit management relating to TLB invalidation. It's a bit all over the place because I kept running into new issues as I was trying to figure it out. The first patch fixes a crash we've seen in practice. The other patches are all addressing things that I found by code inspection and I would _really_ appreciate others having a look. In particular, what can go wrong in practice if a CPU has a stale, writable entry in the TLB for a pte which is !pte_write()? It feels intuitively bad, but I couldn't find anywhere that would explode (the CoW path looks alright, for example). Cheers, Will Cc: Catalin Marinas Cc: Yu Zhao Cc: Minchan Kim Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org --->8 Will Deacon (6): arm64: pgtable: Fix pte_accessible() arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect() tlb: mmu_gather: Remove unused start/end arguments from tlb_finish_mmu() mm: proc: Invalidate TLB after clearing soft-dirty page state tlb: mmu_gather: Introduce tlb_gather_mmu_fullmm() mm: proc: Avoid fullmm flush for young/dirty bit toggling arch/arm64/include/asm/pgtable.h | 31 +++++++++++++++---------------- arch/ia64/include/asm/tlb.h | 2 +- arch/x86/kernel/ldt.c | 2 +- fs/exec.c | 2 +- fs/proc/task_mmu.c | 22 +++++++++++++--------- include/asm-generic/tlb.h | 6 ++++-- include/linux/mm_types.h | 4 ++-- mm/hugetlb.c | 2 +- mm/madvise.c | 6 +++--- mm/memory.c | 4 ++-- mm/mmap.c | 6 +++--- mm/mmu_gather.c | 21 +++++++++++++++------ mm/oom_kill.c | 4 ++-- 13 files changed, 63 insertions(+), 49 deletions(-) -- 2.29.2.454.gaff20da3a2-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel