Skip to content
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

How are the knowledge-v*.json files generated? #6

Closed
adrianherrera opened this issue Jan 22, 2024 · 4 comments
Closed

How are the knowledge-v*.json files generated? #6

adrianherrera opened this issue Jan 22, 2024 · 4 comments

Comments

@adrianherrera
Copy link

Hi there! Really great paper.

I wanted to understand how config/knowledge-5.12.json and config/knowledge-6.1.json are generated. How would I make new knowledge files if I wanted to port to other kernel versions? Are these automatically generated or manually written?

Any pointers would be greatly appreciated!

@ZHYfeng
Copy link
Collaborator

ZHYfeng commented Jan 23, 2024

Hi,

Those files currently are generated manually.

In most case, the knowledge is not changed. For example, 5.12 works for most 5.x versions.
You can test the knowledge file first on your target version. If it does not work well, some manually efforts are needed.

If you are working on latest Linux kernel and find the knowledge can not work well, you can open a issue for that and I can help when I am available.

In fact, I was trying to develop a tool to automatically update those files but I have not finished the tool.

@adrianherrera
Copy link
Author

adrianherrera commented Jan 23, 2024

Cool! Thanks for the reply. Currently, I am using a combination of grep on the .ll file (disassembled llvm) and weggli on the C source to check if anything is different with my target. I have found some slight differences in offsets, but more automation would be very helpful! Happy to help out and test if needed :)

@adrianherrera
Copy link
Author

Btw,

You can test the knowledge file first on your target version. If it does not work well, some manually efforts are needed.

How do you "test" this? Do you just look out the output syscall descriptors and check if they look reasonable?

@ZHYfeng
Copy link
Collaborator

ZHYfeng commented Jan 23, 2024

How do you "test" this? Do you just look out the output syscall descriptors and check if they look reasonable?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants