Received: by 10.223.185.116 with SMTP id b49csp2259857wrg; Thu, 15 Feb 2018 08:55:08 -0800 (PST) X-Google-Smtp-Source: AH8x224goz1pO3JbpjlVxFD+6fvwpc2fkd5+6+BBU1TpIEIJVi8blsC6CCyWBmW3AGRLgkQl42YA X-Received: by 10.99.4.66 with SMTP id 63mr2691090pge.93.1518713708069; Thu, 15 Feb 2018 08:55:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518713708; cv=none; d=google.com; s=arc-20160816; b=zoTqvjYgESM3fefw0T2fH4eUO5mQZa01nfbEnxqiG7aU5bcFXr7729mCpiW6mG9hI2 RCc/jlHYkdr39S6mddaxpZeySSypuWucog6TwY4CO5iEBsHSxRAj4ZlzGVy2IIcXMG5H eHLbAh0z7/kP34HFpDApYRqqvdJEw+93YLsRWjB83l/DfgpCIl5RC3p3AspF6Ovk+Ph1 JXF08IWMeJ6TXuaOtDsSJ/mkLwSlFiRQcifu0x52gPid1npaU0B4Qrz08zkSmtE0GKOS 859z/FLggfGH5UVwjUP5hb7rVzD1L9f7OkvAJNBmLPue71b5x3sMkPvgojRwVZDEXxvc GOrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=k9c8TUsIWfyRVVls/zINC0VdJhYmlY+Hf6EPf4MDeg8=; b=t5Z5taQPxnvzgozz+ymvWGmaabgx5pWxXTdSwZ9UibuLJzPw7YILE7YqoxQgI6hKkN 7Qdsj8WHJxYyqYGtYRBHnZk7yCG5Le15ctnvwVxV7cP/cbsqAXzS27MSMNxJO2TkCcrd TMc9Q4pVtYtxebr9zzzcQYKw+RGhhL8eQwP/VOJKJ6GnR43HJC/ZyCwfb8rIypUrDUBe CRrOMtEdgIWslOapiHTOOEiP0cJLG1lPOdhLu+I/r3zel4saT5H/BY1zYjSx648Je9Ta qnNYwWwYioRqCBKX6dW6drg5oHB31OJ+pX8HNzyzc71k4oBxRj58LL2hGByvM/u18y7B FP0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si9598712pgu.518.2018.02.15.08.54.53; Thu, 15 Feb 2018 08:55:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426623AbeBOQxw (ORCPT + 99 others); Thu, 15 Feb 2018 11:53:52 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59972 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423650AbeBOPkF (ORCPT ); Thu, 15 Feb 2018 10:40:05 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7AED910F0; Thu, 15 Feb 2018 15:40:04 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Laura Abbott , Shanker Donthineni , Will Deacon Subject: [PATCH 4.15 034/202] [Variant 3/Meltdown] arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0 Date: Thu, 15 Feb 2018 16:15:34 +0100 Message-Id: <20180215151714.786408198@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Will Deacon Commit 084eb77cd3a8 upstream. Add a Kconfig entry to control use of the entry trampoline, which allows us to unmap the kernel whilst running in userspace and improve the robustness of KASLR. Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: Shanker Donthineni Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -843,6 +843,19 @@ config FORCE_MAX_ZONEORDER However for 4K, we choose a higher default value, 11 as opposed to 10, giving us 4M allocations matching the default size used by generic code. +config UNMAP_KERNEL_AT_EL0 + bool "Unmap kernel when running in userspace (aka \"KAISER\")" + default y + help + Some attacks against KASLR make use of the timing difference between + a permission fault which could arise from a page table entry that is + present in the TLB, and a translation fault which always requires a + page table walk. This option defends against these attacks by unmapping + the kernel whilst running in userspace, therefore forcing translation + faults for all of kernel space. + + If unsure, say Y. + menuconfig ARMV8_DEPRECATED bool "Emulate deprecated/obsolete ARMv8 instructions" depends on COMPAT