From patchwork Thu Nov 22 14:04:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Currey X-Patchwork-Id: 10694407 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8645F14BD for ; Thu, 22 Nov 2018 15:29:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7445D2C549 for ; Thu, 22 Nov 2018 15:29:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65BD12CEAE; Thu, 22 Nov 2018 15:29:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id E516A2C549 for ; Thu, 22 Nov 2018 15:29:14 +0000 (UTC) Received: (qmail 12056 invoked by uid 550); 22 Nov 2018 15:29:12 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Delivered-To: moderator for kernel-hardening@lists.openwall.com Received: (qmail 17621 invoked from network); 22 Nov 2018 14:04:24 -0000 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=fm1; bh=8/xbp95vXWh23ncgO ZtcIvJ4G5GVZ1X1kYieM09w09g=; b=Fkcia3qB2DW/yt3dHEPoBw2APjLqM9peZ 8brIt10aS81/5tEFbXF6Z1BUSobO1sGX5VsGVhx9lNhw1WRNDz5tv1LQTW4+Hfhp t9/vOrYRttIAiNfxrqwJAnM+p62ZWTB174DPJq5RuaII3YaSlCYyJ2Ydzztk6Usu gKkJnsaxn+UldWJQLZSayZeyA3OhqyIPhPwwnYj8XNbM9kvPXGBHBLNSdLUvWVBS YoF22TfziZuF7vayxRdjqeOZ/RQEcI8Yuis4jZZAZzHtMJfZSwwlfpOYcuOd0UgM RPEg/T6wH9PZNOX1m96Y0sJxS4Evs+QKB8OG0TyvtTTSbNHOu/SMA== X-ME-Sender: X-ME-Proxy: From: Russell Currey To: linuxppc-dev@lists.ozlabs.org Cc: mpe@ellerman.id.au, benh@kernel.crashing.org, kernel-hardening@lists.openwall.com, christophe.leroy@c-s.fr, Russell Currey Subject: [PATCH 0/4] Kernel Userspace Protection for Radix MMU Date: Fri, 23 Nov 2018 01:04:12 +1100 Message-Id: <20181122140416.3447-1-ruscur@russell.cc> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Back again, this time based on top of Christophe Leroy's series: http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=74541 With the magic perk of being the snowpatch maintainer I will try and get the snowpatch results for this series to be applied on top of that series so all the tests aren't failures. There aren't really any major functional changes, just working what I already did into Christophe's framework. The biggest change is that execution prevention is now optional, and all the radix-specific code is now in the radix-specific place where it should be. Russell Currey (4): powerpc: Track KUAP state in the PACA powerpc/64: Setup KUP before feature fixups powerpc/mm/radix: Use KUEP API for Radix MMU powerpc/64s: Implement KUAP for Radix MMU arch/powerpc/include/asm/book3s/64/radix.h | 43 ++++++++++++++++++++ arch/powerpc/include/asm/exception-64e.h | 3 ++ arch/powerpc/include/asm/exception-64s.h | 19 ++++++++- arch/powerpc/include/asm/mmu.h | 9 +++- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 8 ++-- arch/powerpc/include/asm/paca.h | 3 ++ arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/include/asm/uaccess.h | 23 ++++++++++- arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/entry_64.S | 16 +++++++- arch/powerpc/kernel/setup_64.c | 7 +++- arch/powerpc/mm/pgtable-radix.c | 21 ++++++++-- arch/powerpc/mm/pkeys.c | 7 +++- arch/powerpc/platforms/Kconfig.cputype | 2 + 14 files changed, 148 insertions(+), 15 deletions(-)