From: Atish Patra <atish.patra@wdc.com>
To: linux-kernel@vger.kernel.org
Cc: Albert Ou <aou@eecs.berkeley.edu>,
Kees Cook <keescook@chromium.org>,
Anup Patel <anup@brainfault.org>,
linux-riscv@lists.infradead.org,
Atish Patra <atish.patra@wdc.com>,
Guo Ren <guoren@linux.alibaba.com>,
Palmer Dabbelt <palmer@dabbelt.com>, Zong Li <zong.li@sifive.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Greentime Hu <greentime.hu@sifive.com>,
Andrew Morton <akpm@linux-foundation.org>,
Borislav Petkov <bp@suse.de>,
Michel Lespinasse <walken@google.com>,
Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH 5/5] RISC-V: Move dynamic relocation section under __init
Date: Fri, 9 Oct 2020 14:13:44 -0700 [thread overview]
Message-ID: <20201009211344.2358688-6-atish.patra@wdc.com> (raw)
In-Reply-To: <20201009211344.2358688-1-atish.patra@wdc.com>
Dynamic relocation section are only required during boot. Those sections
can be freed after init. Thus, it can be moved to __init section.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
---
arch/riscv/kernel/vmlinux.lds.S | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 15b9882588ae..4aedb4fd79e5 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -60,6 +60,10 @@ SECTIONS
}
PERCPU_SECTION(L1_CACHE_BYTES)
+ .rel.dyn : {
+ *(.rel.dyn*)
+ }
+
__init_data_end = .;
__init_end = .;
@@ -112,10 +116,6 @@ SECTIONS
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
- .rel.dyn : {
- *(.rel.dyn*)
- }
-
#ifdef CONFIG_EFI
. = ALIGN(PECOFF_SECTION_ALIGNMENT);
__pecoff_data_virt_size = ABSOLUTE(. - __pecoff_text_end);
--
2.25.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2020-10-09 21:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 21:13 [PATCH 0/5] Improve kernel section protections Atish Patra
2020-10-09 21:13 ` [PATCH 1/5] RISC-V: Move __start_kernel to .head.text Atish Patra
2020-10-09 21:13 ` [PATCH 2/5] RISC-V: Initialize SBI early Atish Patra
2020-10-09 21:13 ` [PATCH 3/5] RISC-V: Enforce protections for kernel sections early Atish Patra
2020-10-09 21:13 ` [PATCH 4/5] RISC-V: Protect .init.text & .init.data Atish Patra
2020-10-12 13:14 ` Greentime Hu
2020-10-12 23:26 ` Atish Patra
2020-10-13 1:28 ` Atish Patra
2020-10-13 3:08 ` Greentime Hu
2020-10-13 22:25 ` Atish Patra
2020-10-14 1:20 ` Jim Wilson
2020-10-14 5:24 ` Atish Patra
2020-10-16 18:24 ` Atish Patra
2020-10-22 1:31 ` Atish Patra
2020-10-22 5:03 ` Anup Patel
2020-10-22 7:22 ` Anup Patel
2020-10-22 17:13 ` Atish Patra
2020-10-09 21:13 ` Atish Patra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201009211344.2358688-6-atish.patra@wdc.com \
--to=atish.patra@wdc.com \
--cc=akpm@linux-foundation.org \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=ardb@kernel.org \
--cc=bp@suse.de \
--cc=greentime.hu@sifive.com \
--cc=guoren@linux.alibaba.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=walken@google.com \
--cc=zong.li@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).