ARM: 9072/1: mm: remove set_kernel_text_r[ow]()
After commit 5a735583b7 ("arm/ftrace: Use __patch_text()"), the last
and only user of these functions has gone, remove them.
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
committed by
Russell King
parent
32e9a0d5ff
commit
aefdd4383b
@@ -18,12 +18,4 @@ static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
|
|||||||
static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
|
static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_STRICT_KERNEL_RWX
|
|
||||||
void set_kernel_text_rw(void);
|
|
||||||
void set_kernel_text_ro(void);
|
|
||||||
#else
|
|
||||||
static inline void set_kernel_text_rw(void) { }
|
|
||||||
static inline void set_kernel_text_ro(void) { }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -487,33 +487,12 @@ static int __mark_rodata_ro(void *unused)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int kernel_set_to_readonly __read_mostly;
|
|
||||||
|
|
||||||
void mark_rodata_ro(void)
|
void mark_rodata_ro(void)
|
||||||
{
|
{
|
||||||
kernel_set_to_readonly = 1;
|
|
||||||
stop_machine(__mark_rodata_ro, NULL, NULL);
|
stop_machine(__mark_rodata_ro, NULL, NULL);
|
||||||
debug_checkwx();
|
debug_checkwx();
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_kernel_text_rw(void)
|
|
||||||
{
|
|
||||||
if (!kernel_set_to_readonly)
|
|
||||||
return;
|
|
||||||
|
|
||||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), false,
|
|
||||||
current->active_mm);
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_kernel_text_ro(void)
|
|
||||||
{
|
|
||||||
if (!kernel_set_to_readonly)
|
|
||||||
return;
|
|
||||||
|
|
||||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), true,
|
|
||||||
current->active_mm);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline void fix_kernmem_perms(void) { }
|
static inline void fix_kernmem_perms(void) { }
|
||||||
#endif /* CONFIG_STRICT_KERNEL_RWX */
|
#endif /* CONFIG_STRICT_KERNEL_RWX */
|
||||||
|
|||||||
Reference in New Issue
Block a user