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

fuzzing: add allocator harnesses #148

Merged
merged 2 commits into from
Nov 20, 2023
Merged

Conversation

00xc
Copy link
Member

@00xc 00xc commented Nov 2, 2023

Add two fuzzing harnesses. One explicitly targets page allocation, while the other one targets the higher level SvsmAllocator API.

@00xc 00xc changed the title fuzzing: add page allocator fuzzer fuzzing: add allocator harnesses Nov 7, 2023
00xc added 2 commits November 14, 2023 12:30
Add a fuzzer for the page allocator, which will run a series of
semi-random actions like allocating, freeing, writing and reading
pages.

Signed-off-by: Carlos López <[email protected]>
Add a new fuzzing harness for the SvsmAllocator, which will perform
allocations will run a series of semi-random actions like allocating,
freeing and reading memory.

Unfortunately this requires access to the SvsmAllocator type, so it
needs to be public.

Signed-off-by: Carlos López <[email protected]>
inited.insert(page);
}
}
Action::AllocateFile => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_file_page() and put_file_page() can also be called for a wider coverage?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see they are already called when cloning and dropping a PageRef respectively. In fact have made those functions private in #149 as the reference count should not be directly manipulated.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. got it.

@joergroedel joergroedel merged commit 62eca0f into coconut-svsm:main Nov 20, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants