Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3269863pxu; Tue, 15 Dec 2020 02:57:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJywiD4TLdHKQTVy7fYbjZgOfU2dU8JG5HPm6OaiGMCcI1u6GCijwwvhE0zihXDsf1d5ai7V X-Received: by 2002:aa7:d5d6:: with SMTP id d22mr28674234eds.160.1608029865540; Tue, 15 Dec 2020 02:57:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608029865; cv=none; d=google.com; s=arc-20160816; b=ida4wjaqYey5LPJy6nm045hZrXdwvaaoj6Fj8UZC1yBHPTVK3r8bznsiDk4NvE+Syz d3Hz2OFOKl/3D+rkXs4M6XU4nPIKmlXVvcB307DvnYPSOUEdC6Lu9gXyaX1+JmR90SaW djU7jTfG8u1kuTvtcoUU1Ogzf6rwZU5tIsAMP0s/KYfgbPh4XMao66xV8pvuElyRS+rS 1YIBxtpQ/L2Z8TJ1N/MkUI3WZ4L54F82hiQJQwP4bvDn5ZL/p6sTR5Z478Iw0XJ+enb2 CuKpdLgi0DfNFKB1wNhpwns8j4ifp8wQhG8yapaLrKbGgm894iscd9NI+SUT6xK6+U3i Pmcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:subject:references:in-reply-to :cc:to:from; bh=tRGILI4EKel34N18mPD4c+pcx1VHcqbJP5qItgizxfY=; b=UGX1MJoF8OZw1KuzZXx+sEvvhrEf4oTfrWpIUVQ2KaaZvFJXilL4uiscebJKKtfu9J FnN/b00iy/aorsgzaBiNOT8mLtOBA1FRogvftd7vTzo+1cwb2c5AVvKlLLDUfiULM7HM /C192Miu0yrphAkVPSOXftUrk7cjb29A7lLgdRY/UFt3jZ5uZlFCeye5Fs6adl/RmH/q Li80XStN8jzMZV2PDyvXplE2RJTuGGB5nTHuzl8k7QE7U9yrb52KdZWdITRAfyuWauNy u9g+saAeOy22kT21viK98u2+1L+18vJd+hDqXV7AN2EjyLqoioAQ7yx5jV5fSZg/w3HU 8OZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si757770edv.445.2020.12.15.02.57.21; Tue, 15 Dec 2020 02:57:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727167AbgLOKth (ORCPT + 99 others); Tue, 15 Dec 2020 05:49:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727065AbgLOKth (ORCPT ); Tue, 15 Dec 2020 05:49:37 -0500 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E871BC06179C for ; Tue, 15 Dec 2020 02:48:56 -0800 (PST) Received: by ozlabs.org (Postfix, from userid 1034) id 4CwFP306HYz9sSn; Tue, 15 Dec 2020 21:48:54 +1100 (AEDT) From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org In-Reply-To: <8a4ffe4798e9ea32aaaccdf85e411bb1beed3500.1605542955.git.christophe.leroy@csgroup.eu> References: <8a4ffe4798e9ea32aaaccdf85e411bb1beed3500.1605542955.git.christophe.leroy@csgroup.eu> Subject: Re: [PATCH] powerpc/32s: Handle PROTFAULT in hash_page() also for CONFIG_PPC_KUAP Message-Id: <160802920749.504444.12908339583780328287.b4-ty@ellerman.id.au> Date: Tue, 15 Dec 2020 21:48:54 +1100 (AEDT) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Nov 2020 16:09:31 +0000 (UTC), Christophe Leroy wrote: > On hash 32 bits, handling minor protection faults like unsetting > dirty flag is heavy if done from the normal page_fault processing, > because it implies hash table software lookup for flushing the entry > and then a DSI is taken anyway to add the entry back. > > When KUAP was implemented, as explained in commit a68c31fc01ef > ("powerpc/32s: Implement Kernel Userspace Access Protection"), > protection faults has been diverted from hash_page() because > hash_page() was not able to identify a KUAP fault. > > [...] Applied to powerpc/next. [1/1] powerpc/32s: Handle PROTFAULT in hash_page() also for CONFIG_PPC_KUAP https://git.kernel.org/powerpc/c/1b03e71ff6f2bd10b45a0128ce76e0e42014a44c cheers