Message ID | 20190131192533.34130-25-thgarnie@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kernel-hardening-return-15060-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 39D7913B5 for <patchwork-kernel-hardening@patchwork.kernel.org>; Thu, 31 Jan 2019 19:46:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 307D63102E for <patchwork-kernel-hardening@patchwork.kernel.org>; Thu, 31 Jan 2019 19:46:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23AC331793; Thu, 31 Jan 2019 19:46:40 +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 5443D3102E for <patchwork-kernel-hardening@patchwork.kernel.org>; Thu, 31 Jan 2019 19:46:39 +0000 (UTC) Received: (qmail 15965 invoked by uid 550); 31 Jan 2019 19:44:18 -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 21674 invoked from network); 31 Jan 2019 19:29:39 -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=03DhW08PwxDx+7CmSkXN5WrsmPi3V0p8jn7ZS9qbpus=; b=HQJftAgRaIad59USuyr99kBPfPoB5b/JxHSle6f3rJNLkUcnSjE/ZuAjyGJSaGcn3w V55k6m0AAvyzZIki/ywG+U5YQ5mJlGJGZK4gGuUKKsOVn8f+gwoBBNH7TC5lIJC7ENSQ ZNeBhS/Yc7ScR1O39zyJqIlRYi0HLUeToxxFY= 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=03DhW08PwxDx+7CmSkXN5WrsmPi3V0p8jn7ZS9qbpus=; b=XNMl85wWrnMXy75HBHDYyW+wDCMVOadfMyCRQVO1rtcUWbgMf1EgYPZ7yWu3eIGp+L lZSROCpb1vnFBX4CSzMCzJzz4nnFmRcm86KS0WyBh4qIrh5Uj6li72RNIbAxc2jMQNyO YpcVTWuw4cVkVvwt178fb5VH+IoBvHT/T6IUqBtJsKDQxqENKOqighIA4ejuspTB/luN 5mOCen9m0V8HLse899K3QpZgdPnO+CiJnKNRCcEHtsZ40tt2fU0/hfIzgQLjvYa5fyEV p+jAbgaMYKCBgQkxKw3RZ17u2XMNvjr5/97mkYVHQVMHuDgNumyJe4EsQUHT2asqXtlL Gnvw== X-Gm-Message-State: AJcUukeZR86dHpKaDvliymV1upHsNDXYlZY+0WpvQn/1DVqx1ube1XNa 9yerV5TRR9VvBuuTlEyfDX4lv/Osj8w= X-Google-Smtp-Source: ALg8bN7Ztpo3TLep7OYRNosLM7wVxDj/Tp40mg/F+sUt1G+EPB0aZ3tpSUGCksvWzGcW1gHuy+Sc1A== X-Received: by 2002:a17:902:8641:: with SMTP id y1mr36000898plt.159.1548962968064; Thu, 31 Jan 2019 11:29:28 -0800 (PST) From: Thomas Garnier <thgarnie@chromium.org> To: kernel-hardening@lists.openwall.com Cc: kristen@linux.intel.com, Thomas Garnier <thgarnie@chromium.org>, Arnd Bergmann <arnd@arndb.de>, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 24/27] x86/mm: Make the x86 GOT read-only Date: Thu, 31 Jan 2019 11:24:31 -0800 Message-Id: <20190131192533.34130-25-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/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 3d7a6a9c2370..0a038594c878 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -323,6 +323,17 @@ __end_ro_after_init = .; #endif +#ifdef CONFIG_X86_PIE +#define RO_GOT_X86 \ + .got : AT(ADDR(.got) - LOAD_OFFSET) { \ + __start_got = .; \ + *(.got); \ + __end_got = .; \ + } +#else +#define RO_GOT_X86 +#endif + /* * Read only Data */ @@ -379,6 +390,7 @@ __end_builtin_fw = .; \ } \ \ + RO_GOT_X86 \ TRACEDATA \ \ /* Kernel symbol table: Normal symbols */ \
The GOT is changed during early boot when relocations are applied. Make it read-only directly. This table exists only for PIE binary. Position Independent Executable (PIE) support will allow to extend the KASLR randomization range below 0xffffffff80000000. Signed-off-by: Thomas Garnier <thgarnie@chromium.org> --- include/asm-generic/vmlinux.lds.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)