From d20ee9bd98f1a0e98c2d02da825acf3628562e8d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 3 Dec 2019 11:34:27 +0100 Subject: tools: add fops_probe utility fops_probe utility helps to understand what file_operations callbacks are attached to a particular file. Requries KCOV and KALLSYMS. Build with: g++ tools/fops_probe/fops_probe.cc -Wall -static -o fops_probe Then copy the binary to target machine and run as: ./fops_probe /dev/fb0 You should see output similar to: ffffffff81bcccb9 vfs_read ................ ffffffff83af85c3 fb_read ffffffff83b52af5 cirrusfb_sync ffffffff81bcd219 vfs_write ................ ffffffff83af7fe2 fb_write ffffffff83b52af5 cirrusfb_sync ffffffff81c1b745 do_vfs_ioctl ffffffff83af7ea9 fb_ioctl ffffffff81a4ea44 do_mmap ................ ffffffff83af716c fb_mmap which allows to understand what callbacks are associated with /dev/fb0. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4f26bcab8..aeb3c4ace 100644 --- a/Makefile +++ b/Makefile @@ -219,7 +219,8 @@ format_go: $(GO) fmt ./... format_cpp: - clang-format --style=file -i executor/*.cc executor/*.h tools/kcovtrace/*.c + clang-format --style=file -i executor/*.cc executor/*.h \ + tools/kcovtrace/*.c tools/kcovfuzzer/*.c tools/fops_probe/*.cc format_sys: bin/syz-fmt bin/syz-fmt all -- cgit mrf-deployment