-
Notifications
You must be signed in to change notification settings - Fork 562
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
i#4719 qemu: Add xarch_root option for QEMU #4726
Conversation
Adds a new option -xarch_root which sets a path that is prepended to: + The application executable's interpreter, if the original does not exist. + SYS_openat paths, if the original does not exist. + System paths ued for loading private libraries: here the prefix is prepended before checking whether the original exists. Splits dynamorio_app_init() into two pieces in order to have the options set up at the time the loader maps the interpreter, while avoiding ordering problems with the rest of the initialization. The new option also auto-sets -ignore_takeover_timeout for convenience, as that is always needed when running under QEMU. Manually tested in cross-compile AArchXX setups on a Debian system. Test suite integration is forthcoming. Issue: #4719
…nitialized to false in standalone_exit
The failure is the low4G test. The problem is that the heap_in_lower_4GB option is now set during interp mapping, and it's used in os_map_file to add MAP_32BIT. DR's vmm is taking up a bunch of the low 2G and it seems the kernel won't put ld.so below it:
Not sure of the cleanest fix...avoid the MAP_32BIT just for this mapping via some special flag or sthg? |
MAP_FILE_APP to avoid MAP_32BIT on the app interpreter when -heap_in_lower_4GB is set, now that the options are parsed before we map the interpreter.
There are enough additions since the review it may be worth another look. |
Avoids printing of an internal warning during early initialization for single-bitwidth setups regardless of -stderr_mask by moving options init even earlier. To avoid DR heap init messing up the app's brk setup, moves heap init out of the options init and into the later half. This undoes the early heap init from PR #4726, which is worked around by switching to a stack buffer for -arch_init. This seems safer in any case, delaying heap init and client lib loads until after the app's interpreter is loaded. Issue: #4719
Avoids printing of an internal warning during early initialization for single-bitwidth setups regardless of -stderr_mask by moving options init even earlier. To avoid DR heap init messing up the app's brk setup, moves heap init out of the options init and into the later half. This undoes the early heap init from PR #4726, which is worked around by switching to a stack buffer for -arch_init. This seems safer in any case, delaying heap init and client lib loads until after the app's interpreter is loaded. Moves the 1config file deletion from d_r_config_init() to -config_heap_init(), after any potential reload_dynamorio(). Issue: #4719
Adds a new option -xarch_root which sets a path that is prepended to:
before checking whether the original exists.
Splits dynamorio_app_init() into two pieces in order to have the
options set up at the time the loader maps the interpreter, while
avoiding ordering problems with the rest of the initialization.
The new option also auto-sets -ignore_takeover_timeout for
convenience, as that is always needed when running under QEMU.
Manually tested in cross-compile AArchXX setups on a Debian system.
Test suite integration is forthcoming.
Issue: #4719