Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2382776ybn; Thu, 26 Sep 2019 11:03:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+cAzk4CKhJthXUIYMsF2tK3go258WS5FGnVrAlpGJA5sOzY21P9Gd16zwMLIS7Y6gZ/fE X-Received: by 2002:aa7:cb46:: with SMTP id w6mr57827edt.238.1569520988425; Thu, 26 Sep 2019 11:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569520988; cv=none; d=google.com; s=arc-20160816; b=e3XisuGx/5Rww4LDO9ZeY0L9XlVAOkuZs4Xvb32AWOJ3ffPV3qx8Fs1awngUNu8Yhd mRwmPeQImFJptWxbDfGYILB81vgDsPan2l5yBvxrUng6CQdBweFnMjJdNFQ2elgDJYcZ plj4O4E/uB8LTlIaqoYlqqb/rTRR1msAodTCMLeSV6ule8zXWGBlUW70epA1jcA53fpy 2NfIRi0cfRHge9AUztOuKGsyLGJOa/ia+ClY1To2HsEpOPoiKlb4zXkQONoXmN+RItRd x6vDJJzjMU4jpCY4R+urvUKtPQmO9v5V/BXJ5yhBP8fAfAvrmIw5hjGWh6vCpBeU+ifx Ek9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=O3QCNK0Sa729dKyV+OU4JCI6A47TrPf1EYjHeURUF3c=; b=rli5/kh6PEOLdyWHcsBr5hZ0iF/UifrXY7Xx1LeHgzZkVdUWCTAF0obuDGk3jP0EET JVunQWudoBIqUTS6u9Oq3OymlePBHcPiMHg1UanWU0BGwa2ATAXmW279tCE0D08wHx2c uthCPug9geX9wa8kv1AEPUin0zcMbtxBwWeslaJ3lsXAFElPSxcEKSlLjBa5s3TcrZCp nbvKMJH6Uf1ovy/ah07rndbAaVv9guZRNALcU4Lx2+nQa0jdPmICCPO3B8kWz4PxqynV tjaPqbHxS/4DqCr2zYFeshwvJWEjuJhe2SCGTBOz10NUz+Mu+m3/zfr/HonaJquJj0D/ r02Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=n9yc4BHE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si1443017ejd.123.2019.09.26.11.02.41; Thu, 26 Sep 2019 11:03:08 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=n9yc4BHE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728444AbfIZR5t (ORCPT + 99 others); Thu, 26 Sep 2019 13:57:49 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42713 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728027AbfIZR4Y (ORCPT ); Thu, 26 Sep 2019 13:56:24 -0400 Received: by mail-pg1-f194.google.com with SMTP id z12so1946751pgp.9 for ; Thu, 26 Sep 2019 10:56:23 -0700 (PDT) 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; bh=O3QCNK0Sa729dKyV+OU4JCI6A47TrPf1EYjHeURUF3c=; b=n9yc4BHEtaq9x6B5Caek1vzC7Kj3cBAKN1aFv5AxrtAqhGoXrV6YdYIMxu2rFMVkPg k9nvejXtTidhjDe1qOVaAEpDCmdnEEqenwqRMZy/FHknIybfHqsmUzoxgFcuVfJyQFxE 0V7i3wSHnbtKbIRqxJtQ1JLFksmfgInqEY2MA= 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; bh=O3QCNK0Sa729dKyV+OU4JCI6A47TrPf1EYjHeURUF3c=; b=llz34pzOrwD6zO+SzGZOfyzc5B4Aqg2prn7YZmjhmhNpwZ+w7mYHrIDQZI4f797zft i26y5ae7x3eit52KvxDh7K6FLMMRxAGXCPZT1bj5UijrJewjhG3Ea8saoAKIQcIA0awY McNpEJqfjQJLew0ONJWOBpX7Sv24v1vixTzS8RGmDlsWuQG++odkJI9so1Ialg5pvUPY JxRXp2KOGEHXcExOJf24HBDG37UK40k8luHTu9UR+M3NA+RNIcfO6mLMbfdU3vHsISHz XxQPA7Bc6D7g8xFjNi3vu9kSdFDNiQKbUDKKFg1uZtjoZRSP3yL+mWEJTw5dc9fyeiuf MDGg== X-Gm-Message-State: APjAAAV8Gg0Aed9Rh8tPHn/rBiX5MszTKYkFIoSNOI9ciZKFpzC6+DTH JV84YCMFlJHqxsaVEOivHWUyQQ== X-Received: by 2002:aa7:8c19:: with SMTP id c25mr4982222pfd.150.1569520583539; Thu, 26 Sep 2019 10:56:23 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z29sm4938159pff.23.2019.09.26.10.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 10:56:21 -0700 (PDT) From: Kees Cook To: Thomas Gleixner Cc: Kees Cook , Rick Edgecombe , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Arnd Bergmann , linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Michal Simek , linux-parisc@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/29] vmlinux.lds.h: Move NOTES into RO_DATA Date: Thu, 26 Sep 2019 10:55:43 -0700 Message-Id: <20190926175602.33098-11-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190926175602.33098-1-keescook@chromium.org> References: <20190926175602.33098-1-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The .notes section should be non-executable read-only data. As such, it can live in the RO_DATA macro instead of being per-architecture defined. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 -- arch/arc/kernel/vmlinux.lds.S | 2 -- arch/arm/kernel/vmlinux-xip.lds.S | 2 -- arch/arm/kernel/vmlinux.lds.S | 2 -- arch/arm64/kernel/vmlinux.lds.S | 1 - arch/c6x/kernel/vmlinux.lds.S | 1 - arch/csky/kernel/vmlinux.lds.S | 1 - arch/h8300/kernel/vmlinux.lds.S | 1 - arch/hexagon/kernel/vmlinux.lds.S | 1 - arch/ia64/kernel/vmlinux.lds.S | 2 -- arch/microblaze/kernel/vmlinux.lds.S | 1 - arch/mips/kernel/vmlinux.lds.S | 2 -- arch/nds32/kernel/vmlinux.lds.S | 1 - arch/nios2/kernel/vmlinux.lds.S | 1 - arch/openrisc/kernel/vmlinux.lds.S | 1 - arch/parisc/kernel/vmlinux.lds.S | 1 - arch/powerpc/kernel/vmlinux.lds.S | 2 -- arch/riscv/kernel/vmlinux.lds.S | 1 - arch/s390/kernel/vmlinux.lds.S | 2 -- arch/sh/kernel/vmlinux.lds.S | 1 - arch/sparc/kernel/vmlinux.lds.S | 1 - arch/um/include/asm/common.lds.S | 1 - arch/unicore32/kernel/vmlinux.lds.S | 1 - arch/x86/kernel/vmlinux.lds.S | 2 -- arch/xtensa/kernel/vmlinux.lds.S | 1 - include/asm-generic/vmlinux.lds.h | 9 +++++---- 26 files changed, 5 insertions(+), 38 deletions(-) diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index cdfdc91ce64c..bf28043485f6 100644 --- a/arch/alpha/kernel/vmlinux.lds.S +++ b/arch/alpha/kernel/vmlinux.lds.S @@ -34,8 +34,6 @@ SECTIONS swapper_pg_dir = SWAPPER_PGD; _etext = .; /* End of text section */ - NOTES - RODATA EXCEPTION_TABLE(16) diff --git a/arch/arc/kernel/vmlinux.lds.S b/arch/arc/kernel/vmlinux.lds.S index 6c693a9d29b6..1d6eef4b6976 100644 --- a/arch/arc/kernel/vmlinux.lds.S +++ b/arch/arc/kernel/vmlinux.lds.S @@ -118,8 +118,6 @@ SECTIONS /DISCARD/ : { *(.eh_frame) } #endif - NOTES - . = ALIGN(PAGE_SIZE); _end = . ; diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index 8c74037ade22..d2a9651c24ad 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -70,8 +70,6 @@ SECTIONS ARM_UNWIND_SECTIONS #endif - NOTES - _etext = .; /* End of text and rodata section */ ARM_VECTORS diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 23150c0f0f4d..068db6860867 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -81,8 +81,6 @@ SECTIONS ARM_UNWIND_SECTIONS #endif - NOTES - #ifdef CONFIG_STRICT_KERNEL_RWX . = ALIGN(1<