Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1043012rdh; Fri, 27 Oct 2023 03:08:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiJpT/Xw51WYZTLyJdgfezqkredbzD5arJfHWj8k8TMG+xBbTqH0mr+NWgto/E45VSJzYh X-Received: by 2002:a05:6808:2a41:b0:3a9:cfb5:462a with SMTP id fa1-20020a0568082a4100b003a9cfb5462amr1852151oib.36.1698401321284; Fri, 27 Oct 2023 03:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698401321; cv=none; d=google.com; s=arc-20160816; b=wbU9F8j7cYk83v/CZW5fTLGr8/xeQAOVFxPSUQPt66XM3Sxkhy4gMbqMH/ImNudLZZ PmQQlxJZFQtJ1JGbm6KZrRTIka6Y4G1HD0gbfwhsqnr+O8zlZ9BvCZkEd0GrsZmJZMUh JTK0+7tYx6hkTNAhTO8kPEVzeQ5wVhmr8FwVA7PyOVsK+brFoMdL3c5iNUMqtXYWFLkj Na3kXc9PMFjtnhiy4d/03Stl1przy0Sdyb3mSEnqDcGXZoO4ZTPYigGVDPtcTb+Oa7Uq NxEbFYFWkJNDn5VnDoK7T4ncucUTRZ8tOz3pGVpxrxUwcf3qdf0P9HyZ/b1gUe4S8sd8 J1wQ== 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:dkim-signature; bh=bh2SGbEm/VYu88RT5NkddGpfoFKdCZJ1kSqfou4YYXc=; fh=IR91BQ3BTLGB+0AI4Bc2xTyey5jdWHvJZTUP1W3El1o=; b=y98xQrwnBDVK0b/E1Zdz1xTBw1m9SYNKHO6J1ggkEM0lqirfNc+19k4wBZFMKzMeiV dbZlXOPzUKeiEZK+fmBKgYKkGpGrJImGwP9dq9Q+Ec5/oAEsy7Sp75b17XQakZOh2jO1 EQpGpdrzrZbsa7VI0m6bZuxJZHm4YFR7o61qD/aJ04NzWlDeqZ/tJ9wq/LvNgD/+SeP0 UzgORoHM3AQAzYIPZLUc2LXZbyeR1O3Wyf7xxRaDzL4otV/LdrWxOmcXIZJ0b9cCHf3A dDurofCRaHa0zBjdYFtpQNZgwwh3Gt9W9KNwp4dKGbRqCAzPGjfYWUrtpa+JGYO9orEF wnBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=i7iCK8CG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w16-20020a259190000000b00d816928bc52si1927073ybl.350.2023.10.27.03.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 03:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=i7iCK8CG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B15E882ECB2C; Fri, 27 Oct 2023 03:08:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345684AbjJ0KIb (ORCPT + 99 others); Fri, 27 Oct 2023 06:08:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345676AbjJ0KI0 (ORCPT ); Fri, 27 Oct 2023 06:08:26 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DF31AC for ; Fri, 27 Oct 2023 03:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1698401297; bh=bh2SGbEm/VYu88RT5NkddGpfoFKdCZJ1kSqfou4YYXc=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=i7iCK8CG9D+ypzboftRNKsIQJlOdlPbHYwIuvKVLZusjLD5SIqrOVgllGjK03Ychj 3GukHAPTS8Rdw7X7MU2dD2DXOlqHua0ekBgj/dZDwmIK3o4eVMTg/S36vqQZVoYGVY Ozzod3B3e0WLW9beHM9IW/41vC4e9g685vWXqaEIRd5cc06t5wFI5fvz0X2QTagfWk rzV6oy1j7xxZxe5G3dJ48Kwe4xLF+QcbP3GHWz+YJsVC7ZCP+oi8gUTkdwnZwZ6N1v vd1QoSF3tNOUyZ5jDXCJm++Nunf6ELYbTVy4hRjtj7ZYhPHvJmKnlsnF8MmxXgbHe+ 34orJRgPrHv7g== 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 X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SGyzP5FTPz4xWZ; Fri, 27 Oct 2023 21:08:17 +1100 (AEDT) From: Michael Ellerman To: Nicholas Piggin , Christophe Leroy Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org In-Reply-To: References: Subject: Re: (subset) [PATCH v2 00/37] Implement execute-only protection on powerpc Message-Id: <169840079669.2701453.14060989221583470394.b4-ty@ellerman.id.au> Date: Fri, 27 Oct 2023 20:59:56 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 27 Oct 2023 03:08:39 -0700 (PDT) On Mon, 25 Sep 2023 20:31:14 +0200, Christophe Leroy wrote: > This series reworks _PAGE_FLAGS on all platforms in order > to implement execute-only protection on all powerpc. > > For all targets except 40x and 604 it will be a real execute-only > protection as the hardware and/or software allows a distinct protection. > > For 40x and 604 that's a poor's man execute-only protection in the > way that once the page is in the TLB it can be executed. But it's > better than nothing and allows to have a similar implementation for > all sorts of powerpc. > > [...] Applied to powerpc/next. [03/37] powerpc/40x: Remove stale PTE_ATOMIC_UPDATES macro https://git.kernel.org/powerpc/c/cc8ee288f484a2a59c01ccd4d8a417d6ed3466e3 [04/37] powerpc: Remove pte_ERROR() https://git.kernel.org/powerpc/c/3b8547ec4d35778c9f4cc261d85c0cae6c1a8ecb [05/37] powerpc: Deduplicate prototypes of ptep_set_access_flags() and phys_mem_access_prot() https://git.kernel.org/powerpc/c/93f81f6eea10f497e892c52998a2194b4e16c91d [06/37] powerpc: Refactor update_mmu_cache_range() https://git.kernel.org/powerpc/c/da9554e0fe3c7b46912a361a803b50f2655ff30f [07/37] powerpc: Untangle fixmap.h and pgtable.h and mmu.h https://git.kernel.org/powerpc/c/d3e01796728add53ab778298573772d44d52d19c [08/37] powerpc/nohash: Remove {pte/pmd}_protnone() https://git.kernel.org/powerpc/c/81fbb9997057b6e6e5795a08d9a8e10e9f48236f [09/37] powerpc/nohash: Refactor declaration of {map/unmap}_kernel_page() https://git.kernel.org/powerpc/c/7835006979e5415aa4c9bc0e3e7063b5c5943ed4 [10/37] powerpc/nohash: Move 8xx version of pte_update() into pte-8xx.h https://git.kernel.org/powerpc/c/4c1a89d983be951a3e39d7f9c1d6987f3054e32d [11/37] powerpc/nohash: Replace #ifdef CONFIG_44x by IS_ENABLED(CONFIG_44x) in pgtable.h https://git.kernel.org/powerpc/c/0f4027eab59261f2fb72586f18efb44be3594dd4 [12/37] powerpc/nohash: Refactor pte_update() https://git.kernel.org/powerpc/c/42a2722319f0d3d5612ca8efd3ce7d7eae512291 [13/37] powerpc/nohash: Refactor checking of no-change in pte_update() https://git.kernel.org/powerpc/c/7c929ad0b3167e980a3963e03403a761138a4350 [14/37] powerpc/nohash: Deduplicate _PAGE_CHG_MASK https://git.kernel.org/powerpc/c/27672be7751f25566e69bc228c8b8440a0772f8b [15/37] powerpc/nohash: Deduplicate pte helpers https://git.kernel.org/powerpc/c/3a4288164d631b88a57119777b15099eb23c6fbf [16/37] powerpc/nohash: Refactor ptep_test_and_clear_young() https://git.kernel.org/powerpc/c/8c3d9eb323bbf2b37cdc5c01ebf9604175b5970f [17/37] powerpc/nohash: Deduplicate ptep_set_wrprotect() and ptep_get_and_clear() https://git.kernel.org/powerpc/c/cc68d77febe055b6499dda5fa13bda976a12a85c [18/37] powerpc/nohash: Refactor pte_clear() https://git.kernel.org/powerpc/c/2ef9f4bb9c47ed30ff3c7961744cae545c034154 [19/37] powerpc/nohash: Refactor __ptep_set_access_flags() https://git.kernel.org/powerpc/c/799d8836a7c4f4327833e4a5ca952a1700acdb14 [20/37] powerpc/e500: Simplify pte_mkexec() https://git.kernel.org/powerpc/c/4c8dd6c9872d4e89fd2b3a6fc92fd6cc9cdce347 [21/37] powerpc: Implement and use pgprot_nx() https://git.kernel.org/powerpc/c/d3c0dfcfc95796701e82719722fd997ec5256013 [22/37] powerpc: Fail ioremap() instead of silently ignoring flags when PAGE_USER is set https://git.kernel.org/powerpc/c/c7263f156395d1f2a2142375a75b7b040686a07a [23/37] powerpc: Remove pte_mkuser() and pte_mkpriviledged() https://git.kernel.org/powerpc/c/69339071bb27f0b1371cd23d6dada3f976261c20 [24/37] powerpc: Rely on address instead of pte_user() https://git.kernel.org/powerpc/c/a78587473642aec302697cdaceb719a7f8791369 [25/37] powerpc: Refactor permission masks used for __P/__S table and kernel memory flags https://git.kernel.org/powerpc/c/a5a08dc90f4513d1a78582ec24b687fad01cc843 [26/37] powerpc/8xx: Use generic permission masks https://git.kernel.org/powerpc/c/f9f09b93e80148fc5824afb338c318272abde529 [27/37] powerpc/64s: Use generic permission masks https://git.kernel.org/powerpc/c/58f534623c4d8800c2e5d63da9783530848e570c [28/37] powerpc/nohash: Add _PAGE_WRITE to supplement _PAGE_RW https://git.kernel.org/powerpc/c/d20506d4728c3b7408e84d9aececbcb78c3061ee [29/37] powerpc/nohash: Replace pte_user() by pte_read() https://git.kernel.org/powerpc/c/8e9bd41e4ce1001f5b89e4c9a69f870f39d56c12 [30/37] powerpc/e500: Introduce _PAGE_READ and remove _PAGE_USER https://git.kernel.org/powerpc/c/48cf93bb168d506a8278a6fb25c2f88c1c93ce6e [31/37] powerpc/44x: Introduce _PAGE_READ and remove _PAGE_USER https://git.kernel.org/powerpc/c/93820bfeefc4a125a6cedd1ee1a956eeb3eb2580 [32/37] powerpc/40x: Introduce _PAGE_READ and remove _PAGE_USER https://git.kernel.org/powerpc/c/ed815bd3fe9b14a742e2ae094f7f55f70918dbbc [33/37] powerpc/32s: Add _PAGE_WRITE to supplement _PAGE_RW https://git.kernel.org/powerpc/c/46ebef51fd92f52ba7dca21d3c4332e4127de515 [34/37] powerpc/32s: Introduce _PAGE_READ and remove _PAGE_USER https://git.kernel.org/powerpc/c/bac4cffc7c4a009cf0d16f1785a275e0a7715e8d [35/37] powerpc/ptdump: Display _PAGE_READ and _PAGE_WRITE https://git.kernel.org/powerpc/c/ceaba662c06598e52cbe4b90fef6b71b7f965cf9 [36/37] powerpc: Finally remove _PAGE_USER https://git.kernel.org/powerpc/c/163a72fa89161b57b05d848aedfbd5103fac9dd7 [37/37] powerpc: Support execute-only on all powerpc https://git.kernel.org/powerpc/c/b1fba034a6793e9601d581594a781b46c255471f cheers