diff options
| author | Joey Jiao <joeyjiaojg@gmail.com> | 2021-03-02 09:31:32 +0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-03-05 20:05:43 +0100 |
| commit | 69a06ca2b532ff4021a43fdead4e2ac1452a44c0 (patch) | |
| tree | 3ed7ff70026f51ff0a8f980b5967daeb30bcad71 /vm | |
| parent | 800618b02f4f840756eb4218603a313113f94f05 (diff) | |
all: add KernelModule cfg to show DLKM coverage
PC returned for dynamic loaded module (DLKM) is not
parsed in coverage page.
So the commit is to use DLKM modules' load address
to restore the PC and show coverage data of DLKM.
As the load address is written in cfg file, so kaslr
needs to be disabled.
And for linux target, load address is getting from
/proc/modules during instance setup.
For either manual or auto address setting case,
name and path are needed in config kernel_modules, where
name is module name on target.
path is module unstripped object path on host.
addr is decimal value of module load address on target.
Example of config:
"kernel_modules": [
{
"name": "nf_nat",
"path": "/usr/src/linux-source/net/netfilter/nf_nat.ko",
"addr": 18446744072637911040
}
]
Diffstat (limited to 'vm')
| -rw-r--r-- | vm/qemu/qemu.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go index 5ada86950..a7ee82926 100644 --- a/vm/qemu/qemu.go +++ b/vm/qemu/qemu.go @@ -598,6 +598,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin } } else { args = []string{"ssh"} + args = append(args, "-q") args = append(args, sshArgs...) args = append(args, inst.sshuser+"@localhost", "cd "+inst.targetDir()+" && "+command) } |
