1
2
3
4
5
6
7
8
9#ifndef _ASMARM_SET_MEMORY_H
10#define _ASMARM_SET_MEMORY_H
11
12#ifdef CONFIG_MMU
13int set_memory_ro(unsigned long addr, int numpages);
14int set_memory_rw(unsigned long addr, int numpages);
15int set_memory_x(unsigned long addr, int numpages);
16int set_memory_nx(unsigned long addr, int numpages);
17#else
18static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
19static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
20static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
21static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
22#endif
23
24#ifdef CONFIG_STRICT_KERNEL_RWX
25void set_kernel_text_rw(void);
26void set_kernel_text_ro(void);
27#else
28static inline void set_kernel_text_rw(void) { }
29static inline void set_kernel_text_ro(void) { }
30#endif
31
32#endif
33