aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host/machine_info_linux.go
Commit message (Collapse)AuthorAgeFilesLines
* all: support exclude globs in descriptorJoey Jiao2021-06-021-2/+55
|
* all: minor glob fixesDmitry Vyukov2021-05-261-3/+2
|
* pkg/compiler: add glob typeJoey Jiaojg2021-05-261-0/+14
| | | | | | | | | | | | | | | | | | | | * all: add new typename dirname The current way to check files under sysfs or proc is: - define a string to represent each file - open the file - pass the fd to write / read / close The issues above are: - Need to know what file present on target device - Need to write openat for each file With dirname added, which will open one file in the directory randomly and then pass the fd to write/read/close. * all: use typename glob to match filename Fixes #481
* pkg/host: refactor getModulesInfoDmitry Vyukov2021-03-181-5/+5
| | | | | Use strconv.ParseUint instead of Sscanf, it's simpler for parsing of a single number.
* all: support coverage of kernel modulesJoey Jiao2021-03-181-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | The PCs returned for dynamic loaded module (DLKM) is not parsed in coverage page, these PCs are dropped. The commit is to use DLKM modules' load address and symbol file to restore the PC and show coverage data of DLKM. Introduced new config module_obj to specify module directories. Example of config: "module_obj": [ "module_path1" "module_path2" ] For linux target, before Manager.Connect run, load addresses are getting from /proc/modules in order to group PCs into modules. And so, if modules are under kernel_obj or module_obj dir, their addresses and paths can be generated automatically. kernel_obj is searched before module_obj dir and the first found ko object is always used. Also note that kaslr needs to be disabled.
* pkg/host: move machine info functionality from syz-fuzzerDmitry Vyukov2020-09-121-0/+122
It's better to keep functionality in packages rather than in main. It makes it reusable and better organized. Move machine info functionality to pkg/host and do some cosmetic refactoring.