-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
all: add clean_rules config to help CleanPath for specific targets #5842
base: master
Are you sure you want to change the base?
Conversation
In some targets like android, we got addr2line info like: /proc/self/cwd/common/kernel/kcov.c:852 To cleanup the path, we need to remove /proc/self/cwd/ prefix, and add relative path to common directory, so we can have clean_rules like: "/proc/self/cwd/common:kernel_platform/common" More examples: "clean_rules" : [ "/proc/self/cwd/common/../vendor:vendor", "/proc/self/cwd/common/../soc-repo:kernel_platform/soc-repo", "/proc/self/cwd/vendor:vendor", "/proc/self/cwd/common:kernel_platform/common" ]
@a-nogikh there is no reviewer for the PR, can you check once? |
I'll take a closer look in a couple of days, somewhat short on time at the moment. |
We already have quite extensive path rewriting logic around here: syzkaller/pkg/cover/backend/dwarf.go Lines 553 to 611 in c6512ef
So syzkaller already trims Why wouldn't it work in your case? |
No, it won't work, here's my full cleanRules
as you can see there are different kinds of prefixes as in below from vmlinux, android gki modules and vendor modules.
Vendor/OEM android trees are different from AOSP one (there is no rule to say where to put kernel and oot module tree), like my KernelSrc is like /TOPDIR, android kernel is inside /TOPDIR/kernel_platform/common, soc-repo in /TOPDIR/kernel_platform/soc-repo and vendor (oot tree) in /TOPDIR/vendor. So these delimiters in the syzkaller code are not enough.
I think we need to allow a flexible way to cleanPath in config file for different build versions. |
In some targets like android, we got addr2line info like: /proc/self/cwd/common/kernel/kcov.c:852
To cleanup the path, we need to remove /proc/self/cwd/ prefix, and add relative path to common directory,
so we can have clean_rules like:
"/proc/self/cwd/common:kernel_platform/common"
More examples:
"clean_rules" : [
"/proc/self/cwd/common/../vendor:vendor",
"/proc/self/cwd/common/../soc-repo:kernel_platform/soc-repo",
"/proc/self/cwd/vendor:vendor",
"/proc/self/cwd/common:kernel_platform/common"
]
Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md