305b152325
Implement write protection for kernel modules text and read-only data sections by implementing set_memory_[ro|rw] on s390. Since s390 has no execute bit in the pte's NX is not supported. set_memory_[ro|rw] will only work on normal pages and not on large pages, so in case a large page should be modified bail out with a warning. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 lines
434 B
C
15 lines
434 B
C
#ifndef _S390_CACHEFLUSH_H
|
|
#define _S390_CACHEFLUSH_H
|
|
|
|
/* Caches aren't brain-dead on the s390. */
|
|
#include <asm-generic/cacheflush.h>
|
|
|
|
#ifdef CONFIG_DEBUG_PAGEALLOC
|
|
void kernel_map_pages(struct page *page, int numpages, int enable);
|
|
#endif
|
|
|
|
int set_memory_ro(unsigned long addr, int numpages);
|
|
int set_memory_rw(unsigned long addr, int numpages);
|
|
int set_memory_nx(unsigned long addr, int numpages);
|
|
|
|
#endif /* _S390_CACHEFLUSH_H */
|