Skip to content

Commit

Permalink
Merge pull request #237 from IntelLabs/examples/dvkm
Browse files Browse the repository at this point in the history
add dvkm example
  • Loading branch information
Wenzel authored Oct 27, 2023
2 parents d1b43ec + d9999da commit c53c2d0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions deploy/intellabs/kafl/roles/examples/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
examples_url: https://github.com/IntelLabs/kafl.targets
examples_root: "{{ kafl_install_root }}/examples"

dvkm_sub_path: linux-user/dvkm/Damn_Vulnerable_Kernel_Module
linux_agent_sub_path: linux-user/linux_kafl_agent
15 changes: 15 additions & 0 deletions deploy/intellabs/kafl/roles/examples/tasks/dvkm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- name: Install required packages
ansible.builtin.apt:
# required for lddtree
name: pax-utils
become: true

- name: Clone required submodules
ansible.builtin.command: >-
"git submodule update --init --depth 200
--jobs {{ ansible_processor_nproc }}
{{ dvkm_sub_path }}
{{ linux_agent_sub_path }}"
# noqa: command-instead-of-module
args:
chdir: "{{ examples_root }}"
4 changes: 4 additions & 0 deletions deploy/intellabs/kafl/roles/examples/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
- name: Import template windows tasks
ansible.builtin.import_tasks: template_windows.yml
when: "'examples-template-windows' in ansible_run_tags"

- name: Import dvkm tasks
ansible.builtin.import_tasks: dvkm.yml
when: "'examples-linux-dvkm' in ansible_run_tags"
2 changes: 1 addition & 1 deletion docs/source/reference/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ They can be toggled or skipped with the [`--tags`](https://docs.ansible.com/ansi
| `build` | Selects all tasks where a component can be rebuild (`QEMU`, `libxdc`, etc ...). Developer oriented tag. |
| `clone` | Selects all tasks where a repository is cloned. Developer oriented tag. |
| `examples-template-windows` | Installs the required tooling to build the Windows template and run the examples. (Packer, Vagrant, agrant-plugins, qemu-bridge-helper, ...) |

| `examples-dvkm` | Installs the required packages and submodules to use the Damn Vulnerable Kernel Module linux example |

:::{note}
You can list available tags with
Expand Down

0 comments on commit c53c2d0

Please sign in to comment.