vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA
Rename RW_DATA_SECTION to RW_DATA. (Calling this a "section" is a lie, since it's multiple sections and section flags cannot be applied to the macro.) Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # s390 Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Rick Edgecombe <rick.p.edgecombe@intel.com> Cc: Segher Boessenkool <segher@kernel.crashing.org> Cc: Will Deacon <will@kernel.org> Cc: x86-ml <x86@kernel.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Link: https://lkml.kernel.org/r/20191029211351.13243-14-keescook@chromium.org
This commit is contained in:
Родитель
93240b3279
Коммит
c9174047b4
|
@ -50,7 +50,7 @@ SECTIONS
|
|||
|
||||
_sdata = .; /* Start of rw data section */
|
||||
_data = .;
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
|
||||
.got : {
|
||||
*(.got)
|
||||
|
|
|
@ -101,7 +101,7 @@ SECTIONS
|
|||
* 1. this is .data essentially
|
||||
* 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned
|
||||
*/
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
|
||||
_edata = .;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ SECTIONS
|
|||
|
||||
. = ALIGN(THREAD_SIZE);
|
||||
_sdata = .;
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
.data.ro_after_init : AT(ADDR(.data.ro_after_init) - LOAD_OFFSET) {
|
||||
*(.data..ro_after_init)
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ SECTIONS
|
|||
__init_end = .;
|
||||
|
||||
_sdata = .;
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
BSS_SECTION(0, 0, 0)
|
||||
|
|
|
@ -214,7 +214,7 @@ SECTIONS
|
|||
|
||||
_data = .;
|
||||
_sdata = .;
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
|
||||
|
||||
/*
|
||||
* Data written with the MMU off but read with the MMU on requires
|
||||
|
|
|
@ -50,7 +50,7 @@ SECTIONS
|
|||
|
||||
_sdata = .;
|
||||
RO_DATA(PAGE_SIZE)
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
EXCEPTION_TABLE(L1_CACHE_BYTES)
|
||||
|
|
|
@ -47,7 +47,7 @@ SECTIONS
|
|||
#endif
|
||||
_sdata = . ;
|
||||
__data_start = . ;
|
||||
RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(0, PAGE_SIZE, THREAD_SIZE)
|
||||
#if defined(CONFIG_ROMKERNEL)
|
||||
#undef ADDR
|
||||
#endif
|
||||
|
|
|
@ -49,7 +49,7 @@ SECTIONS
|
|||
INIT_DATA_SECTION(PAGE_SIZE)
|
||||
|
||||
_sdata = .;
|
||||
RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
|
||||
RW_DATA(32,PAGE_SIZE,_THREAD_SIZE)
|
||||
RO_DATA(PAGE_SIZE)
|
||||
_edata = .;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ SECTIONS {
|
|||
|
||||
_sdata = .;
|
||||
RO_DATA(PAGE_SIZE)
|
||||
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(16, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
EXCEPTION_TABLE(16)
|
||||
|
|
|
@ -33,7 +33,7 @@ SECTIONS
|
|||
|
||||
RODATA
|
||||
|
||||
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(16, PAGE_SIZE, THREAD_SIZE)
|
||||
|
||||
BSS_SECTION(0, 0, 0)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ SECTIONS
|
|||
|
||||
EXCEPTION_TABLE(16) :data
|
||||
_sdata = .; /* Start of rw data section */
|
||||
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) :data
|
||||
RW_DATA(16, PAGE_SIZE, THREAD_SIZE) :data
|
||||
/* End of data goes *here* so that freeing init code works properly. */
|
||||
_edata = .;
|
||||
NOTES
|
||||
|
|
|
@ -69,7 +69,7 @@ SECTIONS {
|
|||
}
|
||||
|
||||
_sdata = . ;
|
||||
RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(32, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = . ;
|
||||
|
||||
/* Under the microblaze ABI, .sdata and .sbss must be contiguous */
|
||||
|
|
|
@ -54,7 +54,7 @@ SECTIONS
|
|||
|
||||
_sdata = .;
|
||||
RO_DATA(PAGE_SIZE)
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
EXCEPTION_TABLE(16)
|
||||
|
|
|
@ -50,7 +50,7 @@ SECTIONS
|
|||
|
||||
_sdata = .;
|
||||
RO_DATA(PAGE_SIZE)
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
BSS_SECTION(0, 0, 0)
|
||||
|
|
|
@ -74,7 +74,7 @@ SECTIONS
|
|||
/* Whatever comes after _e_kernel_ro had better be page-aligend, too */
|
||||
|
||||
/* 32 here is cacheline size... recheck this */
|
||||
RW_DATA_SECTION(32, PAGE_SIZE, PAGE_SIZE)
|
||||
RW_DATA(32, PAGE_SIZE, PAGE_SIZE)
|
||||
|
||||
_edata = .;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ SECTIONS
|
|||
data_start = .;
|
||||
|
||||
/* Data */
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
|
||||
|
||||
/* PA-RISC locks requires 16-byte alignment */
|
||||
. = ALIGN(16);
|
||||
|
|
|
@ -57,7 +57,7 @@ SECTIONS
|
|||
*(.srodata*)
|
||||
}
|
||||
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
.sdata : {
|
||||
__global_pointer$ = . + 0x800;
|
||||
*(.sdata*)
|
||||
|
|
|
@ -67,7 +67,7 @@ SECTIONS
|
|||
. = ALIGN(PAGE_SIZE);
|
||||
__end_ro_after_init = .;
|
||||
|
||||
RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(0x100, PAGE_SIZE, THREAD_SIZE)
|
||||
BOOT_DATA_PRESERVED
|
||||
|
||||
_edata = .; /* End of data section */
|
||||
|
|
|
@ -51,7 +51,7 @@ SECTIONS
|
|||
|
||||
_sdata = .;
|
||||
RO_DATA(PAGE_SIZE)
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
DWARF_EH_FRAME
|
||||
|
|
|
@ -67,7 +67,7 @@ SECTIONS
|
|||
.data1 : {
|
||||
*(.data1)
|
||||
}
|
||||
RW_DATA_SECTION(SMP_CACHE_BYTES, 0, THREAD_SIZE)
|
||||
RW_DATA(SMP_CACHE_BYTES, 0, THREAD_SIZE)
|
||||
|
||||
/* End of data section */
|
||||
_edata = .;
|
||||
|
|
|
@ -44,7 +44,7 @@ SECTIONS
|
|||
|
||||
_sdata = .;
|
||||
RO_DATA(PAGE_SIZE)
|
||||
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
EXCEPTION_TABLE(L1_CACHE_BYTES)
|
||||
|
|
|
@ -134,7 +134,7 @@ SECTIONS
|
|||
/* Data section */
|
||||
|
||||
_sdata = .;
|
||||
RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE)
|
||||
RW_DATA(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE)
|
||||
_edata = .;
|
||||
|
||||
/* Initialization code and data: */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* _sdata = .;
|
||||
* RO_DATA(PAGE_SIZE)
|
||||
* RW_DATA_SECTION(...)
|
||||
* RW_DATA(...)
|
||||
* _edata = .;
|
||||
*
|
||||
* EXCEPTION_TABLE(...)
|
||||
|
@ -975,7 +975,7 @@
|
|||
* matches the requirement of PAGE_ALIGNED_DATA.
|
||||
*
|
||||
* use 0 as page_align if page_aligned data is not used */
|
||||
#define RW_DATA_SECTION(cacheline, pagealigned, inittask) \
|
||||
#define RW_DATA(cacheline, pagealigned, inittask) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
.data : AT(ADDR(.data) - LOAD_OFFSET) { \
|
||||
INIT_TASK_DATA(inittask) \
|
||||
|
|
Загрузка…
Ссылка в новой задаче