Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2388915ybn; Thu, 26 Sep 2019 11:07:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyL10ppJ0Ts/piUWkEq3DLbociC0/fOGk5kORatbA2yTI9OmaRuHgpXOwXV86yGNR3h4uMQ X-Received: by 2002:a17:906:c5b:: with SMTP id t27mr4283067ejf.180.1569521265759; Thu, 26 Sep 2019 11:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569521265; cv=none; d=google.com; s=arc-20160816; b=y9YyyWdtnYlvOSu8dRFJs9L5X7aoAXG/DAZhG4Lf4jAQJe8uBVyA0kt3vdVFi8t2gj xPbGlSD4RlLFubgXheqXen4Cr20PZorCYErum1q2LDIInEjKtKrn4DFSFAfPEsNBPd6o lTQ4sg5U+mqBFoXo9R5HzAp3n7wRA1ZXSs6VluFg6KHC+kYMQZAiyGCi+6bbk7bUSRAz d8VEU5XMgAfZpYoYn/jma8fZPkwQTZ8dhUr3Nv7fkDggWMoLnG5kAojU2rlzzRG7Fv8j J58pYqFDHcfKYXSFFYsT4weQQjLk4aSzl6DsjDPiVPdsMduqbFrI2rQ50K8AUzDp4jqV K1fA== 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=kVlu3UytET+u7KQ09fcnqnLvPl+cN9h82jlVZJfZjTo=; b=aIKKoW6keJUEfC0PQ6PpYDqhYFja66zHxV7QEaPS+bwZ6sE6s67z8bqh/TFKXlSSTw s4b9+8PnysiL1Ko9CK5PWb41pHsaphvkRvHcAa4eRb2eBjnjBal/NgYmjImsjjJqWuhp 9bhAE0KdmFVt9gnWS0hEfm/OHMceRvssH0rdewAU1zbeV1yVm5z2MXFRhijBsbT7ZSnx LND7/LIEk1EE6sT65YHXXx2VZQfoo9yNoQ1bZDrydL2KTjMunL8Bp5aTpJL13j4+y38n c1pr+UNSkEHXFNXdqqq1aB17pR1QrW9wYV9OhmrQS/lpEZRZoKxbZfiZ4LTED3cLxedi Z0MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gU8LOxxB; 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 m1si1398667ejb.44.2019.09.26.11.07.20; Thu, 26 Sep 2019 11:07:45 -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=gU8LOxxB; 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 S1728241AbfIZSFa (ORCPT + 99 others); Thu, 26 Sep 2019 14:05:30 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:44824 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728091AbfIZSFZ (ORCPT ); Thu, 26 Sep 2019 14:05:25 -0400 Received: by mail-pf1-f194.google.com with SMTP id q21so2245871pfn.11 for ; Thu, 26 Sep 2019 11:05: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=kVlu3UytET+u7KQ09fcnqnLvPl+cN9h82jlVZJfZjTo=; b=gU8LOxxBAqu4ZMjhqcg6B9uvdO+JQKFvVezAsT+/Z7xLV5dDBIvhPco78+OYSHATWV 5vKgvlD1/TWtGQnwfCk7wZ0RsQP6sq6fpYz7/tPJNPScWJo/6tHPyc/NVqe/1uVViJiu QG4qyMvzq9mF+nTaLfsPuABbMBGU0f1v5ZdH4= 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=kVlu3UytET+u7KQ09fcnqnLvPl+cN9h82jlVZJfZjTo=; b=lCWJdbMm5MwNCYYn6ZeFKWHYWzxDywIE6NOHOXpjrZ45EqYfIiKffQyXyENM9IawHi 23FRgyLiacHIVVIvdjkZBy4UelmDlqbQTqNF5gcavzNn2wBQRBfxvodVvx/+QaxYFURA 9OcIHo+N5zAPs2bcpSRLhv17WxNymTmqseJqd9r80vmdO7777iBSYFOFc4jFPkH41V6Z MmqvIJF6FxQx9wENYVhUxl4Kv2ucV9d38kcBlgkQmph/yi+/02dptVjEDXQGXBotfpNf mLyYVlYpTuu9M29df5dlcbYrF0NjW+4zylvklXRL5qkMv5fV02RjDmvgLV82zwaeBU0T aoNg== X-Gm-Message-State: APjAAAV4SsXqH0XzPZRQ4IEHFVkdUg47YeQoOSq5UPy5Mhbs9bz51J48 FgWJS9Khl9W+FPwrIIDl6FIUQQ== X-Received: by 2002:a17:90a:3483:: with SMTP id p3mr4996354pjb.108.1569521123591; Thu, 26 Sep 2019 11:05:23 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 193sm3956718pfc.59.2019.09.26.11.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 11:05:20 -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 11/29] vmlinux.lds.h: Replace RODATA with RO_DATA Date: Thu, 26 Sep 2019 10:55:44 -0700 Message-Id: <20190926175602.33098-12-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 There's no reason to keep the RODATA macro: just replace the callers with the expected RO_DATA macro. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 +- arch/ia64/kernel/vmlinux.lds.S | 2 +- arch/microblaze/kernel/vmlinux.lds.S | 2 +- arch/mips/kernel/vmlinux.lds.S | 2 +- arch/um/include/asm/common.lds.S | 2 +- arch/xtensa/kernel/vmlinux.lds.S | 2 +- include/asm-generic/vmlinux.lds.h | 4 +--- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index bf28043485f6..af411817dd7d 100644 --- a/arch/alpha/kernel/vmlinux.lds.S +++ b/arch/alpha/kernel/vmlinux.lds.S @@ -34,7 +34,7 @@ SECTIONS swapper_pg_dir = SWAPPER_PGD; _etext = .; /* End of text section */ - RODATA + RO_DATA(4096) EXCEPTION_TABLE(16) /* Will be freed after init */ diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index ad3578924589..0d86fc8e88d5 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S @@ -104,7 +104,7 @@ SECTIONS { code_continues2 : { } :text - RODATA + RO_DATA(4096) .opd : AT(ADDR(.opd) - LOAD_OFFSET) { __start_opd = .; diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S index d008e50bb212..2299694748ea 100644 --- a/arch/microblaze/kernel/vmlinux.lds.S +++ b/arch/microblaze/kernel/vmlinux.lds.S @@ -51,7 +51,7 @@ SECTIONS { } . = ALIGN(16); - RODATA + RO_DATA(4096) EXCEPTION_TABLE(16) /* diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 91e566defc16..a5f00ec73ea6 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -82,7 +82,7 @@ SECTIONS } _sdata = .; /* Start of data section */ - RODATA + RO_DATA(4096) /* writeable */ .data : { /* Data */ diff --git a/arch/um/include/asm/common.lds.S b/arch/um/include/asm/common.lds.S index a24b284f5135..eca6c452a41b 100644 --- a/arch/um/include/asm/common.lds.S +++ b/arch/um/include/asm/common.lds.S @@ -9,7 +9,7 @@ _sdata = .; PROVIDE (sdata = .); - RODATA + RO_DATA(4096) .unprotected : { *(.unprotected) } . = ALIGN(4096); diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index a0a843745695..b97e5798b9cf 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S @@ -124,7 +124,7 @@ SECTIONS . = ALIGN(16); - RODATA + RO_DATA(4096) /* Relocation table */ diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 3a4c1cb971da..9520dede6c7a 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -513,9 +513,7 @@ . = ALIGN((align)); \ __end_rodata = .; -/* RODATA & RO_DATA provided for backward compatibility. - * All archs are supposed to use RO_DATA() */ -#define RODATA RO_DATA_SECTION(4096) +/* All archs are supposed to use RO_DATA() */ #define RO_DATA(align) RO_DATA_SECTION(align) /* -- 2.17.1