Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 220f229a authored by Shiraz Hashim's avatar Shiraz Hashim
Browse files

Revert "arm: Add support for KERNEL_TEXT_RDONLY"



This reverts commit 8802ec9d ("arm: Add support for
KERNEL_TEXT_RDONLY") which is going to be replaced by
upstream CONFIG_DEBUG_RODATA support.

Change-Id: I4a7b1437f4bac55e1c3223edcea4ce670103b84f
Signed-off-by: default avatarShiraz Hashim <shashim@codeaurora.org>
parent 2d0f0840
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -75,19 +75,6 @@ config DEBUG_USER
	      8 - SIGSEGV faults
	     16 - SIGBUS faults

config KERNEL_TEXT_RDONLY
	bool "Set kernel text section pages as read only"
	depends on FREE_PAGES_RDONLY
	help
	  The kernel text pages are always mapped in the kernel.
	  This means that anyone can write to the page if they have
	  the address. Enable this option to mark the kernel text pages
	  as read only to trigger a fault if any code attempts to write
	  to a page part of the kernel text section. This may have a
	  performance impact.

	  If unsure, say N.

# These options are only for real kernel hackers who want to get their hands dirty.
config DEBUG_LL
	bool "Kernel low-level debugging functions (read help!)"
+0 −7
Original line number Diff line number Diff line
@@ -510,11 +510,4 @@ int set_memory_nx(unsigned long addr, int numpages);

void flush_uprobe_xol_access(struct page *page, unsigned long uaddr,
			     void *kaddr, unsigned long len);

#ifdef CONFIG_KERNEL_TEXT_RDONLY
void set_kernel_text_ro(void);
#else
static inline void set_kernel_text_ro(void) { }
#endif

#endif
+0 −11
Original line number Diff line number Diff line
@@ -654,14 +654,3 @@ static int __init keepinitrd_setup(char *__unused)

__setup("keepinitrd", keepinitrd_setup);
#endif

#ifdef CONFIG_KERNEL_TEXT_RDONLY
void set_kernel_text_ro(void)
{
	unsigned long start = PFN_ALIGN(_stext);
	unsigned long end = PFN_ALIGN(_etext);

	/* Set the kernel identity mapping for text RO. */
	set_memory_ro(start, (end - start) >> PAGE_SHIFT);
}
#endif