mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Merge branch 'v4.4/topic/ro-vdso' into linux-linaro-lsk-v4.4
This commit is contained in:
@@ -62,6 +62,9 @@ config PCI_QUIRKS
|
||||
config ARCH_SUPPORTS_UPROBES
|
||||
def_bool y
|
||||
|
||||
config DEBUG_RODATA
|
||||
def_bool y
|
||||
|
||||
config S390
|
||||
def_bool y
|
||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||
|
||||
@@ -109,6 +109,13 @@ void __init paging_init(void)
|
||||
free_area_init_nodes(max_zone_pfns);
|
||||
}
|
||||
|
||||
void mark_rodata_ro(void)
|
||||
{
|
||||
/* Text and rodata are already protected. Nothing to do here. */
|
||||
pr_info("Write protecting the kernel read-only data: %luk\n",
|
||||
((unsigned long)&_eshared - (unsigned long)&_stext) >> 10);
|
||||
}
|
||||
|
||||
void __init mem_init(void)
|
||||
{
|
||||
if (MACHINE_HAS_TLB_LC)
|
||||
@@ -127,9 +134,6 @@ void __init mem_init(void)
|
||||
setup_zero_pages(); /* Setup zeroed pages. */
|
||||
|
||||
mem_init_print_info(NULL);
|
||||
printk("Write protected kernel read-only data: %#lx - %#lx\n",
|
||||
(unsigned long)&_stext,
|
||||
PFN_ALIGN((unsigned long)&_eshared) - 1);
|
||||
}
|
||||
|
||||
void free_initmem(void)
|
||||
|
||||
@@ -248,6 +248,14 @@
|
||||
. = ALIGN(align); \
|
||||
*(.data..init_task)
|
||||
|
||||
/*
|
||||
* Allow architectures to handle ro_after_init data on their
|
||||
* own by defining an empty RO_AFTER_INIT_DATA.
|
||||
*/
|
||||
#ifndef RO_AFTER_INIT_DATA
|
||||
#define RO_AFTER_INIT_DATA *(.data..ro_after_init)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Read only Data
|
||||
*/
|
||||
@@ -256,7 +264,7 @@
|
||||
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start_rodata) = .; \
|
||||
*(.rodata) *(.rodata.*) \
|
||||
*(.data..ro_after_init) /* Read only after init */ \
|
||||
RO_AFTER_INIT_DATA /* Read only after init */ \
|
||||
*(__vermagic) /* Kernel version magic */ \
|
||||
. = ALIGN(8); \
|
||||
VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .; \
|
||||
|
||||
Reference in New Issue
Block a user