Closed rmalmain closed 4 weeks ago
good job
Il ven 9 ago 2024, 13:51 Romain Malmain @.***> ha scritto:
- Add cpu_run pre/post exec hooks, to hook the cpu just before / after it runs target code.
- Refactor hooks to separate them in different files
- Remove most extern variables
- Reduce the amount of extra code in QEMU
- Add clang-format script
You can view, comment on, or merge this pull request online at:
https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82 Commit Summary
- 8f61fad https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/commits/8f61fadbec181bfcbd305ba92a86a41376a476f7 Add pre/post cpu_run hooks + Refactoring
File Changes
(44 files https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files)
- M accel/kvm/kvm-all.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-00c49905e0ca7ae71c99a8fbe21b9804feabc217241241409b29d26affa8ae21 (18)
- M accel/tcg/translate-all.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-33efcf96522a43f6f5041f7b3a045a7c508ca5eb5a06ccfc6a2e208bedf0f422 (61)
- M accel/tcg/translator.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-b90d101c57361cc34c95d83239f98edf367ae1697a1c0ecba2395bf3af716b27 (45)
- M include/libafl/exit.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-5c946bc4e9ec83e9bda6f3326b676b7c4ba1dba9ec45153eec4fcde84212b18c (15)
- M include/libafl/hook.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-cd9c2d8da71f011ad8cf8b67ce9b48074ff2a469f9cc0e8d4dde57ffdf3ea1ca (258)
- A include/libafl/hooks/cpu_run.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-cf46f6a52af34196e21fca54f22f33e8a763a41f14c6f3420420c92ba9c0e7c4 (36)
- A include/libafl/hooks/syscall.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-16b6b7d5a695bf95cb0a82340616eba811ad264bc59a89025734261b7672829e (76)
- A include/libafl/hooks/tcg/backdoor.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-0d74d0aa8854e0c23d4d1e19331b1b54a80477fae714f13d892286fcc5506d3a (38)
- A include/libafl/hooks/tcg/block.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-990343f7706ee1c5bcb501fca18a9a114e1ad0d408367c9eb4c8f61a153c7099 (43)
- A include/libafl/hooks/tcg/cmp.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-907590654697c7be356e44b1eb53d42b7b589f3557c1f62b7d6a6f7520638abd (39)
- A include/libafl/hooks/tcg/edge.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-8eb4f7faca654bb10dfbd42c95ccb2696f3dc80976cd8ab4e60ad13259fb0d62 (48)
- A include/libafl/hooks/tcg/instruction.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-741fd736de05e52d0f2d0a8accb3601b072ad24d57022bd068ca86f6390ed966 (43)
- A include/libafl/hooks/tcg/read_write.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-449afbc6efab90f4bbcabd3a12d37dba1ae5b101ca1432b0c76fe38ef6971337 (60)
- A include/libafl/hooks/thread.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-d93b5aed7890bdf2af8312aadc430ef9d54db0336d41d565f40fe12eb4649353 (31)
- M include/libafl/syx-misc.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-de256f1e6020a5787d24b7c90a336df3eebaae99ec6a44942bf82bb9c888d9cc (14)
- M include/libafl/syx-snapshot/channel-buffer-writeback.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-4e91d080f0749697bef42c0e11e109ccf2926fbc712a8f16872cffcad325565e (15)
- M include/libafl/syx-snapshot/device-save.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-0e8ee4dbf4027b752ee19feac4e65f107567e43192c7e7360924ed2bb7c9f80a (2)
- M include/libafl/syx-snapshot/syx-cow-cache.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-0da166d5c0156ed1369a0cef70869f713e85868e5275ac6038b9ef668238cd67 (18)
- M include/libafl/syx-snapshot/syx-snapshot.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-489733bc9974250971f62075c74afba2cb974175aa8b891274bb8e33f1cdc224 (53)
- M include/libafl/user.h https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-1ff89569864cc2d5cac846ed08e95e1201aff21cba7833b9d050f600351fbcde (10)
- A libafl/.clang-format https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-84ae9757c72e963be091a6c7bc1816201f6746c35ce1951680f9d1662364f659 (9)
- M libafl/exit.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-2f250da79f04bae862716d470b810d90d19aa9663c4faecf08bfda524b5f68ab (44)
- M libafl/hook.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-ec7176cf090a4d113e7db3e26503e5c2f0e837431e7b7e4e63c6c1aaf8cee655 (693)
- A libafl/hooks/cpu_run.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-8c2d2a13f9a56db8aa65fefcc8bfb8c8a935a41abddd30c64059b10f23180ca9 (41)
- A libafl/hooks/syscall.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-3f368b465bee31bd55ce35f8f2b92b8376a19c4ca0ede6c996341110cbb2c3bb (89)
- A libafl/hooks/tcg/backdoor.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-8b413de8f345b7d04f9c5caac753ee6e6a565fef47d1575d91696607d224d20f (47)
- A libafl/hooks/tcg/block.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-d294f34f7303205727b8e6547b92ec95fe8fbde1d1db2c9ee5b1f24dd89bddf0 (89)
- A libafl/hooks/tcg/cmp.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-bfae2cc7b57f89c1870eccc78c5bbbd1f87881ee0cd8612a93bdfb216a1eceb3 (129)
- A libafl/hooks/tcg/edge.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-f7845686b11192be41ac97e0bd01be77992aca21c5491129204fd08a85efd38e (89)
- A libafl/hooks/tcg/instruction.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-a38285bd61f919ee00bbdf27f829cd338c824d020c332abf3160b5f684d3bae9 (133)
- A libafl/hooks/tcg/read_write.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-40433dce25143a074a89ade54a0455163f107ca2a1a1994c8c1300c8ff414b12 (240)
- A libafl/hooks/thread.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-1eefc1c343984eff9ca43e45f1479c2ad30c89a293358908d9e793a57f7ad2e8 (47)
- M libafl/jit.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-2647a315689955b42ed5697ed44c8d357aed68a6179e570e74e973fc014aae14 (27)
- M libafl/meson.build https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-7857fecb1f69284b663479eda4052d8f57d4dfd3eec3da96c21efbfd578f8325 (40)
- M libafl/syx-snapshot/channel-buffer-writeback.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-bc9442f5e1bef946bd211d5fa3c86ff570b9c0bad0efbdc1830c19144e3357c2 (172)
- M libafl/syx-snapshot/device-save.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-669b275f189c81fa83159613f584e42ec66e35256185a1d94aa1be833b3bfff7 (85)
- M libafl/syx-snapshot/syx-cow-cache.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-5c8670a60f41f01a33f11eb5e659c0483bd04d90ee715bc457a59cd7367b8a6b (129)
- M libafl/syx-snapshot/syx-snapshot.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-f12faf68f6f7639d205864c0a23d2a1a280c1bc0719a546b99f9addd483b4c2b (498)
- M libafl/utils.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-33d9623aa7244b0a0c4f036db4f2fe8cd71b01bcbd201914e9fc5a68e4c80537 (10)
- M linux-user/signal.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-6c72ad91f06600e6e3fe07cd40edb39991cff32705419b1d69e4264a91144312 (3)
- M linux-user/syscall.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-5e14aca199ae1c42cf2645b1886b8c996a6ef61567dca87930fcc3903d156b99 (58)
- A scripts/libafl-format.sh https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-1d4bd646eecd93f7f2afef327639b7cda61c537af36c8dbd017277eca042a953 (15)
- M system/cpus.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-57c414059eed5e0297271c7e8d006b609321e1d790e29ff26a6505bf10980e36 (23)
- M target/arm/machine.c https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82/files#diff-d2061e7e70301a7c349590c0c23bc283e337acef5a4c40897830373f93a52293 (12)
Patch Links:
- https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82.patch
- https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82.diff
— Reply to this email directly, view it on GitHub https://github.com/AFLplusplus/qemu-libafl-bridge/pull/82, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3LJ6RHY2ZDDAWF3BTKXPLZQSUNTAVCNFSM6AAAAABMIKF4U2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2TONZUHE2TAMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>