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 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1081C4BA0B for ; Wed, 26 Feb 2020 06:46:01 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 4ED832084E for ; Wed, 26 Feb 2020 06:46:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=russell.cc header.i=@russell.cc header.b="QB3lHwMo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="O4/p3ZJv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4ED832084E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=russell.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48S5sy55j2zDqdr for ; Wed, 26 Feb 2020 17:45:58 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=russell.cc (client-ip=64.147.123.21; helo=wout5-smtp.messagingengine.com; envelope-from=ruscur@russell.cc; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=russell.cc Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.a=rsa-sha256 header.s=fm1 header.b=QB3lHwMo; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=O4/p3ZJv; dkim-atps=neutral Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48S5fl2QgZzDqdq for ; Wed, 26 Feb 2020 17:36:15 +1100 (AEDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 0505063D; Wed, 26 Feb 2020 01:36:11 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 26 Feb 2020 01:36:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=russell.cc; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=xzPxK0T3LkI6AKlfQxuJpPd2C1 +xMqQduZDssjupEwU=; b=QB3lHwMoFrMTwCghDNWOiSxy2EErGseqg/TawWgLL/ CmgWAj7Dq0dNddaHBCPXjD69LEOLV7nMa97QhYBdjBA8zGXO0ozC2izszq2jj42m mBBrHd0OROYbjFKjAIlIzc6xiawriOTP0HBFugkgSFrlQuxFsIuLAirOVrGyBwgZ vWO5L7+T2LRmJMIuE58XBv9bKBHSZ4wwFBRJU1TJaGpy6/4IG7c5GAjGO5DdxjJJ XMCS7iTCTY2zvROxQSV/PtIiCcOlad5r13j3EVJ2xPuaolJ/XShJjBJHoQ+T+dCj iUNw0kDVMC435P01rfRCuRyGGBGQPvwpUfMzZ+Gh9a7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=xzPxK0T3LkI6AKlfQ xuJpPd2C1+xMqQduZDssjupEwU=; b=O4/p3ZJvPHU2wN2WkpCFFxVgXlb5y7zN1 S4fob/M5jVJbSM63v82LuesIkd809mq/nhk1qddMxU5s1ue/PuMvZV+iT1uusdwb eDj16F0M9uM+GRHnqa6CAF7BV0EM7ZCMadBbKUx3nBe+WQxOzPuEU21+V+OfBjYu MMkXMxODChCsUXnxPlVqN5OZWQOcSm/UzMV1sTZA+3huyj3b6Uk0BygbS+dbemyv T3czXUb7XtOv6mHRtgtKxs/ymizI49FCP/A8S9n2djbcmUdf2jrp47hL78xtpTBf +uXAXJEQFJZ2EQ2+gQEL47ssz5b+tUB7werucUfi7bKO6j5o/E0Cw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrleefgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdduhedmnecujfgurhephffvuf ffkffoggfgsedtkeertdertddtnecuhfhrohhmpeftuhhsshgvlhhlucevuhhrrhgvhicu oehruhhstghurhesrhhushhsvghllhdrtggtqeenucffohhmrghinhepohiilhgrsghsrd horhhgnecukfhppeduvddvrdelledrkedvrddutdenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehruhhstghurhesrhhushhsvghllhdrtggt X-ME-Proxy: Received: from crackle.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 5FB153060F09; Wed, 26 Feb 2020 01:36:07 -0500 (EST) From: Russell Currey To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v5 0/8] set_memory() routines and STRICT_MODULE_RWX Date: Wed, 26 Feb 2020 17:35:43 +1100 Message-Id: <20200226063551.65363-1-ruscur@russell.cc> 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: ajd@linux.ibm.com, kernel-hardening@lists.openwall.com, jniethe5@gmail.com, Russell Currey , npiggin@gmail.com, joel@jms.id.au, dja@axtens.net Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Repost from v4 because I somehow missed half of the final patch. Picking up from Christophe's last series, including the following changes: - [6/8] Cast "data" to unsigned long instead of int to fix build - [8/8] New, to fix an issue reported by Jordan Niethe Christophe's last series is here: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=156428 Christophe Leroy (4): powerpc/mm: Implement set_memory() routines powerpc/kprobes: Mark newly allocated probes as RO powerpc/mm: implement set_memory_attr() powerpc/32: use set_memory_attr() Russell Currey (4): powerpc/mm/ptdump: debugfs handler for W+X checks at runtime powerpc: Set ARCH_HAS_STRICT_MODULE_RWX powerpc/configs: Enable STRICT_MODULE_RWX in skiroot_defconfig powerpc/mm: Disable set_memory() routines when strict RWX isn't enabled arch/powerpc/Kconfig | 2 + arch/powerpc/Kconfig.debug | 6 +- arch/powerpc/configs/skiroot_defconfig | 1 + arch/powerpc/include/asm/set_memory.h | 34 +++++++ arch/powerpc/kernel/kprobes.c | 17 +++- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/pageattr.c | 117 +++++++++++++++++++++++++ arch/powerpc/mm/pgtable_32.c | 95 +++----------------- arch/powerpc/mm/ptdump/ptdump.c | 21 ++++- 9 files changed, 202 insertions(+), 93 deletions(-) create mode 100644 arch/powerpc/include/asm/set_memory.h create mode 100644 arch/powerpc/mm/pageattr.c -- 2.25.1