{"id":13593702,"url":"https://github.com/memflow/memflow-kvm","last_synced_at":"2025-04-09T05:32:00.234Z","repository":{"id":57637882,"uuid":"277848629","full_name":"memflow/memflow-kvm","owner":"memflow","description":"Linux kernel module for memflow's KVM connector","archived":false,"fork":false,"pushed_at":"2024-12-30T11:24:38.000Z","size":112,"stargazers_count":40,"open_issues_count":5,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-03T02:47:38.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-07T15:05:24.000Z","updated_at":"2025-02-13T03:19:18.000Z","dependencies_parsed_at":"2023-11-23T20:23:42.714Z","dependency_job_id":"364f10e8-11fc-480f-9bb6-1a548ed8b810","html_url":"https://github.com/memflow/memflow-kvm","commit_stats":{"total_commits":90,"total_committers":2,"mean_commits":45.0,"dds":0.1444444444444445,"last_synced_commit":"cbe416c7f8d644960a7d0dd72f5555b33cd56f4b"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memflow%2Fmemflow-kvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memflow%2Fmemflow-kvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memflow%2Fmemflow-kvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memflow%2Fmemflow-kvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memflow","download_url":"https://codeload.github.com/memflow/memflow-kvm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247986842,"owners_count":21028889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:01:23.328Z","updated_at":"2025-04-09T05:32:00.212Z","avatar_url":"https://github.com/memflow.png","language":"C","funding_links":[],"categories":["Exploitation Tools"],"sub_categories":["Unikernel-like"],"readme":"# memflow's KVM connector and its driver\n\nThis is a connector for Kernel based virtual machines, by using a driver that maps all KVM pages into the memflow process (userspace -\u003e userspace DMA).\n\n`memflow-kmod` includes the kernel module that performs the operations.\n\n`memflow-kvm-ioctl` provides a rust based IOCTL api to the kernel module.\n\n`memflow-kvm` provides a memflow physical memory connector that uses the ioctl.\n\n## Setup\n\n#### Connector\n\nRecommended way is to use [memflowup](https://github.com/memflow/memflowup).\n\n#### Kernel module\n\n**Your kernel must be compiled with `CONFIG_KALLSYMS=y`, and `CONFIG_KALLSYMS_ALL=y` being set in kconfig.**\n\nStable versions are available under [releases](https://github.com/memflow/memflow-kvm/releases).\n\nDebian/Ubuntu package can be installed with `sudo dpkg -i memflow-dkms_${VERSION}_amd64.deb`, where `VERSION` is the version of the downloaded module.\n\nFor other distributions, run this command:\n```\nsudo dkms install --archive=memflow-${VERSION}-source-only.dkms.tar.gz\n```\n\nIt might be necessary to also load the module at runtime:\n```\nsudo modprobe memflow\n```\n\nTo load the module at startup create a new file in `/etc/modules-load.d/`:\n```\n/etc/modules-load.d/memflow-kvm.conf\n---\n# Load memflow-kvm module on startup\nmemflow\n```\n\nThe simplest way to setup the kernel module is to create a new group called `memflow` and use a udev rule to set access rights to `/dev/memflow` automatically when the module is being loaded:\n\n```\ngroupadd memflow\nusermod -a -G memflow $USER\n```\n\nThen create the udev rule in `/etc/udev/rules.d/`:\n```\n/etc/udev/rules.d/99-memflow-kvm.rules\n---\nKERNEL==\"memflow\" SUBSYSTEM==\"misc\" GROUP=\"memflow\" MODE=\"0660\"\n```\n\n## Manual installation\n\n#### Connector\n\nInstall the connector using `cargo build --release --all-features`. This will compile the connector in release mode and place it under `target/release/` directory. Do copy out the underlying shared library to `~/.local/lib/memflow/` if you want to use it across other memflow tools.\n\n#### Kernel module\n\nInitialize submodules:\n\n```\ngit submodule update --init\n```\n\nRun `make`. output will be placed in `memflow-kmod/memflow.ko`.\n\nThen to install the module:\n```\nsource dkms.conf\n\nmkdir /usr/src/$BUILT_MODULE_NAME-$PACKAGE_VERSION\ncp -r * /usr/src/$BUILT_MODULE_NAME-$PACKAGE_VERSION\n\ndkms build -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION\n\ndkms install -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION\n```\n\nThen you can load the module:\n```\nsudo modprobe memflow\n```\n\n## FAQ\n\nQ. I'm getting this warning:\n\n```\nwarning: couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))\nwarning: set the LLVM_CONFIG_PATH environment variable to the full path to a valid `llvm-config` executable (including the executable itself)\n```\n\nA. This warning is harmless and can be safely ignored.\n\n## Licensing note\n\nWhile `memflow-kvm-ioctl`, and `memflow-kvm` are licensed under the `MIT` license, `memflow-kmod` is licensed only under `GPL-2`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemflow%2Fmemflow-kvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemflow%2Fmemflow-kvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemflow%2Fmemflow-kvm/lists"}