一個視窗輸入cat /proc/kmsg,等著看輸出;
一個視窗負責卸載、編譯、載入kprobe module;
一個文字編輯程式改kprobe要監視的function。
如果不是kprobe的資料結構必須靜態初始化,否則用module_param動態更改參數可以更快。
另外,用
find . | xargs grep '(struct input_handle *' | grep event
找出可能跑去註冊的event函式,結果如下:
fatsoft0415:drivers mac$ find . | xargs grep '(struct input_handle *' | grep event./char/keyboard.c:static void kbd_event(struct input_handle *handle, unsigned int event_type,
./input/apm-power.c:static void apmpower_event(struct input_handle *handle, unsigned int type,
./input/evbug.c:static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
./input/evdev.c:static void evdev_event(struct input_handle *handle,
./input/input.c:void input_inject_event(struct input_handle *handle,
./input/joydev.c:static void joydev_event(struct input_handle *handle,
./input/mousedev.c:static void mousedev_event(struct input_handle *handle,
fatsoft0415:drivers mac$
實驗結果是,kbd_event與evdev_event有反應,而且evdev_event對滑鼠和鍵盤都有反應。
偏偏mousedev_event一點動靜都沒有,不論是用multi-touch軌跡板還是外接USB滑鼠都一樣,關掉VirtualBox的滑鼠整合也一樣。這已經是在沒有裝GuestAddition的情況下了。
阿阿阿阿~~~~
-----
話說我發現有裝guestaddition的kernel,用lsmod看會找到3個跟vbox有關的module。其中有兩個說是在使用中,不能卸載呢。
沒有留言:
張貼留言