Message ID | 20190131192533.34130-5-thgarnie@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kernel-hardening-return-15040-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com> 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 5B95D746 for <patchwork-kernel-hardening@patchwork.kernel.org>; Thu, 31 Jan 2019 19:42:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52B4031524 for <patchwork-kernel-hardening@patchwork.kernel.org>; Thu, 31 Jan 2019 19:42:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4719931545; Thu, 31 Jan 2019 19:42:44 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 8796E31524 for <patchwork-kernel-hardening@patchwork.kernel.org>; Thu, 31 Jan 2019 19:42:43 +0000 (UTC) Received: (qmail 1391 invoked by uid 550); 31 Jan 2019 19:42:32 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: <mailto:kernel-hardening@lists.openwall.com> List-Help: <mailto:kernel-hardening-help@lists.openwall.com> List-Unsubscribe: <mailto:kernel-hardening-unsubscribe@lists.openwall.com> List-Subscribe: <mailto:kernel-hardening-subscribe@lists.openwall.com> List-ID: <kernel-hardening.lists.openwall.com> Delivered-To: mailing list kernel-hardening@lists.openwall.com Delivered-To: moderator for kernel-hardening@lists.openwall.com Received: (qmail 19475 invoked from network); 31 Jan 2019 19:28:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aVzH3++K/2N/bei/W7brwrZIoSH+2V+4aNBxSbRjbq4=; b=jS2vtOqYqLE/UAH85ZVuBHyHcP6KJfCYF/kd2GCumX7Km1JENVatuWyLBZXwtUcZ78 uuJWTV92JL0DWP/oclQZqlxzCj8+Wr4Yg+P1AZUMQQh/uwJYs9eTqMszVYOeXuU3VhMk tqo7aPoLoLPUsQkRcbW/K1+4phYfubMX5KMoM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aVzH3++K/2N/bei/W7brwrZIoSH+2V+4aNBxSbRjbq4=; b=rThc9eT3U/ff7t4Q6uy7UCZr4R5SkL8PBvpNugV/oRrOd4r8/fey3TVEFhqgF+2fof 4sqwMhzx04BOXliPx+rl9VxVz+suvO8Lt2/lOjF94wa1iBtnFyiTqdHd58BSCgEcBC+T gxCgPIifaqm393RpadCJO9MxhiylBNYRrRnvZKSuYYZpTiqtSM562MuT6cCZkxePMyro 0+jJGngIfi1s2MkCOize15/M6seMoD6TPPa3QFI8UCxTKO+OE9z8IFcZUxYV6+5/WqPw jtN8N12eeghc4Itc4DVcbSK9wdYhLr0AHAIoBsQioYN9agXoOfpQYAsTysgxxiEONavz a4ZQ== X-Gm-Message-State: AJcUukc5H8tFPlQ8gsL3Sx/8M13RdGGbeZY9XPZhfpQ/SbcHBg//+OYr 6y4hJgiBt+ES6qd61s4bxn/4U9UVg1A= X-Google-Smtp-Source: ALg8bN5Pa1G5uAAreLJUsvnXuKXoqnB/OuhYT6/cS4vJiBDbtX21eMh64bYx4cARh8Y2v53zKN5yuA== X-Received: by 2002:a63:a553:: with SMTP id r19mr32449265pgu.53.1548962900998; Thu, 31 Jan 2019 11:28:20 -0800 (PST) From: Thomas Garnier <thgarnie@chromium.org> To: kernel-hardening@lists.openwall.com Cc: kristen@linux.intel.com, Thomas Garnier <thgarnie@chromium.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org, Thomas Garnier <thgarnie@google.com>, linux-kernel@vger.kernel.org Subject: [PATCH v6 04/27] x86: relocate_kernel - Adapt assembly for PIE support Date: Thu, 31 Jan 2019 11:24:11 -0800 Message-Id: <20190131192533.34130-5-thgarnie@chromium.org> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog In-Reply-To: <20190131192533.34130-1-thgarnie@chromium.org> References: <20190131192533.34130-1-thgarnie@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
x86: PIE support and option to extend KASLR randomization
|
expand
|
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S index 11eda21eb697..3320368b6ec9 100644 --- a/arch/x86/kernel/relocate_kernel_64.S +++ b/arch/x86/kernel/relocate_kernel_64.S @@ -208,7 +208,7 @@ identity_mapped: movq %rax, %cr3 lea PAGE_SIZE(%r8), %rsp call swap_pages - movq $virtual_mapped, %rax + movabsq $virtual_mapped, %rax pushq %rax ret
Change the assembly code to use only absolute references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extend the KASLR randomization range below 0xffffffff80000000. Signed-off-by: Thomas Garnier <thgarnie@chromium.org> --- arch/x86/kernel/relocate_kernel_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)