File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ config RISCV
16
16
select OF_EARLY_FLATTREE
17
17
select OF_IRQ
18
18
select ARCH_HAS_BINFMT_FLAT
19
+ select ARCH_HAS_DEBUG_WX
19
20
select ARCH_WANT_FRAME_POINTERS
20
21
select CLONE_BACKWARDS
21
22
select COMMON_CLK
Original file line number Diff line number Diff line change 8
8
9
9
void ptdump_check_wx (void );
10
10
11
+ #ifdef CONFIG_DEBUG_WX
12
+ static inline void debug_checkwx (void )
13
+ {
14
+ ptdump_check_wx ();
15
+ }
16
+ #else
17
+ static inline void debug_checkwx (void )
18
+ {
19
+ }
20
+ #endif
21
+
11
22
#endif /* _ASM_RISCV_PTDUMP_H */
Original file line number Diff line number Diff line change 19
19
#include <asm/sections.h>
20
20
#include <asm/pgtable.h>
21
21
#include <asm/io.h>
22
+ #include <asm/ptdump.h>
22
23
23
24
#include "../kernel/head.h"
24
25
@@ -514,6 +515,8 @@ void mark_rodata_ro(void)
514
515
set_memory_ro (rodata_start , (data_start - rodata_start ) >> PAGE_SHIFT );
515
516
set_memory_nx (rodata_start , (data_start - rodata_start ) >> PAGE_SHIFT );
516
517
set_memory_nx (data_start , (max_low - data_start ) >> PAGE_SHIFT );
518
+
519
+ debug_checkwx ();
517
520
}
518
521
#endif
519
522
You can’t perform that action at this time.
0 commit comments