Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6347552pxb; Mon, 14 Feb 2022 23:48:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLT/9V2djIpqTMIINcUSjIoauwr93YOWPNfKNSqhTZ2lpAFFiGGfl/CTK97kdQ5HboeuAE X-Received: by 2002:a17:906:5189:: with SMTP id y9mr1913523ejk.467.1644911334632; Mon, 14 Feb 2022 23:48:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644911334; cv=none; d=google.com; s=arc-20160816; b=tMzA4/YqjXF9Sr6fVfxYNS6qe0FghGClAWgknO9LdTIVhqKLZlhGouQV0bWzH7uRAY rwgGdZJT4aBKUOu1lbiqwNzUy8lXvt5e/Ka5czGbMZuvZ/bYtQkY6h1gzVvcOVbdKiug c7z743EoWxPqzYdO9PqNR0g3GbYt+EbJhyFWCOAoHlo9ZyseCgFyBa8/TkkqtGlSkaFS 0PXYAKblzcgohHs7+fzTK6cyI7sLKPJ9G5l4oFc1iKpNne3yMPpmlZyd74RPUjJCC52E 9s9bOaygP2V6dUo0xkLtmPYkey9P5hfZ6dLBAOlFAhTusneICLYrYIaQXU6RWE0rsCR6 fX2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from; bh=YNJay/vSM0cRHfqUSc0XrcjTuaamX8PYr8YpcQORoTo=; b=TCnM+2+oRgK1A8a83nG4nGYSZY+oIpn4aHw94KQtRl6QxlifcZ6BssC4ZpphnhJzLC Yptk+0rgG5RgkmigOsvLaLqHaHsjfZbj5oXjtoQ43rrAFuSyjWEdLeU7Ba6Hh8Jo2Lkv 5xooG9Zhlnc+KVvW3h5cMaoiP+te/6h5ij/y9VmLRssNoq79g7EhvT1M6LpJ9fpOGSpw 2VfMSKGiYWFTG1oy3ogRVuZ7C8KDnKOf7ECxmq+W4wDMm1eyV2aZxzWOeW7L1vl0Xty7 2AbAY1kyZHwTTK4Ua1bjOXcOhFwCTgdwktS28ztbjiIJxu1SpcV7jjxZxpSkQTgX0Jbq gSIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht15si1567095ejc.255.2022.02.14.23.48.31; Mon, 14 Feb 2022 23:48:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234040AbiBOFah (ORCPT + 99 others); Tue, 15 Feb 2022 00:30:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234047AbiBOFa0 (ORCPT ); Tue, 15 Feb 2022 00:30:26 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94BD61285B9 for ; Mon, 14 Feb 2022 21:30:11 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4JyV685GSvz4y45; Tue, 15 Feb 2022 16:30:08 +1100 (AEDT) From: Michael Ellerman To: Benjamin Herrenschmidt , Paul Mackerras , Christophe Leroy , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org In-Reply-To: References: Subject: Re: [PATCH] powerpc/603: Clear C bit when PTE is read only Message-Id: <164490280429.270256.7360085115220568003.b4-ty@ellerman.id.au> Date: Tue, 15 Feb 2022 16:26:44 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 31 Jan 2022 07:17:57 +0000, Christophe Leroy wrote: > On book3s/32 MMU, PP bits don't offer kernel RO protection, > kernel pages are always RW. > > However, on the 603 a page fault is always generated when the > C bit (change bit = dirty bit) is not set. > > Enforce kernel RO protection by clearing C bit in TLB miss > handler when the page doesn't have _PAGE_RW flag. > > [...] Applied to powerpc/next. [1/1] powerpc/603: Clear C bit when PTE is read only https://git.kernel.org/powerpc/c/4634bf4455fe26f07dabf97c3585c9ccb86353c4 cheers