-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
syz-declextract: some assorted improvements #5491
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
dvyukov
commented
Nov 7, 2024
- sys/linux: regenerate const files
- tools/syz-declextract: fix header includes
- tools/syz-declextract: provoke non-determinism
- tools/syz-declextract: fix non-determinism and syscall selection
- tools/syz-declextract: restructure for better scalability
dvyukov
changed the title
dvyukov declextract some
syz-declextract: some assorted improvements
Nov 7, 2024
The additional includes we add must be at the top (added after sorting), because other kernel headers are broken and won't compile without these additional ones included first.
Provoke any non-determinism caused by file order early.
Currently syscall selection is non-deterministic and we frequently choose wrond ones. This leads to flaky argument names/types, and wrong argument types (e.g. int16 instead of uid, old_utimbuf32 instead of utimbuf, etc). Make syscall selection robust and correct.
Move AST matcher setup to each interface extractor. This keeps related things together.
Factor it out into a easier to use function, and improve encapsulation.
Currently we select one non-deterministic interfaces from all source files that produce it. This results in non-determinism, and limited set of files. Merge files/subsystems from all source files that produce it.
Currently we have a number of hacks to deal with unused bits: - remove some netlink syscalls if no policy union present - generate the huge union for unused policies - manually remove 1 struct But we still got more unused structs after recent changes. Properly remove all unused bits using the compiler knowledge. This is both simpler and more reliable.
dvyukov
force-pushed
the
dvyukov-declextract-some
branch
from
November 11, 2024 09:27
78a1cd1
to
8320ec3
Compare
tarasmadan
reviewed
Nov 11, 2024
tarasmadan
approved these changes
Nov 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.