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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F8A0C433F5 for ; Wed, 10 Nov 2021 00:38:46 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 F352B61181 for ; Wed, 10 Nov 2021 00:38:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F352B61181 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HpmDh4NS0z3cRF for ; Wed, 10 Nov 2021 11:38:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ad7CPz9u; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1034; helo=mail-pj1-x1034.google.com; envelope-from=jniethe5@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ad7CPz9u; dkim-atps=neutral Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HpmCG2Hg7z2xZm for ; Wed, 10 Nov 2021 11:37:29 +1100 (AEDT) Received: by mail-pj1-x1034.google.com with SMTP id gx15-20020a17090b124f00b001a695f3734aso113669pjb.0 for ; Tue, 09 Nov 2021 16:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fUIfZeEsg24Rg3Y3hTLTmej9xOdZZZMHYvHW6g9p1g0=; b=ad7CPz9u6la29AC50n6shC17hTRQ10Sah6lYgrN5npyWLV5sYsQYCRCBw4I7l+DMoy 7OY7UvY5Qzz+X65dzKc4JxGTrqFNGLiPS66vemeXEJLFqB1wB5Xx0HgZ6Bo54OPPvby8 jpg5Iz+vNIvweJmyavU9utyfNsdLiGF2xdpQPX8/ntJR0VByMh5j9uTa8nq5O5tGO253 06XTKifezw923vRWr3kut0LTLXYPZsjU0zLso1Zpf9MazDqVdC8dguHzzouRUYrD0bD2 0HJS6BrLou8s1a3aKdm/YaLBeIs4/PL1YSM5Zausg/406au+EE/0Ko4ecqTJzxYTtFup NLhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fUIfZeEsg24Rg3Y3hTLTmej9xOdZZZMHYvHW6g9p1g0=; b=xI7wMb3A3yuzp+z9V0JZXNVSZQ/U353ERzhowsPEYZ3I4cj+luIml81oC/DgFWmwLW CUvSvM7nijinLPKuYzvacFNhd35+pz0LXuAEwemzJGLsNnzzOpDPT6vjGA+LXU/9c4Ow /WYf9MS1wWIsUY/vgA1a9nBLaPmlplIFo/9/tFKESH5fKatmrGKUBqmDZQZgENVkiq9/ Xpxh31EaDfVAqPVkij+kmwn5GmQfFz2bYZNFiBdlb/GgQjpDLY1DsCtAz/EpD2m2yI0Y NmCH2HqkrOGrOehErPdnfuKyyd147Bbt5sFJZFEU+W6CYPzOCke5W6p6kFU4m9bORtJk bYew== X-Gm-Message-State: AOAM531qc+8ffy9Z5PjQX3iTLEFbkiQou0LBsUcBQR9NcGSBgoqpROWE p+896YFAHcu+yeQlvAqyWDHbCvXDdB7B9g== X-Google-Smtp-Source: ABdhPJwZ7IOpjLDoeXzp0xOz0cHT3kFaoYzRBe0WP7Qkpe7fzxHLTwt5ccIWeSCzpCyQHZHR55MTVg== X-Received: by 2002:a17:90b:1d8f:: with SMTP id pf15mr8413519pjb.180.1636504642741; Tue, 09 Nov 2021 16:37:22 -0800 (PST) Received: from tee480.ozlabs.ibm.com (159-196-117-139.9fc475.syd.nbn.aussiebb.net. [159.196.117.139]) by smtp.gmail.com with ESMTPSA id t21sm15854074pgo.12.2021.11.09.16.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Nov 2021 16:37:22 -0800 (PST) From: Jordan Niethe To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v7 0/5] Use per-CPU temporary mappings for patching on Radix MMU Date: Wed, 10 Nov 2021 11:37:12 +1100 Message-Id: <20211110003717.1150965-1-jniethe5@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Niethe , cmr@bluescreens.de Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" This is a revision of Chris' series to introduces a per cpu temporary mm to be used for patching with strict rwx on radix mmus. The previous version of the series is here: https://lore.kernel.org/linuxppc-dev/20210911022904.30962-1-cmr@bluescreens.de/ v7: - introduce helper functions for clearing and restoring breakpoint registers when using the temporary mm - use a new patch_instruction_mm() function instead of needing repeated conditionals and a struct to save state to work within do_patch_instruction() - include a ptesync after setting the pte Christopher M. Riedl (4): powerpc/64s: Introduce temporary mm for Radix MMU powerpc: Rework and improve STRICT_KERNEL_RWX patching powerpc: Use WARN_ON and fix check in poking_init powerpc/64s: Initialize and use a temporary mm for patching on Radix Jordan Niethe (1): powerpc: Allow clearing and restoring registers independent of saved breakpoint state arch/powerpc/include/asm/debug.h | 2 + arch/powerpc/kernel/process.c | 36 ++++++- arch/powerpc/lib/code-patching.c | 162 +++++++++++++++++++++++++++---- 3 files changed, 176 insertions(+), 24 deletions(-) -- 2.25.1