Skip to content

Commit

Permalink
vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Heiko Carstens <[email protected]> # s390
Acked-by: Geert Uytterhoeven <[email protected]> # m68k
Cc: Andy Lutomirski <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Michael Ellerman <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Rick Edgecombe <[email protected]>
Cc: Segher Boessenkool <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: x86-ml <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
kees authored and suryasaimadhu committed Nov 4, 2019
1 parent 93240b3 commit c917404
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 = .;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/vmlinux-xip.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/csky/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/h8300/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/hexagon/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 = .;

Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/vmlinux-nommu.lds
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/vmlinux-std.lds
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/vmlinux-sun3.lds
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion arch/nds32/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/nios2/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/openrisc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 = .;

Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 = .;
Expand Down
2 changes: 1 addition & 1 deletion arch/unicore32/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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: */
Expand Down
4 changes: 2 additions & 2 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* _sdata = .;
* RO_DATA(PAGE_SIZE)
* RW_DATA_SECTION(...)
* RW_DATA(...)
* _edata = .;
*
* EXCEPTION_TABLE(...)
Expand Down Expand Up @@ -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) \
Expand Down

0 comments on commit c917404

Please sign in to comment.