-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add memfd shmem backend #2647
Add memfd shmem backend #2647
Conversation
The advantage of using memfd over default POSIX shared memory is automatic cleanup when killing fuzzer instances. This prevents the accumulation of leftover shm files. On android, memfd is the designated successor to ashmem and attempts have been made (but reverted) to remove ashmem. Still, supporting on the successor future-proofs libafl. |
Should we switch the default Android to be Memfd? |
I would refrain from switching to memfd on android, because the afl-compiler-rt.o.c is not yet compatible. |
Alternatively, memfd could be made default on android but forkserver examples use ashmem instead. |
That's already the case; In many cases Forkserver uses LibAFL/libafl_sugar/src/forkserver.rs Line 113 in 89cff63
(not sure if this even works on Android? :D ) |
We'll release 0.14 soon, anything left to do here? |
I converted this to a draft because there seems to be an issue with memfd based on nix (instead of syscall from libc). I'll investigate later today. |
Else we can also go with the syscall method for now if nyx is acting up :) |
b1c4643
to
af8fcc0
Compare
Actually, using nix instead of syscall works if one understands the difference between |
Merging, but we may want to |
memfd backed shmprovider. Tested on android with ForkserverExecutor but should be usable on other Linux flavors. Minor caveat: Android 7 and older as well as old linux kernel (AFAICT < 3.17) are unsupported.