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 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 AF1D6C433EF for ; Thu, 21 Apr 2022 14:04:55 +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:MIME-Version:Message-Id:Date:Subject:Cc :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=045WgdxAjwFuM5vnKOW6S0WbV6z36HvCkPfXtxbsT7I=; b=FugRMz/+sVAAvQ OCO2Saa/sEQ9K3jBPqixMfxdaJcQcGbFYkYxicNrwNCEjl38f5x80MwA837hdbj16uEo9wwbX6Bd6 h7fUzC3mvZfVp9IYO1TDVqQ7QzX/s2ZO07hW+4ZIhTlH5jitPcfVl+8j5qW3bRnO7ikEoZwpMIUl3 FVLuK/4smKwUCq1fi5oyX1Y9LZmh59FFaW3gZgSCMkV6nkqeH9a2wjmQJUCPmfO2NWR9hr83z7Y4S CgbFvmGfsV97z9fRZPg8ZrT4S8Qa3TgUls2WbP40bqYwuaUri1n0+dqWeJc6lHc1snD73JyFDSIlD qHGJwVUJdDO9SUx6O6CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhXPX-00DfXJ-3C; Thu, 21 Apr 2022 14:03:55 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhXPU-00DfWF-25 for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 14:03:53 +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 534AA61D66; Thu, 21 Apr 2022 14:03:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2752DC385A1; Thu, 21 Apr 2022 14:03:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650549830; bh=+ExJERYWKoJB1b+aBlFYgTeHLJ6se0CQ+b2u5mxZsvQ=; h=From:To:Cc:Subject:Date:From; b=OlG9P/FQ71hyl3vLNvSb8UWJfMkX6uYZKzO9KUj+K0aJpE9zEfRmmgX0iqu+6XWPD tZPwfhsEOU3QusV+HBtnqwwF5lUowYTxxAsy4Lz26uCYQzQhaTMv41ifOJfz/2U06N eKkUNEJlv7mxAmpuwdYKxy+wHWIUYPj+Yylwrp9LvTNpzxwi74i5p98v86OjkwDjCl 9tNPKyGVI0jCZF4rMKzi2/Xe1cHZVM2ykIQYFGmpnzXyhQwnzypfGwF0hOEK03HgZ0 wXEAjikW77wVDw7ognFrVvKbLz2g+0oDsCY2DjA85LQDpuAfszLFGmjwlBuMNYwmbL lbqjKz21HhI7w== From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel , will@kernel.org, maz@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, keescook@chromium.org Subject: [PATCH v3 0/2] arm64: apply G-to-nG conversion for KPTI with MMU enabled Date: Thu, 21 Apr 2022 16:03:37 +0200 Message-Id: <20220421140339.1329019-1-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1267; h=from:subject; bh=+ExJERYWKoJB1b+aBlFYgTeHLJ6se0CQ+b2u5mxZsvQ=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBiYWQ3frS/eTNtPd5jrl5n9IWJ0xt6MVRcocumyLy/ eIQZLC2JAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYmFkNwAKCRDDTyI5ktmPJCvcC/ 4jUnBRrXKlvasiORJh48Htqz419Uj89HBowTjiG2ClARJ+pUGkgU/SemvZ5t53O4VicnVssg6yqig4 MGPQBXqdjFESGwB4j8WjwmKUzjuXEZaZAx3hOqG+n33TlarW4S9Vr534EHuwIhtBlWoW+jJ7N/h7sv +F4nFFG86+sntha5JKH8w5rsq/CrM8sXFEkYI2LBCpk/EFCk4D6wZeN2SKGKlyB5FwC8yGQrnCD/Ps Mbrzx556WmOM0vWTv+y91nbVDleY6YgRBrh/KUKyI/HRRuiEYZ84Eir3V5dMdZkdbE0RO51sVx4+jn y4xtfa/Ida3zzTfWAhcfihcPoVFZJGcgw4jEeWKtpszkgxKAjCuKp8mNA3/Pb7DFATW3DIGzAILNc3 hcMNkc0uUSu6UIoPwUyQuEWzSOkSi+sDu9KwxhUEXwy3S1iOuT1HLKg2DOl8bZloPGNpw1itkSPWdZ TX2pNXYT6YnoAxGkzwaSFhUktFgywMXZ64D6NDIebLmh8= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_070352_198123_D60200E9 X-CRM114-Status: GOOD ( 11.34 ) 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 This v3 is now a series, after I split off some preparatory refactoring into a separate patch. Rationale for the series is in patch #2. Changes since v2 [0]: - reinstate optimization that avoids descending into the same page tables repeatedly when KASAN is enabled; - use broadcast TLB maintenance when doing BBM for the temporary mappings, to prevent potential TLB conflicts on the secondary cores that are running from the same set of temporary page tables; - remove a wait loop in the C code, by using 'num_cpus + 1' as the signal value rather then 0x0; - declutter and simplify the asm helper code, to make it more maintainable. Cc: will@kernel.org Cc: maz@kernel.org Cc: mark.rutland@arm.com Cc: catalin.marinas@arm.com Cc: keescook@chromium.org [0] https://lore.kernel.org/linux-arm-kernel/20220413121848.787565-1-ardb@kernel.org/ Ard Biesheuvel (2): arm64: kpti-ng: simplify page table traversal logic arm64: mm: install KPTI nG mappings with MMU enabled arch/arm64/include/asm/mmu.h | 4 + arch/arm64/kernel/cpufeature.c | 65 ++++++- arch/arm64/mm/mmu.c | 8 +- arch/arm64/mm/proc.S | 190 ++++++++++---------- 4 files changed, 161 insertions(+), 106 deletions(-) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel