diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-06-17 13:23:39 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-10-11 18:15:51 +0100 |
commit | ad3a168f1ec2e5d612546aead977753398190676 (patch) | |
tree | 87494023e4cf5ca894a110027488f5f51f4bed2b /arch/arm64/mm/ktext.c | |
parent | 121ae19cefe77863b75c3f856683fef234698e33 (diff) |
arm64: text replication: include most of read-only data as well
Include as much of the read-only data in the replication as we can
without needing to move away from the generic RO_DATA() macro in
the linker script.
Unfortunately, the read-only data section is immedaitely followed
by the read-only after init data with no page alignment, which
means we can't have separate mappings for the read-only data
section and everything else. Changing that would mean replacing
the generic RO_DATA() macro which increases the maintenance burden.
however, this is likely not worth the effort as the majority of
read-only data will be covered.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm64/mm/ktext.c')
-rw-r--r-- | arch/arm64/mm/ktext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/ktext.c b/arch/arm64/mm/ktext.c index a07a03f36519..6ca7c4730893 100644 --- a/arch/arm64/mm/ktext.c +++ b/arch/arm64/mm/ktext.c @@ -122,7 +122,7 @@ void ktext_replication_patch_alternative(__le32 *src, int nr_inst) /* Allocate page tables and memory for the replicated kernel texts. */ void __init ktext_replication_init(void) { - size_t size = _etext - _stext; + size_t size = __end_rodata - _stext; int kidx = pgd_index((phys_addr_t)KERNEL_START); int nid; |