aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-cover
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2024-02-21 14:02:01 +0100
committerAlexander Potapenko <glider@google.com>2024-02-22 15:35:18 +0000
commit8d446f1521b580230a60c9ae228bf0c26312c80b (patch)
tree0090f8a10b15f18c6adc33ecc2ab56a5717d9f92 /tools/syz-cover
parent971a0f14c5cf6379d1a1fde7d26b853293bced2b (diff)
tools/syz-cover: do not accept modules info from /proc/modules
Addresses from /proc/modules have little to do with the addresses of modules' text sections. Instead of trying to fix them by parsing ELF headers, stop supporting this use case. It is still possible to pass modules.json to syz-cover.
Diffstat (limited to 'tools/syz-cover')
-rw-r--r--tools/syz-cover/syz-cover.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/syz-cover/syz-cover.go b/tools/syz-cover/syz-cover.go
index 4023f3e5b..ffecebf67 100644
--- a/tools/syz-cover/syz-cover.go
+++ b/tools/syz-cover/syz-cover.go
@@ -41,7 +41,7 @@ func main() {
var (
flagConfig = flag.String("config", "", "configuration file")
flagModules = flag.String("modules", "",
- "modules info obtained from /modules or file from /proc/modules (optional)")
+ "modules JSON info obtained from /modules (optional)")
flagExportCSV = flag.String("csv", "", "export coverage data in csv format (optional)")
flagExportLineJSON = flag.String("json", "", "export coverage data with source line info in json format (optional)")
flagExportHTML = flag.String("html", "", "save coverage HTML report to file (optional)")
@@ -150,8 +150,9 @@ func loadModules(fname string) ([]host.KernelModule, error) {
return nil, err
}
var modules []host.KernelModule
- if err := json.Unmarshal(data, &modules); err != nil {
- return host.ParseModulesText(data)
+ err = json.Unmarshal(data, &modules)
+ if err != nil {
+ return nil, err
}
return modules, nil
}