Skip to content

Add buddy-contains - #182

Open
nirvanaK456 wants to merge 3 commits into
bata24:devfrom
nirvanaK456:add-buddy-contains
Open

Add buddy-contains#182
nirvanaK456 wants to merge 3 commits into
bata24:devfrom
nirvanaK456:add-buddy-contains

Conversation

@nirvanaK456

Copy link
Copy Markdown

Hey,

When dealing with cross cache related attacks i've more than once found myself parsing the output of buddy-dump, so what i usually do is run pageinfo on the page i'm interested in. However, if said page is in the PCP or has been merged into a block of order > 0, the struct page will not have the PG_BUDDY flag set, therefore i made this command in the same spirit as slab-contains.

The default mode parses the free-lists just like buddy-dump to find out if a given page is in the buddy or not.
One can use the -L option to skip the free-lists parsing, this mode only uses flags present in struct page it can detect whether a page is in the middle of a buddy block but it cannot find out if a page is in the PCP or not.

this is quite useful for me, i don't know if people would like to use it too.
If something needs refactoring or modifications i would be happy to do so.

PR

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.

1 participant