Fix for LKDTM MEM_SWAPOUT crashpoint
PATCH 1/1 Fix for LKDTM MEM_SWAPOUT crashpoint
Hi,
The MEM_SWAPOUT crashpoint in LKDTM could be broken as some compilers inline the call to shrink_page_list() and symbol lookup for this function name fails. Replacing it with the function shrink_inactive_list(), which is the only
function calling shrink_page_list().
Regards,
Signature · 4 lines
Ankita Garg ([email protected]) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India
o Fix for MEM_SWAPOUT crashpoint as some compilers inline the call to shrink_page_list() and symbol lookup for this function name fails.
Signed-off-by Ankita Garg <[email protected]>
--- lkdtm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/misc/lkdtm.c +3 -4
@@ -157,8 +157,7 @@struct scan_control ; -unsigned long jp_shrink_page_list (struct list_head *page_list, -struct scan_control *sc) +unsigned long jp_shrink_inactive_list (unsigned long max_scan,struct zone *zone,struct scan_control *sc) {lkdtm_handler ();jprobe_return ();
@@ -297,8 +296,8 @@ lkdtm.entry = (kprobe_opcode_t *) jp_ll_rw_block;break ;case MEM_SWAPOUT : - lkdtm.kp.symbol_name ="shrink_page_list" ; - lkdtm.entry = (kprobe_opcode_t *) jp_shrink_page_list; + lkdtm.kp.symbol_name ="shrink_inactive_list" ; + lkdtm.entry = (kprobe_opcode_t *) jp_shrink_inactive_list;break ;case TIMERADD : lkdtm.kp.symbol_name ="hrtimer_start" ;
Hi,
Re-posting the patch to fix up the MEM_SWAPOUT crashpoint (after fixing a typo).
o Fix for MEM_SWAPOUT crashpoint as some compilers inline the call to shrink_page_list() and symbol lookup for this function name fails.
Signed-off-by Ankita Garg <[email protected]>
--- lkdtm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/misc/lkdtm.c +4 -4
@@ -157,8 +157,8 @@struct scan_control ; -unsigned long jp_shrink_page_list (struct list_head *page_list, -struct scan_control *sc) +unsigned long jp_shrink_inactive_list (unsigned long max_scan, +struct zone *zone,struct scan_control *sc) {lkdtm_handler ();jprobe_return ();
@@ -297,8 +297,8 @@ lkdtm.entry = (kprobe_opcode_t *) jp_ll_rw_block;break ;case MEM_SWAPOUT : - lkdtm.kp.symbol_name ="shrink_page_list" ; - lkdtm.entry = (kprobe_opcode_t *) jp_shrink_page_list; + lkdtm.kp.symbol_name ="shrink_inactive_list" ; + lkdtm.entry = (kprobe_opcode_t *) jp_shrink_inactive_list;break ;case TIMERADD : lkdtm.kp.symbol_name ="hrtimer_start" ;
Regards,
Signature · 4 lines
Ankita Garg ([email protected]) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India