L4Sys: termination shortcuts
Add two new breakpoints to L4Sys experiment that allow detecting that execution terminated with an error: vga_console_blink() is called by the kernel if JDB was entered (meaning we are hanging, e.g., due to an assertion); also longjmp() is only used by PF handling code after no valid page fault handling could be performed Change-Id: Ice61039c4bd07815a316bbc0bdb39f3483d9a1da
This commit is contained in:
@ -46,13 +46,22 @@ function BuildNRun {
|
|||||||
# backup experiment config
|
# backup experiment config
|
||||||
cp $CFG $BAK
|
cp $CFG $BAK
|
||||||
|
|
||||||
|
blink_addr=$(nm -C fiasco.image| grep blink | cut -d\ -f 1)
|
||||||
|
longjmp_addr=$(nm -C fiasco.image| grep longjmp | cut -d\ -f 1)
|
||||||
|
|
||||||
#echo -e "\033[35;1m[$(date)] ================== Step 0: Getting CR3 =================\033[0m"
|
#echo -e "\033[35;1m[$(date)] ================== Step 0: Getting CR3 =================\033[0m"
|
||||||
#cat $BAK | sed -e 's/PREPARATION_STEP.*/PREPARATION_STEP 4/' >$CFG
|
#cat $BAK | sed -e 's/PREPARATION_STEP.*/PREPARATION_STEP 4/' >$CFG
|
||||||
#buildfail
|
#buildfail
|
||||||
#cr3=`$FAIL_CMD -f bochsrc-bd 2>/dev/null | grep CR3 | sed -e 's/ //g' | cut -d\= -f 2`
|
#cr3=`$FAIL_CMD -f bochsrc-bd 2>/dev/null | grep CR3 | sed -e 's/ //g' | cut -d\= -f 2`
|
||||||
#echo \#defne L4SYS_ADDRESS_SPACE 0x$cr3
|
#echo \#defne L4SYS_ADDRESS_SPACE 0x$cr3
|
||||||
#cat $BAK | sed -e "s/L4SYS_ADDRESS_SPACE .*/L4SYS_ADDRESS_SPACE 0x$cr3/" >$CFG
|
#cat $BAK | sed -e "s/L4SYS_ADDRESS_SPACE .*/L4SYS_ADDRESS_SPACE 0x$cr3/" >$CFG
|
||||||
#mv $CFG $BAK
|
|
||||||
|
mv $CFG $BAK
|
||||||
|
|
||||||
|
cat $BAK | sed -e "s/L4SYS_BREAK_BLINK .*/L4SYS_BREAK_BLINK 0x$blink_addr/" >$CFG
|
||||||
|
mv $CFG $BAK
|
||||||
|
cat $BAK | sed -e "s/L4SYS_BREAK_LONGJMP .*/L4SYS_BREAK_LONGJMP 0x$longjmp_addr/" >$CFG
|
||||||
|
mv $CFG $BAK
|
||||||
|
|
||||||
echo -e "\033[35;1m[$(date)] ================== Step 1: Generating Snapshot =================\033[0m"
|
echo -e "\033[35;1m[$(date)] ================== Step 1: Generating Snapshot =================\033[0m"
|
||||||
cat $BAK | sed -e 's/PREPARATION_STEP.*/PREPARATION_STEP 1/' >$CFG
|
cat $BAK | sed -e 's/PREPARATION_STEP.*/PREPARATION_STEP 1/' >$CFG
|
||||||
|
|||||||
@ -7,22 +7,22 @@
|
|||||||
// the bounds of the program (space, instructions and time)
|
// the bounds of the program (space, instructions and time)
|
||||||
// client
|
// client
|
||||||
#define L4SYS_ADDRESS_SPACE 0x1fd4c000
|
#define L4SYS_ADDRESS_SPACE 0x1fd4c000
|
||||||
// master
|
// server
|
||||||
|
#define L4SYS_ADDRESS_SPACE_TRACE L4SYS_ADDRESS_SPACE
|
||||||
//#define L4SYS_ADDRESS_SPACE_TRACE 0x1fd4c000
|
//#define L4SYS_ADDRESS_SPACE_TRACE 0x1fd4c000
|
||||||
// vcpu task
|
|
||||||
#define L4SYS_ADDRESS_SPACE_TRACE 0x1fd5a000
|
|
||||||
//#define L4SYS_ADDRESS_SPACE_TRACE L4SYS_ADDRESS_SPACE
|
|
||||||
|
|
||||||
// FUNC_{ENTRY,EXIT} specifies the range that needs to
|
// FUNC_{ENTRY,EXIT} specifies the range that needs to
|
||||||
// be captured to log program output properly
|
// be captured to log program output properly
|
||||||
#define L4SYS_FUNC_ENTRY 0x60002052
|
#define L4SYS_FUNC_ENTRY 0x20000220
|
||||||
//#define L4SYS_FUNC_ENTRY 0x10000
|
#define L4SYS_FUNC_EXIT 0x20000216
|
||||||
#define L4SYS_FUNC_EXIT 0x600020ae
|
|
||||||
// FILTER_{ENTRY,EXIT} specifies the range that injections
|
// FILTER_{ENTRY,EXIT} specifies the range that injections
|
||||||
// should be carried out on (should be a subset of the above)
|
// should be carried out on (should be a subset of the above)
|
||||||
// and only works with FILTER_INSTRUCTIONS turned on
|
// and only works with FILTER_INSTRUCTIONS turned on
|
||||||
#define L4SYS_FILTER_ENTRY 0x60002067
|
#define L4SYS_FILTER_ENTRY 0x200002ba
|
||||||
#define L4SYS_FILTER_EXIT 0x60002075
|
#define L4SYS_FILTER_EXIT 0x20000444
|
||||||
|
|
||||||
|
#define L4SYS_BREAK_BLINK 0xf004b800
|
||||||
|
#define L4SYS_BREAK_LONGJMP 0xf004c88e
|
||||||
|
|
||||||
// select instruction filtering
|
// select instruction filtering
|
||||||
// XXX: this should be always on and the code should be
|
// XXX: this should be always on and the code should be
|
||||||
@ -31,8 +31,8 @@
|
|||||||
#define L4SYS_FILTER_INSTRUCTIONS 1
|
#define L4SYS_FILTER_INSTRUCTIONS 1
|
||||||
|
|
||||||
// kernel: 2377547, userland: 79405472
|
// kernel: 2377547, userland: 79405472
|
||||||
#define L4SYS_NUMINSTR 141
|
#define L4SYS_NUMINSTR 27025
|
||||||
#define L4SYS_TOTINSTR 154205
|
#define L4SYS_TOTINSTR 189122
|
||||||
#define L4SYS_BOCHS_IPS 5000000
|
#define L4SYS_BOCHS_IPS 5000000
|
||||||
|
|
||||||
// several file names used
|
// several file names used
|
||||||
|
|||||||
Reference in New Issue
Block a user