Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental helpers for calling kernel functions and writing to …
…memory These are highly-requested features that I didn't implement for awhile because I thought they would be too difficult or hacky. The approach that I finally came up with is slightly deranged but solid: we manually generate a kernel module ELF file and machine code to do a function call. An alternative approach that I tried was generating C source code for a kernel module and building it, but that relies on having kernel-devel and a compatible toolchain installed, and it's slow. (Kudos to Matthew Wilcox for suggesting the kernel module approach last year: https://lwn.net/Articles/953256/.) For now, this is under a new drgn.helpers.experimental package, in the drgn.helpers.experimental.kmodify module, with no stability guarantees, but we still have tests for it. Signed-off-by: Omar Sandoval <[email protected]>
- Loading branch information